/**
 * Responsive Fixes for Vanya Spaces
 * Ensures proper display on all screen sizes
 */

/* ============================================
   GLOBAL RESPONSIVE FIXES
   ============================================ */

/* Ensure all containers are responsive */
.container,
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    max-width: 100%;
}

.row {
    margin-left: -15px;
    margin-right: -15px;
}

.row > * {
    padding-left: 15px;
    padding-right: 15px;
}

/* ============================================
   LARGE SCREENS (1920px+)
   ============================================ */
@media (min-width: 1920px) {
    .container {
        max-width: 1400px;
    }
}

/* ============================================
   DESKTOP LARGE (1400px - 1919px)
   ============================================ */
@media (min-width: 1400px) and (max-width: 1919px) {
    .container {
        max-width: 1320px;
    }
}

/* ============================================
   DESKTOP (1200px - 1399px)
   ============================================ */
@media (min-width: 1200px) and (max-width: 1399px) {
    .container {
        max-width: 1140px;
    }
}

/* ============================================
   LAPTOP & TABLET LANDSCAPE (992px - 1199px)
   ============================================ */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    /* Adjust font sizes for better readability */
    h1 { font-size: 2.2rem !important; }
    h2 { font-size: 1.9rem !important; }
    h3 { font-size: 1.6rem !important; }
    h4 { font-size: 1.4rem !important; }
    h5 { font-size: 1.2rem !important; }
    h6 { font-size: 1.1rem !important; }
    
    /* Adjust spacing */
    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .mb-5 {
        margin-bottom: 3rem !important;
    }
}

/* ============================================
   TABLET PORTRAIT (768px - 991px)
   ============================================ */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    /* Adjust font sizes */
    h1 { font-size: 2rem !important; }
    h2 { font-size: 1.8rem !important; }
    h3 { font-size: 1.5rem !important; }
    h4 { font-size: 1.3rem !important; }
    
    /* Adjust spacing */
    .py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
    
    .mb-5 {
        margin-bottom: 2.5rem !important;
    }
    
    /* Two columns on tablet */
    .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* ============================================
   MOBILE LARGE (576px - 767px)
   ============================================ */
@media (min-width: 576px) and (max-width: 767px) {
    .container {
        max-width: 540px;
    }
    
    /* Adjust font sizes */
    h1 { font-size: 1.8rem !important; }
    h2 { font-size: 1.6rem !important; }
    h3 { font-size: 1.4rem !important; }
    h4 { font-size: 1.2rem !important; }
    
    /* Adjust spacing */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .mb-5 {
        margin-bottom: 2rem !important;
    }
    
    /* Full width columns */
    .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .col-lg-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Stack form elements */
    .search-container {
        flex-direction: column !important;
    }
    
    .search-field {
        border-bottom: 1px solid #e9ecef;
    }
}

/* ============================================
   MOBILE SMALL (320px - 575px)
   ============================================ */
@media (max-width: 575px) {
    .container {
        max-width: 100%;
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Adjust font sizes */
    h1 { font-size: 1.6rem !important; }
    h2 { font-size: 1.4rem !important; }
    h3 { font-size: 1.3rem !important; }
    h4 { font-size: 1.1rem !important; }
    
    /* Adjust spacing */
    .py-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    .mb-5 {
        margin-bottom: 1.5rem !important;
    }
    
    .mb-4 {
        margin-bottom: 1.25rem !important;
    }
    
    /* Full width columns */
    .col-lg-3,
    .col-lg-6,
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Stack all elements */
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .row > * {
        padding-left: 10px;
        padding-right: 10px;
        margin-bottom: 1rem;
    }
    
    /* Stack search container */
    .search-container {
        flex-direction: column !important;
    }
    
    .search-field {
        border-bottom: 1px solid #e9ecef;
        padding: 10px;
    }
    
    /* Adjust button sizes */
    .btn {
        font-size: 0.875rem !important;
        padding: 0.5rem 1rem !important;
    }
    
    /* Adjust card padding */
    .card {
        margin-bottom: 1rem !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
}

/* ============================================
   EXTRA SMALL DEVICES (320px - 375px)
   ============================================ */
@media (max-width: 375px) {
    .container {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    /* Further reduce font sizes */
    h1 { font-size: 1.4rem !important; }
    h2 { font-size: 1.3rem !important; }
    h3 { font-size: 1.2rem !important; }
    
    /* Reduce spacing */
    .py-5 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    
    .btn {
        font-size: 0.75rem !important;
        padding: 0.4rem 0.8rem !important;
    }
}

/* ============================================
   RESPONSIVE IMAGES
   ============================================ */
img,
video {
    max-width: 100%;
    height: auto;
}

.img-fluid {
    max-width: 100%;
    height: 70vh;
}

/* ============================================
   RESPONSIVE EMBEDS
   ============================================ */
.embed-responsive {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.embed-responsive::before {
    content: "";
    display: block;
    padding-bottom: 56.25%;
}

.embed-responsive-item {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100%;
    width: 100%;
    border: 0;
}

/* ============================================
   RESPONSIVE TABLES
   ============================================ */
@media (max-width: 991px) {
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ============================================
   FIX OVERFLOW ISSUES
   ============================================ */
body {
    overflow-x: hidden !important;
}

section {
    overflow-x: hidden !important;
}

/* ============================================
   RESPONSIVE TEXT
   ============================================ */
@media (max-width: 767px) {
    .display-1 { font-size: 3rem !important; }
    .display-2 { font-size: 2.75rem !important; }
    .display-3 { font-size: 2.5rem !important; }
    .display-4 { font-size: 2.25rem !important; }
    .display-5 { font-size: 2rem !important; }
    .display-6 { font-size: 1.75rem !important; }
}

@media (max-width: 575px) {
    .display-1 { font-size: 2.5rem !important; }
    .display-2 { font-size: 2.25rem !important; }
    .display-3 { font-size: 2rem !important; }
    .display-4 { font-size: 1.75rem !important; }
    .display-5 { font-size: 1.5rem !important; }
    .display-6 { font-size: 1.25rem !important; }
}

/* ============================================
   ANIMATED CARDS RESPONSIVE
   ============================================ */
.animated-cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

@media (max-width: 991px) {
    .animated-cards-container {
        gap: 15px;
    }
}

@media (max-width: 767px) {
    .animated-cards-container {
        gap: 10px;
    }
    
    .card {
        flex: 0 0 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
}

@media (max-width: 575px) {
    .animated-cards-container {
        gap: 8px;
    }
    
    .card {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 15px;
    }
}

/* ============================================
   RESPONSIVE NAVIGATION
   ============================================ */
@media (max-width: 991px) {
    .ul-header-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: #fff;
        transition: left 0.3s ease;
        z-index: 9999;
        overflow-y: auto;
    }
    
    .ul-header-nav.mobile-open {
        left: 0;
    }
}

/* ============================================
   RESPONSIVE HERO SECTION
   ============================================ */
.hero-section-video {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 400px;
    max-height: 87vh;
}

@media (max-width: 991px) {
    .hero-section-video {
        height: 450px;
        min-height: 450px;
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
    
    .hero-banner-swiper {
        top: 0 !important;
        height: 100% !important;
        min-height: 450px !important;
    }
    
    .hero-banner-swiper .swiper-slide {
        height: 100% !important;
        min-height: 450px !important;
    }
    
    .banner-slide-item {
        height: 100% !important;
        min-height: 450px !important;
    }
    
    .banner-image,
    .banner-slide-item .img-fluid {
        height: 100% !important;
        width: 100% !important;
        object-fit: cover !important;
        min-height: 450px !important;
    }
}

@media (max-width: 767px) {
    .hero-section-video {
        height: 400px;
        min-height: 400px;
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
    
    .hero-banner-swiper {
        top: 0 !important;
        height: 100% !important;
        min-height: 400px !important;
    }
    
    .hero-banner-swiper .swiper-slide {
        height: 100% !important;
        min-height: 400px !important;
    }
    
    .banner-slide-item {
        height: 100% !important;
        min-height: 400px !important;
    }
    
    .banner-image,
    .banner-slide-item .img-fluid {
        height: 100% !important;
        width: 100% !important;
        object-fit: cover !important;
        min-height: 400px !important;
    }
}

@media (max-width: 575px) {
    .hero-section-video {
        height: 350px;
        min-height: 350px;
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
    
    .hero-banner-swiper {
        top: 0 !important;
        height: 100% !important;
        min-height: 350px !important;
    }
    
    .hero-banner-swiper .swiper-slide {
        height: 100% !important;
        min-height: 350px !important;
    }
    
    .banner-slide-item {
        height: 100% !important;
        min-height: 350px !important;
    }
    
    .banner-image,
    .banner-slide-item .img-fluid {
        height: 100% !important;
        width: 100% !important;
        object-fit: cover !important;
        min-height: 350px !important;
    }
}

@media (max-width: 400px) {
    .hero-section-video {
        height: 300px;
        min-height: 300px;
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
    
    .hero-banner-swiper {
        top: 0 !important;
        height: 100% !important;
        min-height: 300px !important;
    }
    
    .hero-banner-swiper .swiper-slide {
        height: 100% !important;
        min-height: 300px !important;
    }
    
    .banner-slide-item {
        height: 100% !important;
        min-height: 300px !important;
    }
    
    .banner-image,
    .banner-slide-item .img-fluid {
        height: 100% !important;
        width: 100% !important;
        object-fit: cover !important;
        min-height: 300px !important;
    }
}

/* ============================================
   RESPONSIVE SECTIONS
   ============================================ */
section {
    width: 100%;
    overflow-x: hidden;
}

.py-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

@media (max-width: 767px) {
    .py-5 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

@media (max-width: 575px) {
    .py-5 {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
}

