/* ==================== GLOBAL MOBILE STYLES ==================== */
@media (max-width: 768px) {
    /* Hero content positioning for mobile - CENTERED */
    .hero-content {
        position: absolute !important;
        bottom: 15% !important;
        left: 70% !important;
        transform: translateX(-10%) !important;
        width: 100% !important;
        padding: 0 20px !important;
        text-align: left !important;
        z-index: 3;
    }

    /* Hero text container - CENTERED */
    .hero-text {
        width: 100% !important;
        margin: 0 auto !important;
        text-align: left !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    /* Hero welcome text - CENTERED */
    .hero-welcome-text {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
        margin-bottom: 10px !important;
        text-align: center !important;
        display: block !important;
        width: 100% !important;
    }

    /* KCIC text container - CENTERED */
    .kcic-text-container {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 4px !important;
        margin-top: 5px !important;
        width: 100% !important;
        display: flex !important;
    }

    /* Individual title words - CENTERED */
    .hero-title-words {
        font-size: 1.4rem !important;
        margin-right: 4px !important;
        line-height: 1.3 !important;
        display: inline-block !important;
        text-align: center !important;
        pointer-events: none !important;
    }

    /* KCIC acronym - CENTERED */
    .kcic-acronym {
        font-size: 1.3rem !important;
        margin-left: 0 !important;
        margin-top: 5px !important;
        display: block !important;
        width: 100% !important;
        text-align: center !important;
    }
}

@media (max-width: 768px) {
    /* Reset body padding for mobile */
    body {
        padding-top: 100px !important;
        overflow-x: hidden;
    }
       .youtube-background {
        overflow: visible !important;
    }
    
    .hero-video-container {
        overflow: visible !important;
    }
    
    /* Ensure YouTube iframe is properly sized on mobile */
    #youtubePlayer iframe {
        width: 120% !important;
        height: 100% !important;
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        min-width: 100% !important;
        min-height: 100% !important;
    }
    
    /* YouTube overlay adjustment for mobile */
    .youtube-video-overlay {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.8) 0%,
            rgba(0, 0, 0, 0.5) 30%,
            rgba(0, 0, 0, 0.4) 50%,
            rgba(0, 0, 0, 0.5) 70%,
            rgba(0, 0, 0, 0.8) 100%
        );
    }


    /* ============ HERO SECTION - MOBILE OPTIMIZATIONS ============ */
    .hero-section {
        height: 65vh !important;
        min-height: 500px !important;
        padding-top: 100px !important;
        position: relative;
        overflow: hidden;
    }

    .hero-video-container {
        top: 20px !important;
        height: calc(100% - 20px) !important;
    }

    /* Video placeholder optimization for mobile */
    .video-placeholder {
        top: 10px !important;
        height: calc(100% ) !important;
    }

    .video-placeholder img {
        object-fit: cover;
        height: 100%;
        width: 100%;
    }

    /* Hero video adjustments */
    .hero-video {
        object-fit: cover !important;
        height: 100% !important;
        width: 100% !important;
    }

    .video-overlay {
        top: 10px !important;
        height: calc(100%) !important;
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(0, 0, 0, 0.4) 50%,
            rgba(0, 0, 0, 0.7) 100%
        ) !important;
    }

    /* Ripple container adjustments */
    .ripple-container {
        top: 100px !important;
        height: calc(100% - 100px) !important;
        pointer-events: none !important; /* Disable ripples on mobile for performance */
    }

    /* Hero content positioning for mobile */
    .hero-content {
        position: absolute !important;
        bottom: 15% !important; /* Adjusted for mobile */
        left: 0 !important;
        width: 100% !important;
        padding: 0 20px !important;
        text-align: center !important;
        z-index: 3;
    }

    /* Hero text container */
    .hero-text {
        width: 100% !important;
        margin: 0 auto !important;
        text-align: center !important;
    }

    /* Hero welcome text */
    .hero-welcome-text {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
        margin-bottom: 10px !important;
        text-align: center !important;
        display: block !important;
        width: 100% !important;
    }

    /* KCIC text container */
    .kcic-text-container {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 4px !important;
        margin-top: 5px !important;
        width: 100% !important;
    }

    /* Individual title words */
    .hero-title-words {
        font-size: 1.4rem !important;
        margin-right: 4px !important;
        line-height: 1.3 !important;
        display: inline-block !important;
        text-align: center !important;
        pointer-events: none !important; /* Disable hover effects on mobile */
    }

    /* KCIC acronym */
    .kcic-acronym {
        font-size: 1.3rem !important;
        margin-left: 0 !important;
        margin-top: 5px !important;
        display: inline-block !important;
        width: 100% !important;
        text-align: center !important;
    }

    /* Hero subtitle */
    .hero-subtitle {
        font-size: 1rem !important;
        margin-top: 15px !important;
        margin-bottom: 25px !important;
        line-height: 1.5 !important;
        text-align: center !important;
        padding: 0 10px !important;
        max-width: 90% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Disable subtitle animation on mobile */
    .hero-subtitle:after {
        display: none !important;
    }

    /* Video Controls - Mobile Optimization - MOVED TO RIGHT SIDE */
    .video-controls {
        position: absolute !important;
        bottom: 10% !important;
        right: 20px !important; /* Changed from center to right side */
        transform: none !important; /* Removed center transform */
        display: flex !important;
        justify-content: flex-end !important; /* Align to right */
        gap: 10px !important;
        width: auto !important; /* Changed from 100% to auto */
        z-index: 4;
    }

    /* Unmute button - Mobile */
    .mute-btn {
        width: 45px !important;
        height: 45px !important;
        padding: 0 !important;
        font-size: 1rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important; /* Removed auto margin */
        background: rgba(255, 87, 87, 0.9) !important; /* Slightly more opaque for visibility */
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
    }

    .mute-btn i {
        font-size: 18px !important;
    }

    /* Control buttons */
    .control-btn {
        width: 44px !important; /* Minimum touch target size */
        height: 44px !important;
        padding: 10px !important;
        font-size: 16px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Scroll indicator - hide on mobile or adjust */
    .scroll-indicator {
        display: none !important; /* Hide on mobile to save space */
    }

    /* Loading animation for mobile */
    .hero-loading {
        padding: 20px !important;
        font-size: 1rem !important;
        width: 80% !important;
        max-width: 300px !important;
    }

    .loading-spinner {
        width: 40px !important;
        height: 40px !important;
    }

    /* Play video button fallback */
    .play-video-btn {
        padding: 12px 25px !important;
        font-size: 1rem !important;
        margin-top: 20px !important;
        min-height: 44px !important; /* Minimum touch target */
    }

    /* Header spacer */
    .hero-header-spacer {
        height: 100px !important;
    }

    /* Disable intensive animations on mobile for performance */
    .hero-title-words.hovered,
    .hero-title-words.clicked,
    .hero-title-words.active {
        animation: none !important;
        transform: none !important;
        filter: none !important;
        text-shadow: none !important;
        pointer-events: none !important;
    }

    /* Hide hover effects pseudo-elements */
    .hero-title-words::after {
        display: none !important;
    }

    /* ==================== MAIN CONTENT - MOBILE ==================== */
    .main-content {
        padding: 30px 15px !important;
        border-radius: 25px 25px 0 0 !important;
        margin-top: -20px !important;
    }

    /* Section Headers - Mobile */
    .section-header {
        margin-bottom: 30px !important;
    }

    .section-title {
        font-size: 2.2rem !important;
        white-space: normal !important;
        text-align: center !important;
    }

    .section-subtitle {
        font-size: 1.1rem !important;
        white-space: normal !important;
        line-height: 1.5 !important;
    }

    /* Hide animated spaces on mobile */
    .title-left-space,
    .title-right-space,
    .subtitle-left-space,
    .subtitle-right-space {
        display: none !important;
    }

    /* Animated spaces adjustments */
    @keyframes spaceExpand {
        0% {
            width: 0;
            opacity: 0;
            transform: scaleX(0);
        }
        50% {
            opacity: 0.5;
            transform: scaleX(1.1);
        }
        100% {
            width: 25px;
            opacity: 1;
            transform: scaleX(1);
        }
    }

    /* Section Divider */
    .section-divider {
        width: 60px !important;
        margin: 15px auto !important;
    }

    /* About Section - Mobile */
    .alternating-section {
        padding: 40px 15px !important;
    }

    .alternating-container {
        flex-direction: column !important;
        gap: 30px !important;
    }

    .alternating-container.reversed {
        flex-direction: column !important;
    }

    .alternating-content,
    .alternating-media {
        width: 100% !important;
    }

    .content-text h3 {
        font-size: 1.8rem !important;
        text-align: center !important;
    }

    .content-text p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
        text-align: center !important;
    }

    .key-points {
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
    }

    /* Vision & Mission Sections - Mobile */
    .vision-section,
    .mission-section {
        padding: 40px 15px !important;
    }

    .section-icon {
        width: 60px !important;
        height: 60px !important;
        font-size: 28px !important;
        margin: 0 auto 20px !important;
    }

    .vision-statement,
    .mission-statement {
        font-size: 1.1rem !important;
        text-align: center !important;
    }

    .vision-points,
    .mission-objectives {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        margin-top: 30px !important;
    }

    .vision-point,
    .objective {
        text-align: center !important;
        padding: 15px !important;
    }

    .point-number {
        width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
        margin: 0 auto 15px !important;
    }

    /* Focus Areas - Mobile */
    .focus-cards {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        margin-bottom: 40px !important;
    }

    .focus-card {
        margin: 0 auto !important;
        max-width: 350px !important;
    }

    .card-header {
        padding: 25px 20px !important;
        text-align: center !important;
    }

    .card-icon {
        width: 55px !important;
        height: 55px !important;
        font-size: 22px !important;
        margin: 0 auto 15px !important;
    }

    .card-header h3 {
        font-size: 1.3rem !important;
        line-height: 1.4 !important;
    }

    .card-content {
        padding: 20px !important;
    }

    .card-content p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        text-align: center !important;
    }

    .focus-list {
        margin-top: 20px !important;
    }

    .focus-list li {
        font-size: 0.95rem !important;
        padding: 8px 0 !important;
        padding-left: 28px !important;
        line-height: 1.4 !important;
    }

    .focus-list li:hover {
        padding-left: 32px !important;
    }

    /* Membership Cards - Mobile */
    .membership-cards {
        grid-template-columns: 1fr !important;
        max-width: 100% !important;
        margin: 0 auto 40px !important;
        gap: 20px !important;
    }

    .membership-card {
        max-width: 350px !important;
        margin: 0 auto !important;
        border-radius: 20px 20px 15px 15px !important;
    }

    .card-badge {
        padding: 6px 15px !important;
        font-size: 0.8rem !important;
        top: 10px !important;
        right: 10px !important;
    }

    .card-header h3 {
        font-size: 1.6rem !important;
    }

    .price {
        font-size: 2.5rem !important;
    }

    .price::before {
        left: -18px !important;
        font-size: 1.2rem !important;
    }

    .price span {
        font-size: 1rem !important;
    }

    .card-content {
        padding: 25px 20px !important;
    }

    .card-content li {
        padding: 10px 0 !important;
        font-size: 0.95rem !important;
    }

    .note {
        font-size: 0.9rem !important;
        margin-top: 10px !important;
        text-align: center !important;
    }

    /* ============ EVENTS GALLERY - MOBILE OPTIMIZATIONS ============ */
    .events-gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
        gap: 10px !important;
        margin: 25px 0 !important;
    }

    .event-photo {
        aspect-ratio: 1/1 !important;
        max-width: 100% !important;
        height: 120px !important;
        border-radius: 8px !important;
        overflow: hidden !important;
    }

    .event-photo img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .event-photo:hover {
        transform: scale(1.02) !important;
    }

    .gallery-loading {
        padding: 20px !important;
        min-height: 120px !important;
    }

    .view-gallery-btn {
        padding: 12px 20px !important;
        font-size: 0.95rem !important;
        gap: 6px !important;
        min-height: 44px !important;
    }

    /* Lightbox - Mobile */
    .lightbox-nav {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
    }

    .lightbox-prev {
        left: 10px !important;
    }

    .lightbox-next {
        right: 10px !important;
    }

    .lightbox-close {
        top: 10px !important;
        right: 10px !important;
        width: 35px !important;
        height: 35px !important;
        font-size: 1.5rem !important;
    }

    /* Upcoming Events - Mobile */
    .upcoming-events-container {
        padding: 20px !important;
    }

    .coming-soon-placeholder {
        padding: 25px 15px !important;
    }

    .coming-soon-icon {
        width: 70px !important;
        height: 70px !important;
        font-size: 32px !important;
    }

    .coming-soon-placeholder h3 {
        font-size: 1.8rem !important;
    }

    .coming-soon-placeholder > p {
        font-size: 1rem !important;
    }

    .coming-soon-subtext {
        font-size: 0.95rem !important;
    }

    .upcoming-list {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .upcoming-list li {
        padding: 15px !important;
        font-size: 0.95rem !important;
    }

    .subscribe-form {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .subscribe-btn {
        width: 100% !important;
    }

    /* Partners Section - Mobile */
    .partners-section {
        margin: 40px 0 !important;
        padding: 30px 15px !important;
        border-radius: 20px !important;
    }

    .partners-container {
        flex-direction: column !important;
        gap: 30px !important;
    }

    .partners-container .alternating-media {
        order: -1 !important;
    }

    .partner-logos-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        margin: 25px 0 !important;
    }

    .partner-logo {
        height: 120px !important;
        padding: 20px !important;
    }

    .partner-stats {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
        margin-top: 25px !important;
    }

    .stat-item {
        padding: 15px !important;
    }

    .stat-number {
        font-size: 1.8rem !important;
    }

    .stat-label {
        font-size: 0.85rem !important;
    }

    /* Contact Section - Mobile */
    .contact-container {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .contact-info {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .contact-card {
        padding: 25px !important;
    }

    .contact-icon {
        width: 60px !important;
        height: 60px !important;
        font-size: 24px !important;
        margin-bottom: 15px !important;
    }

    .contact-form {
        padding: 25px !important;
    }

    .contact-form h3 {
        font-size: 1.6rem !important;
        margin-bottom: 20px !important;
        text-align: center !important;
    }

    /* Navigation Dots - Mobile */
    .section-navigation {
        display: none !important; /* Hide navigation dots on mobile */
    }
}

/* ==================== SMALL MOBILE STYLES (max-width: 480px) ==================== */
@media (max-width: 480px) {
    /* Hero Section - Small Mobile */
    .hero-section {
        height: 55vh !important;
        min-height: 400px !important;
    }

    .hero-content {
        bottom: 12% !important;
        padding: 0 15px !important;
    }

    .hero-welcome-text {
        font-size: 1.6rem !important;
        margin-bottom: 8px !important;
    }

    .hero-title-words {
        font-size: 1.2rem !important;
        margin-right: 3px !important;
    }

    .kcic-acronym {
        font-size: 1.1rem !important;
    }

    .hero-subtitle {
        font-size: 0.95rem !important;
        margin-top: 12px !important;
        margin-bottom: 20px !important;
        padding: 0 5px !important;
    }

    .video-controls {
        bottom: 8% !important;
        right: 15px !important; /* Adjusted for smaller screens */
    }

    .mute-btn {
        width: 40px !important;
        height: 40px !important;
    }

    .mute-btn i {
        font-size: 16px !important;
    }

    .control-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 0.9rem !important;
    }

    /* Main Content - Small Mobile */
    .main-content {
        padding: 25px 10px !important;
        border-radius: 20px 20px 0 0 !important;
    }

    /* Section Headers - Small Mobile */
    .section-title {
        font-size: 1.8rem !important;
    }

    .section-subtitle {
        font-size: 1rem !important;
        padding: 0 10px !important;
    }

    /* Focus Cards - Small Mobile */
    .focus-card {
        max-width: 100% !important;
    }

    .card-header {
        padding: 20px 15px !important;
    }

    .card-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 20px !important;
    }

    .card-header h3 {
        font-size: 1.2rem !important;
    }

    .card-content {
        padding: 15px !important;
    }

    .focus-list li {
        font-size: 0.9rem !important;
        padding-left: 25px !important;
    }

    /* Membership Cards - Small Mobile */
    .membership-card {
        max-width: 100% !important;
    }

    .card-header h3 {
        font-size: 1.4rem !important;
    }

    .price {
        font-size: 2.2rem !important;
    }

    .card-content li {
        font-size: 0.9rem !important;
    }

    /* Events Gallery - Small Mobile */
    .events-gallery {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
        gap: 8px !important;
        margin: 20px 0 !important;
    }

    .event-photo {
        height: 100px !important;
    }

    .view-gallery-btn {
        padding: 10px 18px !important;
        font-size: 0.9rem !important;
    }

    .gallery-loading {
        padding: 15px !important;
        font-size: 0.9rem !important;
    }

    .loading-spinner {
        width: 35px !important;
        height: 35px !important;
    }

    /* Upcoming Events - Small Mobile */
    .coming-soon-placeholder {
        padding: 25px 15px !important;
    }

    .coming-soon-icon {
        width: 60px !important;
        height: 60px !important;
        font-size: 28px !important;
    }

    .coming-soon-placeholder h3 {
        font-size: 1.6rem !important;
    }

    .coming-soon-placeholder > p {
        font-size: 0.95rem !important;
    }

    .upcoming-list li {
        font-size: 0.9rem !important;
    }

    /* Partners - Small Mobile */
    .partner-logos-container {
        grid-template-columns: 1fr !important;
    }

    .partner-logo {
        height: 100px !important;
        padding: 15px !important;
    }

    .partner-stats {
        grid-template-columns: 1fr !important;
    }

    /* Contact - Small Mobile */
    .contact-card {
        padding: 20px !important;
    }

    .contact-form {
        padding: 20px !important;
    }

    .contact-form h3 {
        font-size: 1.4rem !important;
    }
}

/* ==================== VERY SMALL MOBILE STYLES (max-width: 360px) ==================== */
@media (max-width: 360px) {
    /* Hero Section - Very Small Mobile */
    .hero-section {
        height: 50vh !important;
        min-height: 350px !important;
    }

    .hero-content {
        bottom: 10% !important;
        padding: 0 10px !important;
    }

    .hero-welcome-text {
        font-size: 1.4rem !important;
    }

    .hero-title-words {
        font-size: 1rem !important;
        margin-right: 2px !important;
    }

    .kcic-acronym {
        font-size: 1rem !important;
    }

    .hero-subtitle {
        font-size: 0.85rem !important;
        margin-top: 10px !important;
        margin-bottom: 15px !important;
    }

    .video-controls {
        bottom: 5% !important;
        right: 10px !important; /* Adjusted for very small screens */
    }

    .mute-btn {
        width: 35px !important;
        height: 35px !important;
    }

    .mute-btn i {
        font-size: 14px !important;
    }

    .control-btn {
        width: 35px !important;
        height: 35px !important;
        font-size: 0.8rem !important;
        padding: 8px !important;
    }

    /* Section Headers */
    .section-title {
        font-size: 1.6rem !important;
    }

    .section-subtitle {
        font-size: 0.9rem !important;
    }

    /* Focus Cards */
    .card-header h3 {
        font-size: 1.1rem !important;
    }

    /* Membership Cards */
    .price {
        font-size: 2rem !important;
    }

    /* Events Gallery - Very Small Mobile */
    .events-gallery {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr)) !important;
        gap: 6px !important;
    }

    .event-photo {
        height: 85px !important;
        border-radius: 6px !important;
    }

    .view-gallery-btn {
        padding: 8px 15px !important;
        font-size: 0.85rem !important;
        min-height: 40px !important;
    }
}

/* ==================== TABLET OPTIMIZATIONS (481px - 768px) ==================== */
@media (min-width: 481px) and (max-width: 768px) {
    .events-gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        gap: 12px !important;
    }

    .event-photo {
        height: 140px !important;
    }
}

/* ==================== MOBILE-SPECIFIC UTILITIES ==================== */
/* Touch-friendly buttons and links */
@media (max-width: 768px) {
    .control-btn,
    .submit-btn,
    .view-gallery-btn,
    .subscribe-btn,
    .website-link,
    .mute-btn {
        min-height: 44px !important; /* Minimum touch target size */
        min-width: 44px !important;
        padding: 12px 20px !important;
    }

    /* Improve form input touch targets */
    .form-group input,
    .form-group select,
    .form-group textarea,
    .subscribe-input {
        font-size: 16px !important; /* Prevents iOS zoom */
        padding: 14px !important;
        min-height: 50px !important;
    }

    /* Prevent text selection on interactive elements */
    .control-btn,
    .nav-dot,
    .focus-card,
    .membership-card,
    .event-photo,
    .mute-btn {
        -webkit-tap-highlight-color: transparent !important;
        user-select: none !important;
    }

    /* Improve hero section text readability */
    .hero-title,
    .hero-welcome-text,
    .hero-title-words,
    .kcic-acronym,
    .hero-subtitle {
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8) !important;
    }
}

/* ==================== MOBILE PERFORMANCE OPTIMIZATIONS ==================== */
@media (max-width: 768px) {
    /* Reduce animations for better performance */
    .hero-title-words,
    .card-animate,
    .focus-card,
    .membership-card {
        animation-duration: 0.5s !important;
    }

    /* Disable heavy animations on mobile */
    .ripple-container *,
    .ambient-ripple-indicator,
    .cursor-speed-indicator,
    .click-splash {
        display: none !important;
        animation: none !important;
    }

    /* Optimize image rendering */
    .event-photo img,
    .partner-logo img,
    .hero-video,
    .video-placeholder img {
        image-rendering: -webkit-optimize-contrast !important;
        image-rendering: crisp-edges !important;
    }

    /* Reduce shadow complexity for mobile */
    .focus-card,
    .membership-card,
    .contact-card,
    .partner-logo,
    .mute-btn,
    .control-btn {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
    }

    .focus-card:hover,
    .membership-card:hover,
    .contact-card:hover,
    .partner-logo:hover,
    .mute-btn:hover,
    .control-btn:hover {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
        transform: translateY(-3px) !important;
    }

    /* Optimize video playback for mobile */
    .hero-video,
    .section-video {
        preload: "metadata" !important;
        playsinline: true !important;
        muted: true !important;
    }
    
    /* Lazy loading for gallery images */
    .event-photo img {
        loading: lazy !important;
    }

    /* Reduce animation complexity for gallery */
    .event-photo {
        transition: transform 0.2s ease !important;
    }

    /* Optimize image rendering for gallery */
    .event-photo img {
        image-rendering: -webkit-optimize-contrast !important;
        image-rendering: crisp-edges !important;
    }
}

/* ==================== MOBILE LANDSCAPE ORIENTATION ==================== */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        height: 80vh !important;
        min-height: 400px !important;
    }

    .hero-content {
        bottom: 20% !important;
        left: 5% !important;
        width: 90% !important;
        text-align: left !important;
    }

    .hero-title-words {
        display: inline-block !important;
        margin-right: 5px !important;
        font-size: 1.3rem !important;
    }

    .hero-welcome-text {
        text-align: left !important;
    }

    .kcic-text-container {
        justify-content: flex-start !important;
    }

    .hero-subtitle {
        text-align: left !important;
        max-width: 80% !important;
        margin-left: 0 !important;
    }

    .video-controls {
        bottom: 15% !important;
        right: 20px !important; /* Keep on right side */
        transform: none !important; /* Removed center transform */
        justify-content: flex-end !important; /* Align to right */
    }

    .focus-cards {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .membership-cards {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .events-gallery {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 8px !important;
    }

    .event-photo {
        height: 100px !important;
    }
}

/* ==================== MOBILE FONT SIZE OPTIMIZATION ==================== */
@media (max-width: 768px) {
    /* Base font scaling */
    html {
        font-size: 14px !important;
    }

    /* Headings */
    h1 { 
        font-size: 2rem !important; 
        line-height: 1.2 !important;
    }
    h2 { 
        font-size: 1.8rem !important; 
        line-height: 1.2 !important;
    }
    h3 { 
        font-size: 1.5rem !important; 
        line-height: 1.3 !important;
    }
    h4 { 
        font-size: 1.2rem !important; 
        line-height: 1.3 !important;
    }

    /* Hero specific font sizes */
    .hero-title {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
    }

    /* Paragraphs and text */
    p, li, span, .hero-subtitle {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }

    /* Hero specific line heights */
    .hero-title-words,
    .kcic-acronym {
        line-height: 1.3 !important;
    }
}

/* ==================== MOBILE SCROLL OPTIMIZATIONS ==================== */
@media (max-width: 768px) {
    /* Smooth scrolling for mobile */
    html {
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Prevent horizontal scrolling */
    body, .main-content, .alternating-section, .hero-section {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    /* Hero section specific scroll handling */
    .hero-section {
        position: relative !important;
        overflow: hidden !important;
    }

    /* Ensure content fits within viewport */
    .hero-content {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* ==================== MOBILE NETWORK PERFORMANCE OPTIMIZATIONS ==================== */
@media (max-width: 768px) and (max-resolution: 1.5dppx) {
    /* Lower resolution devices - further optimize */
    .hero-video {
        display: none !important; /* Hide video on low-res devices for performance */
    }

    .video-placeholder {
        display: block !important;
    }
}

/* ==================== MOBILE BATTERY SAVING MODE ==================== */
@media (prefers-reduced-motion: reduce) and (max-width: 768px) {
    /* Disable all animations when user prefers reduced motion */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    /* Hero specific reduced motion */
    .hero-title-words,
    .hero-subtitle,
    .mute-btn,
    .control-btn,
    .play-video-btn,
    .scroll-indicator {
        animation: none !important;
        transition: none !important;
    }

    /* Video handling for reduced motion */
    .hero-video {
        animation: none !important;
    }
    
    /* Gallery specific reduced motion */
    .event-photo,
    .event-photo:hover {
        transform: none !important;
        transition: none !important;
    }
}

/* Add this at the end of index-mobile-style.css */
@media (max-width: 768px) {
    /* Quick fix for hero text position */
    .hero-section {
        height: 60vh !important;
    }
    
    .hero-content {
        top: 60% !important;
        bottom: auto !important;
        transform: translateY(0) !important;
    }
    
    .video-controls {
        top: 50% !important;
        bottom: auto !important;
    }
}