/* ==========================================================================
   VARIABLES GLOBALES
   ========================================================================== */
:root {
    --primary: #2a6342;
    --primary-dark: #1e4a31;
    --primary-light: #3d8059;
    --accent: #a8d5ba;
    --text: #333;
    --text-light: #555;
    --bg-light: #f8faf9;
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.06);
    --shadow-md: 0 10px 40px rgba(42,99,66,0.12);
    --gray-navbar: #6c757d; /* Gris medio claro para navbar por defecto */
}

/* ==========================================================================
   BASE & RESET
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

main {
    flex: 1;
}

/* ==========================================================================
   NAVBAR - Fondo gris claro + menú hamburguesa en móvil
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(108, 117, 125, 0.92); /* Gris medio claro semi-transparente */
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all 0.35s ease;
    color: white;
}

body.scrolled .navbar {
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    color: var(--text);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.4s ease;
}

body.scrolled .logo {
    color: var(--primary);
}

.logo:hover {
    color: var(--accent);
}

.logo-icon {
    width: 48px;
    height: auto;
}

/* Menú hamburguesa - visible solo en móvil */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: inherit;
    font-size: 2.2rem;
    cursor: pointer;
}

/* Menú links - horizontal en desktop */
.nav-links {
    list-style: none;
    display: flex;
    gap: 2.2rem;
    margin: 0;
}

.nav-links a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.4s ease;
}

.nav-links a:hover,
body.scrolled .nav-links a:hover {
    color: var(--primary);
}

/* ==========================================================================
   MENÚ MÓVIL (hamburguesa + desplegable)
   ========================================================================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        padding: 2rem 0;
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        color: var(--text);
        font-size: 1.3rem;
        padding: 0.8rem 0;
    }

    body.scrolled .nav-links a {
        color: var(--text);
    }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
    height: 90vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.6)), url('images/inicio.jpg') center/cover no-repeat fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-text {
    max-width: 900px;
    padding: 2rem;
}

.hero-text h1 {
    font-size: 3.8rem;
    margin-bottom: 1.2rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
}

.slogan {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 2rem;
}

.highlight-word {
    font-weight: 700;
    color: var(--accent);
}

/* ==========================================================================
   SECCIONES GENERALES
   ========================================================================== */
.section {
    padding: 6rem 1.5rem 4rem;
    text-align: center;
}

.section h1, .section h2 {
    color: var(--primary);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    margin-bottom: 2rem;
}

.section h1 { font-size: 3rem; }
.section h2 { font-size: 2.4rem; }

/* ==========================================================================
   BOTONES CTA
   ========================================================================== */
.cta-button {
    display: inline-block;
    padding: 1.1rem 2.4rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.cta.center {
    text-align: center;
    margin: 3rem 0;
}

.cta-button.large {
    padding: 1.3rem 3rem;
    font-size: 1.3rem;
}

/* ==========================================================================
   SECCIONES HERO DE SERVICIOS (index.html)
   ========================================================================== */
.service-hero-section {
    padding: 1rem;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.service-hero-content {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    gap: 2rem;
}

@media (min-width: 992px) {
    .service-hero-content {
        flex-direction: row;
        align-items: center;
        gap: 4rem;
    }
    .service-hero-content .service-img,
    .service-hero-content .image-placeholder {
        flex: 1;
        order: 2;
    }
    .service-hero-content .service-info {
        flex: 1;
        order: 1;
        text-align: left;
    }
    .gas-section .service-hero-content,
    .incendios-section .service-hero-content {
        flex-direction: row-reverse;
    }
}

.service-img {
    width: 100%;
    height: 380px;
    min-height: 300px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    display: block;
}

.image-placeholder.large {
    height: 380px;
    min-height: 300px;
    background: #e9ecef;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.6rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.service-info h2 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.2rem;
    font-weight: 800;
}

.service-info p {
    font-size: 1.35rem;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 2.5rem;
}

.service-hero-button {
    display: inline-block;
    padding: 1.3rem 2.8rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.service-hero-button:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(42,99,66,0.25);
}

/* Fondos diferenciados */
.gas-section       { background: linear-gradient(to bottom, #f8faf9, #e8f5ea); }
.sanitarias-section { background: linear-gradient(to bottom, #f8f9fa, #e3f2fd); }
.incendios-section  { background: linear-gradient(to bottom, #fff5f5, #ffebee); }

/* ==========================================================================
   NOSOTROS
   ========================================================================== */
.about-content {
    max-width: 960px;
    margin: 0 auto;
    text-align: left;
    padding: 0 1rem;
}

.about-content h1 {
    font-size: 3.4rem;
    margin-bottom: 1.6rem;
    color: var(--primary);
}

.about-content h2 {
    font-size: 2.4rem;
    margin: 3.5rem 0 1.4rem;
    color: var(--primary);
}

.about-content .lead {
    font-size: 1.38rem;
    line-height: 1.9;
    color: var(--text);
    margin-bottom: 2rem;
    font-weight: 500;
}

.about-content p {
    font-size: 1.18rem;
    line-height: 1.9;
    margin-bottom: 1.8rem;
    color: var(--text-light);
}

.services-list.extended li {
    margin-bottom: 1.6rem;
    font-size: 1.15rem;
    padding-left: 2.2rem;
    position: relative;
}

.services-list.extended li i {
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* Values grid */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2.2rem;
    margin: 3.5rem 0;
}

.value-item {
    background: white;
    padding: 2.2rem 1.8rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.value-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.value-item i {
    color: var(--primary);
    margin-bottom: 1.2rem;
    font-size: 2.5rem;
}

.value-item h4 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 0.9rem;
    font-weight: 600;
}

.value-item p {
    color: var(--text-light);
    font-size: 1.08rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    background: var(--primary);
    color: white;
    padding: 3rem 1.5rem 1.5rem;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-column {
    flex: 1;
    min-width: 220px;
    text-align: center;
}

.footer-column h3 {
    color: var(--accent);
    margin-bottom: 1.2rem;
}

footer a {
    color: white;
    text-decoration: none;
}

footer a:hover {
    color: var(--accent);
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ==========================================================================
   ELEMENTOS FIJOS - WhatsApp flotante
   ========================================================================== */
.whatsapp-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 999;
}

.whatsapp-btn img {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    transition: transform 0.3s ease;
}

.whatsapp-btn:hover img {
    transform: scale(1.1);
}

.scroll-top {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 55px;
    height: 55px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   FORMULARIO CONTACTO
   ========================================================================== */
.contact-section {
    padding: 8rem 1rem 6rem;
    background: linear-gradient(135deg, var(--bg-light) 0%, #e8f5ea 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.contact-wrapper {
    max-width: 640px;
    width: 100%;
    text-align: center;
}

.contact-header h1 {
    font-size: 2.6rem;
    color: var(--primary);
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.contact-header p {
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

/* Formulario */
.modern-form {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    max-width: 500px;
    margin: 0 auto 3rem;
}

.form-field label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--primary);
    font-size: 1.05rem;
    text-align: left;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.2rem;
    pointer-events: none;
}

.modern-form input,
.modern-form select,
.modern-form textarea {
    width: 100%;
    padding: 0.95rem 1rem 0.95rem 3rem;
    border: 1px solid #d0e0d4;
    border-radius: 10px;
    font-size: 1.05rem;
    background: white;
    transition: all 0.25s ease;
}

.modern-form input:focus,
.modern-form select:focus,
.modern-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(42,99,66,0.15);
    outline: none;
}

.modern-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232a6342' d='M6 8.5L1 3.5h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
}

.modern-form textarea {
    min-height: 110px;
    resize: vertical;
}

.form-submit {
    align-self: center;
    padding: 1rem 2.8rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
}

.form-submit:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(42,99,66,0.25);
}

/* Contacto alternativo */
.quick-contact {
    text-align: center;
    margin-top: 2.5rem;
}

.alt-title {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.quick-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.quick-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1.8rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    transition: all 0.3s ease;
}

.quick-btn i {
    font-size: 1.6rem;
}

.quick-btn.whatsapp i { color: #25D366; }
.quick-btn.email i { color: var(--primary); }

.quick-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

/* ==========================================================================
   GAS - SUBTIPOS Y GALERÍAS
   ========================================================================== */
.gas-hero {
    padding: 7rem 1rem 4rem;
    background: linear-gradient(to bottom, #f8faf9, #e8f5ea);
    text-align: center;
}

.gas-hero-content h1 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.gas-hero .intro {
    font-size: 1.3rem;
    color: var(--text-light);
    max-width: 900px;
    margin: 0 auto 4rem;
}

.gas-subtypes {
    padding: 2rem 1rem 5rem;
    background: white;
}

.subtype-section {
    max-width: 1200px;
    margin: 0 auto 6rem;
    padding: 0 1rem;
}

.subtype-section h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    text-align: center;
}

.subtype-section p {
    font-size: 1.15rem;
    color: var(--text-light);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.gallery-img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.gallery-img:hover {
    transform: scale(1.03);
}

/* Botón WhatsApp por subtipo */
.whatsapp-service-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    max-width: 360px;
    margin: 0 auto;
    padding: 1.1rem 2rem;
    background: #25D366;
    color: white;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-service-btn:hover {
    background: #20b858;
    transform: translateY(-3px);
}

/* Botón deshabilitado (para Sanitarias e Incendios temporalmente) */
.service-hero-button.disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}

.service-hero-button.disabled:hover {
    background: #ccc;
    transform: none;
}

/* ==========================================================================
   RESPONSIVE GENERAL
   ========================================================================== */
@media (max-width: 768px) {
    .hero-text h1 { font-size: 2.8rem; }
    .section { padding: 5rem 1rem 3rem; }
    .image-placeholder.large,
    .service-img { height: 300px; }
    .service-hero-content { gap: 1.8rem; }
    .footer-content { flex-direction: column; text-align: center; }
    .values-grid { grid-template-columns: 1fr; }
    .contact-section { padding: 6rem 1rem 4rem; }
    .modern-form { gap: 1.4rem; }
    .form-submit { padding: 0.9rem 2.2rem; font-size: 1.05rem; }
    .gas-hero { padding: 5rem 1rem 3rem; }
    .gas-hero-content h1 { font-size: 2.4rem; }
    .subtype-section { margin-bottom: 5rem; }
    .subtype-section h2 { font-size: 2.1rem; }
    .gallery-grid { grid-template-columns: 1fr; }
}
/* Ajuste para que el hero no quede tapado por el navbar fijo */
.hero {
    padding-top: 80px; /* espacio aproximado del navbar + margen de seguridad */
    min-height: calc(90vh - 80px); /* compensa el padding para mantener altura visual */
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .hero {
        padding-top: 70px; /* un poco menos en móvil si el navbar es más chico */
        min-height: calc(85vh - 70px); /* ajustado para celulares */
    }
    
    .hero-text h1 {
        font-size: 2.4rem; /* reduce tamaño del título en móvil para que quepa mejor */
    }
    
    .slogan {
        font-size: 1.4rem;
    }
    
    .hero-text p {
        font-size: 1.2rem; /* texto descriptivo más legible */
    }
}

/* Asegura que el contenido principal empiece debajo del navbar */
main {
    padding-top: 80px; /* margen superior para TODO el main */
}

@media (max-width: 768px) {
    main {
        padding-top: 70px;
    }
}
/* Ajustes para móviles: reducir tamaños de títulos y textos grandes */
@media (max-width: 768px) {
    /* Hero principal */
    .hero-text h1 {
        font-size: 2.2rem;          /* antes 2.8rem → ahora más pequeño y legible */
        line-height: 1.2;
    }

    .slogan {
        font-size: 1.3rem;          /* más compacto */
    }

    .hero-text p {
        font-size: 1.1rem;          /* texto descriptivo no tan grande */
    }

    /* Títulos de secciones generales */
    .section h1 {
        font-size: 2.4rem;          /* antes 3rem → mucho más cómodo en móvil */
    }

    .section h2 {
        font-size: 1.9rem;          /* antes 2.4rem */
    }

    /* Títulos de las secciones de servicios (Gas, Sanitarias, Incendios) */
    .service-info h2 {
        font-size: 2.2rem;          /* antes 3rem → queda mucho mejor en celular */
    }

    .service-info p {
        font-size: 1.1rem;          /* párrafos más legibles */
    }

    /* Títulos en la página de gas (subtipos) */
    .subtype-section h2 {
        font-size: 2rem;            /* antes 2.5rem / 2.1rem */
    }

    .subtype-section p {
        font-size: 1.05rem;
    }

    /* Botones CTA grandes */
    .cta-button.large {
        padding: 1rem 2.2rem;
        font-size: 1.15rem;
    }

    .service-hero-button {
        padding: 1rem 2rem;
        font-size: 1.15rem;
    }
}

/* Para celulares muy pequeños (ej. < 380px) - opcional pero útil */
@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2rem;
    }
    .section h1 {
        font-size: 2.1rem;
    }
    .service-info h2,
    .subtype-section h2 {
        font-size: 1.8rem;
    }
}
/* Compactar logo en móvil para que no quede tan separado */
@media (max-width: 768px) {
    .logo {
        gap: 0.4rem;              /* reduce separación entre ícono y texto */
        font-size: 1.5rem;        /* texto más chico para que quepa mejor */
    }

    .logo-icon {
        width: 40px;              /* ícono un poco más pequeño en móvil */
        height: auto;
    }

    .navbar {
        padding: 0.8rem 1.2rem;   /* reduce padding general del navbar en móvil */
    }

    /* Ajuste extra si el menú hamburguesa empuja todo */
    .menu-toggle {
        font-size: 2rem;          /* ícono hamburguesa un poco más chico */
    }
}