/* ==========================================================================
   1. ESTILOS GLOBALES Y VARIABLES
   ========================================================================== */

/* Importación de la fuente de Google (debe ir al principio) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --color-primario: #2c462f;      /* Verde oscuro del logo */
    --color-secundario: #E1A100;    /* Amarillo dorado del logo */
    --color-texto: #333;
    --color-fondo: #f8f9fa;
    --color-sombra-ligera: rgba(0,0,0,0.08);
    --color-sombra-media: rgba(0,0,0,0.15);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--color-fondo);
    color: var(--color-texto);
    line-height: 1.6;
    overflow-x: hidden;
}

.container { 
    width: 90%; 
    max-width: 1200px; 
    margin: 0 auto; 
}

h2 {
    font-size: 2.5rem; 
    margin-bottom: 2.5rem; 
    color: var(--color-primario); 
    position: relative;
    text-align: center;
}

h2::after {
    content: ''; 
    display: block; 
    width: 60px; 
    height: 4px;
    background-color: var(--color-secundario); 
    margin: 1rem auto 0 auto; 
    border-radius: 2px;
}


/* ==========================================================================
   2. COMPONENTES REUTILIZABLES (Header, Footer, Navegación)
   ========================================================================== */

/* --- Header y Logo (AJUSTADO PARA LOGO CUADRADO) --- */
.header {
    background-color: #fff;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 8px var(--color-sombra-ligera);
    position: sticky;
    top: 0;
    z-index: 999;
}

.header .container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo img { 
    max-height: 65px;
    width: auto; 
    display: block; 
}

/* --- Menú Hamburguesa --- */
.nav-toggle {
    background: none; 
    border: none; 
    cursor: pointer; 
    padding: 10px;
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
    width: 44px; 
    height: 44px; 
    z-index: 1001;
}

.nav-toggle span {
    display: block; 
    width: 24px; 
    height: 3px; 
    background-color: var(--color-primario);
    border-radius: 3px; 
    transition: all 0.3s ease-in-out; 
    position: relative;
}

.nav-toggle span + span { 
    margin-top: 5px; 
}

.nav-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- Panel de Navegación (Móvil) --- */
.nav {
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
    gap: 2rem; 
    background-color: rgba(255, 255, 255, 0.95); 
    backdrop-filter: blur(8px);
    position: fixed; 
    top: 0; 
    right: 0; 
    height: 100%; 
    width: 100%;
    transform: translateX(100%); 
    transition: transform 0.3s ease-in-out; 
    z-index: 1000;
}

.nav.nav-visible { 
    transform: translateX(0); 
}

.nav a { 
    color: var(--color-texto); 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 1.8rem; 
}

/* --- Footer --- */
.site-footer {
    background-color: #222;
    color: #ccc;
    padding: 3rem 0 0 0;
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #444;
    align-items: start;
}

.footer-logo {
    width: 150px;
    height: auto;
    background-color: #fff;
    border-radius: 5px;
    padding: 5px;
    margin-bottom: 1rem;
}

.footer-contact p {
    margin: 0 0 1rem 0;
    line-height: 1.6;
}

.footer-contact a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}
.footer-contact a:hover {
    text-decoration: underline;
}

.footer-reviews h3 {
    font-size: 1.5rem;
    color: #fff;
    margin-top: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--color-primario);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.review-card {
    background-color: #333;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.review-card .stars {
    color: var(--color-secundario);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.review-card .review-text {
    margin: 0 0 0.5rem 0;
    font-style: italic;
    color: #f0f0f0;
}

.review-card .review-author {
    margin: 0;
    font-weight: bold;
    text-align: right;
    color: #fff;
}

.google-reviews-link {
    display: inline-block;
    margin-top: 1rem;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.google-reviews-link:hover {
    color: var(--color-secundario);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
    color: #aaa;
}
.footer-bottom p {
    margin: 0;
}


/* ==========================================================================
   3. ESTILOS ESPECÍFICOS POR PÁGINA
   ========================================================================== */

/* --- PÁGINA: INICIO (Homepage) --- */

.hero {
    background: linear-gradient(135deg, var(--color-primario) 0%, #222 100%); /* CAMBIO: Nuevo degradado de verde a carbón */
    color: #fff; /* CAMBIO: Texto vuelve a ser blanco */
    text-align: center;
    padding: 2.5rem 0 3.5rem 0; 
    border-bottom: 1px solid #eee;
}

.hero h1 { 
    font-size: 1.8rem; 
    margin-top: 0; 
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3); /* CAMBIO: Sombra de texto restaurada */
    line-height: 1.2;
    color: #fff; /* CAMBIO: Título vuelve a ser blanco */
}

.hero p { 
    font-size: 1.1rem; 
    margin-bottom: 2.5rem; 
    max-width: 600px; 
    margin-left: auto; 
    margin-right: auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.cta-button, .cta-button-call {
    padding: 15px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.cta-button svg, .cta-button-call svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.cta-button {
    background-color: #198754; 
    color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 2px solid #198754;
}
.cta-button:hover { 
    transform: translateY(-3px) scale(1.05); 
}

/* CAMBIO: Botón de llamada restaurado para fondo oscuro */
.cta-button-call {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
}
.cta-button-call:hover {
    background-color: #fff;
    color: var(--color-primario);
    transform: translateY(-3px) scale(1.05);
}

.services-overview { 
    padding: 4rem 0; 
}

.services-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 2rem; 
}

.service-card {
    background-color: #fff; 
    padding: 2.5rem; 
    border-radius: 12px;
    box-shadow: 0 8px 20px var(--color-sombra-ligera);
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    text-align: left;
}
.service-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 12px 25px var(--color-sombra-media); 
}
.service-card h3 { 
    color: var(--color-primario); 
    font-size: 1.8rem; 
    margin-bottom: 1rem; 
}
.service-card h3 a {
    text-decoration: none;
    color: var(--color-primario);
}

.why-us { 
    padding: 4rem 0; 
}
.why-us ul { 
    list-style: none; 
    padding: 0; 
    text-align: left; 
    max-width: 700px; 
    margin: 0 auto; 
}
.why-us li {
    font-size: 1.1rem; 
    margin-bottom: 1.2rem; 
    padding-left: 2rem; 
    position: relative;
}
.why-us li::before {
    content: '✓'; 
    color: var(--color-primario); 
    font-weight: bold;
    position: absolute; 
    left: 0; 
    top: 2px; 
    font-size: 1.5rem;
}

.floating-cta { 
    display: none; 
}


/* --- PÁGINA: SERVICIOS --- */
.page-title {
    background-color: var(--color-fondo);
    padding: 2.5rem 0;
    text-align: center;
    border-bottom: 1px solid #ddd;
}
.page-title h1 {
    font-size: 2.8rem;
    color: var(--color-primario);
    margin: 0;
}
.page-title p {
    font-size: 1.2rem;
    color: #666;
    margin-top: 0.5rem;
}
.services-list {
    padding: 3rem 0;
}
.service-item {
    background-color: #fff;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-left: 5px solid var(--color-primario);
}
.service-item h2 {
    text-align: left;
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 1rem;
}
.service-item h2::after {
    display: none;
}
.service-item p {
    text-align: left;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
}
.cta-section {
    background-color: var(--color-primario);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}
.cta-section h2 {
    color: #fff;
    font-size: 2.5rem;
}
.cta-section h2::after {
    background-color: var(--color-secundario);
}
.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}
.cta-button-secondary {
    background-color: #fff;
    color: var(--color-primario);
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.cta-button-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}
.cta-button-secondary .whatsapp-icon {
    width: 28px;
    height: 28px;
}

/* --- PÁGINA: URGENCIAS --- */
.urgency-hero {
    background-image: linear-gradient(135deg, #c31432 0%, #240b36 100%);
    color: #fff;
    padding: 2.5rem 0 3rem 0;
    text-align: center;
}
.urgency-hero h1 {
    font-size: 2.2rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}
.urgency-hero .subtitle {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    font-weight: 400;
}
.urgency-cta-box {
    background-color: rgba(255,255,255,0.1);
    border: 2px solid #fff;
    border-radius: 12px;
    padding: 1.5rem;
}
.contact-now-text {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 600;
}
.urgency-main-button {
    background-color: #198754; 
    color: #fff;
    padding: 18px 30px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.3rem;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s ease;
    animation: pulse 2s infinite;
}
.urgency-main-button:hover {
    transform: scale(1.05);
    animation: none;
}
.urgency-main-button .whatsapp-icon {
    width: 28px;
    height: 28px;
}
.common-problems {
    padding: 3rem 0;
}
.problems-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 600px;
    font-size: 1.2rem;
    text-align: left;
}
.problems-list li {
    margin-bottom: 1rem;
    color: #333;
}

/* --- PÁGINA: CONTACTO --- */
.contact-section {
    padding: 3rem 0;
    background-color: var(--color-fondo);
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}
.contact-details h2, .contact-form h2 {
    color: var(--color-primario);
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
}
.contact-details ul {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}
.contact-details li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}
.contact-details a {
    color: var(--color-primario);
    text-decoration: none;
    font-weight: 600;
}
.contact-details a:hover {
    text-decoration: underline;
}
.contact-urgency-link {
    display: inline-block;
    background-color: #D32F2F;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s ease;
}
.contact-urgency-link:hover {
    background-color: #a02323;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
}
.submit-button {
    background-color: var(--color-primario);
    color: #fff;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.submit-button:hover {
    background-color: #004a8b;
}
.map-section {
    padding: 0;
    line-height: 0;
}

/* ==========================================================================
   4. ESTILOS RESPONSIVE (Tablet y Escritorio)
   ========================================================================== */

@media (max-width: 799px) {
    .floating-cta {
        display: none; 
    }
}

@media (min-width: 800px) {
    .nav-toggle { 
        display: none; 
    }
    .nav {
        display: flex; 
        flex-direction: row; 
        align-items: center; 
        gap: 1.5rem;
        position: static; 
        height: auto; 
        width: auto; 
        background-color: transparent;
        backdrop-filter: none; 
        transform: translateX(0);
    }
    .nav a { 
        font-size: 1rem; 
    }
    .footer-grid {
        grid-template-columns: 1fr 1.5fr;
    }
    .hero { 
        padding: 4rem 0 5rem 0;
    }
    .hero h1 { 
        font-size: 3.5rem; 
    }
    .cta-button, .cta-button-call {
        font-size: 1.3rem;
        padding: 18px 35px;
    }
    .services-grid { 
        grid-template-columns: repeat(3, 1fr); 
    }
    .page-title h1 {
        font-size: 3.5rem;
    }
    .urgency-hero {
        padding: 4rem 0;
    }
    .urgency-hero h1 {
        font-size: 3.5rem;
    }
    .urgency-hero .subtitle {
        font-size: 1.5rem;
    }
    .urgency-main-button {
        padding: 20px 40px;
        font-size: 1.8rem;
    }
    .contact-grid {
        grid-template-columns: 1fr 1.5fr;
    }
}