/* ==========================================================================
   About Us & Our Legacy Section Styles (css/about-legacy.css)
   ========================================================================== */

.about-legacy-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* --- ABOUT US SECTION --- */
.about-us-section {
    background-color: #ffffff;
    position: relative;
    padding: 80px 20px 120px 20px;
}

.about-bg-illustration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.about-us-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* About Logo Column */
.about-logo-col {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-logo-img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 320px;
}

.about-logo-placeholder {
    width: 100%;
    max-width: 280px;
}

/* About Text Column */
.about-heading {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e3a8a; /* Deep blue title matching design */
    margin: 0 0 20px 0;
}

.about-body p {
    font-size: 0.98rem;
    color: #334155;
    line-height: 1.7;
    margin: 0 0 24px 0;
}

.about-accent-line {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 280px;
}

.line-yellow {
    height: 4px;
    background-color: #facc15;
    border-radius: 2px;
}

.line-blue {
    height: 4px;
    background-color: #2563eb;
    border-radius: 2px;
    width: 65%;
}

/* Curved Section Wave Dividers */
.section-wave-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    line-height: 0;
    z-index: 3;
}

.section-wave-divider svg {
    width: 100%;
    height: 80px;
}

/* --- OUR LEGACY SECTION --- */
.our-legacy-section {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #ffffff;
    position: relative;
    padding: 100px 20px 140px 20px;
}

.legacy-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* Legacy Text Column */
.legacy-heading {
    font-size: 2.5rem;
    font-weight: 800;
    color: #facc15; /* Yellow title matching reference */
    margin: 0 0 24px 0;
}

.legacy-paragraph {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Legacy Cards Column */
.legacy-cards-col {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
}

.legacy-card {
    width: 220px;
    height: 340px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
}

.legacy-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.legacy-card:hover img {
    transform: scale(1.05);
}

.card-low {
    transform: translateY(40px);
}

.card-high {
    transform: translateY(-20px);
}

.section-wave-divider-bottom {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    line-height: 0;
}

.section-wave-divider-bottom svg {
    width: 100%;
    height: 60px;
}

/* ==========================================================================
   Responsive Adjustments (Mobile & Tablet)
   ========================================================================== */

@media (max-width: 991px) {
    .about-us-container {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .about-accent-line {
        margin: 0 auto;
    }

    .legacy-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .legacy-cards-col {
        justify-content: center;
    }

    .legacy-card {
        width: 160px;
        height: 260px;
    }

    .card-low, .card-high {
        transform: none; /* Align cards side-by-side on smaller screens */
    }
}

/* ==========================================
   About & Legacy Animations & Layout
========================================== */

/* Accent Line Expansion Animation */
.about-accent-line {
    display: flex;
    gap: 6px;
    margin-top: 20px;
    height: 4px;
    width: 0; /* Starts collapsed */
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.animate-on-scroll.is-visible .about-accent-line {
    width: 140px; /* Expands when scrolled into view */
}

.line-yellow {
    flex: 1;
    background: #eab308;
    border-radius: 2px;
}

.line-blue {
    flex: 2;
    background: #1e40af;
    border-radius: 2px;
}

/* Floating Card Base Styles */
.legacy-cards-col {
    position: relative;
    display: flex;
    gap: 20px;
}

.legacy-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
                box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.legacy-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.legacy-card:hover img {
    transform: scale(1.08); /* Soft image zoom on hover */
}

.legacy-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.45);
}

/* Subtly offset floating keyframe animation for cards */
.card-low {
    transform: translateY(20px);
    animation: floatLow 8s ease-in-out infinite alternate;
}

.card-high {
    transform: translateY(-20px);
    animation: floatHigh 8s ease-in-out infinite alternate 1s;
}

@keyframes floatLow {
    0% { transform: translateY(20px); }
    100% { transform: translateY(8px); }
}

@keyframes floatHigh {
    0% { transform: translateY(-20px); }
    100% { transform: translateY(-32px); }
}

/* ==========================================
   Scroll-Triggered Entry Animations
========================================== */

.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

/* Directional Starts */
.animate-on-scroll.fade-left {
    transform: translateX(-80px);
}

.animate-on-scroll.fade-right {
    transform: translateX(80px);
}

.animate-on-scroll.fade-up {
    transform: translateY(80px);
}

/* Active State (Triggered by JS Observer) */
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}