/* =========================================
   VARIABLES CSS (:root)
   Aquí definimos los colores y valores que usaremos en todo el sitio.
   Si cambiamos un color aquí, se cambia automáticamente en todas partes.
   ========================================= */
:root {
    --primary-color: #0d47a1; /* Azul Profundo (Color principal) */
    --secondary-color: #00bcd4; /* Cian/Turquesa (Color secundario) */
    --accent-color: #ff5252; /* Rojo Urgente (Para destacar) */
    --text-color: #333;       /* Color del texto (Gris oscuro) */
    --light-bg: #f5f9fa;      /* Fondo claro para secciones alternas */
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0,0,0,0.1); /* Sombra suave para tarjetas */
    --transition: all 0.3s ease;         /* Suavizado de animaciones */
}

/* =========================================
   RESETEO BÁSICO
   Eliminamos márgenes por defecto para tener control total.
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* El padding no aumenta el tamaño total del elemento */
}

body {
    font-family: 'Inter', sans-serif; /* Fuente principal */
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

a {
    text-decoration: none; /* Quitar subrayado de enlaces */
    color: inherit;
}

ul {
    list-style: none; /* Quitar puntos de las listas */
}

/* Clase .container: Centra el contenido y evita que se pegue a los bordes */
.container {
    max-width: 1200px; /* Ancho máximo */
    margin: 0 auto;    /* Centrado automático */
    padding: 0 20px;   /* Espacio a los lados */
}

/* =========================================
   ENCABEZADO (HEADER)
   ========================================= */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky; /* Se queda pegado arriba al hacer scroll */
    top: 0;
    z-index: 1000;    /* Se asegura que esté por encima de todo */
    padding: 1rem 0;
}

.header-container {
    display: flex; /* Flexbox permite alinear elementos en fila */
    justify-content: space-between; /* Espacio entre logo y menú */
    align-items: center; /* Alineado verticalmente al centro */
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    gap: 2rem; /* Espacio entre enlaces */
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-color);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--secondary-color); /* Cambio de color al pasar el mouse */
}

.hamburger {
    display: none; /* Oculto en escritorio, visible en móvil */
    font-size: 1.5rem;
    cursor: pointer;
}

/* =========================================
   BOTONES
   ========================================= */
.btn-primary {
    background: var(--primary-color);
    color: var(--white) !important;
    padding: 0.5rem 1.5rem;
    border-radius: 50px; /* Bordes redondeados */
    font-weight: 600;
}

.btn-primary:hover {
    background: #0a367a; /* Color más oscuro al pasar el mouse */
}

.btn-whatsapp {
    background: #25D366; /* Color oficial de WhatsApp */
    color: var(--white);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-whatsapp:hover {
    background: #1ebc57;
    transform: translateY(-2px); /* Pequeño salto hacia arriba */
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* =========================================
   SECCIÓN HÉROE (HERO)
   ========================================= */
.hero {
    /* Fondo con imagen y degradado azul encima para legibilidad */
    background: linear-gradient(rgba(13, 71, 161, 0.9), rgba(0, 188, 212, 0.8)), url('https://images.unsplash.com/photo-1629909613654-28e377c37b09?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.address {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap; /* Permite que los botones bajen si no caben */
}

.hero-buttons .btn-outline {
    border-color: var(--white);
    color: var(--white);
}

.hero-buttons .btn-outline:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* =========================================
   SECCIONES GENERALES
   ========================================= */
.section {
    padding: 4rem 0; /* Espaciado arriba y abajo */
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
    position: relative;
}

/* Línea decorativa debajo del título */
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    margin: 10px auto 0;
}

.bg-light {
    background-color: var(--light-bg);
}

/* =========================================
   GRILLA DE SERVICIOS
   ========================================= */
.services-grid {
    display: grid;
    /* Crea columnas automáticas de mínimo 300px */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px); /* Efecto de elevación */
}

.service-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* =========================================
   SECCIÓN SOBRE MÍ (ABOUT)
   ========================================= */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dos columnas iguales */
    gap: 4rem;
    align-items: center;
}

.role {
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.credentials {
    margin-top: 1.5rem;
}

.credentials li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.credentials i {
    color: var(--secondary-color);
}

.placeholder-img {
    width: 100%;
    height: 400px;
    background: #e0e0e0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: #bdbdbd;
}

/* =========================================
   UBICACIÓN
   ========================================= */
.location-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.info-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-card h3:first-child {
    margin-top: 0;
}

.map-container {
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.full-width {
    width: 100%;
    justify-content: center;
    margin-top: 2rem;
}

/* =========================================
   PIE DE PÁGINA (FOOTER)
   ========================================= */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 2rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--secondary-color);
}

.copyright {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* =========================================
   WHATSAPP FLOTANTE
   ========================================= */
.float-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: var(--transition);
}

.float-whatsapp:hover {
    transform: scale(1.1); /* Efecto de crecimiento al pasar mouse */
}

/* =========================================
   MENÚ MÓVIL
   ========================================= */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--white);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transform: translateX(100%); /* Oculto a la derecha por defecto */
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.active {
    transform: translateX(0); /* Entra a la pantalla */
}

.mobile-menu a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

/* =========================================
   DISEÑO RESPONSIVO (MÓVILES)
   ========================================= */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Oculta menú normal */
    }

    .hamburger {
        display: block; /* Muestra botón hamburguesa */
    }

    .hero h1 {
        font-size: 2rem; /* Reduce tamaño de título */
    }

    .about-container, .location-grid {
        grid-template-columns: 1fr; /* Cambia a una sola columna */
    }

    .mobile-hide {
        display: none; /* Oculta elementos marcados */
    }
}
