/* ============================================
   SECTION 3: STRATEGIC ADVISORY LAYER
   White background — tonal shift from dark navy
   Grid: Animated canvas, #224d78 at ~4% opacity
   Same InfrastructureGrid class as Sections 1-2
   Typography: Cormorant Garamond headings, Telegraf body
   ============================================ */

/* --- Six Caps Font Import --- */
@font-face {
    font-family: 'Six Caps';
    src: url('../added-assets/six-caps.regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* --- Telegraf Bold Font Import --- */
@font-face {
    font-family: 'Telegraf';
    src: url('../telegraf/Telegraf%20UltraBold%20800.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* --- Section wrapper --- */
.advisory-section {
    background: #f7f5ee;
    position: relative;
    z-index: 2;
    padding: 100px 2rem 80px;
    overflow: hidden;
}

/* --- Section-local animated canvas grid --- */
.advisory-section__grid {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* --- Centered container --- */
.advisory-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}


/* ============================================
   A) TWO-COLUMN HERO — 40% left / 60% right
   ============================================ */

.advisory-hero {
    display: grid;
    grid-template-columns: 1.5fr 2.5fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 60px;
}

/* LEFT column — body content, vertically centered */
.advisory-hero__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.25rem;
    padding-top: 0;
}

.advisory-hero__body {
    font-family: 'Telegraf', 'Inter', sans-serif;
    font-size: 0.95rem;
    color: #4c6786;
    line-height: 1.65;
    margin: 0;
    text-align: right;
    font-weight: 400;
}

.advisory-hero__body--bold {
    font-family: 'Telegraf', 'Inter', sans-serif;
    font-weight: 700;
    font-variation-settings: 'wght' 700;
}

/* RIGHT column — heading moved here, sits above card swap */
.advisory-hero__heading {
    font-family: 'Six Caps', sans-serif;
    font-weight: 400;
    font-size: clamp(5rem, 7.5vw, 7.5rem);
    color: #db4a2b;
    line-height: 0.9;
    margin: -2.5rem 0 2rem 0;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
    text-align: center;
}

/* RIGHT column: Heading + Card Swap area */
.advisory-hero__cards {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 0;
}


/* ============================================
   CARD SWAP — ReactBits-style 3D animated stack
   ============================================ */

.card-swap-container {
    position: relative;
    width: 100%;
    height: 420px;
    margin-top: 1.5rem;
    perspective: 900px;
    overflow: visible;
}

.card-swap-card {
    position: absolute;
    top: 35%;
    left: 50%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transform-style: preserve-3d;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.25rem 2rem;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* --- Card inner content --- */
.card-swap-card__title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.2;
    margin: 0 0 0.5rem 0;
    color: inherit;
}

.card-swap-card__subline {
    font-family: 'Telegraf', 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.55;
    margin: 0;
    opacity: 0.75;
    color: inherit;
}

.card-swap-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1.5rem;
}

.card-swap-card__meta {
    font-family: 'Telegraf', 'Inter', sans-serif;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.5;
    color: inherit;
}

/* Download button — visible on hover */
.card-swap-card__download {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: 'Telegraf', 'Inter', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: inherit;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    pointer-events: none;
}

.card-swap-card__download svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.card-swap-card:hover .card-swap-card__download {
    opacity: 0.85;
    transform: translateY(0);
    pointer-events: auto;
    cursor: pointer;
}

/* Color theme overrides */
.card-swap-card--red {
    background: #db4a2b;
    color: #ffffff;
}

.card-swap-card--navy {
    background: #224d78;
    color: #ffffff;
}

.card-swap-card--cream {
    background: #f4ebd0;
    color: #0a2f52;
    border-color: rgba(10, 47, 82, 0.1);
}


/* ============================================
   B) SERVICES BLOCK — "Core Advisory Services"
   ============================================ */

.advisory-services {
    margin-top: 0;
}

.advisory-services__heading {
    font-family: 'Six Caps', sans-serif;
    font-weight: 400;
    font-size: clamp(5rem, 7.5vw, 7.5rem);
    color: #0a2f52;
    margin: 0 0 3rem 0;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 0.9;
}

/* Service groups container */
.advisory-services-container {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* Individual service group */
.advisory-service-group {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.advisory-service-group__title {
    font-family: 'Telegraf', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #ff6105;
    margin: 0;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1;
}

.advisory-service-group__subline {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: 0.98rem;
    color: #0a2f52;
    opacity: 1;
    line-height: 1.4;
    margin: 6px 0 0 0;
}

/* Card grid - 3 columns */
.advisory-service-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

/* Individual service item card - Glass morphism with 3D effect */
.advisory-service-item {
    background-color: transparent;
    border: none;
    border-radius: 12px;
    padding: 0;
    min-height: 80px;
    position: relative;
    perspective: 600px;
    transform-style: preserve-3d;
    cursor: pointer;
    transition: none;
}

.advisory-service-item__back,
.advisory-service-item__front {
    border-radius: 12px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s cubic-bezier(0.83, 0, 0.17, 1),
                transform 0.3s cubic-bezier(0.83, 0, 0.17, 1);
}

.advisory-service-item__back {
    background: linear-gradient(135deg, rgba(10, 47, 82, 0.05), rgba(10, 47, 82, 0.02));
    box-shadow: 0 2px 8px rgba(10, 47, 82, 0.04);
    display: block;
    transform: rotate(2deg);
    transform-origin: 100% 100%;
    will-change: transform;
    z-index: 0;
}

.advisory-service-item__front {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3) inset,
                0 2px 8px rgba(10, 47, 82, 0.04);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    -moz-backdrop-filter: blur(20px) saturate(180%);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 1.25rem 1.5rem;
    transform-origin: 80% 50%;
    will-change: transform;
    z-index: 1;
    border-left: 3px solid rgba(10, 47, 82, 0.15);
}

.advisory-service-item__text {
    font-family: 'Telegraf', 'Inter', sans-serif;
    font-size: 0.83rem;
    font-weight: 400;
    color: #0a2f52;
    line-height: 1.5;
    margin: 0;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* Hover effects */
.advisory-service-item:hover .advisory-service-item__back {
    transform: rotate(3deg) translate3d(-0.15em, -0.15em, 0.15em);
}

.advisory-service-item:hover .advisory-service-item__front {
    transform: translate3d(0, 0, 0.5em);
    background: rgba(255, 255, 255, 0.3);
    border-left-color: rgba(10, 47, 82, 0.25);
}

/* Entrance animation target */
.advisory-animate {
    opacity: 0;
    transform: translateY(30px);
}


/* ============================================
   SCOPED FOOTER OVERRIDE
   Only applies when .advisory-section precedes .site-footer
   Does NOT affect about.html or publications.html
   ============================================ */

.advisory-section ~ .site-footer {
    background: #f7f5ee;
    border-top: 1px solid rgba(10, 47, 82, 0.06);
    padding: 2rem 2rem 1.5rem;
}

.advisory-section ~ .site-footer .footer-byline {
    color: #0a2f52;
    opacity: 0.4;
}

.advisory-section ~ .site-footer .footer-links {
    color: #0a2f52;
    opacity: 0.35;
}

.advisory-section ~ .site-footer .footer-links a {
    color: #0a2f52;
}

.advisory-section ~ .site-footer .footer-links a:hover {
    opacity: 0.8;
}

.advisory-section ~ .site-footer .footer-links .separator {
    color: #0a2f52;
    opacity: 0.2;
}


/* ============================================
   RESPONSIVE — Tablet (<=1200px)
   ============================================ */

@media (max-width: 1200px) {
    .advisory-section {
        padding: 80px 2rem 60px;
    }

    .advisory-hero {
        gap: 30px;
        margin-bottom: 50px;
    }

    .advisory-hero__heading {
        font-size: clamp(5.625rem, 6.875vw, 6.875rem);
    }

    .advisory-hero__body {
        font-size: 0.9rem;
        text-align: right;
    }

    .card-swap-container {
        height: 380px;
    }

    .advisory-services__heading {
        font-size: clamp(5.625rem, 6.875vw, 6.875rem);
    }

    .advisory-services-container {
        gap: 50px;
    }

    .advisory-service-items {
        gap: 14px;
    }
}


/* ============================================
   RESPONSIVE — Mobile (<=768px)
   ============================================ */

@media (max-width: 768px) {
    .advisory-section {
        padding: 60px 1rem 50px;
    }

    .advisory-hero {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 50px;
        align-items: start;
    }

    .advisory-hero__text {
        order: 2;
    }

    .advisory-hero__cards {
        order: 1;
        padding-bottom: 80px;
    }

    .advisory-hero__heading {
        font-size: 4.375rem;
        white-space: normal;
    }

    .advisory-hero__body {
        font-size: 0.85rem;
        text-align: right;
    }

    .card-swap-container {
        height: 260px;
    }

    .card-swap-card {
        padding: 1.5rem 1.25rem;
    }

    .card-swap-card__title {
        font-size: 1.2rem;
    }

    .card-swap-card__subline {
        font-size: 0.75rem;
    }

    .advisory-services-container {
        gap: 40px;
    }

    .advisory-service-items {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .advisory-services__heading {
        font-size: 4.375rem;
        margin-bottom: 1.5rem;
    }

    .advisory-service-group__title {
        font-size: 0.875rem;
    }

    .advisory-service-group__subline {
        font-size: 0.85rem;
    }

    .advisory-service-item {
        min-height: 70px;
    }

    .advisory-service-item__front {
        padding: 1rem 1.25rem;
    }

    .advisory-service-item__text {
        font-size: 0.7rem;
    }
}


/* ============================================
   RESPONSIVE — Small phone (<=480px)
   ============================================ */

@media (max-width: 480px) {
    .advisory-section {
        padding: 50px 0.75rem 40px;
    }

    .advisory-hero {
        gap: 20px;
        margin-bottom: 40px;
    }

    .advisory-hero__heading {
        font-size: 3rem;
        white-space: normal;
    }

    .advisory-hero__body {
        font-size: 0.8rem;
        text-align: left;
        line-height: 1.75;
    }

    .card-swap-container {
        height: 220px;
    }

    .card-swap-card {
        padding: 1.25rem 1rem;
        max-width: calc(100vw - 3rem);
        overflow: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .card-swap-card__title {
        font-size: 1rem;
        line-height: 1.25;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .card-swap-card__subline {
        font-size: 0.65rem;
        line-height: 1.45;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .card-swap-card__footer {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .card-swap-card__meta {
        font-size: 0.625rem;
    }

    .advisory-hero__cards {
        padding-top: 15px;
    }

    .advisory-services-container {
        gap: 35px;
    }

    .advisory-services__heading {
        font-size: 3rem;
        margin-bottom: 1.25rem;
    }

    .advisory-service-group__title {
        font-size: 0.75rem;
        line-height: 1.35;
    }

    .advisory-service-group__subline {
        font-size: 0.75rem;
        line-height: 1.5;
    }

    .advisory-service-item {
        min-height: 65px;
    }

    .advisory-service-item__front {
        padding: 0.875rem 1rem;
    }

    .advisory-service-item__text {
        font-size: 0.67rem;
    }
}


/* ============================================
   RESPONSIVE — Mobile landscape
   ============================================ */

@media (max-width: 768px) and (orientation: landscape) {
    .advisory-section {
        padding: 60px 1.5rem 50px;
    }

    .advisory-hero {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        align-items: center;
    }

    .advisory-hero__text {
        order: 0;
    }

    .advisory-hero__cards {
        order: 0;
    }

    .advisory-service-items {
        grid-template-columns: repeat(2, 1fr);
    }
}
