/* =============================================================================
   SAT — PRIVACY & LAW PAGE
   Authoritative, Trust-First Design System
   ---------------------------------------------------------------------------
   Design Goals:
   - Explain legal & ethical boundaries clearly
   - Earn trust of citizens, seniors, and youth
   - Match SAT Home page card quality
   - Zero HTML changes
   - Zoom safe (200–300%)
   - Dark-mode compatible
============================================================================= */


/* =============================================================================
   GLOBAL SAFETY RESET
============================================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.65;
    background: #f4f7fb;
    color: #0b1f3a;
}


/* =============================================================================
   ROOT VARIABLES (TRUST PALETTE)
============================================================================= */
:root {
    --bg-page: #f4f7fb;
    --bg-card: #ffffff;
    --bg-card-dark: #0f2445;

    --text-main: #0b1f3a;
    --text-soft: #444;
    --text-dark: #e8edf5;

    --accent-blue: #2f6fed;
    --accent-soft: #e6efff;

    --shadow-soft: 0 10px 30px rgba(0,0,0,0.08);
    --shadow-strong: 0 22px 60px rgba(0,0,0,0.14);
}


/* =============================================================================
   HERO SECTION (VIDEO — NO ZOOM, NO DISTRACTION)
============================================================================= */
.privacy-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Mobile viewport fix */
@supports (-webkit-touch-callout: none) {
    .privacy-hero {
        min-height: 100svh;
    }
}

/* Background video */
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;

    pointer-events: none;
    z-index: 0;

    filter: brightness(0.9) contrast(1.05);
}

/* iOS fallback */
@supports (-webkit-touch-callout: none) {
    .hero-video {
        display: none;
    }
    .privacy-hero {
        background: url("/static/images/privacy-poster.jpg") center / cover no-repeat;
    }
}

/* Overlay */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        rgba(8,18,36,0.55),
        rgba(8,18,36,0.75)
    );
    z-index: 1;
}

/* Hero content */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    padding: clamp(80px, 8vw, 120px) 20px;
    margin: 0 auto;
    color: #ffffff;
}


/* =============================================================================
   SECTION STRUCTURE
============================================================================= */
.privacy-section {
    padding: clamp(60px, 7vw, 100px) 20px;
    background: var(--bg-page);
}

/* Divider between major sections */
.privacy-section + .privacy-section {
    border-top: 1px solid rgba(0,0,0,0.06);
}


/* =============================================================================
   SECTION TITLE (ANCHOR BAR — TRUST STYLE)
============================================================================= */
.section-title {
    max-width: 1100px;
    margin: 0 auto 40px;
    padding: 18px 28px;

    background: linear-gradient(135deg, #0b1f3a, #0f2e5a);
    color: #ffffff;

    border-radius: 14px;
    text-align: center;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 700;
    letter-spacing: 0.4px;

    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255,255,255,0.05);
}


/* =============================================================================
   GRID SYSTEM (ZOOM SAFE)
============================================================================= */
.privacy-grid {
    max-width: 1200px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(28px, 4vw, 48px);
}


/* =============================================================================
   TRUST CARDS (CORE ELEMENT)
============================================================================= */
.privacy-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: clamp(28px, 3vw, 40px);

    text-align: center;
    box-shadow: var(--shadow-soft);

    display: flex;
    flex-direction: column;
    align-items: center;

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

/* Hover — desktop only, calm */
@media (hover: hover) {
    .privacy-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-strong);
    }
}

/* Active / focus — all devices */
.privacy-card:active,
.privacy-card:focus-within {
    background: var(--accent-soft);
}


/* =============================================================================
   ICON HANDLING (MEANING FIRST)
============================================================================= */
.privacy-card img {
    width: 64px;
    height: 64px;
    margin-bottom: 18px;
    object-fit: contain;
    opacity: 0.95;
}

/* Gentle emphasis */
.privacy-card:hover img {
    transform: scale(1.08);
    opacity: 1;
}


/* =============================================================================
   TEXT HIERARCHY (SENIOR FRIENDLY)
============================================================================= */
.privacy-card h3 {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.privacy-card .label {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 16px;

    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;

    background: #e4ebf6;
    color: #243a5e;
}

.privacy-card p {
    font-size: clamp(0.95rem, 1.6vw, 1rem);
    line-height: 1.75;
    letter-spacing: 0.2px;
    color: var(--text-soft);

    max-width: 34ch;
    margin: 0 auto;
}


/* =============================================================================
   DARK MODE SUPPORT
============================================================================= */
@media (prefers-color-scheme: dark) {

    body {
        background: #081526;
        color: var(--text-dark);
    }

    .privacy-card {
        background: var(--bg-card-dark);
    }

    .privacy-card h3 {
        color: var(--text-dark);
    }

    .privacy-card p {
        color: rgba(232,237,245,0.9);
    }

    .privacy-card:active,
    .privacy-card:focus-within {
        background: #1b3d73;
    }

    .section-title {
        background: linear-gradient(
            180deg,
            #020617,
            #020c1b
        );
        color: #e5e7eb;
    }
}


/* =============================================================================
   ACCESSIBILITY & MOTION SAFETY
============================================================================= */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}


/* =============================================================================
   FUTURE-SAFE GUARANTEE
============================================================================= */
.privacy-card * {
    max-width: 100%;
}

/* =============================================================================
   MOBILE OPTIMIZATIONS - Video Hero Fix
   ⚠️ FIXED: Now shows FULL video content like Canva preview
============================================================================= */

/* Tablet adjustments */
@media (max-width: 1024px) {
    .privacy-hero {
        min-height: 80vh;
    }
    
    .hero-content {
        padding: 60px 20px;
    }
}

/* Mobile - FIXED TO MATCH CANVA DISPLAY */
@media (max-width: 768px) {
    .privacy-hero {
        min-height: auto;  /* Let content dictate height */
        height: auto;
        overflow: hidden;  /* Prevent unwanted overflow */
        flex-direction: column;
        padding: 0;
        background: #0b1f3a;  /* Fallback background */
    }
    
    /* ✅ KEY FIX: Video now shows FULL content like in Canva */
    .hero-video {
        position: static;  /* Remove absolute positioning */
        width: 100%;
        height: auto;  /* Maintain aspect ratio */
        max-height: 65vh;  /* Prevent too tall */
        
        object-fit: contain;  /* CRITICAL: Shows full video, no cropping */
        object-position: center center;  /* Center the video */
        
        display: block;
        margin: 0;
        filter: brightness(0.85) contrast(1.05);  /* Slight darkening for text readability */
    }
    
    /* Overlay now works with static layout */
    .hero-overlay {
        position: static;  /* Changed from absolute */
        background: linear-gradient(
            180deg,
            rgba(8,18,36,0.7),
            rgba(8,18,36,0.9)
        );
        padding: 30px 0;
    }
    
    /* Text content below video */
    .hero-content {
        position: relative;
        z-index: 2;
        padding: 30px 20px;
        background: transparent;  /* Use overlay gradient instead */
        border-radius: 0;
        margin: 0;
        margin-top: -5px;  /* Slight overlap for seamless look */
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
        margin-bottom: 12px;
        line-height: 1.3;
        text-shadow: 0 2px 8px rgba(0,0,0,0.5);  /* Better readability */
    }
    
    .hero-content p {
        font-size: 0.9rem;
        line-height: 1.5;
        text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    }
}

/* Small mobile phones */
@media (max-width: 480px) {
    .privacy-hero {
        background: #0b1f3a;
    }
    
    .hero-video {
        max-height: 55vh;  /* Slightly shorter on small screens */
    }
    
    .hero-content {
        padding: 20px 15px;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 0.85rem;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .hero-video {
        max-height: 50vh;
    }
    
    .hero-content h1 {
        font-size: 1.3rem;
    }
    
    .hero-content p {
        font-size: 0.8rem;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {
        .privacy-hero {
            min-height: auto;
            background: #0b1f3a;
        }
        
        .hero-video {
            /* Ensure video displays properly on iOS */
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
        }
    }
}

/* Landscape mode on mobile - keep video visible */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
    .privacy-hero {
        min-height: auto;
    }
    
    .hero-video {
        max-height: 70vh;
        object-fit: contain;  /* Keep full content visible */
    }
    
    .hero-content {
        padding: 15px;
    }
    
    .hero-content h1 {
        font-size: 1.4rem;
    }
    
    .hero-content p {
        font-size: 0.85rem;
    }
}

/* =============================================================================
   END OF MOBILE OPTIMIZATIONS
============================================================================= */


/* =============================================================================
   EMERGENCY FIX - FORCE VIDEO TO SHOW FULL CONTENT
   Use this if the previous fix didn't work
============================================================================= */

/* =============================================================================
   STEP 1: ADD THIS CODE AT THE VERY END OF YOUR CSS FILE
   This uses !important to override any conflicting styles
============================================================================= */

/* Mobile - FORCED FIX with !important */
@media (max-width: 768px) {
    
    /* Force container to auto height */
    .privacy-hero {
        min-height: auto !important;
        height: auto !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #0b1f3a !important;
    }
    
    /* CRITICAL: Force video to show full content */
    .hero-video {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;  /* Remove any min-height */
        max-height: 65vh !important;
        
        /* THIS IS THE KEY - MUST BE CONTAIN */
        object-fit: contain !important;
        object-position: center center !important;
        
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        filter: brightness(0.85) contrast(1.05) !important;
        
        /* Remove any transforms or other effects */
        transform: none !important;
        transform-origin: center center !important;
    }
    
    /* Force overlay to static positioning */
    .hero-overlay {
        position: static !important;
        inset: auto !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        background: linear-gradient(
            180deg,
            rgba(8,18,36,0.7),
            rgba(8,18,36,0.9)
        ) !important;
        padding: 30px 0 !important;
        margin: 0 !important;
        display: block !important;
    }
    
    /* Force content to transparent background */
    .hero-content {
        position: relative !important;
        z-index: 2 !important;
        padding: 30px 20px !important;
        background: transparent !important;
        border-radius: 0 !important;
        margin: 0 !important;
        margin-top: -5px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .hero-content h1 {
        font-size: 1.8rem !important;
        margin-bottom: 12px !important;
        line-height: 1.3 !important;
        text-shadow: 0 2px 8px rgba(0,0,0,0.5) !important;
    }
    
    .hero-content p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        text-shadow: 0 1px 4px rgba(0,0,0,0.5) !important;
    }
}

/* Extra small phones */
@media (max-width: 480px) {
    .hero-video {
        max-height: 55vh !important;
    }
    
    .hero-content h1 {
        font-size: 1.5rem !important;
    }
    
    .hero-content p {
        font-size: 0.85rem !important;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .hero-video {
        max-height: 50vh !important;
    }
    
    .hero-content h1 {
        font-size: 1.3rem !important;
    }
}


/* =============================================================================
   IF ABOVE DOESN'T WORK - NUCLEAR OPTION
   Remove ALL existing mobile video code and use only this
============================================================================= */

/*
@media (max-width: 768px) {
    .privacy-hero * {
        position: static !important;
        transform: none !important;
    }
    
    .hero-video {
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        max-height: 60vh !important;
    }
}
*/
