/* Head Held High Pitch Deck - Custom Styles */

/* Brand Colors */
:root {
    --color-orange: #FF6B35; /* Vibrant orange from logo */
    --color-yellow: #F4A261; /* Mustard yellow from logo */
    --color-charcoal: #36454F; /* Charcoal for depth */
    --color-white: #FFFFFF;
    --color-dark: #2C3E50;
    
    /* Bootstrap overrides */
    --bs-primary: var(--color-orange);
    --bs-secondary: var(--color-yellow);
    --bs-dark: var(--color-charcoal);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    overflow-y: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow-x: hidden;
    overflow-y: hidden;
    height: 100vh;
    width: 100%;
    max-width: 100vw;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* Text Colors */
.text-orange {
    color: var(--color-orange) !important;
}

.text-yellow {
    color: var(--color-yellow) !important;
}

.text-charcoal {
    color: var(--color-charcoal) !important;
}

/* Slides Container */
.slides-container {
    position: relative;
    width: 100%;
    max-width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Individual Slides - no scrolling, content must fit */
.slide {
    width: 100%;
    max-width: 100vw;
    height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    padding: 1rem 0;
    transition: opacity 0.5s ease-in-out;
}

.slide.active {
    display: flex;
    opacity: 1;
    z-index: 1;
}

/* All slides: container must not overflow */
.slide .container {
    max-height: 100%;
    overflow: hidden;
    min-height: 0;
}

.slide .container.h-100 {
    display: flex;
    flex-direction: column;
}

.slide .container .row {
    flex-shrink: 1;
    min-height: 0;
}

.slide-dark {
    background-color: var(--color-charcoal);
}

.slide-alt {
    background-color: #F8F9FA;
}

/* Navigation Buttons - Hidden on mobile/tablet, visible on desktop */
.nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--color-orange);
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--color-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Hide navigation buttons on mobile and tablet - swiping is sufficient */
@media (max-width: 1024px) {
    .nav-btn {
        display: none !important;
    }
}

/* Medium and larger screens: Add padding to containers to avoid nav buttons */
@media (min-width: 1025px) {
    .slide .container {
        padding-left: 100px;
        padding-right: 100px;
    }
}

/* Extra large screens: Limit container max-width for better readability */
@media (min-width: 1200px) {
    .slide .container {
        max-width: 1600px;
        margin-left: auto;
        margin-right: auto;
    }
}

.nav-btn:hover {
    background-color: var(--color-orange);
    color: var(--color-white);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

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

.nav-btn-prev {
    left: 20px;
}

.nav-btn-next {
    right: 20px;
}

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

.nav-btn:disabled:hover {
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--color-orange);
}

/* Music: Speaker button (top right) */
.music-speaker-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--color-orange);
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.music-speaker-btn:hover {
    background: var(--color-orange);
    color: var(--color-white);
    transform: scale(1.05);
}

.music-speaker-btn .music-icon {
    width: 24px;
    height: 24px;
}

/* Music offcanvas (Bootstrap) - theme and width */
.music-offcanvas.offcanvas {
    background: var(--color-charcoal);
    width: 280px;
    max-width: 90vw;
}

.music-offcanvas .offcanvas-body {
    color: var(--color-white);
}

.music-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.music-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--color-orange);
    background: rgba(255, 255, 255, 0.15);
    color: var(--color-white);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.music-btn:hover {
    background: var(--color-orange);
    color: var(--color-white);
}

.music-volume-wrap {
    margin-top: 8px;
}

.music-volume-label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.music-volume {
    width: 100%;
    height: 8px;
    accent-color: var(--color-orange);
    cursor: pointer;
}

/* Slide Indicator */
.slide-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background-color: rgba(54, 69, 79, 0.8);
    color: var(--color-white);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Logo */
.logo-main {
    max-width: 300px;
    height: auto;
}

/* Images */
img.img-fluid {
    max-width: 100%;
    height: auto;
    display: block;
}

.slide img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
}

.slide img.shadow {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Video slide (slide 5) */
.slide-video .video-wrapper {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.slide-video .ratio {
    --bs-aspect-ratio: 56.25%;
}

/* Slide 1: logo container - shrinks and crossfades tash → logo */
#logo-container {
    position: absolute;
    left: 0;
    bottom: 0;
    right: 60vw; /* initial: container is 40vw wide */
    height: 100%;
    transition: right 3s ease-in-out;
    overflow: visible;
}

#logo-container.animating {
    right: 85vw; /* animates to: container shrinks to 15vw wide */
}

#logo-container .slide1-logo,
#logo-container .slide-hero-bg-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left bottom;
    transition: opacity 3s ease-in-out;
}

#logo-container .slide-hero-bg-img {
    z-index: 1;
    pointer-events: none;
}

#logo-container.animating .slide-hero-bg-img {
    opacity: 0;
}

#logo-container .slide1-logo {
    z-index: 0;
    opacity: 0;
    transition: opacity 1s ease-out 2s; /* starts at 2s, fades in over the last second */
}

#logo-container.animating .slide1-logo {
    opacity: 1;
}

#slide1 {
    background-color: #FAE4C4;
    position: relative;
    overflow: visible;
}

.slide-hero-bg .container.slide1-layout {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    max-height: 100%;
    overflow: hidden;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.slide1-headline-wrapper {
    flex-shrink: 0;
    position: relative;
    min-height: 0;
}

.slide1-headline-word {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    font-size: clamp(3rem, 12vw, 8rem);
    font-weight: 900;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.08s ease-out;
    white-space: nowrap;
    z-index: 2;
}

@media (min-width: 768px) {
    .slide1-headline-word {
        left: 65%;
        top: 50%;
        transform: translate(-50%, -50%);
        font-size: clamp(4rem, 10vw, 11rem);
    }
}

.slide1-headline-word.visible {
    opacity: 1;
}

.slide1-headline-block {
    position: absolute;
    left: 3rem;
    top: 2rem;
    right: 2rem;
    z-index: 2;
}

.slide1-headline {
    font-size: clamp(2rem, 6vw, 4.5rem);
    line-height: 1.2;
    text-align: left;
    opacity: 0;
    transition: opacity 0.15s ease-out;
    margin-bottom: 0.5rem;
}

.slide1-headline.final {
    opacity: 1;
}

.slide1-tagline-reveal {
    opacity: 0;
    margin-top: 0.5rem;
    transition: opacity 1s ease-out;
}

#slide1.slide1-phase2 .slide1-tagline-reveal {
    opacity: 1;
}

.slide1-subline-reveal {
    opacity: 0;
    margin-top: 0.5rem;
    transition: opacity 1s ease-out;
}

#slide1.slide1-phase2 .slide1-subline-reveal {
    opacity: 1;
    transition-delay: 0.8s;
}

.slide1-bg-girls {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/images/2-girls.png');
    background-position: right bottom;
    background-size: 75% auto;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease-in;
    z-index: 0;
    pointer-events: none;
}

.slide1-bg-girls.visible {
    opacity: 1;
}

.slide1-body {
    min-height: 0;
}

.slide1-right {
    min-height: 0;
}


.slide1-tagline {
    font-size: clamp(1rem, 2vw, 1.5rem);
    line-height: 1.3;
}

/* Slide 1 hero image (001.png) - constrained in right column */
.slide#slide1 .slide-hero-img,
.slide-hero-img {
    max-width: 280px;
    max-height: 22vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Stat Cards */
.stat-card {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 1rem;
}

.stat-text {
    font-size: 1.1rem;
    line-height: 1.4;
}

/* Mission Card */
.mission-card {
    background-color: var(--color-white);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-left: 5px solid var(--color-orange);
}

.impact-badge {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .impact-badge {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .impact-badge span {
        display: inline-block;
    }
}

.badge-impact {
    font-size: 2rem;
    font-weight: 900;
}

/* Feature Cards */
.feature-card {
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--color-yellow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.belief-statement {
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: 10px;
    border-left: 5px solid var(--color-orange);
}

/* Programme Cards */
.programme-info-card,
.programme-outcomes-card {
    background-color: var(--color-white);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--color-orange);
}

.results-badge {
    background-color: var(--color-yellow);
    border-radius: 10px;
}

/* Service Cards */
.service-card {
    background-color: var(--color-white);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-left: 5px solid var(--color-orange);
}

/* Impact Items */
.impact-item {
    background-color: var(--color-white);
    border-radius: 8px;
    border: 2px solid var(--color-yellow);
}

.case-study-card {
    background-color: var(--color-white);
    border-radius: 10px;
    border-left: 5px solid var(--color-orange);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Cost Cards */
.cost-card {
    border-radius: 15px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cost-prevention {
    background: linear-gradient(135deg, var(--color-orange) 0%, #FF8C5A 100%);
}

.cost-justice {
    background: linear-gradient(135deg, var(--color-charcoal) 0%, #4A5A6A 100%);
}

.cost-amount {
    font-size: 4rem;
    line-height: 1;
}

.roi-statement {
    background-color: var(--color-white);
    border-radius: 10px;
    border-left: 5px solid var(--color-yellow);
}

/* Partnership Benefits */
.partnership-benefit {
    background-color: var(--color-white);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--color-yellow);
}

.partnerships-list {
    background-color: var(--color-white);
    border-radius: 10px;
    border-left: 5px solid var(--color-orange);
}

/* Ask Card */
.ask-card {
    background: linear-gradient(135deg, var(--color-charcoal) 0%, #4A5A6A 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.investment-amount {
    font-size: 5rem;
    line-height: 1;
}

.what-it-achieves {
    background-color: var(--color-white);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Contact Card */
.contact-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.contact-card a:hover {
    text-decoration: underline !important;
}

/* Data Sources - no scrolling, content fits in slide */
.data-sources-content {
    max-height: 65vh;
    overflow: hidden;
    padding-right: 10px;
}

.source-category {
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.note-box {
    background-color: #F8F9FA;
    border-radius: 10px;
    border-left: 5px solid var(--color-yellow);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-btn {
        width: 50px;
        height: 50px;
    }
    
    .nav-btn-prev {
        left: 10px;
    }
    
    .nav-btn-next {
        right: 10px;
    }
    
    .slide {
        padding: 0.5rem 0;
    }
    
    .slide#slide1 .slide-hero-img {
        max-height: 18vh;
        max-width: 220px;
    }
    
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .display-1 {
        font-size: 2.5rem !important;
        line-height: 1.2;
    }
    
    .display-3 {
        font-size: 2rem !important;
        line-height: 1.3;
    }
    
    .display-5 {
        font-size: 1.5rem !important;
    }
    
    .stat-number {
        font-size: 3rem;
    }
    
    .cost-amount {
        font-size: 3rem;
    }
    
    .investment-amount {
        font-size: 3rem;
    }
    
    .logo-main {
        max-width: 200px;
    }
    
    .slide-indicator {
        bottom: 15px;
        padding: 8px 15px;
        font-size: 0.8rem;
    }
    
    .stat-card,
    .mission-card,
    .feature-card,
    .programme-info-card,
    .programme-outcomes-card,
    .service-card,
    .partnership-benefit {
        padding: 1.5rem;
    }
    
    h1, h2, h3, h4 {
        word-wrap: break-word;
    }
    
    .slide img {
        margin-bottom: 0.5rem;
    }
    
    .row {
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }
    
    [class*="col-"] {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

@media (max-width: 576px) {
    .nav-btn {
        width: 44px;
        height: 44px;
    }
    
    .nav-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .display-1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    .display-3 {
        font-size: 1.75rem !important;
        line-height: 1.3;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .cost-amount {
        font-size: 2.5rem;
    }
    
    .investment-amount {
        font-size: 2.5rem;
    }
    
    body {
        font-size: 16px;
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .stat-card,
    .mission-card,
    .feature-card,
    .programme-info-card,
    .programme-outcomes-card,
    .service-card,
    .partnership-benefit,
    .ask-card,
    .contact-card {
        padding: 1.25rem;
    }
    
    .logo-main {
        max-width: 150px;
    }
}

/* Very Small Mobile Devices (320px - 375px) */
@media (max-width: 375px) {
    .nav-btn {
        width: 40px;
        height: 40px;
        left: 5px;
        right: 5px;
    }
    
    .nav-btn-prev {
        left: 5px;
    }
    
    .nav-btn-next {
        right: 5px;
    }
    
    .nav-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .slide {
        padding: 0.5rem 0;
    }
    
    .slide#slide1 .slide-hero-img {
        max-height: 15vh;
        max-width: 180px;
    }
    
    
    .data-sources-content {
        max-height: 55vh;
    }
    
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .display-1 {
        font-size: 1.75rem !important;
        line-height: 1.2;
        word-break: break-word;
    }
    
    .display-3 {
        font-size: 1.5rem !important;
        line-height: 1.3;
        word-break: break-word;
    }
    
    .display-5 {
        font-size: 1.25rem !important;
        word-break: break-word;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .cost-amount {
        font-size: 2rem;
    }
    
    .investment-amount {
        font-size: 2rem;
    }
    
    .badge-impact {
        font-size: 1.5rem;
    }
    
    .stat-text {
        font-size: 1rem;
    }
    
    .stat-card,
    .mission-card,
    .feature-card,
    .programme-info-card,
    .programme-outcomes-card,
    .service-card,
    .partnership-benefit,
    .ask-card,
    .contact-card {
        padding: 1rem;
    }
    
    .logo-main {
        max-width: 120px;
    }
    
    .slide-indicator {
        bottom: 10px;
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    h1, h2, h3, h4, h5, h6 {
        word-break: break-word;
        hyphens: auto;
    }
    
    p, li, span {
        word-break: break-word;
    }
    
    .impact-badge {
        font-size: 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .impact-badge span {
        display: block;
    }
    
    .results-badge {
        padding: 1rem !important;
        font-size: 0.9rem;
    }
    
    .cost-card {
        min-height: 250px;
        padding: 1.5rem !important;
    }
    
    .ask-card {
        padding: 1.5rem !important;
    }
    
    .contact-card {
        padding: 1.5rem !important;
    }
    
    .data-sources-content {
        max-height: 60vh;
    }
}

/* Scrollbar Styling */
.data-sources-content::-webkit-scrollbar {
    width: 8px;
}

.data-sources-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.data-sources-content::-webkit-scrollbar-thumb {
    background: var(--color-orange);
    border-radius: 10px;
}

.data-sources-content::-webkit-scrollbar-thumb:hover {
    background: #FF8C5A;
}

/* Smooth Transitions - handled in .slide.active above */

/* Global overflow prevention */
* {
    box-sizing: border-box;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Ensure containers don't overflow */
.container,
.container-fluid {
    max-width: 100%;
    overflow-x: hidden;
}

/* Prevent text overflow */
h1, h2, h3, h4, h5, h6, p, li, span, div {
    overflow-wrap: break-word;
    word-wrap: break-word;
}
