/* ===== ESG 永續管理頁專用樣式 esg.css =====
   放在 wwwroot/css/esg.css，由 Esg.cshtml 的 @section Styles 引入。
   不影響 site.css，可獨立維護。 */
.esg-scope {
    --ink: #07261F;
    --pine: #0E3B2E;
    --moss: #1C5D45;
    --living: #34D399;
    --gold: #F2C14E;
    --mist: #EAF3EE;
    --line: rgba(255,255,255,.14);
    --esg-display: "Fraunces",Georgia,serif;
}

    .esg-scope img {
        display: block;
        max-width: 100%
    }

.esg-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px,4vw,40px)
}

/* HERO */
.esg-hero {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    color: #fff;
    overflow: hidden;
    background: var(--ink)
}

.esg-hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1
}

.esg-hero__aurora {
    position: absolute;
    inset: -20%;
    z-index: 0;
    filter: blur(60px);
    opacity: .9;
    background: radial-gradient(40% 40% at 20% 30%, rgba(52,211,153,.55), transparent 60%), radial-gradient(35% 35% at 80% 25%, rgba(242,193,78,.40), transparent 60%), radial-gradient(45% 45% at 60% 80%, rgba(28,93,69,.85), transparent 60%);
    animation: esg-drift 18s ease-in-out infinite alternate
}

@keyframes esg-drift {
    0% {
        transform: translate3d(0,0,0) scale(1)
    }

    50% {
        transform: translate3d(3%,-2%,0) scale(1.1)
    }

    100% {
        transform: translate3d(-3%,2%,0) scale(1.05)
    }
}

.esg-hero__scrim {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg,rgba(7,38,31,.35),rgba(7,38,31,.55) 60%,rgba(7,38,31,.85))
}

.esg-hero__inner {
    position: relative;
    z-index: 3;
    padding: 120px 0
}

.esg-eyebrow {
    font-size: .8rem;
    letter-spacing: .32em;
    text-transform: uppercase;
    color: var(--living);
    font-weight: 600;
    margin: 0 0 18px
}

.esg-hero h1 {
    font-family: var(--esg-display);
    font-weight: 600;
    line-height: 1.05;
    font-size: clamp(2.4rem,6vw,4.6rem);
    margin: 0 0 22px;
    max-width: 16ch;
    text-wrap: balance
}

.esg-hero p, .esg-hero__subtitle {
    font-size: clamp(1rem,1.6vw,1.25rem);
    max-width: 46ch;
    color: rgba(255,255,255,.85);
    margin: 0 0 34px
}

    .esg-hero__subtitle p {
        margin: 0 0 .5em
    }

    .esg-hero__subtitle a {
        color: #fff;
        text-decoration: underline
    }

.esg-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px
}

.btn-esg {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    padding: 14px 26px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .25s,box-shadow .25s,background .25s
}

.btn-esg--solid {
    background: var(--living);
    color: #04241a;
    box-shadow: 0 10px 30px -8px rgba(52,211,153,.6)
}

.btn-esg--ghost {
    border: 1px solid var(--line);
    color: #fff;
    background: rgba(255,255,255,.04);
    backdrop-filter: blur(4px)
}

.btn-esg:hover {
    transform: translateY(-3px)
}

.btn-esg--solid:hover {
    box-shadow: 0 16px 38px -8px rgba(52,211,153,.75)
}

.esg-scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 3;
    transform: translateX(-50%);
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255,255,255,.5);
    border-radius: 14px
}

    .esg-scroll-cue::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 8px;
        width: 4px;
        height: 8px;
        border-radius: 2px;
        background: #fff;
        transform: translateX(-50%);
        animation: esg-cue 1.6s ease-in-out infinite
    }

@keyframes esg-cue {
    0%,100% {
        opacity: 0;
        transform: translate(-50%,0)
    }

    50% {
        opacity: 1;
        transform: translate(-50%,10px)
    }
}

.esg-reveal {
    opacity: 0;
    transform: translateY(24px);
    animation: esg-up .9s cubic-bezier(.2,.7,.2,1) forwards
}

    .esg-reveal.d1 {
        animation-delay: .1s
    }

    .esg-reveal.d2 {
        animation-delay: .25s
    }

    .esg-reveal.d3 {
        animation-delay: .4s
    }

@keyframes esg-up {
    to {
        opacity: 1;
        transform: none
    }
}

/* STATS */
.esg-stats {
    background: var(--mist);
    padding: clamp(48px,8vw,86px) 0
}

.esg-stats__grid {
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(auto-fit,minmax(200px,1fr))
}

.esg-stat {
    text-align: center
}

.esg-stat__num {
    font-family: var(--esg-display);
    font-weight: 700;
    font-size: clamp(2.4rem,5vw,3.6rem);
    line-height: 1;
    background: linear-gradient(120deg,var(--moss),var(--living));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent
}

.esg-stat__label {
    margin-top: 10px;
    color: #3a4d45;
    font-weight: 500
}

    .esg-stat__label::before {
        content: "";
        display: block;
        width: 36px;
        height: 3px;
        border-radius: 2px;
        margin: 0 auto 12px;
        background: linear-gradient(90deg,var(--moss),var(--living));
        opacity: .7
    }

/* SECTION HEAD */
.esg-section {
    padding: clamp(56px,9vw,110px) 0
}

.esg-section-head {
    text-align: center;
    max-width: 60ch;
    margin: 0 auto clamp(28px,5vw,52px)
}

    .esg-section-head .esg-eyebrow {
        color: var(--moss)
    }

    .esg-section-head h2 {
        font-family: var(--esg-display);
        font-size: clamp(1.8rem,4vw,2.8rem);
        margin: .2em 0 .3em;
        color: #0d2a22
    }

    .esg-section-head p {
        color: #4a5b53;
        margin: 0
    }

/* SLIDESHOW */
.esg-slideshow {
    position: relative;
    width: 100%;
    aspect-ratio: 16/7;
    min-height: 320px;
    border-radius: 20px;
    overflow: hidden;
    background: #0b3024;
    box-shadow: 0 30px 60px -24px rgba(7,38,31,.55)
}

.esg-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease
}

    .esg-slide.active {
        opacity: 1
    }

    .esg-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transform: scale(1.02)
    }

    .esg-slide.active img {
        animation: esg-ken 7s ease-out forwards
    }

@keyframes esg-ken {
    from {
        transform: scale(1.02)
    }

    to {
        transform: scale(1.16)
    }
}

.esg-slide__cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: clamp(20px,4vw,40px);
    color: #fff;
    background: linear-gradient(0deg,rgba(7,38,31,.85),transparent)
}

    .esg-slide__cap h3 {
        font-family: var(--esg-display);
        font-size: clamp(1.3rem,3vw,2rem);
        margin: 0 0 .3em
    }

    .esg-slide__cap p {
        margin: 0;
        color: rgba(255,255,255,.85);
        max-width: 50ch
    }

.esg-dots {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px
}

    .esg-dots button {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        border: 0;
        cursor: pointer;
        padding: 0;
        background: rgba(255,255,255,.45);
        transition: width .3s,background .3s
    }

        .esg-dots button.active {
            width: 28px;
            border-radius: 6px;
            background: var(--living)
        }

/* NEWS GRID */
.esg-grid {
    display: grid;
    gap: 26px;
    grid-template-columns: repeat(auto-fill,minmax(290px,1fr))
}

.esg-card {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e7eee9;
    box-shadow: 0 6px 18px -10px rgba(13,42,34,.25);
    transition: transform .4s cubic-bezier(.2,.7,.2,1),box-shadow .4s;
    opacity: 0;
    transform: translateY(30px)
}

    .esg-card.in {
        opacity: 1;
        transform: none
    }

    .esg-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 26px 50px -18px rgba(13,42,34,.4)
    }

    .esg-card a {
        text-decoration: none;
        color: inherit;
        display: block
    }

.esg-card__media {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    cursor: zoom-in;
    background: #cde0d6
}

    .esg-card__media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .7s cubic-bezier(.2,.7,.2,1)
    }

.esg-card:hover .esg-card__media img {
    transform: scale(1.12)
}

.esg-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,transparent 40%,rgba(7,38,31,.55));
    opacity: .55;
    transition: opacity .4s
}

.esg-card:hover .esg-card__media::after {
    opacity: .85
}

.esg-chip {
    position: absolute;
    z-index: 2;
    top: 14px;
    left: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: #04241a;
    background: var(--living)
}

.esg-card__body {
    padding: 20px 20px 24px
}

.esg-card__date {
    position: absolute;
    z-index: 2;
    top: 14px;
    right: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    background: rgba(255,255,255,.92);
    border-radius: 10px;
    padding: 8px 10px;
    text-align: center;
    box-shadow: 0 4px 12px -4px rgba(13,42,34,.3)
}

    .esg-card__date strong {
        font-family: var(--esg-display);
        font-size: 1.4rem;
        color: #11271f
    }

    .esg-card__date em {
        font-style: normal;
        font-size: .62rem;
        color: #7c8b83;
        letter-spacing: .04em;
        margin-top: 3px
    }

.esg-card__title {
    font-family: var(--esg-display);
    font-weight: 600;
    font-size: 1.22rem;
    margin: .35em 0 .5em;
    color: #11271f;
    line-height: 1.3
}

.esg-card__sum {
    color: #566;
    font-size: .94rem;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.esg-card__more {
    display: inline-flex;
    align-items: center;
    gap: .4em;
    margin-top: 14px;
    font-weight: 600;
    color: var(--moss);
    font-size: .9rem;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity .35s,transform .35s
}

.esg-card:hover .esg-card__more {
    opacity: 1;
    transform: none
}

/* LIGHTBOX */
.esg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: none;
    place-items: center;
    padding: 24px;
    background: rgba(4,18,14,.82);
    backdrop-filter: blur(8px);
    cursor: zoom-out
}

    .esg-lightbox.open {
        display: grid;
        animation: esg-fade .3s ease
    }

@keyframes esg-fade {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.esg-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: 12px;
    box-shadow: 0 40px 80px -20px rgba(0,0,0,.7);
    animation: esg-pop .35s cubic-bezier(.2,.8,.2,1)
}

@keyframes esg-pop {
    from {
        transform: scale(.92);
        opacity: 0
    }

    to {
        transform: scale(1);
        opacity: 1
    }
}

.esg-lightbox__close {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 2rem;
    color: #fff;
    background: none;
    border: 0;
    cursor: pointer;
    line-height: 1
}

/* REDUCED MOTION — 尊重使用者降低動態偏好 */
@media (prefers-reduced-motion:reduce) {
    .esg-hero__aurora, .esg-scroll-cue::after {
        animation: none
    }

    .esg-slide img, .esg-slide.active img {
        animation: none;
        transform: none
    }

    .esg-slide {
        transition: opacity .01s
    }

    .esg-reveal {
        animation: none;
        opacity: 1;
        transform: none
    }

    .esg-card {
        opacity: 1;
        transform: none;
        transition: box-shadow .2s
    }

        .esg-card:hover {
            transform: none
        }

            .esg-card:hover .esg-card__media img {
                transform: none
            }
}

/* ===== 三支柱 E/S/G 分頁 ===== */
.esg-pillars__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 36px
}

.esg-pill-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 12px 28px;
    border: 1px solid #d6e3db;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    color: #1c5d45;
    transition: background .3s,color .3s,box-shadow .3s,border-color .3s
}

    .esg-pill-tab span {
        font-size: .68rem;
        letter-spacing: .14em;
        text-transform: uppercase;
        color: #9bb0a6;
        font-weight: 500
    }

    .esg-pill-tab.active {
        background: linear-gradient(120deg,var(--moss),var(--living));
        color: #fff;
        border-color: transparent;
        box-shadow: 0 14px 28px -10px rgba(28,93,69,.55)
    }

        .esg-pill-tab.active span {
            color: rgba(255,255,255,.82)
        }

.esg-pill-panel {
    display: none
}

    .esg-pill-panel.active {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 44px;
        align-items: center;
        animation: esg-fade .5s ease
    }

.esg-pill-panel__media {
    aspect-ratio: 4/3;
    border-radius: 18px;
    overflow: hidden;
    background: #cde0d6;
    cursor: zoom-in;
    box-shadow: 0 24px 50px -22px rgba(7,38,31,.5)
}

    .esg-pill-panel__media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .7s cubic-bezier(.2,.7,.2,1)
    }

    .esg-pill-panel__media:hover img {
        transform: scale(1.08)
    }

.esg-pill-panel__body h3 {
    font-family: var(--esg-display);
    font-size: clamp(1.5rem,3vw,2.2rem);
    color: #0d2a22;
    margin: 0 0 .45em
}

.esg-pill-panel__body > p {
    color: #4a5b53;
    margin: 0 0 26px;
    max-width: 46ch
}

.esg-pill-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 26px
}

.esg-pill-stat {
    display: flex;
    flex-direction: column
}

    .esg-pill-stat .num {
        font-family: var(--esg-display);
        font-weight: 700;
        font-size: 1.9rem;
        line-height: 1;
        background: linear-gradient(120deg,var(--moss),var(--living));
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent
    }

    .esg-pill-stat .lbl {
        font-size: .84rem;
        color: #7c8b83;
        margin-top: 6px
    }

.esg-pill-more {
    display: inline-flex;
    align-items: center;
    gap: .4em;
    font-weight: 600;
    color: var(--moss);
    text-decoration: none
}

    .esg-pill-more:hover {
        gap: .7em
    }

@media (max-width:768px) {
    .esg-pill-panel.active {
        grid-template-columns: 1fr;
        gap: 24px
    }

    .esg-pill-tab {
        padding: 10px 18px
    }
}

/* ===== 區塊捲動進場 ===== */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s cubic-bezier(.2,.7,.2,1),transform .7s cubic-bezier(.2,.7,.2,1)
}

    [data-reveal].in {
        opacity: 1;
        transform: none
    }

@media (prefers-reduced-motion:reduce) {
    [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none
    }

    .esg-pill-panel.active {
        animation: none
    }
}
