html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    background-color: #F6F9FC;
}

.esg-logo-espa {
    display: flex;
    align-items: center;
    justify-content: start;
    gap:3rem;
}
.header-espa {
    width: 400px;
}

@media (max-width:1575px) {
    .esg-logo-espa {
        flex-direction: column;
        align-items: start;
        gap:1rem;
    }
    .header-espa {
        margin-right: 1rem;
        width: 150px;
    }
}

.environment-content > * ,
.environment-1 > * ,
.environment-1-2 > * ,
.environment-2 > * ,
.governance-content > *,
.governance-1 > *,
.governance-2 > *{ min-width: 0; }

header {
    width: 80%;
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin:auto;
    border-bottom: 1px solid #E2E5E8;
    border-color: #E2E5E8;
    height: 8.125rem;
    padding: 0 1.25rem 1.25rem 1.25rem;
    position: sticky;
    top:0;
    background-color: #F6F9FC;
    z-index: 9999;
}

nav {
    display:flex;
    justify-content: center;
    align-items: end;
    flex-direction: column;
}

nav>div:first-of-type{
    display:flex;
    gap:1rem;
    justify-content: center;
    align-items: center;
}
.enimerwsi-btn{
    display: inline-block;
    text-decoration: none;
    color: #014D7C;
    font-weight:800;
    transition: all 0.3s ease;
}

.enimerwsi-btn:hover {
    color: #00AD62;
    text-decoration: underline;
    
}

.cityon-esg {
    width: 80%;
    margin: auto;
    padding-bottom: 120px;
}

.environment, .society, .governance {
    width: 90%;
    margin:auto;
    padding-top: 3.75rem;
}

.environment-content, .governance-content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2.5rem;
    align-items: stretch;
}

.environment-1 {
    display: grid;
    grid-template-rows:auto auto;
    gap: 2.5rem;
}

.energy-grid{
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 1fr);
    gap: 28px;
    align-items: end;
    min-width: 0;
}

.energy-legend{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.energy-legend .item{
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap:10px;
}
.energy-legend .sw{
    width:13px;
    height:13px;
    border-radius:4px;
    flex: none;
}
.energy-legend .lbl{
    font-size:10px;
    color:#313131;
    font-weight:300;
}

.environment-1-2 { 
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2.5rem;
}

.span-3 {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: start;
}

.record-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 20px;
    margin-bottom: 25px;
}
.environment-2 {
    display: grid;
    grid-template-rows: auto auto;
    row-gap: 2.5rem;  
}

canvas{ 
    width:100%; 
    height:100%;
    display:block;
}

h3 {
    color: #000000;
    margin: 0;
}
small {
    margin: 0;
}

.select-wrap{
    position: relative;
    display: inline-block;
}

.select-wrap select{
    appearance: none;
    -webkit-appearance: none; 
    -moz-appearance: none;
    font: inherit;
    color: #000000;
    background-color: #d4effa;
    border: 1px solid #4CADDB;
    border-radius: 10px;
    padding: 3px 28px 3px 10px;
    cursor: pointer;
    height: 30px;
}

.select-wrap::after{
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 7px solid #313131;
}

.select-wrap select:focus{
    outline: none;
    border-color: #4CADDB;
    box-shadow: 0 0 0 3px rgba(16,185,129,.2);
}

.select-wrap select:disabled{
    opacity: .6;
    cursor: not-allowed;
}

.card {
    background-color: #FFFFFF;
    border-radius: 10px;
    border: 1px solid #EFEFF4;
    padding: 1.25rem 1.44rem 1.35rem 1.7rem;
}
.card-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.canvas-wrap{
    margin-top: 20px;
    position:relative;
    max-height: 17.2rem;
}

.legend{
    font-size:10px;
    color:#313131;
}

.recycling-wrap {
    max-height: 10.2rem;
    margin-top: 20px;
}

.air-quality-wrap {
    max-height: 8.75rem;
    display: flex;
    justify-content: end;
    width: 100%;
}

.span-4 {
    display: flex;
    justify-content: space-between;
    align-items: start;
    flex-direction: column;
}

.co-wrap {
    max-height: 12rem;
}
.pill{
    display:inline-block;
    padding:4px 20px;
    background:#22c55e;
    color:#000000;
    border-radius:999px;
    font-weight:700;
    font-size:13px;
    margin-top: 10px;
}

.record-value{
    line-height: 1;
    font-weight: 900;
    display: inline-flex;
    align-items: baseline;
}

.record-value #recycling-record{
    font-size: 54px;
    color: #1AC17E;
}

.record-value .kg{
    font-size: 24px;
    font-weight: bolder;
    color: #19504D;
}


.society-content {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
    align-items: stretch;
}

.sports-wrap {
    margin-top: 20px;
    position:relative;
    height: 220px;
}

.dual-kpis{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 2.5rem;
}

.muted{
    color:#666666;
    font-size: 12px;
}

.kpi-value{
    font-size: 55px;
    font-weight: bolder;
    color:#1AC17E;
    line-height:1;
}

.ce-list{
    display: grid;
    gap: 16px;
    margin-top: 1.75rem;
}

.ce-item-head{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ce-item-head .label{
    color: #666666;
    font-size: 11px;
}
.ce-item-head .pct{
    font-weight: 800;
    color:#313131;
    font-size: 14px;
}


.ce-track{
    height: 13px;
    background: #E7ECEC;
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.ce-fill{
    position: absolute;
    left:0;
    top:0;
    bottom:0;
    width: 0%;
    background: #60B099;
    border-radius: inherit;
}

.sports-wrap.small-ish{
    max-height: 220px;
}

.span-8, .span-5 {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.governance-1{
    display: grid;
    gap: 2.5rem;
}
.governance-2{
    display: grid;
    grid-template-rows: auto auto;
    gap: 2.5rem;
}


.progress-wrap{
    position: relative;
    width: 100%;
    height: 50px;
    border-radius: 9999px;
    background: #66666633;
    overflow: hidden;
}
.span-9 {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    align-items: start;
}

.span-11 {
    height: fit-content;
    position: relative;
}
.progress-wrap::before{
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
        to right,
        #FFFFFF 0 1px,
        transparent 1px calc(5%)   /* 100/20 = 5% */
        );
    pointer-events: none;
    height: 16px;
    z-index: 2;
    margin: auto;
    width: 90%;
}

.progress-wrap::after{
    content: "100%";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    padding: 4px 8px;
    border-radius: 9999px;
    font-weight: 800;
    font-size: 13px;
    color: #666666;
    z-index: 3;
    background-color: #adadad;
}

.progress-fill{
    position: absolute;
    left: 0; 
    top: 0; 
    bottom: 0;
    width: 0%;
    background: linear-gradient(98deg,#16C377,#4DACDE);
    border-radius: inherit;
    transition: width .6s ease;
    z-index: 1;
}

.kpi-grid{
    display:grid;
    grid-template-columns: repeat(3,1fr);
    margin-top: 50px;
    margin-bottom: 30px;
}

.kpi-title{
    font-weight:700;
    font-size: 14px;
    color: #313131;
}

.kpi-sub{
    color:#666666;
    font-size:12px;
    margin-bottom:6px;
}

.kpi-value{
    font-size: 55px;
    font-weight:800;
    color:#1AC17E;
    line-height:1;
    margin-top: 30px;
}


.donut-grid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 33px;
    align-items: end;
    margin-top: 40px;
}

.donut-wrap .canvas{
    max-height: 250px;
}
.donut-legend{
    display:flex;
    flex-direction:column;
    gap:25px;
    justify-content:center;
}

.donut-legend .cap{
    color:#666666;
    font-size:12px;
    margin-bottom:17px;
}

.donut-legend .val{
    font-size:32px;
    font-weight:900;
    line-height:1;
}

.donut-legend .val.green{
    color:#1AC17E;
}

.donut-legend .val.amber{
    color:#F5AC37;
}


.map-wrap{
    position: relative;
    margin-top: 30px;
    border-radius: 16px;
    overflow: hidden;
    height: 235px;
    background: #FFFFFF;
}

.span-11-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}
.leaflet-map{ width:100%; height:100%; }

/* Custom pins (διπλός κύκλος) */
.pin{
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: rgb(60, 200, 144, 0.58);
    position: relative;
}
.pin::after{
    content: "";
    position: absolute;
    inset: 11px;
    border-radius: 999px;
    background: #19504E;/* εσωτερικός κύκλος */
}

.cluster-pin{
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #19504E;
    color: #FFFFFF;
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 20px;
    position: relative;
    border: 0; /* χωρίς border */
    box-shadow: 0 0 0 6px rgb(60, 200, 144, 0.58);
}

/*πλήθος έργων δεξιά πανώ */
.map-badge{
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #19504E;
    color: #ffffff;
    display:grid;
    place-items:center;
    font-weight: 800;
    font-size: 16px;
}

/* Custom zoom */
.map-zoom{
    position: absolute;
    left: 12px;
    top: 12px; display:
    grid; gap:
    8px;
    z-index: 500;
}

.map-zoom .btn{
    width: 26px;
    height: 26px;
    cursor: pointer;
}

/* Απόκκρυψη default zoom του Leaflet*/
.leaflet-control-zoom{
    display: none;
}


.single-page {
    width: 80%;
    margin:auto;
    min-height: 80vh;
}

footer {
    padding: 1rem 0;
    background-color: #FFFFFF;
    text-align: center;
    bottom:0;
}

footer p {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #343434;
}

footer a{
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: #343434;
    gap:8px;
    margin-left: 5px;
}

footer a:hover{
    text-decoration: underline;
}
footer p a img {
    vertical-align: middle;
}
@media (max-width:900px){
    nav>div:first-of-type{
        flex-direction: column;
        gap:1rem;
        align-items: end;
    }

    header {
        align-items: center;
        height: fit-content;
        padding: 1.5rem 0 1.25rem 0;
    }
}

@media (max-width:750px){
    .environment-1-2 { 
        grid-template-columns: minmax(0, 1fr);
    }

    .kpi-grid{
        grid-template-columns: minmax(0, 1fr);
    }

    .kpi-value{
        margin-top: 10px;
        margin-bottom: 40px;
    }
}

@media (max-width:1100px){

    .energy-grid{
        grid-template-columns: minmax(0, 1fr);
    }

    .energy-legend{ 
        order: 2;
        flex-direction: row;
        gap: 12px;
        overflow-x: hidden;
        padding-bottom: 4px;
        justify-content: end;
    }
    
    .environment-content, .governance-content {
        grid-template-columns: 1fr;
    }

    .progress-wrap {
        margin-top: 60px;
    }
    .society-content {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}


@media (max-width:1400px){

    header {
        width: 90%;
    }

    .cityon-esg {
        width: 90%;
    }

    .environment, .society, .governance {
        width: 100%;
    }

}

.not-found {
    height: 80vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.not-found-container {
    text-align: center;
    height: fit-content;
    width: fit-content;
}

.not-found-btn {
    color:#33AB80;
    font-weight: 800;
    cursor: pointer;
}

.not-found-btn:hover {
    color:#19504D;
} 



.language-toggle {
    display: inline-flex;
    border: 1px solid #4CADDB;
    border-radius: 20px;
    overflow: hidden;
}

.language-toggle .lang-btn {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    color: #222222;
    background: #f2f2f2;
    transition: all 0.2s ease;
}

.language-toggle .lang-btn.active {
    background: #d4effa;
}



/*esg add data modal form*/
.add-esg-btn {
    font: inherit;
    font-size:14px;
    color: #000000;
    background-color: #d4effa;
    border: 1px solid #4CADDB;
    border-radius: 10px;
    padding: 2px 10px;
    cursor: pointer;
    text-wrap: nowrap;
    height: 30px;
}

.esg-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 10001;
    overflow-y: auto;
}

.esg-modal.is-open {
    display: block;
}

.esg-modal-backdrop {
    position: fixed;
    width: 100%;
    background: rgba(0,0,0,0.45);
    height: 100%;
}

.esg-modal-dialog {
    position: relative;
    width: min(760px, 80%);
    margin: 160px auto;
    background: #F6F9FC;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    z-index: 2;
}

.esg-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.esg-modal-close {
    border: none;
    background: transparent;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
}

.esg-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    overflow: hidden;
}

.esg-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.esg-form-field small {
    margin-left:10px;
}



.esg-form-field label {
    font-weight: 700;
    font-size: 14px;
    margin-left: 10px;
}

.esg-form-field input,
.esg-form-field select {
    border: 1px solid #d0d7de;
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
}

.esg-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.esg-cancel-btn,
.esg-submit-btn {
    border-radius: 10px;
    padding: 10px 16px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.esg-cancel-btn {
    border: 1px solid #c9d1d9;
    background: #fff;
    color: #222;
    transition: background-color 0.3s ease;
}

.esg-cancel-btn:hover {
    background-color: #d6d6d6
}
.esg-submit-btn {
    background-color: #1AC17E;
    color: #fff;
    transition: background-color 0.3s ease;
    border: none;
}

.esg-submit-btn:hover {
    background: #268059;
}

.esg-form-message {
    margin-top: 16px;
    margin-left: 10px;
    font-size: 14px;
}

.esg-form-message.success {
    color: #0a7a43;
}

.esg-form-message.error {
    color: #c62828;
}

@media (max-width: 650px) {
    .esg-form-grid {
        grid-template-columns: 1fr;
    }
}