/* style.css */

/* Variables CSS para facilitar el cambio de color de la marca */
:root {
    --primary-color: #3498db; /* Azul corporativo */
    --secondary-color: #2c3e50; /* Azul oscuro/negro */
    --accent-color: #25D366; /* Verde WhatsApp */
    --text-color: #2c3e50;
    --background-light: #f8f9fa;
    --background-dark: #2c3e50;
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.08);
    --shadow-heavy: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Fuente moderna y segura. Se puede importar una fuente de Google Fonts si se desea */
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-light);
    scroll-behavior: smooth; /* Desplazamiento suave para anclas */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Encabezado */
header {
    background-color: var(--secondary-color);
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-heavy);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo i {
    font-size: 28px;
    margin-right: 10px;
    color: var(--primary-color);
}

.logo-text {
    font-size: 22px;
    font-weight: bold;
}

.logo-subtext {
    font-size: 12px;
    opacity: 0.8;
    margin-left: 5px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease-in-out; /* Animación más suave */
    font-weight: 500;
}

nav ul li a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    /* URL de imagen de fondo por defecto */
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)), url('https://images.unsplash.com/photo-1450101499163-c8848c66ca85?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 120px 0; /* Más espacio */
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 25px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 30px;
}

/* Botones */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 14px 35px; /* Más padding */
    text-decoration: none;
    border: none;
    border-radius: 8px; /* Bordes más modernos */
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.4);
}

.btn:hover {
    background-color: #2980b9;
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.6);
    transform: translateY(-2px);
}

/* Secciones de contenido */
section {
    padding: 80px 0; /* Más padding vertical */
}

section:nth-child(even) { /* Color de fondo sutil para alternar secciones */
    background-color: #f1f4f8; 
}

section h2 {
    text-align: center;
    margin-bottom: 50px;
    color: var(--secondary-color);
    font-size: 2.2rem;
    position: relative;
}

section h2::after { /* Se usa ::after en lugar de :after (aunque ambos funcionan, :: es la notación moderna) */
    content: '';
    display: block;
    width: 100px;
    height: 5px;
    background: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

.about-content, .services-content {
    display: grid; /* Uso de Grid para mejor control de layout */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive automático */
    gap: 30px;
}

.about-item, .service-item {
    background: white;
    padding: 30px;
    border-radius: 12px; /* Bordes más suaves */
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    border-left: 5px solid var(--primary-color); /* Toque de color */
}

.about-item:hover, .service-item:hover {
    transform: translateY(-8px); /* Mayor elevación */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.about-item h3, .service-item h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-size: 1.3rem;
}

.about-item h3 i, .service-item h3 i {
    margin-right: 15px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Mapa */
.map-container {
    height: 450px; /* Mayor altura */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Formulario de contacto */
.contact-form {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    max-width: 650px; /* Más ancho */
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

.form-group textarea {
    min-height: 180px;
    resize: vertical;
}

/* Estilo para el checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    transform: scale(1.2); /* Agrandar un poco el checkbox */
    cursor: pointer;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: 400;
}

.privacy-link {
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
    transition: color 0.3s;
}

.privacy-link:hover {
    color: #2980b9;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid; /* Uso de Grid para mejor control */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 25px;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.footer-section p {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.footer-section i {
    margin-right: 10px;
    font-size: 1.1rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

/* Botones flotantes (Toggle, WhatsApp) y Formulario Flotante */
.form-toggle, .whatsapp-float {
    position: fixed;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    font-size: 24px;
    border: none;
    color: white; /* Para el botón toggle */
    transition: transform 0.2s;
}

.form-toggle {
    bottom: 30px;
    background: var(--primary-color);
}

.form-toggle:hover {
    background: #2980b9;
    transform: scale(1.05);
}

.whatsapp-float {
    bottom: 100px;
    background: var(--accent-color);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    background: #1eac54;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.floating-form {
    position: fixed;
    bottom: 110px; /* Se mueve para evitar el WhatsApp */
    right: 30px;
    width: 350px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    padding: 25px;
    z-index: 1000;
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.floating-form.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.floating-form h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
}

.floating-form h3 i {
    margin-right: 10px;
    color: var(--primary-color);
}

.close-form {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #7f8c8d;
    transition: color 0.3s;
}

.close-form:hover {
    color: var(--primary-color);
}

/* Aviso de privacidad (Modal) */
.privacy-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none; /* Inicia oculto */
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.privacy-content {
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 90vh; /* Se usa vh para mejor visualización */
    overflow-y: auto;
    padding: 40px;
    border-radius: 10px;
    position: relative;
    transform: scale(0.95); /* Animación inicial */
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

/* Estilos de visibilidad para el modal (controlado por JS) */
.privacy-modal.show .privacy-content {
    transform: scale(1);
    opacity: 1;
}

.close-privacy {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 28px;
    color: #7f8c8d;
    transition: color 0.3s;
}

.close-privacy:hover {
    color: var(--secondary-color);
}

/* Responsive */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    nav ul {
        margin-top: 15px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    nav ul li {
        margin: 0 10px 10px;
    }
    
    .hero {
        padding: 80px 0;
    }

    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }

    section {
        padding: 50px 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .floating-form {
        width: 90%;
        right: 5%;
        bottom: 100px;
    }
    
    .form-toggle, .whatsapp-float {
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 22px;
    }

    .whatsapp-float {
        bottom: 80px;
    }

    .form-toggle {
        bottom: 20px;
    }
}