/* ============================================
   COMPLETE MOBILE STYLES - ALL SCREEN SIZES
   ============================================ */

/* Fix Feature Boxes (Center Piece) - DESKTOP */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: -4rem;
    position: relative;
    z-index: 10;
    margin-bottom: 4rem;
}

.features-grid .feature-box:nth-child(2) {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: none;
}

.features-grid .feature-box:nth-child(2) .feature-icon {
    color: white;
}

.features-grid .feature-box:nth-child(2) h3 {
    color: white;
}

.features-grid .feature-box:nth-child(2) p {
    color: rgba(255, 255, 255, 0.9);
}

.feature-box {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-10px);
}

/* Hamburger Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: var(--color-secondary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================
   TABLET (992px and below)
   ============================================ */
@media (max-width: 992px) {

    /* Show hamburger, hide search */
    .mobile-menu-toggle {
        display: flex !important;
    }

    .search-toggle {
        display: none !important;
    }

    /* Hide menu by default */
    .nav-menu-wrapper {
        display: none;
        position: fixed;
        top: 140px;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        max-height: calc(100vh - 140px);
        overflow-y: auto;
    }

    /* Show when active */
    .nav-menu-wrapper.active {
        display: block !important;
    }

    /* Stack menu vertically */
    .nav-menu {
        flex-direction: column !important;
        gap: 0 !important;
        padding: 0 !important;
        width: 100%;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--color-gray-200);
        margin: 0;
    }

    .nav-menu a {
        display: block !important;
        padding: 1rem 1.5rem !important;
        text-align: left !important;
        width: 100% !important;
        border-bottom: none !important;
    }

    .nav-menu a::after {
        display: none !important;
    }

    .nav-menu a:hover {
        background: var(--color-gray-50) !important;
    }

    /* Nav container fixes */
    .nav-container {
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
    }

    .site-logo {
        order: 1;
        flex: 0 0 auto;
    }

    .nav-menu-wrapper {
        order: 3;
    }

    .nav-actions {
        order: 2;
        margin-left: auto;
        flex: 0 0 auto;
    }

    /* Feature grid - 2 columns */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 2rem;
        gap: 1.5rem;
    }

    .features-grid .feature-box:nth-child(2) {
        transform: none !important;
    }

    /* Contact grids - 2 columns */
    [style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ============================================
   MOBILE (768px and below)
   ============================================ */
@media (max-width: 768px) {

    /* Top bar adjustments */
    .top-bar {
        padding: 0.5rem 0;
        font-size: 0.85rem;
    }

    .top-bar-content {
        padding: 0 1rem;
    }

    /* Navigation */
    .nav-container {
        padding: 0.75rem 1rem;
        min-height: 70px;
    }

    .site-logo img,
    .custom-logo {
        max-height: 50px;
    }

    .nav-menu-wrapper {
        top: 120px;
    }

    /* Container padding */
    .container {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    /* Feature boxes - stack */
    .features-grid {
        display: flex !important;
        flex-direction: column !important;
        margin-top: 2rem;
        gap: 1.5rem;
    }

    .feature-box {
        width: 100% !important;
        padding: 2rem 1.5rem !important;
    }

    /* ALL grids stack to single column */
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Contact cards */
    [style*="padding: 3rem 2rem"] {
        padding: 2rem 1.5rem !important;
    }

    /* Icon circles smaller */
    [style*="width: 80px; height: 80px"] {
        width: 60px !important;
        height: 60px !important;
    }

    [style*="width: 80px; height: 80px"] span {
        font-size: 2rem !important;
    }

    /* Typography */
    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }

    h3 {
        font-size: 1.25rem !important;
    }

    [style*="font-size: 3rem"] {
        font-size: 2rem !important;
    }

    [style*="font-size: 2.5rem"] {
        font-size: 1.75rem !important;
    }

    [style*="font-size: 1.5rem"] {
        font-size: 1.25rem !important;
    }

    /* Section spacing */
    section[style*="margin-top: 4rem"],
    [style*="margin-top: 4rem"] {
        margin-top: 2rem !important;
    }

    section[style*="margin-bottom: 4rem"],
    [style*="margin-bottom: 4rem"] {
        margin-bottom: 2rem !important;
    }

    /* Max width containers */
    [style*="max-width: 800px"],
    [style*="max-width: 700px"] {
        max-width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Hero section */
    .hero-content h1 {
        font-size: 2.5rem !important;
    }

    .hero-content p {
        font-size: 1.1rem !important;
    }

    /* General section padding */
    .section,
    section {
        padding: 3rem 0 !important;
    }

    /* Before & After */
    .ba-container {
        height: 250px !important;
    }

    /* Page header */
    .page-header {
        min-height: 200px !important;
        padding: var(--spacing-lg) 0 !important;
    }

    .page-header .page-title {
        font-size: 2rem !important;
    }
}

/* ============================================
   SMALL MOBILE (480px and below) - Fold/Flip
   ============================================ */
@media (max-width: 480px) {

    /* Even tighter spacing */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Smaller text */
    h1 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.125rem !important;
    }

    /* Smaller buttons */
    .btn {
        padding: 0.875rem 1.5rem !important;
        font-size: 0.9rem !important;
    }

    /* Tighter feature boxes */
    .feature-box {
        padding: 1.5rem 1rem !important;
    }

    /* Smaller icons */
    [style*="width: 80px; height: 80px"],
    [style*="width: 60px; height: 60px"] {
        width: 50px !important;
        height: 50px !important;
    }

    [style*="width: 80px; height: 80px"] span,
    [style*="width: 60px; height: 60px"] span {
        font-size: 1.5rem !important;
    }

    /* Logo smaller */
    .site-logo img,
    .custom-logo {
        max-height: 40px !important;
    }

    /* Top bar */
    .top-bar {
        font-size: 0.75rem;
    }

    /* Navigation */
    .nav-container {
        padding: 0.5rem 0.75rem;
        min-height: 60px;
    }

    .nav-menu-wrapper {
        top: 110px;
    }

    .nav-menu a {
        padding: 0.875rem 1rem !important;
        font-size: 0.95rem !important;
    }

    /* Tighter sections */
    .section,
    section {
        padding: 2rem 0 !important;
    }

    section[style*="margin-top: 4rem"],
    [style*="margin-top: 4rem"],
    section[style*="margin-top: 2rem"],
    [style*="margin-top: 2rem"] {
        margin-top: 1.5rem !important;
    }

    section[style*="margin-bottom: 4rem"],
    [style*="margin-bottom: 4rem"],
    section[style*="margin-bottom: 2rem"],
    [style*="margin-bottom: 2rem"] {
        margin-bottom: 1.5rem !important;
    }

    /* Contact cards */
    [style*="padding: 3rem 2rem"],
    [style*="padding: 2rem 1.5rem"] {
        padding: 1.5rem 1rem !important;
    }
}

/* ============================================
   EXTRA SMALL (360px and below) - Galaxy Fold
   ============================================ */
@media (max-width: 360px) {
    h1 {
        font-size: 1.5rem !important;
    }

    h2 {
        font-size: 1.25rem !important;
    }

    .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .feature-box {
        padding: 1.25rem 0.75rem !important;
    }

    .site-logo img,
    .custom-logo {
        max-height: 35px !important;
    }
}

/* ============================================
   CONTACT FORM & SECTION FIXES
   ============================================ */

/* Contact Section */
.contact-section {
    padding: 4rem 0;
    background: var(--color-gray-50);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info h2 {
    margin-bottom: 1rem;
}

.contact-details {
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* Contact Form */
.contact-form-wrapper {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.contact-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--color-gray-300);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-block {
    width: 100%;
}

/* Mobile Contact Form Fixes */
@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-form-wrapper {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .contact-section {
        padding: 3rem 0;
    }
    
    .contact-grid {
        gap: 2rem;
    }
    
    .contact-form-wrapper {
        padding: 1.5rem;
        margin: 0 -0.5rem;
        border-radius: 8px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
    }
    
    .contact-icon svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .contact-section {
        padding: 2rem 0;
    }
    
    .contact-form-wrapper {
        padding: 1.25rem;
        margin: 0;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .contact-item {
        gap: 0.75rem;
    }
}


/* ============================================
   CRITICAL MOBILE FIXES - Menu, Toggle, Carousel
   ============================================ */

/* Dark/Light Toggle - Smaller on Mobile */
@media (max-width: 768px) {
    .theme-switch {
        width: 50px !important;
        height: 24px !important;
        right: 1rem !important;
    }
    
    .slider:before {
        height: 16px !important;
        width: 16px !important;
        left: 2px !important;
        bottom: 2px !important;
        font-size: 10px !important;
    }
    
    input:checked + .slider:before {
        transform: translateX(26px) !important;
    }
}

/* Carousel Fixes - Better spacing and buttons */
.carousel-slide {
    min-height: 400px !important;
}

.carousel-content {
    padding: 2rem 1rem !important;
}

.carousel-title {
    font-size: 2rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.2 !important;
}

.carousel-subtitle {
    font-size: 1.125rem !important;
    margin-bottom: 1.5rem !important;
}

/* Carousel Navigation Buttons */
.carousel-nav {
    width: 50px !important;
    height: 50px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10 !important;
}

.carousel-prev {
    left: 1rem !important;
}

.carousel-next {
    right: 1rem !important;
}

.carousel-nav:hover {
    background: white !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}

.carousel-nav svg {
    width: 24px !important;
    height: 24px !important;
    color: var(--color-secondary) !important;
}

/* Carousel Indicators */
.carousel-indicators {
    bottom: 1.5rem !important;
    display: flex !important;
    gap: 0.5rem !important;
    justify-content: center !important;
}

.carousel-indicator {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.5) !important;
    border: 2px solid white !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.carousel-indicator.active {
    background: var(--color-primary) !important;
    transform: scale(1.2) !important;
}

@media (max-width: 768px) {
    .carousel-slide {
        min-height: 350px !important;
    }
    
    .carousel-content {
        padding: 1.5rem 1rem !important;
    }
    
    .carousel-title {
        font-size: 1.75rem !important;
    }
    
    .carousel-subtitle {
        font-size: 1rem !important;
    }
    
    .carousel-nav {
        width: 40px !important;
        height: 40px !important;
    }
    
    .carousel-nav svg {
        width: 20px !important;
        height: 20px !important;
    }
    
    .carousel-prev {
        left: 0.5rem !important;
    }
    
    .carousel-next {
        right: 0.5rem !important;
    }
}

@media (max-width: 480px) {
    .carousel-slide {
        min-height: 300px !important;
    }
    
    .carousel-title {
        font-size: 1.5rem !important;
    }
    
    .carousel-subtitle {
        font-size: 0.95rem !important;
    }
    
    .carousel-buttons {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .carousel-buttons .btn {
        width: 100% !important;
        max-width: 250px !important;
    }
}

/* CRITICAL: Force menu to show when active */
.nav-menu-wrapper.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure hamburger is clickable */
.mobile-menu-toggle {
    position: relative !important;
    z-index: 1002 !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Make sure menu wrapper is positioned correctly */
@media (max-width: 992px) {
    .nav-menu-wrapper {
        position: fixed !important;
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }
}



/* ============================================
   CAROUSEL BUTTON & DOT FIXES
   ============================================ */

/* Make carousel arrows PERFECT circles */
.carousel-prev,
.carousel-next {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: white !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25) !important;
}

/* Move dots higher */
.carousel-indicators {
    bottom: 2.5rem !important;
    z-index: 5 !important;
}

/* Make carousel buttons smaller on mobile */
.carousel-buttons {
    display: flex !important;
    gap: 1rem !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
}

.carousel-buttons .btn {
    padding: 0.875rem 1.75rem !important;
    font-size: 0.95rem !important;
}

@media (max-width: 768px) {
    /* Smaller arrow circles on mobile */
    .carousel-prev,
    .carousel-next {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
    }
    
    .carousel-prev svg,
    .carousel-next svg {
        width: 20px !important;
        height: 20px !important;
    }
    
    /* Dots higher on mobile */
    .carousel-indicators {
        bottom: 3rem !important;
    }
    
    /* Smaller carousel buttons */
    .carousel-buttons .btn {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.9rem !important;
    }
}

@media (max-width: 480px) {
    /* Even smaller on tiny screens */
    .carousel-prev,
    .carousel-next {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
    }
    
    .carousel-prev svg,
    .carousel-next svg {
        width: 18px !important;
        height: 18px !important;
    }
    
    /* Stack buttons vertically */
    .carousel-buttons {
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100% !important;
        max-width: 280px !important;
        margin: 0 auto !important;
    }
    
    .carousel-buttons .btn {
        width: 100% !important;
        padding: 0.875rem 1.25rem !important;
        font-size: 0.875rem !important;
    }
}

