/* ============================================
   MOBILE OPTIMIZATION FIXES
   ============================================ */

/* =======================================
   1. NAVIGATION BAR MOBILE FIXES
   ======================================= */

/* Make navigation bar more compact on mobile */
@media (max-width: 991px) {
    /* Reduce overall navbar height */
    .nav-bar .container {
        padding: 0.5rem 1rem;
    }
    
    /* Make logo bigger on mobile (as requested) */
    .navbar-brand h1 {
        font-size: 1.5rem !important;
        margin-bottom: 0 !important;
        line-height: 1.2;
    }
    
    .navbar-brand h1 i {
        font-size: 1.3rem !important;
    }
    
    /* Compact navbar padding */
    .navbar {
        padding: 0.5rem 0 !important;
    }
    
    /* Optimize hamburger button */
    .navbar-toggler {
        padding: 0.4rem 0.6rem !important;
        font-size: 1rem;
    }
    
    /* Better spacing for mobile nav */
    .navbar .navbar-nav {
        margin-top: 15px !important;
        padding-bottom: 15px !important;
    }
    
    .navbar .navbar-nav .nav-item {
        padding: 12px 15px !important;
    }
}

/* Extra small devices (phones in portrait) */
@media (max-width: 576px) {
    .navbar-brand h1 {
        font-size: 1.3rem !important;
    }
    
    .navbar-brand h1 i {
        font-size: 1.1rem !important;
        margin-right: 0.3rem !important;
    }
}


/* =======================================
   2. CAROUSEL MOBILE FIXES
   ======================================= */

/* Fix carousel content spacing on mobile */
@media (max-width: 991px) {
    /* Add top padding to carousel content to prevent touching navbar */
    .header-carousel .header-carousel-item .carousel-caption {
        padding-top: 80px !important;
    }
    
    /* Make text bigger and punchier for mobile */
    .header-carousel-item h4 {
        font-size: 1.1rem !important;
        margin-bottom: 1.2rem !important;
        font-weight: 700 !important;
    }
    
    .header-carousel-item h1 {
        font-size: 2.5rem !important;
        line-height: 1.15 !important;
        margin-bottom: 1.2rem !important;
        font-weight: 800 !important;
    }
    
    .header-carousel-item p {
        font-size: 1.05rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1.8rem !important;
        font-weight: 400 !important;
    }
    
    /* Make buttons stack better on mobile */
    .header-carousel-item .d-flex {
        flex-direction: column !important;
        gap: 0.75rem;
    }
    
    .header-carousel-item .btn {
        width: 100%;
        text-align: center;
        margin: 0 !important;
    }
}

/* Fix carousel navigation buttons on mobile */
@media (max-width: 767px) {
    /* Move navigation buttons below content */
    .header-carousel .owl-nav .owl-prev,
    .header-carousel .owl-nav .owl-next {
        width: 50px !important;
        height: 50px !important;
        font-size: 20px !important;
    }
    
    /* Position buttons at bottom, centered */
    .header-carousel .owl-nav .owl-prev {
        bottom: 15px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-left: -60px !important;
        z-index: 10;
    }
    
    .header-carousel .owl-nav .owl-next {
        bottom: 15px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-left: 60px !important;
        right: auto !important;
        z-index: 10;
    }
    
    /* Reduce carousel height - less tall as requested */
    .header-carousel .header-carousel-item {
        height: 650px !important;
    }
    
    /* Add more top padding for extra spacing */
    .header-carousel .header-carousel-item .carousel-caption {
        padding-top: 90px !important;
        padding-bottom: 70px !important;
    }
    
    /* Keep text punchy on small screens */
    .header-carousel-item h4 {
        font-size: 1rem !important;
    }
    
    .header-carousel-item h1 {
        font-size: 2.2rem !important;
    }
    
    .header-carousel-item p {
        font-size: 1rem !important;
    }
}

/* Extra small devices - further optimization */
@media (max-width: 576px) {
    /* Shorter height for small phones */
    .header-carousel .header-carousel-item {
        height: 600px !important;
    }
    
    .header-carousel-item h1 {
        font-size: 2rem !important;
    }
    
    .header-carousel-item .btn {
        padding: 0.7rem 1.8rem !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
    }
    
    /* Smaller nav buttons */
    .header-carousel .owl-nav .owl-prev,
    .header-carousel .owl-nav .owl-next {
        width: 45px !important;
        height: 45px !important;
        font-size: 18px !important;
    }
    
    .header-carousel .owl-nav .owl-prev {
        margin-left: -55px !important;
    }
    
    .header-carousel .owl-nav .owl-next {
        margin-left: 55px !important;
    }
}


/* =======================================
   3. HIDE CAROUSEL IMAGES ON MOBILE
   ======================================= */

/* Hide carousel images on mobile (as requested) */
@media (max-width: 991px) {
    .header-carousel .calrousel-img {
        display: none !important;
    }
    
    /* Center the text content when image is hidden */
    .header-carousel .row {
        justify-content: center !important;
    }
    
    .header-carousel .col-lg-7,
    .header-carousel .col-lg-5 {
        text-align: center !important;
    }
    
    .header-carousel-item .text-sm-center,
    .header-carousel-item .text-md-start,
    .header-carousel-item .text-md-end {
        text-align: center !important;
    }
    
    .header-carousel-item .justify-content-md-start,
    .header-carousel-item .justify-content-md-end {
        justify-content: center !important;
    }
}


/* =======================================
   4. GENERAL MOBILE IMPROVEMENTS
   ======================================= */

/* Better spacing for mobile sections */
@media (max-width: 767px) {
    /* Reduce padding on sections for mobile */
    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Make containers more mobile-friendly */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Better heading sizes on mobile */
    .display-1 {
        font-size: 2.5rem !important;
    }
    
    .display-4 {
        font-size: 1.75rem !important;
    }
}

/* Phone call button optimization on mobile */
@media (max-width: 1199px) {
    .d-none.d-xl-flex {
        display: none !important;
    }
}


/* =======================================
   5. ENSURE PROPER SPACING
   ======================================= */

/* Add safe area for notched devices */
@media (max-width: 767px) {
    .nav-bar {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    .header-carousel .header-carousel-item .carousel-caption {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }
}


/* =======================================
   6. SMOOTH TRANSITIONS
   ======================================= */

/* Smooth transitions for all mobile adjustments */
.navbar-brand h1,
.header-carousel-item h1,
.header-carousel-item h4,
.header-carousel-item p,
.header-carousel .owl-nav .owl-prev,
.header-carousel .owl-nav .owl-next {
    transition: all 0.3s ease-in-out;
}


/* =======================================
   7. ORANGE CTA BUTTON - ATTENTION GRABBING!
   ======================================= */

/* Make the CTA button ORANGE, BIGGER and POPPING */
.nav-btn .btn-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%) !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4) !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    padding: 0.75rem 1.8rem !important;
    transition: all 0.3s ease !important;
    animation: pulse 2s infinite !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Hover effect - even brighter */
.nav-btn .btn-primary:hover {
    background: linear-gradient(135deg, #ff8c42 0%, #ffa552 100%) !important;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6) !important;
    transform: translateY(-2px) !important;
    color: white !important;
}

/* Pulse animation to grab attention */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(255, 107, 53, 0.7);
    }
    100% {
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    }
}

/* Shine effect for extra attention */
.nav-btn .btn-primary::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.nav-btn .btn-primary:hover::before {
    left: 100%;
}

/* Mobile optimization for CTA button */
@media (max-width: 991px) {
    .nav-btn .btn-primary {
        font-size: 0.9rem !important;
        padding: 0.7rem 1.5rem !important;
        margin-left: 0 !important;
        width: 100%;
        text-align: center;
    }
}

/* Make button bigger on desktop */
@media (min-width: 992px) {
    .nav-btn .btn-primary {
        font-size: 1rem !important;
        padding: 0.85rem 2rem !important;
    }
}

/* Ensure button stays orange and visible */
.navbar .nav-btn .btn,
.navbar .nav-btn a.btn {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%) !important;
    color: white !important;
    border: none !important;
}
