/* --- VARIABLES GLOBALES --- */
:root {
    --primary-color: #f59e0b; 
    --primary-hover: #d97706;
    --dark-bg: #0f172a; 
    --light-bg: #f8fafc;
    --text-main: #334155;
    --text-light: #cbd5e1;
    --white: #ffffff;
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); /* Transición premium tipo Apple */
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; scroll-behavior: smooth; }
body { color: var(--text-main); line-height: 1.6; overflow-x: hidden; }

/* --- UTILIDADES --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 100px 0; }
.bg-light { background-color: var(--light-bg); }
.bg-dark { background-color: var(--dark-bg); }
.text-white { color: var(--white); }
.center-text { text-align: center; }
.center-margin { margin-left: auto; margin-right: auto; }
.sub-text { color: #64748b; margin-top: -15px; margin-bottom: 40px; }

.divider {
    height: 4px; width: auto;
    background-color: var(--primary-color);
    margin: 15px 0 30px 0; border-radius: 2px;
}

/* --- BOTONES --- */
.btn-primary {
    display: inline-block; background-color: var(--primary-color); color: var(--dark-bg);
    padding: 10px 24px; border-radius: 5px; text-decoration: none; font-weight: 600;
    transition: var(--transition); border: none; cursor: pointer;
}
.btn-primary:hover { background-color: var(--primary-hover); color: var(--white); transform: translateY(-2px); }
.btn-primary.large { padding: 15px 35px; font-size: 1.1rem; }

/* --- NAVEGACIÓN --- */
header {
    position: fixed; top: 0; width: 100%; padding: 20px 50px; display: flex;
    justify-content: space-between; align-items: center; background: transparent;
    transition: var(--transition); z-index: 1000;
}
header.scrolled {
    background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(10px); padding: 15px 50px; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
header .logo { color: var(--white); font-size: 1.5rem; font-weight: 800; }
header nav ul { list-style: none; display: flex; gap: 30px; align-items: center; }
header nav a { color: var(--white); text-decoration: none; font-weight: 600; transition: var(--transition); }
header nav a:hover:not(.btn-primary) { color: var(--primary-color); }

/* --- HERO --- */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), url('https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover;
    display: flex; align-items: center; justify-content: center; text-align: center; color: var(--white); padding: 0 20px;
}
.hero h1 { font-size: 4rem; margin-bottom: 20px; line-height: 1.2; }
.hero h1 span { color: var(--primary-color); }
.hero p { font-size: 1.2rem; max-width: 600px; margin: 0 auto 30px auto; color: var(--text-light); }

/* --- GRID DE SERVICIOS CON EFECTO DESLIZANTE (SLIDE-UP REVEAL) --- */
.grid-servicios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.card {
    position: relative;
    background: var(--white);
    height: 280px; /* Altura fija para controlar el área de animación */
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    overflow: hidden; /* Importante para esconder el contenido de abajo */
    border: 1px solid #e2e8f0;
    transition: var(--transition);
}

/* Contenedor 1: Lo que se ve al principio */
.card-visible-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    transition: var(--transition);
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    transition: var(--transition);
}

.card h3 {
    font-size: 1.35rem;
    color: var(--dark-bg);
}

/* Contenedor 2: El texto descriptivo oculto abajo */
.card-hidden-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg); /* Cambia a fondo oscuro industrial al abrirse */
    padding: 35px 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(100%); /* Lo saca de la pantalla hacia abajo */
    transition: var(--transition);
}

.card-hidden-content p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
}

/* --- LOGICA DEL HOVER (EL TRUCO) --- */
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    border-color: var(--primary-color);
}

/* Cuando pasa el mouse, el contenido visible sube y desaparece */
.card:hover .card-visible-content {
    transform: translateY(-100%);
    opacity: 0;
}

/* Cuando pasa el mouse, la descripción sube y toma el control total de la tarjeta */
.card:hover .card-hidden-content {
    transform: translateY(0);
}


/* --- CONTACTO & FOOTER --- */
.contact-form { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 15px; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; padding: 15px; border: none; border-radius: 5px; background: rgba(255, 255, 255, 0.1); color: var(--white); outline: none; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border: 1px solid var(--primary-color); }
footer { background: #0b1120; color: var(--text-light); text-align: center; padding: 20px 0; font-size: 0.9rem; }

/* --- SOLUCIÓN AL CONTRASTE DEL SELECT --- */
.contact-form select option {
    background-color: var(--dark-bg); /* Fuerza a las opciones a tener el fondo azul oscuro industrial */
    color: var(--white);              /* Mantiene el texto blanco legible */
    padding: 10px;
}

/* Opcional: Estilo específico para la primera opción ("Selecciona un servicio") */
.contact-form select option:disabled {
    color: #64748b; /* Le da un tono grisáceo para que se note que es un 'placeholder' */
}


/* --- INTERSECTION OBSERVER ANIMACIONES (Al hacer scroll) --- */
.reveal { opacity: 0; visibility: hidden; }
.fade-up { transform: translateY(50px); }
.reveal.active { opacity: 1; visibility: visible; transform: translate(0, 0); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }

/* Responsividad */
@media (max-width: 768px) {
    header { padding: 15px 20px; flex-direction: column; background: var(--dark-bg); }
    header nav ul { margin-top: 15px; flex-wrap: wrap; justify-content: center; }
    .hero h1 { font-size: 2.5rem; }
    
    /* En celulares, desactivamos un poco el efecto para que el usuario pueda leer dando un tap */
    .card-hidden-content { padding: 20px; }
}


/* --- BOTÓN FLOTANTE DE WHATSAPP --- */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #48aa1b; /* Verde oficial de WhatsApp */
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 9999; /* Asegura que flote por encima de todo el contenido */
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-icon {
    font-size: 2rem;
    line-height: 1;
}

/* Efecto hover interactivo */
.whatsapp-btn:hover {
    transform: scale(1.1) translateY(-5px);
    background-color: #ffffff; /* Un verde ligeramente más oscuro */
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.6);
}

/* Ajuste para pantallas pequeñas (Celulares) para que no tape contenido crítico */
@media (max-width: 768px) {
    .whatsapp-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    .whatsapp-icon {
        font-size: 1.6rem;
    }
}