/* ===================================
   MUNI Metro Modernization Project
   Professional Slide Presentation
   =================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    /* MUNI/SF Transit Colors */
    --muni-red: #E31937;
    --muni-orange: #F05A28;
    --muni-blue: #0075BF;
    --muni-green: #00A651;
    --muni-purple: #8B5BA8;
    --muni-yellow: #FFD700;
    
    /* Route Colors */
    --j-church: #F05A28;
    --k-ingleside: #5B7F95;
    --l-ocean: #8B5BA8;
    --m-market: #00A651;
    --n-judah: #0075BF;
    --t-third: #E31937;
    
    /* Neutral Colors */
    --dark: #1a1a1a;
    --gray-dark: #333333;
    --gray: #666666;
    --gray-light: #999999;
    --gray-lighter: #e0e0e0;
    --white: #ffffff;
    --bg-light: #f8f9fa;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    height: auto;
    color: var(--dark);
    line-height: 1.6;
    scroll-behavior: smooth;
    /* space for fixed hamburger bar */
    padding-top: 84px;
}

/* ===================================
   Slides Container (Single-page Scroll)
   =================================== */

.slides-container {
    width: 100%;
    height: auto;
    position: relative;
    display: block;
    /* tighter vertical rhythm (less dead space between cards) */
    padding: 10px 0 34px;
}

.slide {
    position: relative;
    width: min(1200px, 92vw);
    margin: 14px auto;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    opacity: 1;
    transform: none;
    pointer-events: auto;
    overflow: hidden;
    scroll-margin-top: 104px; /* offset for fixed nav */
}

/* Each slide should feel like a page */
.slide-content {
    /* slightly shorter pages + less vertical padding */
    padding: var(--spacing-lg);
    min-height: 68vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Pull the first card up closer to the divider */
.slide:first-of-type {
    margin-top: 4px;
}

/* Reduce the gap specifically between the hero and the next card */
.slide[data-slide="1"] {
    margin-bottom: 10px;
}

/* Remove legacy "active slide" behavior (not used in scroll mode) */
.slide.active {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}


/* ===================================
   Typography
   =================================== */

h1, h2, h3 {
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: 3.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    color: var(--gray-dark);
}

h3 {
    font-size: 1.5rem;
    color: var(--gray-dark);
}

p {
    font-size: 1.1rem;
    color: var(--gray);
    line-height: 1.7;
}

/* ===================================
   Title Slide (Slide 1)
   =================================== */

.title-slide {
    text-align: center;
    justify-content: center;
    background: transparent;color: var(--white);
    border-radius: 20px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Full-bleed photographic backgrounds for the image-based slides */
.slide[data-slide="1"] {
    /* Hero: video background with readability overlay */
    background: linear-gradient(rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.30));
}
.slide[data-slide="2"] .slide-content,
.slide[data-slide="5"] .slide-content,
.slide[data-slide="14"] .slide-content {
    /* keep text blocks readable while the slide itself carries the image */
    background: transparent;
}

.slide[data-slide="2"] {
    background: linear-gradient(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.28)),
                url('../images/muni-station-platform.jpg') center center / cover no-repeat;
}

.slide[data-slide="5"] {
    background: linear-gradient(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.28)),
                url('../images/historic-streetcar.jpg') center center / cover no-repeat;
}

.slide[data-slide="14"] {
    background: linear-gradient(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.28)),
                url('../images/sf-transit-center.jpg') center center / cover no-repeat;
}

/* Ensure text remains white on photo backgrounds */
.slide[data-slide="1"] .slide-content,
.slide[data-slide="2"] .slide-content,
.slide[data-slide="5"] .slide-content,
.slide[data-slide="14"] .slide-content {
    color: var(--white);
}


.main-title {
    font-size: 4rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: var(--spacing-md);
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    margin-bottom: var(--spacing-lg);
}

.muni-logo {
    font-size: 5rem;
    color: var(--white);
    opacity: 0.9;
    margin-top: var(--spacing-lg);
}

/* ===================================
   Section Title Slides
   =================================== */

.section-title-slide {
    text-align: center;
    justify-content: center;
    background: transparent;border-radius: 20px;
    color: var(--white);
}

.section-title {
    font-size: 4rem;
    color: var(--white);
    font-weight: 800;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* ===================================
   Info Cards Grid (Slide 3)
   =================================== */

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.info-card {
    background: var(--bg-light);
    padding: var(--spacing-md);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    margin-bottom: var(--spacing-sm);
}

.icon-circle.orange { background: var(--muni-orange); }
.icon-circle.red { background: var(--muni-red); }
.icon-circle.blue { background: var(--muni-blue); }
.icon-circle.gray { background: var(--gray); }

.info-card p {
    font-size: 1rem;
    line-height: 1.6;
}

/* ===================================
   Slide 3 Decorative Elements
   =================================== */

.slide-3-enhanced {
    position: relative;
    overflow: hidden;
}

.decorative-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.decorative-header h2 {
    margin: 0;
    white-space: nowrap;
}

.header-line {
    flex: 1;
    height: 3px;
    background: linear-gradient(90deg, var(--muni-orange), var(--muni-red), var(--muni-blue));
    border-radius: 2px;
}

.card-animated {
    position: relative;
    animation: cardFloat 3s ease-in-out infinite;
}

.card-animated:nth-child(1) { animation-delay: 0s; }
.card-animated:nth-child(2) { animation-delay: 0.2s; }
.card-animated:nth-child(3) { animation-delay: 0.4s; }
.card-animated:nth-child(4) { animation-delay: 0.6s; }

@keyframes cardFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.card-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid;
}

.card-corner.top-left {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
    border-color: var(--muni-blue);
}

.card-corner.top-right {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
    border-color: var(--muni-orange);
}

.card-corner.bottom-left {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
    border-color: var(--muni-red);
}

.card-corner.bottom-right {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
    border-color: var(--muni-purple);
}

.card-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 0 0 8px 8px;
}

.orange-accent { background: var(--muni-orange); }
.red-accent { background: var(--muni-red); }
.blue-accent { background: var(--muni-blue); }
.gray-accent { background: var(--gray); }

.decorative-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation: shapeFloat 8s ease-in-out infinite;
}

.shape-1 {
    width: 150px;
    height: 150px;
    background: var(--muni-blue);
    border-radius: 50%;
    top: 10%;
    right: 5%;
    animation-delay: 0s;
}

.shape-2 {
    width: 100px;
    height: 100px;
    background: var(--muni-orange);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    bottom: 15%;
    left: 8%;
    animation-delay: 2s;
}

.shape-3 {
    width: 120px;
    height: 120px;
    background: var(--muni-purple);
    border-radius: 50% 50% 0 0;
    top: 50%;
    left: 3%;
    transform: rotate(45deg);
    animation-delay: 4s;
}

@keyframes shapeFloat {
    0%, 100% { 
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
    }
    50% { 
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(20px) rotate(-5deg);
    }
}

.slide-3-enhanced .content-grid {
    position: relative;
    z-index: 1;
}

/* ===================================
   Goals List (Slide 4)
   =================================== */

.goals-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.goal-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    background: var(--bg-light);
    padding: var(--spacing-md);
    border-radius: 12px;
    border-left: 5px solid var(--muni-blue);
    transition: transform 0.3s ease;
}

.goal-item:hover {
    transform: translateX(10px);
}

.goal-number {
    min-width: 50px;
    height: 50px;
    background: var(--muni-blue);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.goal-item p {
    flex: 1;
    margin: 0;
    padding-top: 0.5rem;
}

/* ===================================
   Route Slides
   =================================== */

.route-slide .slide-content {
    padding: var(--spacing-xl);
}

.route-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 3px solid;
}

.route-badge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
}

.j-church .route-badge { background: var(--j-church); }
.j-church { border-color: var(--j-church); }

.k-ingleside .route-badge { background: var(--k-ingleside); }
.k-ingleside { border-color: var(--k-ingleside); }

.l-ocean .route-badge { background: var(--l-ocean); }
.l-ocean { border-color: var(--l-ocean); }

.m-market .route-badge { background: var(--m-market); }
.m-market { border-color: var(--m-market); }

.n-judah .route-badge { background: var(--n-judah); }
.n-judah { border-color: var(--n-judah); }

.t-third .route-badge { background: var(--t-third); }
.t-third { border-color: var(--t-third); }

.route-header h2 {
    margin: 0;
    color: var(--gray-dark);
}

.route-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.route-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--bg-light);
    border-radius: 8px;
}

.route-info i {
    font-size: 1.5rem;
    color: var(--muni-blue);
}

.route-info p {
    margin: 0;
    font-size: 1.2rem;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-sm);
}

.schedule-grid.complex {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.schedule-item {
    background: var(--white);
    border: 2px solid var(--gray-lighter);
    padding: var(--spacing-md);
    border-radius: 8px;
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.schedule-item i {
    font-size: 1.5rem;
    color: var(--muni-orange);
}

.schedule-label {
    font-size: 0.9rem;
    color: var(--gray);
    margin: 0;
}

.schedule-freq {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-dark);
    margin: 0;
}

.hours {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--muni-blue);
    color: var(--white);
    border-radius: 8px;
}

.hours i {
    font-size: 1.5rem;
}

.hours p {
    color: var(--white);
    margin: 0;
}

/* ===================================
   Bus Changes (Slide 12)
   =================================== */

.bus-changes {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.change-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--muni-orange);
}

.change-icon {
    min-width: 50px;
    height: 50px;
    background: var(--muni-orange);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.3rem;
}

.change-item p {
    flex: 1;
    margin: 0;
    padding-top: 0.5rem;
}

/* ===================================
   Map Slide (Slide 13)
   =================================== */

.map-slide {
    text-align: center;
}

.map-placeholder {
    width: 100%;
    height: 500px;
    background: linear-gradient(135deg, var(--gray-lighter) 0%, var(--bg-light) 100%);
    border: 3px dashed var(--gray-light);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: var(--spacing-md);
}

.map-placeholder i {
    font-size: 5rem;
    color: var(--gray-light);
    margin-bottom: var(--spacing-md);
}

.map-placeholder p {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray);
    margin-bottom: var(--spacing-sm);
}

.map-placeholder small {
    color: var(--gray-light);
}

/* ===================================
   Benefits (Slide 15)
   =================================== */

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.benefit-card {
    background: var(--bg-light);
    padding: var(--spacing-lg);
    border-radius: 12px;
    text-align: center;
    border-top: 5px solid var(--muni-green);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.benefit-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    margin: 0 auto var(--spacing-md);
}

.benefit-icon.green {
    background: var(--muni-green);
}

.benefit-card h3 {
    color: var(--gray-dark);
    margin-bottom: var(--spacing-sm);
}

.benefit-card p {
    font-size: 1rem;
}

/* ===================================
   Tradeoffs (Slide 16)
   =================================== */

.tradeoffs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.tradeoff-card {
    background: var(--bg-light);
    padding: var(--spacing-lg);
    border-radius: 12px;
    text-align: center;
    border-top: 5px solid var(--muni-orange);
}

.tradeoff-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--muni-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    margin: 0 auto var(--spacing-md);
}

.tradeoff-card h3 {
    color: var(--gray-dark);
    margin-bottom: var(--spacing-sm);
}

.tradeoff-card p {
    font-size: 1rem;
}

/* ===================================
   Thank You Slide (Slide 17)
   =================================== */

.thank-you-slide {
    text-align: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--muni-red) 0%, var(--muni-purple) 100%);
    color: var(--white);
    border-radius: 20px;
}

.thank-you-title {
    font-size: 5rem;
    color: var(--white);
    margin-bottom: var(--spacing-lg);
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.thank-you-icon {
    font-size: 5rem;
    color: var(--white);
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
}

.thank-you-text {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--spacing-sm);
}

.author {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

/* ===================================
   Navigation
   =================================== */

.nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--gray-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 100;
}

.nav-arrow:hover {
    background: var(--white);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.nav-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.nav-prev {
    left: 2rem;
}

.nav-next {
    right: 2rem;
}

.nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-arrow:disabled:hover {
    transform: translateY(-50%) scale(1);
}

/* Navigation Dots */
.nav-dots {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.8rem;
    z-index: 100;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.nav-dot.active {
    background: var(--white);
    transform: scale(1.3);
}

/* Slide Counter */
.slide-counter {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

/* Keyboard Hint */
.keyboard-hint {
    position: fixed;
    top: 2rem;
    left: 2rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-size: 0.9rem;
    color: var(--gray);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.keyboard-hint:hover {
    opacity: 1;
}

.keyboard-hint p {
    margin: 0;
    font-size: 0.9rem;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 1024px) {
    .slide {
        width: 95%;
        height: 90vh;
    }
    
    .slide-content {
        padding: var(--spacing-md);
    }
    
    .main-title {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .thank-you-title {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {
    .slide {
        width: 98%;
        height: 93vh;
        border-radius: 15px;
    }
    
    .slide-content {
        padding: var(--spacing-sm);
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .thank-you-title {
        font-size: 3rem;
    }
    
    .content-grid,
    .benefits-grid,
    .tradeoffs-grid {
        grid-template-columns: 1fr;
    }
    
    .schedule-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-arrow {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .nav-prev {
        left: 1rem;
    }
    
    .nav-next {
        right: 1rem;
    }
    
    .slide-counter {
        top: 1rem;
        right: 1rem;
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }
    
    .keyboard-hint {
        display: none;
    }
    
    .route-badge {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .map-placeholder {
        height: 350px;
    }
    
    .map-placeholder i {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .thank-you-title {
        font-size: 2.5rem;
    }
    
    p {
        font-size: 1rem;
    }
    
    .muni-logo,
    .thank-you-icon {
        font-size: 3rem;
    }
    
    .icon-circle {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .goal-number {
        min-width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    body {
        background: white;
    }
    
    .slide {
        position: relative;
        width: 100%;
        max-width: 100%;
        height: auto;
        page-break-after: always;
        box-shadow: none;
        opacity: 1;
        transform: none;
        border-radius: 0;
    }
    
    .nav-arrow,
    .nav-dots,
    .slide-counter,
    .keyboard-hint {
        display: none;
    }
}

/* ===================================
   Accessibility
   =================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Focus Styles */
button:focus-visible,
.nav-dot:focus-visible {
    outline: 3px solid var(--muni-blue);
    outline-offset: 4px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .slide {
        border: 2px solid var(--dark);
    }
    
    button {
        border: 2px solid var(--dark);
    }
}


/* ===================================
   Single-page Scroll Overrides
   =================================== */

.slides-container {
    width: 100%;
    height: auto;
    position: relative;
    display: block;
    padding: var(--spacing-lg) 0;
}

.slide {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: auto;
    min-height: calc(100vh - 72px);
    margin: 0 auto var(--spacing-lg);
    opacity: 1;
    transform: none;
    pointer-events: auto;
    overflow: hidden; /* prevent inner scrollbars */
}

.slide.active {
    opacity: 1;
    transform: none;
}

/* ===================================
   Fixed Hamburger Menu
   =================================== */

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 84px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 18px;
    z-index: 1000;
    /* Purple header bar (restored) */
    background: rgba(139, 91, 168, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.14);
}

@media (max-width: 600px) {
  .top-nav {
    height: 78px;
  }
}

.brand {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.96);
    font-size: 0.98rem;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hamburger {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 10px;
    border-radius: 12px;
}

.hamburger:focus-visible {
    outline: 3px solid rgba(0,117,191,0.35);
    outline-offset: 2px;
}

.hamburger-lines span {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 2px;
    margin: 5px 0;
    transition: transform 180ms ease, opacity 180ms ease;
}

.site-menu {
    position: fixed;
    inset: 0;
    z-index: 1100;
    pointer-events: none;
}

.site-menu.open {
    pointer-events: auto;
}

.menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    transition: opacity 200ms ease;
    /* Keep backdrop behind the panel so it doesn't intercept link clicks */
    z-index: 0;
}

.site-menu.open .menu-backdrop {
    opacity: 1;
}

.menu-panel {
    position: absolute;
    top: 72px;
    left: 0;
    width: min(360px, 92vw);
    height: calc(100vh - 72px);
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 24px 70px rgba(0,0,0,0.28);
    transform: translateX(-105%);
    transition: transform 220ms ease;
    display: flex;
    flex-direction: column;
    /* Ensure panel is above backdrop */
    z-index: 1;
}

.site-menu.open .menu-panel {
    transform: translateX(0);
}

.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 18px 12px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.menu-title {
    font-weight: 800;
    color: var(--gray-dark);
}

.menu-close {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 10px;
    border-radius: 12px;
}

.menu-close:focus-visible {
    outline: 3px solid rgba(0,117,191,0.35);
    outline-offset: 2px;
}

.menu-list {
    list-style: none;
    padding: 10px 10px 18px;
    overflow: auto;
}

.menu-list a {
    display: flex;
    align-items: center;
    padding: 12px 12px;
    border-radius: 14px;
    color: var(--gray-dark);
    text-decoration: none;
    font-weight: 600;
    transition: background 150ms ease;
}

.menu-list a:hover {
    background: rgba(0,0,0,0.05);
}

.menu-list a.active {
    background: rgba(0,117,191,0.10);
}

/* Ensure anchor jumps account for fixed header */
.slide {
    scroll-margin-top: 86px;
}

/* Hide old presentation-only UI if still present for any reason */
.slide-counter,
.nav-arrow,
.nav-dots,
.keyboard-hint {
    display: none !important;
}


/* Hero background image */
.slide:first-of-type {
  background: url("../images/header_bkg.png") center center / cover no-repeat;
}


/* Hero animation + parallax */
.slide:first-of-type {
  background-attachment: fixed;
  background-position: center 0px;
  background-size: cover;
  animation: heroFadeIn 1.2s ease-out both;
}

.slide:first-of-type .slide-content,
.slide:first-of-type h1,
.slide:first-of-type h2,
.slide:first-of-type p {
  animation: heroTextIn 1.4s ease-out both;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: scale(1.05); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes heroTextIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ===================================
   Hero animations + parallax
   =================================== */

.slide[data-slide="1"] .title-slide > * {
    opacity: 0;
    transform: translateY(12px);
}

.slide[data-slide="1"].hero-animate .title-slide > * {
    animation: heroFadeUp 900ms ease forwards;
}

.slide[data-slide="1"].hero-animate .title-slide .main-title {
    animation-delay: 80ms;
}

.slide[data-slide="1"].hero-animate .title-slide .subtitle {
    animation-delay: 220ms;
}

@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduce motion support */
@media (prefers-reduced-motion: reduce) {
    .slide[data-slide="1"] .title-slide > * {
        opacity: 1;
        transform: none;
        animation: none !important;
    }
}


/* ===================================
   Hero background animation (Ken Burns)
   =================================== */

.slide[data-slide="1"] {
    animation: heroKenBurns 28s ease-in-out infinite alternate;
    background-size: 110% 110%;
    will-change: background-position, background-size;
}

@keyframes heroKenBurns {
    0% {
        background-position: center 0px, center 0px;
        background-size: 110% 110%;
    }
    50% {
        background-position: center -40px, center -40px;
        background-size: 115% 115%;
    }
    100% {
        background-position: center -80px, center -80px;
        background-size: 120% 120%;
    }
}

/* Disable animation if user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .slide[data-slide="1"] {
        animation: none !important;
        background-size: cover;
    }
}


/* ===================================
   Hero video background
   =================================== */

.slide[data-slide="1"] {
    position: relative;
}

.hero-video-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-video-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,0.18), rgba(0,0,0,0.30));
    pointer-events: none;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile: make the hero truly full-bleed across the viewport */
@media (max-width: 768px) {
    .slide[data-slide="1"] {
        width: 100vw;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        scroll-margin-top: 84px;
        /* Make the hero itself a landscape-shaped card on phones */
        height: min(56.25vw, 58vh); /* ~16:9 based on viewport width */
    }

    .slide[data-slide="1"] .slide-content {
        /* Fill the hero; don't force extra height that creates gaps */
        height: 100%;
        min-height: 0;
        padding: clamp(1.25rem, 4vw, 2rem);
}

    .hero-video-wrap,
    .hero-video {
        border-radius: 0;
    }
    /* On small screens, avoid aggressive cropping: fit the video to full width */
    .hero-video {
        object-fit: contain;
        /* Use the page purple instead of black for letterboxing */
        background: rgba(139, 91, 168, 0.55);
    }

}

/* Ensure hero text sits above video */
.slide[data-slide="1"] .hero-text {
    position: relative;
    z-index: 1;
}

/* Hide hero text until video finishes */
.slide[data-slide="1"] .hero-text {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 600ms ease, transform 600ms ease;
}

.slide[data-slide="1"].hero-ready .hero-text {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .hero-video-wrap { display: none; }
    .slide[data-slide="1"] .hero-text {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ===================================
   Map Zoom Lightbox
   =================================== */

.map-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.map-lightbox.is-open { display: block; }

.map-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}

.map-lightbox__panel {
  position: absolute;
  inset: 16px;
  border-radius: 14px;
  background: rgba(20, 22, 26, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  z-index: 1;
}

.map-lightbox__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.map-lightbox__title {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-lightbox__controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.map-lightbox__btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  line-height: 1;
}

.map-lightbox__btn:hover { background: rgba(255, 255, 255, 0.14); }
.map-lightbox__btn:active { transform: translateY(1px); }

.map-lightbox__btn--close {
  background: rgba(227,25,55,0.92);
  border-color: rgba(227,25,55,0.92);
}

.map-lightbox__hint {
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  font-weight: 600;
  margin-right: 6px;
  display: none;
}

.map-lightbox__viewport {
  position: relative;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.map-lightbox__viewport:active { cursor: grabbing; }

.map-lightbox__img {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
  max-width: none;
}

@media (min-width: 900px) {
  .map-lightbox__hint { display: inline; }
}

/* Mobile friendliness */
@media (max-width: 600px) {
  .map-lightbox__panel {
    inset: 6px;
    border-radius: 10px;
  }
  .map-lightbox__toolbar {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 12px;
  }
  .map-lightbox__btn {
    padding: 10px 14px;
    font-size: 15px;
  }
  .map-lightbox__hint { display: inline; }
}



/* Map placeholder image fit (responsive) */
.map-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}



}


/* Thank you full-bleed (expand red area to fill entire block) */
.slide[data-slide="17"] .thank-you-slide {
  /* shorter like the rest of the deck */
  min-height: 72vh;
  border-radius: 0;
}





/* Header logo (extra large) */
.header-logo {
  /* Larger mark inside the white bounding box */
  height: 74px;
  width: auto;
  max-width: 360px;
  flex: 0 0 auto;
  display: block;
  /* Restore a subtle bounding box behind the logo for legibility */
  background: rgba(255, 255, 255, 0.92) !important;
  /* Tighter padding so the mark reads larger inside the box */
  padding: 4px 6px;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
  mix-blend-mode: normal;
  object-fit: contain;
}

@media (max-width: 600px) {
  .header-logo {
    height: 66px;
    max-width: 320px;
    padding: 4px 6px;
  }
}

/* -----------------------------------
   Scroll-mode mobile fixes
   (avoid fixed slide heights creating dark gaps)
   ----------------------------------- */
@media (max-width: 768px) {
  .slide {
    height: auto;
  }

  .slide-content {
    min-height: 0;
  }
}

/* ===================================
   FINAL OVERRIDES (v5)
   These rules come LAST to override earlier duplicate slide sizing
   rules that were keeping pages extremely tall and leaving large gaps.
   =================================== */

/* Bring the very first slide right up under the fixed header divider */
.slides-container {
  padding-top: 0 !important;
}

/* Tighter spacing between cards/pages */
.slide {
  width: min(1100px, 94vw) !important;
  max-width: none !important;
  margin: 10px auto !important;
  height: auto !important;
  min-height: 0 !important;
}

.slide:first-of-type {
  margin-top: 0 !important;
}

.slide[data-slide="1"] {
  margin-bottom: 8px !important;
}

/* Reduce overall page height by reducing padding + min-height */
.slide-content {
  padding: 2rem !important;
  min-height: 52vh !important;
}

@media (max-width: 768px) {
  .slide {
    width: 100vw !important;
    margin: 0 auto 10px !important;
    border-radius: 0 !important;
  }

  .slide:not([data-slide="1"]) {
    width: min(1000px, 96vw) !important;
    margin: 10px auto !important;
    border-radius: 18px !important;
    box-shadow: 0 16px 44px rgba(0,0,0,0.25) !important;
  }

  .slide-content {
    padding: 1.25rem !important;
    min-height: 44vh !important;
  }
}

/* Ensure any letterbox area around the hero video inherits the deck tone */
.hero-video {
  background: rgba(139, 91, 168, 0.55);
}

