/* ═══════════════════════════════════════════════════════════
   LEGAL PAGES — Privacy Policy, Terms of Use, Refund Policy
   Shared stylesheet for all legal/policy pages
   Color palette based on --msid-primary: #034694
   ═══════════════════════════════════════════════════════════ */

/* ── Animation Keyframes ── */
@keyframes legalFadeUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes legalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes legalSlideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes legalLineExpand {
    from { width: 0; }
    to { width: 48px; }
}

@keyframes legalDotPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* ── Hero Section ── */
.legal-hero {
    position: relative;
    padding: 12rem 0 5rem;
    background: #011a3a;
    background-image: url('../Images/AboutUs/About-Banner.png');
    background-size: cover;
    background-position: center right;
    overflow: hidden;
}

.legal-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(1, 26, 58, 0.93) 0%, rgba(3, 70, 148, 0.82) 50%, rgba(1, 26, 58, 0.90) 100%);
    pointer-events: none;
}

.legal-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.legal-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: legalFadeUp 0.6s ease forwards;
    animation-delay: 0.1s;
}

.legal-hero-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #5b9bd5;
    animation: legalDotPulse 2s ease-in-out infinite;
}

.legal-hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
    opacity: 0;
    animation: legalFadeUp 0.7s ease forwards;
    animation-delay: 0.25s;
}

.legal-hero-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: legalFadeUp 0.7s ease forwards;
    animation-delay: 0.4s;
}

.legal-hero-line {
    margin-top: 2rem;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    opacity: 0;
    animation: legalFadeIn 0.8s ease forwards;
    animation-delay: 0.55s;
}

.legal-hero-line::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    height: 1px;
    width: 0;
    background: linear-gradient(90deg, transparent, #5b9bd5, transparent);
    animation: legalLineExpand 0.8s ease forwards;
    animation-delay: 0.8s;
}

/* ── Main Content Body ── */
.legal-body {
    padding: 4rem 0 6rem;
    background: #fff;
    overflow: visible;
}

.legal-content-wrapper {
    display: flex;
    gap: 3.5rem;
    align-items: flex-start;
}

/* ── Sidebar Navigation ── */
.legal-sidebar {
    position: sticky;
    top: 120px;
    width: 260px;
    min-width: 260px;
    padding-right: 1.5rem;
    border-right: 1px solid #e8edf4;
    align-self: flex-start;
}

.legal-sidebar-title {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 1rem;
    font-weight: 600;
}

.legal-sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.legal-sidebar-nav li {
    margin-bottom: 2px;
}

.legal-sidebar-nav a {
    display: block;
    padding: 8px 14px;
    font-size: 0.85rem;
    color: #666;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.25s ease;
    line-height: 1.4;
}

.legal-sidebar-nav a:hover,
.legal-sidebar-nav a.active {
    color: #034694;
    background: rgba(3, 70, 148, 0.06);
}

/* ── Article Content ── */
.legal-article {
    flex: 1;
    min-width: 0;
}

.legal-section {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f3f8;
    /* Micro-animation: each section fades up when scrolled into view */
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.legal-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.legal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.legal-section-heading {
    font-size: 1.35rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 1rem;
    line-height: 1.35;
    letter-spacing: -0.01em;
    position: relative;
    padding-left: 18px;
}

.legal-section-heading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    width: 4px;
    height: 20px;
    border-radius: 4px;
    background: #034694;
}

.legal-section-subheading {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2a2a2a;
    margin: 1.5rem 0 0.75rem;
    line-height: 1.4;
}

.legal-section p {
    font-size: 0.95rem;
    line-height: 1.85;
    color: #4a4a4a;
    margin: 0 0 1rem;
}

.legal-section a {
    color: #034694;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease;
}

.legal-section a:hover {
    border-bottom-color: #034694;
}

/* ── Lists ── */
.legal-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.legal-list li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
    line-height: 1.75;
    color: #4a4a4a;
}

.legal-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #034694;
    opacity: 0.6;
}

/* ── Cookie Examples / Info Cards ── */
.legal-info-card {
    background: #f5f8fc;
    border: 1px solid #e0e8f3;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin: 1rem 0 1.5rem;
}

.legal-info-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
}

.legal-info-card strong {
    color: #2a2a2a;
}

/* ── Contact Card ── */
.legal-contact-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #f5f8fc 0%, #edf2f9 100%);
    border: 1px solid #dde5f0;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-top: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.legal-contact-card:hover {
    box-shadow: 0 4px 20px rgba(3, 70, 148, 0.08);
}

.legal-contact-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #034694;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.legal-contact-icon svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

.legal-contact-text {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

.legal-contact-text a {
    color: #034694;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease;
}

.legal-contact-text a:hover {
    border-bottom-color: #034694;
}

/* ── Cross-page Navigation Bar ── */
.legal-cross-nav {
    display: flex;
    gap: 2rem;
    padding: 2.5rem 0;
    border-top: 1px solid #e8edf4;
    margin-top: 3rem;
}

.legal-cross-nav-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: #f5f8fc;
    border: 1px solid #e0e8f3;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.legal-cross-nav-item:hover {
    background: #fff;
    border-color: rgba(3, 70, 148, 0.2);
    box-shadow: 0 4px 16px rgba(3, 70, 148, 0.06);
    transform: translateY(-2px);
}

.legal-cross-nav-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(3, 70, 148, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.3s ease;
}

.legal-cross-nav-item:hover .legal-cross-nav-icon {
    background: rgba(3, 70, 148, 0.12);
}

.legal-cross-nav-icon svg {
    width: 18px;
    height: 18px;
    color: #034694;
}

.legal-cross-nav-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #999;
    margin-bottom: 2px;
}

.legal-cross-nav-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
}

/* ── Effective Date Tag ── */
.legal-effective-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 2rem;
    padding: 5px 12px;
    background: #f5f8fc;
    border-radius: 6px;
}

.legal-effective-date svg {
    width: 14px;
    height: 14px;
    color: #aaa;
}

/* ── Responsive ── */
@media (max-width: 991px) {
    .legal-hero {
        padding: 10rem 0 3.5rem;
    }

    .legal-content-wrapper {
        flex-direction: column;
    }

    .legal-sidebar {
        position: relative;
        top: auto;
        width: 100%;
        min-width: 100%;
        border-right: none;
        border-bottom: 1px solid #e8edf4;
        padding-right: 0;
        padding-bottom: 1.5rem;
        margin-bottom: 1rem;
        align-self: auto;
    }

    .legal-sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .legal-sidebar-nav a {
        font-size: 0.8rem;
        padding: 6px 12px;
        white-space: nowrap;
    }

    .legal-cross-nav {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 767px) {
    .legal-hero {
        padding: 9rem 0 3rem;
    }

    .legal-hero h1 {
        font-size: 1.75rem;
    }

    .legal-body {
        padding: 2.5rem 0 4rem;
    }

    .legal-section-heading {
        font-size: 1.15rem;
    }

    .legal-contact-card {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
}

@media (max-width: 479px) {
    .legal-hero {
        padding: 8rem 0 2.5rem;
    }

    .legal-sidebar-nav {
        flex-direction: column;
    }

    .legal-sidebar-nav a {
        white-space: normal;
    }
}
