/* Division Pages Mobile Optimization */
.hero-video-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    z-index: 0;
}

/* Video optimization for mobile */
@media (max-width: 768px) {
    .hero-video {
        height: 60vh; /* Shorter on mobile */
    }
    
    .hero-content {
        position: relative;
        padding-top: 60vh; /* Position content below video */
        background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.9) 100%);
    }
}

/* Video performance optimizations */
.hero-video {
    will-change: transform;
    transform: translate3d(-50%, -50%, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Mobile-optimized content layout */
.division-content {
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .division-content {
        margin-top: -20vh; /* Overlap with video */
        background: linear-gradient(to bottom, transparent, #fff 20%);
        padding: 2rem 1rem;
    }

    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
        text-align: center;
    }

    .hero-description {
        font-size: 1.1rem !important;
        text-align: center;
        margin: 1rem auto;
        max-width: 90%;
    }

    .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-width: 300px;
        margin: 2rem auto;
    }

    .cta-button {
        width: 100%;
        text-align: center;
        padding: 1rem;
    }
}

/* Improved card layouts for mobile */
@media (max-width: 768px) {
    .card-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .topic-card {
        background: white;
        border-radius: 1rem;
        padding: 1.5rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        transform: none !important;
    }

    .topic-card:hover {
        transform: translateY(-5px) !important;
    }
}

/* Loading optimization */
.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.video-loaded .video-placeholder {
    opacity: 0;
}

/* Smooth scroll behavior */
.smooth-scroll {
    scroll-behavior: smooth;
}

/* Improved touch interactions */
@media (hover: none) {
    .touch-target {
        min-height: 44px;
        min-width: 44px;
    }
    
    .card-link {
        -webkit-tap-highlight-color: transparent;
    }
}

/* Loading performance */
.content-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.content-loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation improvements */
@media (max-width: 768px) {
    .mobile-nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 80%;
        background: white;
        z-index: 1000;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .mobile-nav.active {
        right: 0;
    }

    .nav-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
    }

    .nav-backdrop.active {
        opacity: 1;
        visibility: visible;
    }
}
