/* ===== RESPONSIVE DESIGN - UPDATED FOR MOBILE SCROLL FIX ===== */

/* ===== BASE FIXES FOR ALL DEVICES ===== */
* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

/* Ensure all images are responsive (videos handled in mobile queries only) */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent containers from exceeding viewport width */
.container,
.hero,
.section,
[class*="wrapper"],
[class*="container"] {
    max-width: 100%;
    overflow-x: hidden;
}

/* ===== TABLETS AND SMALL DESKTOPS (992px to 1199px) ===== */
@media (max-width: 1199px) {
    .container {
        padding: 0 var(--spacing-xl);
        max-width: 100%;
    }
    
    .hero-content {
        padding: var(--spacing-xl);
        margin: 20px auto;
        max-width: 100%;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .video-feature-wrapper {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .feature-video-content {
        padding-right: 0;
        text-align: center;
    }
    
    .feature-list {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .testimonial-rotator {
        height: 350px;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
}

/* ===== TABLETS (768px to 991px) ===== */
@media (max-width: 991px) {
    /* Force proper width constraints */
    html, body {
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .container {
        padding: 0 var(--spacing-lg);
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Navigation */
    .nav-desktop {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .header-actions {
        display: none;
    }
    
    /* Hero */
    .hero {
        min-height: 600px;
        margin-top: 0 !important;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .hero-content {
        padding: var(--spacing-lg);
        margin: 10px auto;
        max-width: 100%;
        width: 100%;
    }
    
    .hero-title {
        font-size: 1.5rem;
        word-wrap: break-word;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-features {
        gap: var(--spacing-md);
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .feature-chip {
        padding: 0.75rem 1.25rem;
        font-size: 0.8rem;
        flex-shrink: 0;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
    }
    
    /* Live Stats */
    .live-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    .live-stats-bar {
        margin: 20px auto;
        padding: var(--spacing-xl) 0;
        width: 100%;
        overflow-x: hidden;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    /* Solutions */
    .solutions-grid-full {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    /* Testimonials */
    .testimonial-rotator {
        height: 300px;
        width: 100%;
        max-width: 100%;
    }
    
    .testimonial-card {
        padding: var(--spacing-lg);
    }
    
    /* Videos and Images */
    .platform-video,
    .feature-video-container,
    .feature-video-container video,
    .video-grid video {
        width: 100%;
        max-width: 100%;
        height: auto;
    }
    
    /* Footer */
    .footer-main {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-xl);
    }
    
    .footer-brand {
        padding-right: 0;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-certifications {
        justify-content: center;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        text-align: left;
    }
    
    /* Live Support */
    .live-support {
        bottom: var(--spacing-lg);
        right: var(--spacing-lg);
    }
    
    .support-toggle {
        width: 48px;
        height: 48px;
        font-size: 1.125rem;
    }
}

/* ===== MOBILE DEVICES (576px to 767px) ===== */
@media (max-width: 767px) {
    /* Critical width constraints */
    html, body {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        position: relative;
    }

    * {
        max-width: 100%;
    }

    .container {
        padding: 0 var(--spacing-md);
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Reduce header padding on mobile to push logo left */
    .header .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* Tighter logo spacing on mobile */
    .logo a {
        gap: 6px;
    }

    /* Hide breadcrumb on mobile - removes white gap between navbar and hero */
    .breadcrumb {
        display: none !important;
    }
    
    /* Typography */
    h1 { font-size: 1.5rem; word-wrap: break-word; }
    h2 { font-size: 1.25rem; word-wrap: break-word; }
    h3 { font-size: 1.125rem; word-wrap: break-word; }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    /* Hero */
    .hero {
        min-height: 500px;
        margin-top: 0 !important;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .hero-content {
        padding: var(--spacing-md);
        margin: 5px auto;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .hero-title {
        font-size: 1.25rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
        margin-bottom: var(--spacing-lg);
        word-wrap: break-word;
    }
    
    .hero-badge {
        padding: 0.5rem 1rem;
        max-width: 100%;
    }
    
    .badge-text {
        font-size: 0.75rem;
    }
    
    .hero-features {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
        width: 100%;
        max-width: 100%;
    }
    
    .feature-chip {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        word-wrap: break-word;
        text-align: center;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
        max-width: none;
    }
    
    .trusted-logos {
        gap: var(--spacing-sm);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
    }
    
    .logo-item {
        padding: 0.7rem 1.125rem;
        font-size: 0.8rem;
        flex-shrink: 0;
    }
    
    /* Live Stats */
    .live-stats-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        width: 100%;
    }
    
    .live-stats-bar {
        margin: 10px auto;
        padding: var(--spacing-lg) 0;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .stat-card {
        padding: var(--spacing-lg);
        width: 100%;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    /* Solutions */
    .solutions-grid-full {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .solution-card,
    .solution-item {
        width: 100%;
        max-width: 100%;
    }
    
    /* Testimonials */
    .testimonial-rotator {
        height: 250px;
        margin: 20px auto;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .testimonial-card {
        padding: var(--spacing-md);
        width: 100%;
    }
    
    .testimonial-text {
        font-size: 0.85rem;
        word-wrap: break-word;
    }
    
    /* Video Grid */
    .video-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }
    
    /* Videos and Images - Critical Responsive Fixes */
    .platform-video,
    .feature-video-container,
    .feature-video-container video,
    .feature-video-container iframe,
    .video-grid video,
    .video-grid iframe,
    img,
    video,
    iframe {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        display: block;
    }
    
    /* Feature Video */
    .video-feature-wrapper {
        grid-template-columns: 1fr;
        width: 100%;
        gap: var(--spacing-lg);
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .feature-item i {
        width: 45px;
        height: 45px;
        margin: 0 auto;
    }
    
    /* Logo Slider - Prevent horizontal overflow */
    .logo-slider-container {
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
    }
    
    .logo-slider-track {
        width: max-content;
    }
    
    .logo-slider-item {
        width: 150px;
        height: 80px;
        flex-shrink: 0;
    }
    
    /* Partners Section */
    .partners-section {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        padding: 40px 0;
    }
    
    .partners-section::before,
    .partners-section::after {
        width: 50px;
    }
    
    /* Footer */
    .footer-links {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-xl);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .contact-item i {
        margin-top: 0;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .footer-technologies {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* Live Support */
    .live-support {
        bottom: var(--spacing-md);
        right: var(--spacing-md);
    }
    
    .support-toggle {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
    
    .support-options {
        min-width: 150px;
        right: -10px;
    }
    
    /* Slide Indicators */
    .slide-indicators {
        bottom: 20px;
        display: flex;
        justify-content: center;
        max-width: 100%;
        overflow-x: auto;
    }
    
    .scroll-indicator {
        bottom: 60px;
    }
    
    .scroll-button {
        width: 38px;
        height: 38px;
    }
    
    .scroll-button i {
        font-size: 1.125rem;
    }
    
    /* CTA */
    .cta-actions {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .cta-actions .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .cta-features {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-md);
    }
    
    /* Tables - Make them scrollable */
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ===== SMALL MOBILE DEVICES (up to 575px) ===== */
@media (max-width: 575px) {
    /* Strict width enforcement */
    html, body {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .container {
        padding: 0 var(--spacing-md);
        width: 100%;
        max-width: 100%;
    }

    /* Tighter header padding on small screens */
    .header .container {
        padding-left: 0.4rem;
        padding-right: 0.4rem;
    }
    
    /* Hero */
    .hero {
        min-height: 450px;
        width: 100%;
        max-width: 100vw;
    }
    
    .hero-content {
        padding: var(--spacing-sm);
        margin: 0 auto;
        width: 100%;
    }
    
    .hero-title {
        font-size: 1.125rem;
        word-wrap: break-word;
    }
    
    .hero-subtitle {
        font-size: 0.8rem;
        margin-bottom: var(--spacing-lg);
    }
    
    .hero-badge {
        display: none;
    }
    
    .hero-features {
        grid-template-columns: 1fr;
        width: 100%;
    }
    
    .slide-indicators {
        display: none;
    }
    
    .scroll-indicator {
        bottom: 30px;
    }
    
    .scroll-button {
        width: 34px;
        height: 34px;
    }
    
    .scroll-button i {
        font-size: 1rem;
    }
    
    /* Testimonials */
    .testimonial-rotator {
        height: auto;
        min-height: 200px;
        width: 100%;
    }
    
    .testimonial-text {
        font-size: 0.8rem;
        padding-left: var(--spacing-md);
    }
    
    .testimonial-author {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    /* Logo Slider for small screens */
    .logo-slider-item {
        width: 120px;
        height: 70px;
    }
    
    .logo-slider-item img {
        max-height: 40px;
    }
    
    /* Fix scroll issue on mobile */
    html {
        scroll-behavior: auto;
    }
}

/* ===== SOLUTIONS DROPDOWN RESPONSIVE ===== */
@media (max-width: 991px) {
    .dropdown-menu {
        width: 550px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        max-width: 90vw;
    }
}

@media (max-width: 767px) {
    /* Hide desktop dropdown completely on mobile */
    .nav-desktop .dropdown-menu {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }
    
    .nav-desktop .nav-dropdown:hover .dropdown-menu {
        display: none !important;
    }
    
    /* Mobile dropdown list */
    .mobile-solutions-list {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding-left: 15px;
        border-left: 2px solid rgba(255, 255, 255, 0.1);
        margin-top: 5px;
        width: 100%;
    }
    
    .mobile-solutions-list.show {
        max-height: 400px;
        padding: 10px;
    }
    
    .mobile-solutions-list li {
        margin-bottom: 5px;
    }
    
    .mobile-solutions-list a {
        color: #ffffff !important;
        font-size: 0.85rem;
        padding: 8px 12px;
        word-wrap: break-word;
    }
    
    .mobile-solutions-list a:hover {
        color: var(--primary-green) !important;
    }
    
    /* Ensure mobile dropdown works */
    .mobile-dropdown-parent {
        position: relative;
        width: 100%;
    }
    
    .mobile-solutions-list {
        background: rgba(255, 255, 255, 0.05);
        border-radius: var(--radius-md);
        margin: 8px 0 8px 15px;
        padding-left: 10px;
    }
    
    .mobile-solutions-list li {
        margin-bottom: 4px;
    }
    
    .mobile-solutions-list a {
        padding: 10px 14px;
        border-radius: var(--radius-sm);
        display: block;
    }
    
    .mobile-solutions-list a:hover {
        background: rgba(76, 175, 80, 0.1);
    }
}

@media (max-width: 575px) {
    .mobile-solutions-list {
        padding-left: 10px;
    }
    
    .mobile-solutions-list a {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
    
    .mobile-solutions-list.show {
        max-height: 350px;
    }
}

/* ===== RESPONSIVE MOBILE MENU FIXES ===== */
@media (max-width: 991px) {
    /* Force header to be visible */
    .header {
        background: #000000 !important;
        width: 100%;
    }
    
    /* Ensure mobile toggle is visible */
    .menu-toggle {
        display: flex !important;
    }
    
    /* Hide desktop navigation */
    .nav-desktop {
        display: none !important;
    }
    
    /* Hide header actions on mobile */
    .header-actions {
        display: none !important;
    }
    
    /* Remove gap between header and hero on mobile */
    .hero {
        margin-top: 0 !important;
    }
    
    /* Fix body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    /* Mobile navigation */
    .nav-mobile {
        max-width: 90vw;
    }
}

@media (max-width: 576px) {
    /* Adjust mobile menu width for small screens */
    .nav-mobile {
        width: 85%;
        max-width: 300px;
    }
    
    /* Better touch targets */
    .nav-mobile a,
    .mobile-close,
    .menu-toggle {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Adjust hero for mobile */
    .hero {
        min-height: 500px;
    }
    
    .hero-content {
        padding: 30px 20px;
        margin: 20px auto;
    }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .slide-indicator,
    .support-option,
    .nav-mobile a,
    .dropdown-content a,
    .link-column a {
        min-height: 44px;
        min-width: 44px;
    }
    
    .dropdown:hover .dropdown-content {
        opacity: 0;
        visibility: hidden;
    }
    
    .solution-item:hover,
    .industry-card:hover,
    .stat-card:hover {
        transform: none;
    }
    
    /* Disable hover animations on touch devices */
    .hero-slide {
        pointer-events: none;
    }
}

/* ===== REDUCED MOTION SUPPORT ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-slide {
        transition: none;
    }
    
    .btn:hover,
    .solution-item:hover,
    .industry-card:hover,
    .stat-card:hover {
        transform: none !important;
    }
    
    .scroll-button {
        animation: none;
    }
    
    .animated-text,
    .pulse-text {
        animation: none !important;
    }
    
    .testimonial-slide {
        animation: none !important;
    }
}

/* ===== LANDSCAPE ORIENTATION FOR MOBILE ===== */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: 600px;
    }
    
    .hero-content {
        padding: var(--spacing-sm) var(--spacing-md);
        margin-top: 0;
    }
    
    .hero-title {
        font-size: 1.25rem;
        margin-bottom: var(--spacing-xs);
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-features {
        display: none;
    }
    
    .hero-actions {
        flex-direction: row;
        gap: var(--spacing-sm);
    }
    
    .hero-actions .btn {
        width: auto;
        min-width: auto;
        padding: 0.75rem 1.5rem;
    }
    
    .hero-trusted {
        display: none;
    }
    
    .testimonial-rotator {
        height: 150px;
    }
}

/* ===== EXTRA SMALL DEVICES (< 400px) ===== */
@media (max-width: 399px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .hero-title {
        font-size: 1rem;
    }
    
    .hero-subtitle {
        font-size: 0.75rem;
    }
    
    .btn {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
    }
    
    .logo-slider-item {
        width: 100px;
        height: 60px;
    }
}/* ===== SIMPLE MOBILE ADJUSTMENTS ===== */
@media (max-width: 991px) {
    /* 1. Logo - just 2px left shift */
    .logo {
        transform: translateX(-2px);
    }
    
    /* 2. Remove header-hero gap */
    .hero {
        margin-top: 0 !important;
    }
    
    /* 3. Add internal hero spacing */
    .hero .container {
        padding-top: 40px !important; /* Internal spacing only */
        padding-bottom: 40px !important;
    }
    
    /* Specific element spacing */
    .flashing-words-container {
        margin-top: 10px !important;
    }
    
    .hero-actions {
        margin-top: 25px !important;
    }
}
/* Ensure map container is visible */
#contactMap {
    background-color: #e9f0f5;
    min-height: 400px;
    width: 100%;
    height: 100%;
}

.map-container {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    border-radius: 20px;
}
/* ===== HERO IMAGES - RESPONSIVE FIX FOR ALL SCREENS ===== */

/* Base hero container - ensures images fill properly */
.hero {
    position: relative;
    width: 100%;
    min-height: 600px;
    overflow: hidden;
}

/* Hero slides container */
.hero-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Individual hero slides - CRITICAL FOR IMAGE DISPLAY */
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

/* ===== DESKTOP (1200px and above) ===== */
@media (min-width: 1200px) {
    .hero {
        min-height: 650px;
    }
    
    .hero-slide {
        background-attachment: fixed; /* Optional parallax effect on desktop */
    }
}

/* ===== LAPTOPS AND SMALL DESKTOPS (992px to 1199px) ===== */
@media (min-width: 992px) and (max-width: 1199px) {
    .hero {
        min-height: 550px;
    }
}

/* ===== TABLETS (768px to 991px) ===== */
@media (min-width: 768px) and (max-width: 991px) {
    .hero {
        min-height: 500px;
    }
    
    .hero-slide {
        background-position: center !important;
    }
}

/* ===== MOBILE LANDSCAPE AND SMALL TABLETS (576px to 767px) ===== */
@media (min-width: 576px) and (max-width: 767px) {
    .hero {
        min-height: 450px;
    }
    
    .hero-slide {
        background-position: center 30% !important; /* Adjust focal point */
    }
}

/* ===== MOBILE PORTRAIT (up to 575px) ===== */
@media (max-width: 575px) {
    .hero {
        min-height: 400px;
    }
    
    .hero-slide {
        background-position: center 25% !important; /* Show more of the top/subject */
        background-size: cover !important;
    }
}

/* ===== SMALL MOBILE (up to 375px) ===== */
@media (max-width: 375px) {
    .hero {
        min-height: 350px;
    }
    
    .hero-slide {
        background-position: center 20% !important;
    }
}

/* ===== EXTRA SMALL MOBILE (up to 320px) ===== */
@media (max-width: 320px) {
    .hero {
        min-height: 300px;
    }
}

/* ===== LANDSCAPE ORIENTATION ON MOBILE ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
    
    .hero-slide {
        background-position: center center !important;
    }
}

/* ===== HIGH DPI/RETINA DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optional: You can serve higher resolution images via JavaScript */
    .hero-slide {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ===== DARK OVERLAY FOR TEXT READABILITY ===== */
.hero-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /* Subtle dark overlay */
    z-index: 1;
    pointer-events: none;
}

/* Ensure text stays above overlay */
.hero-content,
.hero .container {
    position: relative;
    z-index: 3;
}

/* ===== HERO CONTENT RESPONSIVE SPACING ===== */
@media (max-width: 767px) {
    .hero .container {
        padding-top: 60px !important;
        padding-bottom: 40px !important;
    }
    
    .hero-content {
        padding: 0 15px;
    }
}

@media (max-width: 575px) {
    .hero .container {
        padding-top: 50px !important;
        padding-bottom: 30px !important;
    }
}

/* ===== FIX FOR IPAD AND TABLET SPECIFIC ISSUES ===== */
@media (min-width: 768px) and (max-width: 1024px) {
    .hero-slide {
        background-attachment: scroll; /* Disable parallax on tablets */
    }
}

/* ===== FIX FOR VERY TALL SCREENS ===== */
@media (min-aspect-ratio: 16/9) {
    .hero {
        min-height: 50vw; /* Adjust based on aspect ratio */
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.hero-slide {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: opacity, transform;
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    .hero-slide {
        transition: opacity 0.5s ease; /* Faster transition on touch devices */
    }
}

/* ===== REDUCED MOTION PREFERENCE ===== */
@media (prefers-reduced-motion: reduce) {
    .hero-slide {
        transition: none;
    }
}