/* ================= RESET ================= */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    font-family:'Montserrat', sans-serif;
    color:#222;
    overflow-x:hidden;
}

/* ================= CONTAINER ================= */
.container{
    width:90%;
    max-width:1200px;
    margin:auto;
}

/* ================= HEADER ================= */
.header{
    position:fixed;
    width:100%;
    background:#fff;
    z-index:1000;
    border-bottom:1px solid #eee;
    transition:0.3s;
}

.nav{
    display:flex;
    justify-content:space-between;
    align-items:center;
    height:75px;
}

/* ================= LOGO ================= */
/* Estilo unificado al final en la Sección Maestra */

/* ================= MENU ================= */
.menu{
    margin-left:auto;
    margin-right:35px;
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    justify-content:center;
}

.menu a{
    margin-left:28px;
    text-decoration:none;
    color:#222;
    font-weight:600;
    transition:0.3s;
    font-size:0.95rem;
    white-space:nowrap;
}

.menu a:hover{
    color:#0056ff;
}

/* ================= SEARCH ================= */
.nav-search a{
    display:flex;
    align-items:center;
}

.nav-search img{
    width:24px;
    transition:0.3s;
}

.nav-search img:hover{
    transform:scale(1.1);
}

/* ================= BANNER ================= */
.banner-mantenimiento{
    position:relative;
    height:420px;
    overflow:hidden;

    display:flex;
    justify-content:center;
    align-items:center;
}

.banner-bg{
    position:absolute;
    width:100%;
    height:100%;
    object-fit:cover;
}

.banner-overlay{
    position:absolute;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.45);
}

.banner-content{
    position:relative;
    z-index:2;
}

/* CAMBIO SEO: Transformado a h2 para respetar la jerarquía de Google */
.banner-content h2{
    color:#fff;
    font-size:3rem;
    text-align:center;
    background:rgba(0,0,0,0.45);
    padding:18px 35px;
    border-radius:8px;
}

/* ================= INTRO ================= */
.maintenance-intro{
    padding:40px 0;
    background:#fff;
}

.section-title{
    text-align:center;
    margin-bottom:50px;
}

.section-title h2{
    font-size:2.4rem;
    margin-bottom:15px;
}

.section-title p{
    font-size:1.1rem;
}

/* FEATURES */
.features-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:30px;
    text-align:center;
}

.feature-item{
    padding:3px;
}

/* CÍRCULOS MÁS GRANDES */
.feature-circle{
    width:230px;
    height:230px;
    border-radius:50%;
    background:#f2f2f2;
    margin:auto;
    margin-bottom:25px;

    display:flex;
    justify-content:center;
    align-items:center;

    overflow:hidden;

    transition:0.4s;
}

.feature-circle:hover{
    transform:translateY(-8px);
}

.feature-circle img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.feature-item h3{
    margin-bottom:12px;
    font-size:1.15rem;
}

.feature-item p{
    line-height:1.7;
}

/* ================= PACKAGES ================= */
.packages-section{
    padding:20px 0 60px;
    background:#f7f7f7;
}

.packages-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:40px;
    align-items:stretch;
}

.package-card{
    display:flex;
    flex-direction:column;
    align-items:center;
    height:100%;
}

.package-content{
    width:100%;
    display:grid;
    grid-template-columns:300px 1fr;
    background:#e3e6ea;
    height:100%;
    min-height:320px;
}

.package-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.package-info{
    padding:40px 30px;
    display:flex;
    align-items:center;
}

.package-info ul{
    padding-left:20px;
}

.package-info li{
    margin-bottom:18px;
    line-height:1.6;
    font-size:1.05rem;
}

/* BUTTONS */
.package-button{
    margin-top:25px;
}

.package-button a{
    display:inline-block;
    padding:15px 35px;
    color:#fff;
    text-decoration:none;
    font-size:1.1rem;
    transition:0.3s;
}

.gold-btn a{
    background:#1823b8;
}

.silver-btn a{
    background:#36a4dc;
}

.package-button a:hover{
    transform:translateY(-3px);
}

/* ================= ANIMACIÓN SCROLL ================= */

.hidden{
    opacity:0;
    transform:translateY(60px);
    transition:all 0.9s ease;
}

.show{
    opacity:1;
    transform:translateY(0);
}

/* ================= FOOTER ================= */
.footer{
    background:#f2f2f2;
    padding:20px 0;
}

/* FOOTER SEARCH */
.footer-search{
    padding-bottom:20px;
    margin-bottom:30px;
    border-bottom:1px solid #cfcfcf;
}

.footer-search a{
    display:flex;
    align-items:center;
    gap:12px;
    width:fit-content;
    text-decoration:none;
    color:#222;
}

.footer-search img{
    width:120px;
}

/* FOOTER GRID */
.footer-grid{
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:30px;
}

.footer-grid h4{
    margin-bottom:12px;
}

.footer a{
    display:block;
    margin:6px 0;
    color:#333;
    text-decoration:none;
    transition:0.3s;
}

.footer a:hover{
    color:#0056ff;
}

/* ================= FOOTER SOCIAL ================= */
.footer-social{
    margin-top:20px;

    display:flex;
    align-items:center;
    gap:15px;
}

.footer-social a{
    width:45px;
    height:45px;

    display:flex;
    justify-content:center;
    align-items:center;

    background:#fff;
    border-radius:12px;

    transition:0.3s;
    box-shadow:0 4px 12px rgba(0,0,0,0.10);
}

.footer-social a:hover{
    transform:translateY(-4px);
    background:#0056ff;
}

.footer-social img{
    width:22px;
    height:22px;
    object-fit:contain;
}


/* ================= WHATSAPP ================= */
.whatsapp {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25D366;
    color: #fff;
    padding: 12px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    z-index: 1000;
}

/* ================= LOGOS ================= */
.proveedores-logos{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:12px;
}

.proveedores-logos img{
    width:100%;
    height:55px;
    object-fit:contain;
    background:#fff;
    padding:6px;
    border-radius:10px;
}

/* ================= RESPONSIVE DE BLOQUES "MANTENIMIENTO" ================= */

/* FIX TABLET HORIZONTAL (1100px para evitar que se aplasten los círculos) */
@media (max-width:1100px){
    .features-grid{
        grid-template-columns:1fr 1fr;
    }
    .feature-circle{
        width: 190px;
        height: 190px;
    }
    .packages-grid{
        grid-template-columns:1fr;
    }
}

/* FIX TABLET VERTICAL (Aquí rompemos el footer para que empate con domotica.css) */
@media (max-width:992px){
    .footer-grid{
        grid-template-columns:1fr 1fr;
    }
}

/* FIX CELULARES Y TABLETS PEQUEÑAS */
@media (max-width:768px){

    .container{ width: 92%; }

    /* CAMBIO SEO: Mantiene tamaño responsivo del h2 */
    .banner-content h2{
        font-size:2rem;
    }

    .features-grid{
        grid-template-columns:1fr;
    }
    
    .feature-circle{
        width:160px;
        height:160px;
    }

    .package-content{
        grid-template-columns:1fr;
    }

    /* FIX: Centrado del Footer en Móviles */
    .footer-grid{
        grid-template-columns:1fr;
        text-align:center;
    }
    .footer-grid div{
        text-align:center;
    }
    .footer-social{
        justify-content:center;
    }
    .proveedores-logos{
        max-width:220px;
        margin:auto;
    }
}


/* ========================================================================= */
/* --- SECCIÓN MAESTRA UNIFICADA (RESPONSIVE HEADER Y MENÚ MÓVIL) --- */
/* ========================================================================= */

/* ESTILO MAESTRO PARA EL LOGO (Evita que cambie de tamaño o tenga subrayado) */
.header .logo a,
.header .logo strong {
    font-size: 2.0rem !important;
    font-weight: 800 !important;
    color: #111 !important;
    text-decoration: none !important;
}

/* --- COMPONENTES DEL MENÚ MÓVIL --- */
.hamburger-btn { display: none; background: none; border: none; cursor: pointer; padding: 8px; flex-direction: column; gap: 5px; z-index: 1001; border-radius: 8px; transition: background 0.2s; }
.hamburger-btn:hover { background: #f1f5f9; }
.hamburger-btn span { display: block; width: 25px; height: 3px; background: #0f172a; border-radius: 2px; }

.mobile-menu-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15,23,42,0.6); z-index: 2000; opacity: 0; transition: 0.3s; backdrop-filter: blur(3px);}
.mobile-menu-overlay.active { display: block; opacity: 1; }

.mobile-menu-drawer { position: fixed; top: 0; right: -300px; width: 280px; height: 100%; background: #fff; z-index: 2001; box-shadow: -5px 0 30px rgba(0,0,0,0.15); transition: right 0.3s; display: flex; flex-direction: column; overflow-y: auto; padding-top: 20px;}
.mobile-menu-drawer.active { right: 0; }
.mobile-menu-drawer .close-btn { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 24px; color: #64748b; cursor: pointer; }
.mobile-menu-drawer a { display: block; padding: 15px 25px; font-family: 'Montserrat', sans-serif; font-weight: 700; color: #1e293b; text-decoration: none; border-bottom: 1px solid #f1f5f9; }

/* Para iluminar la pestaña activa */
.menu a.active, .mobile-menu-drawer a.active { color: #0056ff; }


/* --- CORRECCIÓN VISUAL: HEADER TABLETS Y MÓVILES --- */
@media (max-width: 1200px) {
    /* Ocultar menú de texto de PC */
    .menu { display: none !important; }

    /* Forzar diseño en una sola línea horizontal */
    .header .nav {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        height: 70px !important;
        padding: 0 20px !important;
        flex-wrap: nowrap !important;
    }

    /* Logo a la izquierda */
    .header .logo {
        margin-right: auto !important;
        margin-bottom: 0 !important;
        text-align: left !important;
        width: auto !important;
        order: 1 !important;
    }

    /* Lupa antes de la hamburguesa */
    .header .nav-search {
        margin-left: 0 !important;
        margin-right: 20px !important;
        margin-bottom: 0 !important;
        position: static !important;
        display: flex !important;
        align-items: center !important;
        order: 2 !important;
    }

    /* Botón hamburguesa al extremo derecho */
    .header .hamburger-btn {
        display: flex !important;
        margin: 0 !important;
        order: 3 !important;
    }
}

@media (max-width: 768px) {
    /* Ajustes finos para celulares */
    .container { width: 92%; }
    .header .nav { padding: 0 15px !important; }
    .header .nav-search img { width: 22px !important; height: 22px !important; }
}