/* ----- Page Hero ----- */
.hero-section {
    overflow: visible;
    position: relative;
    padding-bottom: 0;

    &::before {
        content: '';
        position: absolute;
        inset: 0;
        pointer-events: none;
        background-image:
            linear-gradient(rgba(197, 168, 128, .04) 1px, transparent 1px),
            linear-gradient(90deg, rgba(197, 168, 128, .04) 1px, transparent 1px);
        background-size: 60px 60px;
    }

    & .container {
        grid-template-columns: 1fr 2fr;
        position: relative;
    }

    & .section-title [data-lang="en"] {
        display: inline-block;
        max-width: 23ch;
    }
}

.hero-orb-1 {
    position: absolute;
    top: 20%;
    right: 5%;
    width: 400px;
    height: 400px;
    background: rgba(197, 168, 128, 0.15);
    filter: blur(100px);
    border-radius: 50%;
    z-index: 0;
}

/* ----- Hero Stats ----- */
.portfolio-hero-stats {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
    padding-block: 12px 46px;
    margin-top: 16px;
    border-top: 1px solid #e8c56a33;
}

.stat-block .stat-number {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--accent-gold);
    line-height: 1;
    display: block;
}

.stat-block .stat-label {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-top: 5px;
    display: block;
}

.val-mds {
    font-size: 1.5rem;
    opacity: .65;
}

.stat-plus,
.stat-minus {
    font-size: 2.8rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .portfolio-hero-stats {
        gap: 28px;
    }

    .stat-block .stat-number {
        font-size: 2rem;
    }

    .val-mds {
        font-size: 1.1rem;
    }

    .stat-plus,
    .stat-minus {
        font-size: 2rem;
    }
}

.history-desc {
    padding: 24px;
    margin-block: 60px;
    transition-delay: 0.2s;
    height: max-content;
    position: sticky;
    bottom: 0px;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid rgba(13, 27, 42, 0.08);
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.history-desc:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(13, 27, 42, 0.10), 0 2px 8px rgba(13, 27, 42, 0.05);
    border-color: rgba(232, 197, 106, 0.35);
}

.history-desc p {
    color: var(--text-secondary);
}

/*  Paper-on-table image viewer — COSUMAF pages */
/* ── Perspective scene ───────────────── */
.pdf-paper-scene {
    perspective: 1200px;
    padding: 24px 16px 40px;
}

/* ── Tilted paper shell ──────────────── */
.pdf-paper {
    position: relative;
    border-radius: 3px;
    transform-style: preserve-3d;
    transform-origin: center bottom;
    will-change: transform, box-shadow;
    transition:
        transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.5s ease;
    box-shadow:
        4px 8px 0px 0px rgba(0, 0, 0, 0.18),
        8px 20px 24px -4px rgba(0, 0, 0, 0.30),
        12px 40px 60px -8px rgba(13, 27, 42, 0.22);
    opacity: 0;
    translate: 0 20px;
}

.pdf-paper.is-visible {
    opacity: 1;
    translate: 0 0;
    transform: rotate(2.5deg) rotateX(2deg);
    animation: pdf-float 7s ease-in-out 0.5s infinite;
}

@keyframes pdf-float {

    0%,
    100% {
        transform: rotate(2.5deg) rotateX(2deg) translateY(0px);
        box-shadow:
            4px 8px 0px 0px rgba(0, 0, 0, 0.18),
            8px 20px 24px -4px rgba(0, 0, 0, 0.30),
            12px 40px 60px -8px rgba(13, 27, 42, 0.22);
    }

    50% {
        transform: rotate(2.2deg) rotateX(1.5deg) translateY(-7px);
        box-shadow:
            4px 14px 4px 0px rgba(0, 0, 0, 0.14),
            8px 28px 32px -2px rgba(0, 0, 0, 0.24),
            14px 52px 72px -4px rgba(13, 27, 42, 0.18);
    }
}

.pdf-paper:hover {
    animation-play-state: paused;
    transform: rotate(0.4deg) rotateX(0.5deg) translateY(-6px);
    box-shadow:
        2px 4px 0px 0px rgba(0, 0, 0, 0.12),
        6px 24px 36px -4px rgba(0, 0, 0, 0.22),
        10px 48px 80px -6px rgba(13, 27, 42, 0.16);
}

/* ── Snap-scroll image strip ─────────── */
.pdf-img-strip {
    background-color: var(--bg-white);
    width: 100%;
    aspect-ratio: 210 / 297;
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    border-radius: 0 0 3px 3px;
}

/* Between 480 px and 992 px: show 2 pages side-by-side */
@media (min-width: 480px) and (max-width: 992px) {
    .pdf-img-strip {
        display: grid;
        grid-template-columns: 1fr 1fr;
        aspect-ratio: 420 / 297;
    }
}

@media (max-width: 992px) {
    .pdf-paper-scene {
        margin-right: 16px;
    }
}

.pdf-img-strip::-webkit-scrollbar {
    display: none;
}

.pdf-img-strip img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 210 / 297;
    scroll-snap-align: start;
    /* Each image = exactly one "page" */
    flex-shrink: 0;
}

/* ── Page counter badge ──────────────── */
.pdf-page-badge {
    position: absolute;
    top: 10px;
    right: 12px;
    background: rgba(13, 27, 42, 0.72);
    backdrop-filter: blur(6px);
    color: var(--accent-gold);
    font-family: 'Inter', sans-serif;
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .1em;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(197, 168, 128, .25);
    z-index: 3;
    pointer-events: none;
    user-select: none;
}

.pdf-paper-caption {
    border-left: 2px solid var(--accent-gold);
    padding-left: 16px;
}

.pdf-paper-caption h1 {
    font-size: 1.4rem;
    font-weight: 700;
    padding-block: 0;
}



.pdf-paper-caption p {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-block: 0;
}

/* ── Grid: always 10 columns, 1 rows ── */
.mosaic-section {
    position: relative;
    overflow: hidden;
}

.mosaic-grid {
    display: flex;
    width: max-content;
    animation: scroll-marquee 30s linear infinite;
}

.mosaic-grid:hover {
    animation-play-state: paused;
}

@keyframes scroll-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── Flip card shell ── */
.fc-wrap {
    width: 10vw;
    aspect-ratio: 1 / 1;
    perspective: 900px;
    flex-shrink: 0;
}

.fc-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform .65s cubic-bezier(.45, .05, .55, .95);
}

/* Flip on hover — pure CSS */
.fc-wrap:hover .fc-inner {
    transform: rotateY(180deg);
}

/* ── Front & back shared ── */
.fc-front,
.fc-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #0d1b2a22;
}

/* Front: dark card + logo */
.fc-front {
    background-color: var(--bg-white);
    padding: 14%;
    transition: border-color .3s;
}

.fc-front img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(var(--logo-scale, 1));
}

/* Back: partner photo */
.fc-back {
    transform: rotateY(180deg);
}

.fc-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mosaic-section p {
    color: var(--primary-color);
    padding: 16px;
    width: max-content;
    height: max-content;
    text-align: end;
    background-color: #ffffffe6;
    border-radius: 4px;
    font-size: 0.8rem;
}

.section-title-container {
    padding: 16px;
    width: max-content;
    background-color: #ffffffe6;
    border-radius: 4px;
}

.mosaic-section > .container {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    z-index: 10;
    pointer-events: none;
    text-shadow: 0 4px 20px #fff, 0 2px 8px #fff;
}

/* ----- PV Section Styles (copied from index.html / hero-index.css) ----- */
.pv-header {
    margin-bottom: 48px;
}

.pv-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
}

.pv-card {
    border: 1px solid rgba(184, 152, 58, 0.12);
    border-radius: 8px;
    padding: 16px 16px 18px;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    background-color: #fff;
}

.pv-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(13, 27, 42, 0.10), 0 2px 8px rgba(13, 27, 42, 0.05);
    border-color: rgba(232, 197, 106, 0.35);
}

.pv-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 9px;
    margin-bottom: 14px;
}

.pv-card-title {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: .07em;
    line-height: 1.4;
    font-size: .9rem;
    margin: 0;
}

.pv-card-icon {
    flex-shrink: 0;
    color: var(--accent-gold);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pv-divider {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 18px;
}

.pv-divider::before {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, #b8983a 0%, #e8c56a 60%, rgba(184, 152, 58, .15) 100%);
}

.pv-divider-dots {
    display: flex;
    gap: 5px;
}

.pv-divider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #b8983a;
}

.pv-divider-dot:nth-child(2) {
    opacity: .5;
}

.pv-divider-dot:nth-child(3) {
    opacity: .2;
}

.pv-card-body {
    line-height: 1.72;
    margin: 0;
}

.pv-section .section-subtitle {
    padding-block: 0;
    color: var(--text-secondary);
}

.pv-section-container {
    background-color: #d4ac4b10;
}

@media (max-width: 992px) {
    .pv-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .pv-grid {
        grid-template-columns: 1fr;
    }
}

main.section {
    padding-block: 0;
}

/* Heritage CTA Section (matches portfolio-total-banner) */
.heritage-cta-section {
    padding-top: 0;
}

.heritage-cta-section .container {
    border-radius: 16px;
    padding: 40px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
    background-color: #ffffff;
    border: 1px solid rgba(13, 27, 42, 0.08);
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.heritage-cta-section .container:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(13, 27, 42, 0.10), 0 2px 8px rgba(13, 27, 42, 0.05);
    border-color: rgba(232, 197, 106, 0.35);
}

.heritage-cta-section .container::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgb(197 168 128 / 8%); /* Slightly darker for white bg */
    pointer-events: none;
}

.heritage-cta-content {
    max-width: 680px;
    z-index: 1;
}

.heritage-cta-title {
    font-size: clamp(2rem, 3vw, 2.5rem);
    margin-bottom: 12px;
    font-family: var(--font-heading);
    color: var(--primary-color);
}

.heritage-cta-desc {
    color: var(--text-secondary);
    font-size:0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.heritage-cta-actions {
    z-index: 1;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .heritage-cta-section .container {
        flex-direction: column;
        align-items: flex-start;
        padding: 32px 24px;
    }
    .heritage-cta-actions {
        margin-top: 16px;
    }
}

.heritage-cta-inline-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.3s ease;
}

.heritage-cta-inline-link:hover {
    color: var(--accent-gold);
}

/* Sector Cards Overlay Styles */
.sector-card {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-color: #111;
}
.sector-card .sector-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.5s ease;
}
.sector-card:hover .sector-image {
    transform: scale(1.05);
}
.sector-card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0) 100%);
    z-index: 2;
}
.sector-card-content {
    position: relative;
    z-index: 3;
    padding: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}
.sector-card-title {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: .07em;
    line-height: 1.4;
    font-size: .65rem;
    margin: 0;
    color: #fff;
}
.sector-card-icon {
    flex-shrink: 0;
    color: var(--accent-gold);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sector-section {
    margin-top: calc(var(--section-padding-block) / 2);
}
