/* ========================================
   LEGENDS ICE CREAM - RESPONSIVE ENHANCEMENTS
   ======================================== */

/* Mobile First Optimizations */
@media (max-width: 767px) {
    /* Video responsivo */
    .video video {
        min-height: 40vh !important;
        max-height: 60vh !important;
    }
    
    /* Carruseles */
    .owl-carousel .item {
        padding: 0.5rem;
    }
    
    .card-top-products {
        height: auto;
        min-height: 300px;
    }
    
    /* Social media icons */
    .fa-brands {
        font-size: clamp(1.25rem, 4vw, 1.5rem) !important;
    }
    
    /* Ubicaciones */
    .locations-cards {
        padding: 1rem !important;
    }
    
    .locations-cards img {
        width: 100%;
        height: auto;
    }
    
    /* Hiring section */
    .background-hiring {
        min-height: auto !important;
    }
    
    /* Footer spacing */
    footer .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Tablet and Mobile Navbar */
@media (max-width: 1199px) {
    /* Dropdowns - Ocultos por defecto, solo visibles al hacer clic */
    .dropdown-menu {
        display: none !important;
        position: static !important;
        border: none !important;
        padding-left: 1rem !important;
        background-color: transparent !important;
    }
    
    .dropdown-menu.show {
        display: block !important;
    }
    
    .dropdown-item {
        padding: 0.5rem 1rem !important;
        white-space: normal !important;
    }
    
    /* Reducir espacio entre items */
    .nav-item {
        margin-bottom: 0.5rem;
    }
    
    .navbar-collapse {
        max-height: 70vh;
        overflow-y: auto;
    }
}

/* Tablet Optimizations */
@media (min-width: 768px) and (max-width: 1023px) {
    /* Video en tablets */
    .video video {
        min-height: 50vh !important;
        max-height: 70vh !important;
    }
    
    /* Navbar - Evitar que se abra automáticamente */
    .navbar-collapse {
        display: none !important;
    }
    
    .navbar-collapse.show {
        display: block !important;
    }
    
    .navbar-collapse.collapsing {
        display: block !important;
    }
    
    /* Cards */
    .card-top-products {
        height: 400px;
    }
    
    /* Ubicaciones - Carrusel ancho completo en tablet */
    .owl-locations-carousel {
        margin: 1rem 0 !important;
        width: 100%;
    }
    
    .locations-sections {
        padding: 0 1rem;
    }
}

/* Desktop Optimizations */
@media (min-width: 1024px) {
    /* Video en desktop */
    .video video {
        height: 100vh !important;
        min-height: 100vh !important;
    }
    
    /* Navbar fijo */
    .nav-bar {
        backdrop-filter: blur(10px);
        background-color: rgba(0, 0, 0, 0.95) !important;
    }
}

/* Landscape mobile devices */
@media (max-height: 500px) and (orientation: landscape) {
    .video video {
        min-height: 100vh !important;
        object-fit: cover;
    }
    
    .pt-20 {
        padding-top: 4rem !important;
    }
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Smooth transitions */
* {
    transition: all 0.3s ease;
}

/* Touch targets for mobile */
@media (max-width: 767px) {
    a, button {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Prevent horizontal scroll */
body {
    overflow-x: hidden;
}

.container-fluid {
    overflow-x: hidden;
}

/* Better text readability on small screens */
@media (max-width: 575px) {
    p, a, span {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}
