/* Responsive Styles for KEX Construction */

/* Hide mobile wizard section on desktop */
.mobile-wizard-section {
    display: none;
}

/* Tablet Styles (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .hero-subtitle {
        font-size: 20px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .about-content {
        gap: 40px;
    }
    
    .services-grid,
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Styles (max-width: 768px) */
@media (max-width: 768px) {
    /* Typography */
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .section-subtitle {
        font-size: 16px;
    }
    
    /* Top Bar */
    .top-bar-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .top-bar-left,
    .top-bar-right {
        width: 100%;
        justify-content: center;
    }
    
    .top-bar-left a {
        margin: 0 10px;
    }
    
    /* Navbar */
    .navbar-content {
        flex-wrap: wrap;
        position: relative;
    }
    
    .navbar-toggle {
        display: flex;
        order: 3;
    }
    
    .navbar-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: all 0.3s ease;
        z-index: 999;
    }
    
    .navbar-menu.active {
        max-height: 600px;
        opacity: 1;
    }
    
    .navbar-menu li {
        width: 100%;
        text-align: center;
        padding: 10px 0;
    }
    
    .navbar-menu li a {
        display: block;
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .navbar-btn {
        display: none;
        width: 100%;
        text-align: center;
        margin: 15px 0 0 0;
        padding: 12px 20px;
    }
    
    .navbar-menu.active ~ .navbar-btn {
        display: block;
        position: static;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 10px 0 0 20px;
        display: none;
    }
    
    .dropdown:hover .dropdown-menu {
        display: block;
    }
    
    /* Hero Section - Mobile Optimized */
    .hero-section {
        height: auto;
        min-height: 500px; /* Further reduced */
        padding-top: 120px; /* Further reduced top padding */
        padding-bottom: 80px; /* Further increased bottom padding */
        position: relative;
        background-color: #1D1B1B; /* Dark background to prevent white flash */
    }
    
    .hero-slider {
        background-color: #1D1B1B; /* Match hero section background */
    }
    
    .hero-slide {
        background-color: #1D1B1B; /* Ensure slides have dark background */
    }
    
    .hero-content {
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding-top: 0;
        position: relative;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 0;
        width: 100%;
        display: block;
        text-align: center; /* Center text on mobile */
        padding: 20px 0; /* Add vertical padding to text container */
    }
    
    /* SHOW hero text AND buttons on mobile */
    .hero-text {
        display: block !important;
        max-width: 100% !important;
        text-align: center !important;
        padding: 0 20px; /* Add horizontal padding */
    }
    
    .hero-title {
        margin-bottom: 15px !important;
    }
    
    .hero-subtitle {
        margin-bottom: 25px !important;
    }
    
    .hero-buttons {
        display: flex !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 15px !important;
    }
    
    /* Reduce button width on mobile */
    .hero-buttons .btn {
        padding: 10px 20px !important;
        font-size: 14px !important;
        min-width: auto !important;
        width: auto !important;
    }
    
    /* Make all hero buttons transparent on mobile */
    .hero-buttons .btn-primary {
        background-color: transparent !important;
        color: var(--white) !important;
        border: 2px solid var(--white) !important;
    }
    
    .hero-buttons .btn-primary:hover {
        background-color: var(--white) !important;
        color: var(--structural) !important;
    }
    
    /* HIDE wizard card INSIDE the slider on mobile */
    .hero-grid .hero-wizard-card {
        display: none !important;
    }
    
    /* Hide dots navigation on mobile - it overlaps the card */
    .hero-dots {
        display: none !important;
    }
    
    /* Keep side navigation arrows */
    .hero-prev,
    .hero-next {
        padding: 12px 16px;
        font-size: 20px;
        z-index: 5;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .hero-prev {
        left: 10px;
    }
    
    .hero-next {
        right: 10px;
    }
    
    /* Mobile Wizard Card Section - appears AFTER slider */
    .mobile-wizard-section {
        display: block !important;
        padding: 40px 0;
        background-color: var(--foundation);
    }
    
    .mobile-wizard-section .hero-wizard-card {
        max-width: 500px;
        width: 90%;
        margin: 0 auto;
        padding: 30px;
        background: var(--white);
        border-radius: 16px;
        box-shadow: var(--shadow-lg);
    }
    
    /* Reduce white space between slider and mobile wizard */
    .mobile-wizard-section {
        margin-top: -20px;
        padding-top: 40px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .stat-label {
        font-size: 16px;
    }
    
    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .about-text h3 {
        font-size: 26px;
    }
    
    .about-values {
        grid-template-columns: 1fr;
    }
    
    /* Services Section */
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: 30px 20px;
    }
    
    /* Portfolio Section */
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    /* Testimonials Section */
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    /* CTA Section */
    .cta-content h2 {
        font-size: 32px;
    }
    
    .cta-content p {
        font-size: 18px;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-bottom-links {
        justify-content: center;
    }
    
    /* WhatsApp Float */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 28px;
        bottom: 20px;
        right: 20px;
    }
    
    .scroll-to-top {
        bottom: 80px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    /* Section Padding */
    .section-padding {
        padding: 60px 0;
    }
    
    /* Contact Form */
    .contact-form-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Pricing Cards */
    .pricing-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    /* Adjust hero height for small phones */
    .hero-section {
        min-height: 550px; /* Adjusted for small screens */
        padding-top: 120px; /* Further reduced top padding */
        padding-bottom: 80px; /* Further increased bottom padding */
        position: relative;
    }
    
    .hero-content {
        height: 100%;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
    }
    
    .hero-grid {
        display: block !important;
        text-align: center !important;
        position: relative !important;
    }
    
    /* Ensure hero text shows on small phones */
    .hero-text {
        display: block !important;
        text-align: center !important;
    }
    
    .hero-buttons {
        display: flex !important;
        justify-content: center !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    /* Hide wizard card inside slider on small phones */
    .hero-grid .hero-wizard-card {
        display: none !important;
    }
    
    /* Mobile wizard section styling for small phones */
    .mobile-wizard-section .hero-wizard-card {
        max-width: 95%;
        width: 95%;
        padding: 25px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stat-icon {
        font-size: 36px;
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .service-icon {
        font-size: 42px;
    }
    
    .service-title {
        font-size: 20px;
    }
    
    .cta-content h2 {
        font-size: 26px;
    }
    
    .cta-content p {
        font-size: 16px;
    }
    
    .section-padding {
        padding: 40px 0;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 700px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-section,
    .whatsapp-float,
    .scroll-to-top,
    .footer-social,
    .cta-section {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .section-padding {
        padding: 20px 0;
    }
}
