.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 {
        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;
    pointer-events: none;
}

.hero-svg {
    transform: rotate(-1deg);
    margin-inline-end: -160%;
}

.hero-content {
    position: relative;
    z-index: 10;

    >img {
        position: absolute;
        top: -7%;
        left: -7%;
        width: 75%;
        height: 120%;
        z-index: -1;
    }
}

.hero-actions {
    display: flex;
    gap: 16px;
}

#heroMainSubsection {
    margin-block: var(--margin-top, 0) var(--margin-bottom, calc(var(--section-padding-block) / 3));
}

.expertise-section .section-subtitle {
    color: var(--text-secondary);
}

.expertise-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.expertise-nav {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-bottom: 1px solid rgba(197, 168, 128, 0.2);
}

.expertise-nav::-webkit-scrollbar {
    display: none;
}

.expertise-nav-btn {
    padding: 0 0 4px;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color 0.25s, border-color 0.25s;
    text-transform: uppercase;
}

.expertise-nav-btn:hover {
    color: var(--primary-color);
}

.expertise-nav-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--accent-gold);
}

.expertise-scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 2rem;
    padding-bottom: 1rem;
    scrollbar-width: none;
    /* Firefox */
}

.expertise-scroll-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.expertise-item {
    flex: 0 0 100%;
    scroll-snap-align: center;
    display: flex;
    justify-content: center;
}

.expertise-card {
    background-color: var(--bg-light);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    text-align: left;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.expertise-card-content {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.expertise-card-image-wrapper {
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    position: relative;
}

.expertise-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.expertise-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Make card content non-selectable and pass pointer events to the container for smooth dragging */
.expertise-card {
    user-select: none;
    -webkit-user-select: none;
}

.expertise-card * {
    pointer-events: none;
}

/* Allow interaction with the CTA button */
.expertise-card .expertise-card-btn,
.expertise-card .expertise-card-btn * {
    pointer-events: auto;
}

.expertise-icon {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.expertise-card-approach {
    margin-bottom: 2rem;
}

.expertise-card-approach h4 {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.expertise-card-approach-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.expertise-card-approach-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.expertise-card-approach-list li i {
    color: var(--accent-gold);
}

/* Responsive */
@media (max-width: 992px) {
    .expertise-nav {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        scroll-snap-type: x mandatory;
    }

    .expertise-nav-btn {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .expertise-card {
        grid-template-columns: 1fr;
    }

    .expertise-card-image-wrapper {
        height: 250px;
    }

    .expertise-card-content {
        padding: 2rem;
    }
}

/* Dynamic View Logic for Expertise Page */
.hero-section .breadcrumb-nav [data-target]:not(.active),
.hero-section .section-title [data-target]:not(.active),
.hero-section .section-subtitle [data-target]:not(.active),
#expertise-details [data-target]:not(.active),
.heritage-cta-desc [data-target]:not(.active),
.main-section-bg > section[data-target]:not(.active) {
    display: none !important;
}

/* Isolate text colors for expertise-overview when placed inside hero-section */
#expertise-overview {
    color: var(--text-primary);
    padding-bottom: calc(var(--section-padding-block) - 1rem);
}
#expertise-overview .section-title {
    color: var(--primary-color);
}
#expertise-overview .section-subtitle {
    color: var(--text-secondary);
}
#expertise-overview .expertise-nav-btn {
    color: rgba(255, 255, 255, 0.7);
}
#expertise-overview .expertise-nav-btn.active {
    color: #ffffff;
}
#expertise-overview .expertise-card {
    border: #ffffff;
}
/* PDF Paper Strip for Expertise */
.pdf-paper {
    position: relative;
    border-radius: 8px;
    border: 1px solid rgba(13, 27, 42, 0.08);
    background-color: var(--bg-white);
}
.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: 8px;
}
.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;
    flex-shrink: 0;
}
.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;
}
.history-desc {
    padding: 24px;
    height: max-content;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid rgba(13, 27, 42, 0.08);
}
.history-desc .section-subtitle {
    color: var(--text-secondary);
}

.history-desc table {
    table-layout: fixed;
    width: 100%;
}

.history-desc table td:first-child,
.history-desc table th:first-child {
    width: 50%;
}
@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;
    }
}

.history-desc-section {
    background-color: #d4ac4b10;
}

.fee-schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--text-primary);
    border: 1px solid rgba(13, 27, 42, 0.1);
}
.fee-schedule-table th, .fee-schedule-table td {
    padding: 12px 16px;
    border: 1px solid rgba(13, 27, 42, 0.1);
}
.fee-schedule-table th {
    background-color: rgba(197, 168, 128, 0.1);
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
}
.fee-schedule-table .table-main-header {
    text-align: center;
    font-size: 0.95rem;
    padding: 16px;
}
.fee-schedule-table .table-sub-header {
    text-align: center;
    background-color: rgba(13, 27, 42, 0.03);
    font-size: 0.9rem;
}
.fee-schedule-table .table-section-row td {
    background-color: rgba(13, 27, 42, 0.02);
    text-align: center;
    padding: 16px;
}
.fee-schedule-table td:nth-child(2) {
    width: 40%;
}

.history-desc-section .grid-2 {
    grid-template-columns: 0.9fr 2.1fr;
    gap: 4px;
    align-items: start;
}

.pdf-paper-scene {
    position: sticky;
    top: 100px;
}

.main-section-bg {
    padding-top: 0;
}

.main-section-bg.default-view {
    padding-top: 3rem;
}

/* Heritage CTA Section */
.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%);
    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);
}

/* Analyse et Recherche Grid */
.analyse-buttons-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.analyse-button {
    border-radius: 8px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease, background-image 0.2s ease;
    overflow: hidden; /* Contains the hero-section ::before grid pattern */
}

.analyse-button:hover {
    background-image: none; /* Override section-bg-dark gradient */
    background-color: #162a3f;
    transform: translateY(-4px);
}

.analyse-button-icon {
    color: var(--accent-gold);
    font-size: 28px;
    flex-shrink: 0;
}

.analyse-button-content {
    display: flex;
    flex-direction: column;
}

.analyse-button-title {
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 4px;
    font-family: var(
    --font-body);
    text-transform: uppercase;
}

.analyse-button-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.analyse-button-arrow {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.3s ease, border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
    flex-shrink: 0;
}

.analyse-button-arrow i {
    font-size: 15px;
}

.analyse-button:hover .analyse-button-arrow {
    border-color: rgba(232, 197, 106, 0.5);
    color: var(--accent-gold);
    background: rgba(232, 197, 106, 0.08);
    transform: rotate(45deg);
}

.analyse-button-pdf {
    width: 34px;
    height: 48px;
    flex-shrink: 0;
    perspective: 400px;
    margin-right: 4px;
}

.analyse-button-pdf .pdf-paper {
    width: 100%;
    height: 100%;
    animation: none;
    transform: rotate(4deg) rotateX(4deg);
    transition: transform 0.2s ease;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    background: #fff;
    border: none;
}

.analyse-button:hover .analyse-button-pdf .pdf-paper {
    transform: rotate(0) rotateX(0) translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.analyse-button-pdf .pdf-img-strip {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 4px;
}

.analyse-button-pdf .pdf-img-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 2-page side-by-side layout for large PDF viewer */
.pdf-img-strip-2x {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    aspect-ratio: 420 / 297 !important;
    width: 100%;
}

.pdf-img-strip-2x img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 210 / 297 !important;
}

/* Larger PDF scene wrapper */
.pdf-scene-large {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

/* Download button for PDF scene */
.pdf-dl-btn {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.4rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    z-index: 10;
}

.pdf-dl-btn:hover {
    background: var(--accent-gold);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(232, 197, 106, 0.5);
    color: #fff;
}

@media (max-width: 992px) {
    .analyse-buttons-grid {
        grid-template-columns: 1fr;
    }
}