/* mobile.css - FINAL RESPONSIVE FIXES */

/* ============ TABLET & SMALLER DESKTOP (<= 1024px) ============ */
@media (max-width: 1024px) {
    .nav-container {
        padding: 10px 20px;
        width: 100%;
        max-width: 100%;
        justify-content: space-between;
        gap: 0;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        right: -300px; /* Start off-screen to the right */
        width: 300px; /* Fixed width for the side menu */
        height: 100vh; /* Full viewport height */
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start; /* Align items to the top */
        gap: 25px;
        transition: right 0.3s ease-in-out; /* Animate the 'right' property */
        z-index: 999;
        padding-top: 100px; /* Add padding to push items down below the main navbar */
    }

    .nav-menu.active {
        display: flex;
        right: 0; /* Slide into view */
    }

    .hamburger {
        display: flex;
        z-index: 1000;
    }

    .nav-logo .logo {
        position: static;
        height: 60px; /* Smaller height for tablet/mobile nav */
        transform: scale(1); /* No extra scaling */
        left: 0;
    }

    .nav-menu {
        font-size: 1em; /* Smaller font for menu items */
    }

    /* Adjust grid layouts for tablets */
    .services-grid,
    .module-matrix-grid,
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* Footer responsive styles for tablets */
    .footer-section, .footer-logo, .footer #nave, .footer #oursol {
        position: static;
        left: 0;
    }

    .footer-content {
        justify-content: center;
        text-align: center;
    }
}

/* ============ MOBILE PHONES (<= 780px) ============ */
@media (max-width: 780px) {
    /* General Section Padding */
    section {
        padding: 60px 15px;
    }

    /* Hero Section */
        .hero,
        section.hero#inicio,
        #inicio.hero {
            display: block !important;
            height: auto !important;
            min-height: 500px !important;
            padding: 120px 15px 60px !important;
            overflow: visible !important;
            position: relative !important;
        }

    .hero-content {
        position: relative;
        z-index: 10;
        padding: 20px;
        border-radius: 10px;
        backdrop-filter: blur(5px);
    }

    .hero-title {
        font-size: 2em !important;
        line-height: 1.2 !important;
        word-wrap: break-word !important;
        margin-bottom: 15px !important;
        color: white !important;
    }

    .hero-slider {
        display: none !important; 
    }

    .hero-description {
        font-size: 1em;
        color: rgba(255, 255, 255, 0.9) !important;
        margin-bottom: 20px !important;
    }

    .hero-tagline {
        font-size: 0.9em !important;
        color: rgba(255, 255, 255, 0.8) !important;
        margin-bottom: 25px !important;
        white-space: normal; 
        overflow: visible; 
        border-right: none; 
        animation: none; 
        width: auto; 
    }

    .hero-buttons {
        flex-direction: column;
        gap: 13px;
        align-items: center;
        margin-top: 50px;
        padding: 20px;
    }

    .hero,
    .hero * {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    .services-grid,
    .module-matrix-grid,
    .gallery-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .services, .module-matrix {
        min-height: auto;
        height: auto;
    }

    .contact {
        padding-bottom: 100px; 
        height: auto;
        min-height: auto;
    }
    
    .contact-info {
        max-height: none; 
        overflow: visible;
    }

    .recaptcha-container {
        margin: 10px; 
    }


    #gmail, #outlook, #yahoo, #otro {
        display: none !important; 
    }
    #mail {
        display: inline-flex !important; 
        visibility: visible !important; 
    }
    #mails {
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-section, .footer-logo, .footer #nave, .footer #oursol {
        align-items: center;
        position: static;
        left: 0;
    }
}

/* ============ SMALL MOBILE PHONES (<= 480px) ============ */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.6em !important;
    }
    
    .section-title {
        font-size: 1.7em;
    }
}

@media (max-width: 780px) {
    .hero {
        max-width: 100% !important; 
        width: 100%;
        overflow: hidden;
    }

    .hero-background-elements {
        display: none;
    }
}