/* =========================================
   1. VARIABLES & CONFIGURACIÓN (THEME)
   ========================================= */
:root {
    /* --- PALETA DE COLORES (Brand Colors) --- */
    --color-primary: black;    /* Azul Marino Profundo (Autoridad) */
    --color-primary-dark: #06182a; /* Azul casi negro para hovers */
    --color-secondary: #ebda1f;    /* Dorado Clásico (Metallic Gold) */
    --color-secondary-dark: #B5952F; /* Dorado oscurecido para efecto hover */
    
    /* Textos y Fondos */
    --color-text-main: #333333;    /* Gris oscuro para lectura */
    --color-text-light: #666666;   /* Gris medio */
    --color-bg-body: rgb(238, 238, 248);      /* Fondo casi blanco */
    --color-white: #ffffff;
    --color-bg-section: rgba(10, 37, 64, 0.05); /* Fondo de sección con transparencia */
    
    /* --- IMPORTANTE PARA BOTONES --- */
    --color-text-on-gold: #ffffff;
    
    /* --- TIPOGRAFÍA FLUIDA (Clamp Magic) --- */
    --font-family-head: 'Poppins', sans-serif;
    --font-family-body: 'Open Sans', sans-serif;

    /* clamp(min, value, max) -> Escala suavemente entre 2rem y 3.5rem */
    --fs-h1: clamp(2rem, 5vw + 1rem, 3.5rem); 
    --fs-h2: clamp(1.5rem, 3vw + 1rem, 2.5rem);
    --fs-h3: clamp(1rem, 2vw, 1.25rem);
    --fs-body: clamp(0.9rem, 1vw + 0.5rem, 1rem);

    /* --- ESPACIADO Y LAYOUT --- */
    --header-height: 4.5rem; /* ~72px */
    --container-width: 1200px;
    --z-fixed: 999;
    --z-modal: 1000;
    --z-normal: 2;
    
    /* --- BORDES Y SOMBRAS --- */
    --radius-sm: 10px;
    --radius-full: 50px;
    --shadow-sm: 0 2px 8px rgba(207, 184, 13, 0.989);
    --shadow-md: -10px 0 15px rgba(207, 184, 13, 0.989);
}

/* =========================================
   2. RESET & BASE
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth; /* Scroll suave al navegar */
}
body {
    font-family: var(--font-family-body);
    font-size: var(--fs-body);
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    line-height: 1.6;
     /* CSS Grid: El body organiza las áreas principales (header, main, footer) */
    display: grid;
    grid-template-rows: auto 1fr auto; /* header (alto automático), main (ocupa el resto), footer (alto automático) */
    grid-template-areas:
        "header-area"
        "main-area"
        "footer-area"; /* Nombres de las áreas para la cuadrícula */
    max-width: 100vw;
    min-height: 100vh;
}
/* Asignar las áreas de grid a los elementos HTML correspondientes */
header { grid-area: header-area;}
main { grid-area: main-area; margin-top: 70px; max-width: 100vw;}
footer { grid-area: footer-area; box-shadow: var(--border-glow);}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button, input { font-family: inherit; border: none; outline: none; }

.scroll-animar {
    opacity: 0; /* Invisible al principio */
    transition: opacity 0.3s; /* Por si el JS tarda en cargar, que no sea brusco */
}
/* Tu texto de animación de escritura */
.typing-text {
    color: var(--primary-color); /* Usar variable de color */
    text-shadow: 0 0 10px var(--secondary-color), 0 0 20px var(--secondary-color), 0 0 30px var(--secondary-color);
    white-space: nowrap; /* POR DEFECTO: PERMITIR QUE EL TEXTO SE ENVUELVA */
    overflow: hidden;
    border-radius: 10px;
    border-right: 1px solid var(--secondary-color); /* El "cursor" de la animación */
    animation: typing 4s steps(40, end) infinite, blink 0.7s step-end infinite;
    max-width: 0; /* Necesario para el efecto de escritura */
}
/* --- CORRECCIÓN DE SALTOS (Force Layout) --- */

/* =========================================
   3. CLASES DE UTILIDAD (REUTILIZABLES)
   ========================================= */

.btn--primary {
    background-color: var(--color-secondary); /* Fondo Dorado */
    color: var(--color-text-on-gold);         /* Texto Azul (para que se lea bien) */
    font-weight: 700;                         /* Letra un poco más gruesa */
    transition: all 0.3s ease;
    cursor: pointer;
}
/* Texto de color */
.text-dorado { color: var(--color-secondary); }

/* --- Barra de Navegación (Nav) --- */

#navbar {
    display: flex; /* Para que sus hijos directos (los dos <ul>) se alineen */
    flex-direction: row;
    justify-content: space-between; /* Intentará poner el primer <ul> a la izquierda, el segundo <ul> (sidebar) a la derecha */
    align-items: center;
    padding: 1rem;
    font-family: var(--font-family-head);
    font-weight: 700;
    background-color: rgba(0,0,0,1);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-modal);
    box-shadow: var(--shadow-sm);
    height: 70px;
}
/* Estilos para el PRIMER UL (el de los enlaces principales y el logo) */
#navbar > ul:first-of-type {
    display: flex; /* Para que los <li> de esta lista se alineen horizontalmente */
    flex-direction: row;
    align-items: center; /* Centrar verticalmente los ítems */
    justify-content: space-around;
    gap: 4rem;
}
#navbar > ul:first-of-type li a {
    display: flex;
    color: var(--color-text-on-gold, #f5f5f5);
    font-size: 1.2rem;
    border-radius: var(--radius-sm); /* Bordes redondeados */
    transition: color 0.3s;
}
#navbar > ul:first-of-type li a:hover {
    color: var(--primary-color); /* Dorado al pasar el mouse */
}
.header-logo {
    display: flex; /* Alinea imagen y texto horizontalmente */
    align-items: center;
    justify-content: space-around;
    font-family: var(--font-family-head);
    font-weight: 700;
    color: var(--color-primary);
}
.header-logo-img {
    width: 100px;
    padding: 1rem;
}
/* Ocultar elementos específicos en móvil por defecto */
.hideOnMobile {
    display: none;
}
/* Tu botón del menú hamburguesa es un li*/
.menu-button button {
    display: block; /* Visible en móvil */
    background: none;
    cursor: pointer;
    color: var(--color-white);
    font-size: 2.5rem;
}
/* --- Sidebar para menú móvil --- */
/* NOTA: Este UL es el SEGUNDO UL dentro de #navbar */
.sidebar { 
    position: fixed;
    top: 0;
    right: -100%; /* Inicialmente fuera de la pantalla */
    width: 100%; /* Ocupa todo el ancho en móvil */
    max-width: 300px; /* Limita el ancho del sidebar en pantallas más grandes */
    height: 100vh;
    background:rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(100px);
    padding: 4rem 1.5rem; /* Espacio para que no se superponga con la nav fija */
    transition: right 0.3s ease-in-out;
    z-index: var(--z-fixed); /* Detrás del botón de menú principal */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-shadow: var(--shadow-md); /* Sombra para que se vea que "sale" */
}

.sidebar.active {
    right: 0; /* Deslizar hacia adentro cuando está activo */
}
.sidebar li {
    width: 100%;
    text-align: center; /* Alinear texto a la izquierda */
    padding: 0.5rem;
}
.sidebar li a {
    display: block;
    padding: 1rem;
    color: var(--color-text-on-gold, #f5f5f5);
    text-decoration: none;
    border-radius: 10px;
    font-size: 1.3rem;
    transition: color 0.3s ease;
}
.sidebar li a:hover {
    color: var(--color-text-on-gold);
    background: var(--color-secondary-dark);
}
/* Botón de cerrar sidebar */
.sidebar li:first-child a i { /* El ícono fas fa-times */
    font-size: 1.8rem;
}
/* --- HERO SECTION INTELIGENTE --- */
.hero-grid {
    /* 1. Definimos el Grid */
    display: grid;
    
    /* 2. LA MAGIA RESPONSIVA (Sin Media Queries)
       - repeat(auto-fit, ...): Crea tantas columnas como quepan.
       - minmax(min(100%, 450px), 1fr):
         Cada columna debe medir AL MENOS 450px. 
         Si la pantalla es menor a 450px (móvil), la columna ocupa el 100% (se apilan).
         Si la pantalla es grande, se dividen el espacio (1fr).
    */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
    padding: 2rem;
    gap: 4rem; /* Espacio entre texto e imagen */
    align-items: center; /* Centrado verticalmente */
    justify-content: center;
    scroll-margin-top: var(--header-height);
    box-shadow: var(--shadow-sm);
}
.hero-text
{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}
/* --- TIPOGRAFÍA FLUIDA (CLAMP) --- */
.hero-text h1 {
    /* clamp(Mínimo, Ideal, Máximo) */
    font-size: var(--fs-h1); 
    line-height: 1.1;
    color: var(--color-primary);
    font-family: var(--font-family-head);
}
.hero-text h3 {
    font-size: var(--fs-h3); /* Texto legible en móvil y PC */
    color: var(--color-text-main);
    max-width: 60ch; /* Limita el ancho para que sea cómodo de leer */
    animation: floatImage 4s ease-in-out infinite;
}

/* --- BOTÓN HERO --- */
.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background-color: var(--color-primary); /* Botón Azul en el Hero para contraste */
    color: var(--color-white);
    padding: 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: clamp(1.1rem, 1.5vw, 1.2rem);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-hero:hover {
    background-color: var(--color-secondary); /* Dorado al pasar el mouse */
    color: var(--color-primary); /* Texto azul sobre dorado */
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* --- IMAGEN HERO --- */
.hero__tracking {
    display: flex;
    justify-content: center;
    align-items: center;
    /* Animación de flotación para darle vida */
    animation: floatImage 4s ease-in-out infinite;
}
.hero__tracking img {
    /* Filtro opcional para integrar la imagen si tiene fondo */
    border-radius: 20px; 
    box-shadow: var(--shadow-md); /* Detalle decorativo dorado */
}
/* =========================================
   4. BANNER DE SERVICIOS
   ========================================= */
#servicios
{
    position: relative;
    height: auto;
    background-color: var(--color-bg-body); 
    font-family: var(--font-family-head);
    display: flex; 
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 3rem;
    scroll-margin-top: var(--header-height);
    box-shadow: var(--shadow-sm);
}
/* --- CONTENEDOR INTELIGENTE (WRAPPER) --- */
.services-intro {
    display: grid;
    /* min(100%, 400px): Esto asegura que en celulares muy pequeños no se rompa.
       1fr: Se reparten el espacio sobrante.
    */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    gap: 1rem; /* Espacio entre el título y el banner */
    align-items: center; /* Centrado Vertical perfecto */
    width: 100%;
}

/* --- AJUSTES DEL TÍTULO PARA ESTE LAYOUT --- */
.title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    color: var(--color-secondary);
}
.section-title {
    color: var(--color-primary);
    font-size: var(--fs-h1);
    z-index: 10; /* Asegura que el texto esté encima */
}
.section-subtitle {
    font-size: var(--fs-h2);
    z-index: 10;
    animation: floatImage 4s ease-in-out infinite;
}
.banner{
    width: 100%;
    height: 300px;
    text-align: center;
    position: relative;
}
.banner .slider{
    position: absolute;
/* 1. DEFINIMOS EL TAMAÑO DINÁMICO AQUÍ */
    --w: clamp(150px, 20vw, 200px);
    --h: clamp(180px, 25vw, 250px);
    /* 2. APLICAMOS LA VARIABLE AL ANCHO Y ALTO */
    width: var(--w); 
    height: var(--h);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transform-style: preserve-3d;
    transform-origin: center center; /* Eje de rotación */
    perspective: 1000px;
    animation: autoRun 15s linear infinite; /* 15s es una buena velocidad */
    z-index: 2;
}
.banner .slider .item{
    position: absolute;
    inset: 0 0 0 0;
    transform: 
        rotateY(calc( (var(--position) - 1) * (360 / var(--quantity)) * 1deg))
        translateZ(calc(var(--w)*0.6)); /* Profundidad del carrusel */
}
.banner .slider .item img{
    width: 100%;          /* 1. Obliga a la imagen a no ser más ancha que la tarjeta */
    height: 100%;         /* 2. Obliga a la imagen a no ser más alta que la tarjeta */
    object-fit: cover;    /* 3. CLAVE: Recorta la imagen para llenar el espacio sin deformarse */
    display: block;       /* 4. Evita pequeños espacios blancos abajo de las imágenes */
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border-radius: var(--radius-sm); /* Bordes redondeados modernos */
    background: white; /* Por si la imagen no carga */
    -webkit-box-reflect: below 10px linear-gradient(transparent, transparent, rgba(0,0,0,0.2)); /* Reflejo cool */
}
/* --- CONTENEDOR DE LAS TARJETAS --- */
.services-info {
    display: grid;
    /* Grid Responsivo Automático */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 2.5rem;
    width: 100%;
    z-index: 5; /* Asegura que esté por encima de cualquier elemento decorativo */
}

/* --- TARJETA INDIVIDUAL --- */
.service-detail {
    padding: 2.5rem 2rem;
    border-radius: var(--radius-full); /* Bordes bien redondeados */
    box-shadow: 0 10px 40px rgba(0,0,0,0.05); /* Sombra suave de alta calidad */
    background-color: rgba(0,0,0,0.2); /* Fondo Blanco para resaltar */
    text-align: left; /* Texto alineado a la izquierda para mejor lectura */
    transition: all 0.4s ease;
    border: 1px solid rgba(0,0,0,0.03); /* Borde casi invisible */
    position: relative;
    overflow: hidden;
}
/* EFECTO HOVER (Vida a la sección) */
.service-detail:hover {
    transform: translateY(-10px); /* Levita al pasar el mouse */
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    border-bottom: 5px solid var(--color-secondary); /* Línea DORADA abajo */
}
/* --- ICONOS --- */
.service-icon {
    width: 70px;
    height: 70px;
    background-color: var(--color-white); /* Azul muy clarito de fondo */
    border-radius: var(--radius-full);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: var(--color-primary); /* Icono Azul */
    transition: all 0.3s ease;
}
/* Icono cambia a Dorado al hacer Hover */
.service-detail:hover .service-icon {
    background-color: var(--color-secondary); /* Fondo Dorado */
    color: var(--color-white); /* Icono Blanco */
    transform: rotateY(360deg); /* Pequeña pirueta 3D */
}
/* --- TIPOGRAFÍA --- */
.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-primary);
}
.service-desc {
    color: var(--color-text-light);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.7;
}
/* --- BOTÓN DE TEXTO (LINK) --- */
.btn-text {
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: 0.3s;
}
.btn-text i {
    font-size: 0.8rem;
    transition: transform 0.3s;
}
.btn-text:hover {
    color: var(--color-secondary); /* Texto Dorado al hover */
}
.btn-text:hover i {
    transform: translateX(5px); /* La flecha se mueve a la derecha */
}
/* =========================================
   5. SECCIÓN COMO FUNCIONA EN 4 PASOS
   ========================================= */
.section-proceso {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    gap: clamp(1rem, 5vw, 2rem);
    padding: clamp(1rem, 5vw, 2rem);
    font-family: var(--font-family-head);
    background-color: var(--color-bg-section);
    box-shadow: var(--shadow-sm);
    scroll-margin-top: var(--header-height);
}
/* --- CONTENEDOR GRID (TEXTO + IMAGEN) --- */
.header-grid {
    display: grid;
    /* LA LÓGICA RESPONSIVA SIN MEDIA QUERIES:
       - repeat(auto-fit, ...): Crea tantas columnas como quepan.
       - minmax(min(100%, 400px), 1fr): 
         Cada elemento (Texto e Imagen) intentará medir al menos 400px.
         Si la pantalla es grande (>800px), caben los dos lado a lado (1fr cada uno).
         Si la pantalla es pequeña (Móvil), no caben, así que se apilan uno sobre otro.
    */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    /* CLAMP PARA EL ESPACIADO (GAP):
       - Móvil: 2rem (32px)
       - Ideal: 5% del ancho de pantalla
       - Desktop: 4rem (64px)
       El espacio entre texto e imagen crece o se encoge suavemente.
    */
    gap: clamp(2rem, 5vw, 4rem);
    padding: clamp(1rem, 5vw, 3rem);
    align-items: center;
    width: 100%;
}
.header-text
{
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    font-weight: 700;
}
.header-text span {
    font-size: var(--fs-h2);
    color: var(--color-secondary);
}
.header-text p {
    font-size: var(--fs-h3);
    color: var(--color-text-main);
}
.header-image {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    animation: floatImage 4s ease-in-out infinite;
}
.header-image img {
    width: clamp(300px, 30vw, 400px);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    object-fit: cover;
}
/* --- GRID DEL PROCESO --- */
.process-grid {
    display: grid;
    /* En móvil 1 columna, en PC hasta 4 columnas */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    padding: 2rem;
    gap: 2rem;
}
/* --- TARJETA DE PASO --- */
.step-card {
    box-shadow: 0 9px 8px 4px var(--color-primary);
    padding: 2rem 1rem;
    position: relative;
    transition: transform 0.3s ease;
    border-radius: var(--radius-sm);
}
.step-card:hover {
    transform: translateY(-5px); /* Pequeña animación al pasar mouse */
}
/* EL NÚMERO GIGANTE DE FONDO */
.step-number {
    font-size: 6rem;
    font-weight: 900;
    color: var(--color-text-light); /* Azul muy transparente */
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    font-family: var(--font-family-head);
    line-height: 1;
}
/* EL ICONO */
.step-icon {
    font-size: 2.5rem;
    color: var(--color-secondary); /* Dorado */
    background: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.5rem auto;
    position: relative;
    z-index: 2; /* Encima del número */
    box-shadow: var(--shadow-sm);
}
/* TEXTOS */
.step-card h3 {
    font-size: var(--fs-h2);
    color: var(--color-primary);
    position: relative;
    z-index: var(--z-normal);
}
.step-card p {
    font-size: var(--fs-h3);
    color: var(--color-text-light);
    line-height: 1.6;
    position: relative;
    z-index: var(--z-normal);
}
/* BOTÓN FINAL CENTRADO */
.process-cta {
    text-align: center;
}
/* =====================
   5. SECCION CONTACTO 
   =====================*/
/* --- SECCIÓN GENERAL --- */
.section-contacto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    scroll-margin-top: var(--header-height);
    padding: clamp(2rem, 5vw, 4rem);
    gap: clamp(2rem, 5vw, 4rem);
    background-color: var(--color-bg-body);
    box-shadow: var(--shadow-sm);
    font-family: var(--font-family-head);
}
/* --- GRID DE CONTACTO (Info + Formulario) --- */
.contact-grid {
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 5vw, 2.5rem);
}
/* --- TÍTULO DE LA SECCIÓN --- */
.contact-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 1rem;
    color: var(--color-secondary);
}
.contact-title span {
    font-size: var(--fs-h1);
    color: var(--color-secondary);
}

.contact-title h2 {
    font-size: var(--fs-h2);
    color: var(--color-primary);
}
.contact-title p {
    font-size: var(--fs-h3);
    color: var(--color-text-main);
}
.contact-info {
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 5vw, 2.5rem);
}
/* --- COLUMNA 1: INFO --- */
.info-text {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 5vw, 2rem);
}
.info-text h3 {
    font-size: var(--fs-h1);
    color: var(--color-primary);
    font-family: var(--font-family-head);
}
.info-text p {
    color: var(--color-text-main);
    font-size: var(--fs-h3);
}
.info-text h2{
    font-size: var(--fs-h2);
    color: var(--color-secondary);
}
/* Items de contacto (Icono + Texto) */
.info-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-family: var(--font-family-head);
}

.info-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(212, 175, 55, 0.1); /* Dorado muy suave */
    color: var(--color-secondary); /* Icono Dorado */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    flex-shrink: 0; /* Evita que el circulo se aplaste */
}
.info-icon-text {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.info-item h3 {
    font-size: 1.2rem;
    color: var(--color-primary);
}

.info-item p {
    font-size: var(--fs-h3);
    color: var(--color-text-main);
}
.ws-item
{   
    width: fit-content;
    color: var(--color-white);
    background-color: var(--color-primary);
    padding: 0.5rem 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.ws-item:hover
{
    background-color: var(--color-secondary);
    color: var(--color-primary);
    transform: translateY(-5px);
    transition: 0.3s;
}
.ws-double{
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}
/* --- GALERÍA DE RELLENO CONTACTOS USA --- */
.office-gallery {
    padding-top: 2rem;
    border-top: 1px solid #eee; /* Una línea sutil para separar */
}

.gallery-title{
    font-size: var(--fs-h2);
    margin-bottom: 1.5rem;
    color: var(--color-primary);
    font-family: var(--font-family-head);
}

.gallery-grid {
    display: grid;
    /* TRUCO PRO:
       clamp(200px, 40vw, 500px) le dice al navegador:
       1. En móvil: No bajes de 200px.
       2. En desktop: Intenta llegar a 500px.
       3. El '1fr' se encarga de rellenar el espacio sobrante.
    */
    grid-template-columns: repeat(auto-fit, minmax(clamp(200px, 40vw, 500px), 1fr));
    gap: 2rem;
}
.gallery-grid img {
    width: 100%;
    height: clamp(400px, 50vw, 800px); /* Altura fija para que todas se vean uniformes */
    object-fit: cover; /* Recorta la imagen para que no se deforme */
    border-radius: var(--radius-sm);
    box-shadow: 0 15px 20px rgba(0,0,0,0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
/* Efecto Hover Premium */
.gallery-grid img:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 20px rgba(0,0,0,0.6);
    border: 2px solid var(--color-secondary);
}
/* =========================================
   6. Sección Footer 
   ========================================= */
/* --- FOOTER (CONTENEDOR PRINCIPAL) --- */
.footer-grid {
    display: grid;
    /* Columnas automáticas: Mínimo 250px, si sobran se reparten (1fr) */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: clamp(3rem, 5vw, 4rem); /* Espacio entre cajas */
    /* ESPACIADO INTERNO (Sustituye a la clase container) */
    /* Arriba/Abajo: 4rem y 2rem */
    /* Lados: clamp(2rem, 5%, 8rem) -> Mantiene el contenido centrado y aireado */
    padding: 3rem clamp(2rem, 5%, 8rem) 2rem clamp(2rem, 5%, 8rem);
    background-color: var(--color-bg-section); /* Fondo Azul Profundo */
    color: var(--color-white);
    scroll-margin-top: var(--header-height);
    font-family: var(--font-family-head);
}
/* --- CAJAS INDIVIDUALES --- */
.footer-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(1rem, 3vw, 1.5rem);
}
/* --- LOGO Y DESCRIPCIÓN --- */
.footer-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: clamp(1.5rem, 3vw, 1.5rem);
    font-weight: 900;
    color: var(--color-primary);
    width: 100%;
}
.footer-logo img {
    width: clamp(100px, 5vw, 120px);
    margin-left: -1rem;
}
.footer-desc {
    color: var(--color-text-main);
    font-size: var(--fs-h3);
}
/* --- REDES SOCIALES --- */
.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-white);
    transition: 0.3s ease;
    border: 1px solid transparent;
}

.social-link:hover {
    background-color: var(--color-secondary); /* Dorado */
    color: var(--color-primary); /* Icono Azul */
    transform: translateY(-3px);
}

/* --- TÍTULOS Y LISTAS --- */
.footer-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
    position: relative;
    padding-bottom: 0.5rem;
}

/* Línea dorada debajo del título */
.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: var(--color-secondary);
}
.footer-links {
    display: flex;
    flex-direction: column;
    color: var(--color-white);
    gap: clamp(0.5rem, 2vw, 1rem);
}
/* Estilo específico para los íconos dentro de los enlaces del footer */
.footer-links i {
    margin-right: 0.5rem; /* Espacio entre ícono y texto */
    color: var(--color-secondary); /* Color Dorado para el ícono */
    width: 20px; /* Ancho fijo para que todos los textos queden alineados verticalmente */
    text-align: center; /* Centrar el ícono en su espacio */
    transition: transform 0.3s;
}

/* Efecto opcional: Al pasar el mouse, el ícono gira un poco */
.footer-links a:hover i {
    transform: rotate(15deg);
    color: var(--color-primary);
}
.footer-links a {
    transition: 0.3s;
    display: inline-block;
    background-color: var(--color-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
}
.footer-links a:hover {
    color: var(--color-primary);
    transform: translateX(5px);
    background-color: var(--color-secondary);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

/* --- BARRA INFERIOR (COPYRIGHT + CREDITOS) --- */
.footer-bottom {
    /* TRUCO IMPORTANTE: */
    /* Esto obliga al div a ocupar TODAS las columnas disponibles (ancho completo) */
    grid-column: 1 / -1; 
    border-top: 1px solid var(--color-primary);
    padding-top: 2rem;
    color: var(--color-text-main);
}
.bottom-content {
    display: flex;
    flex-wrap: wrap; /* Para que baje en móviles */
    justify-content: space-between;
    text-align: center;
    align-items: center;
    gap: 1rem;
    font-size: var(--fs-h3);
}
/* --- CRÉDITOS (ALCIV@RDEV) --- */
.footer-credits {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    gap: 1rem;
    width: 100%;
}
.separator
{
    display: none;
    color: var(--color-primary);
}

.dev-link {
    color: var(--color-primary);
    font-weight: 900;
    text-decoration: none;
    position: relative;
    transition: color 0.3s;
}

.dev-link:hover {
    color: var(--color-secondary); /* Tu nombre en dorado */
}
/* Redes Sociales */
.social-links {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 3rem;
}
.social-link {
    width: 45px;
    height: 45px;
    background-color: var(--color-white);
    color: var(--color-primary);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
    font-size: 1.2rem;
}

.social-link:hover {
    background-color: var(--color-secondary); /* Dorado */
    color: var(--color-white);
    transform: translateY(-3px);
}

/* =========================================
   7. MEDIA QUERIES (RESPONSIVE DESIGN)
   ========================================= */
@media (min-width: 768px) and (max-width: 1025px){
   /* --- Nav para Tablet --- */
    #navbar 
    {
        justify-content: space-between; /* Permite que los dos <ul> se separen */
        padding: 3 1rem;
    }
    /* Mostrar los enlaces principales de la nav y el botón de tema en desktop */
    #navbar > ul:first-of-type 
    {
        display: flex; /* Asegura que la lista principal se muestre en desktop */
        flex-grow: 1; /* Permite que ocupe el espacio disponible */
        align-items: center; /* Centrar verticalmente */
        gap: 0.5rem; /* Espacio entre los ítems */
    }
    #navbar > ul:first-of-type li a
    {
    font-size: 1rem;
    }
    /* Ocultar elementos específicos que eran 'hideOnMobile' */
    .hideOnMobile {display: block;} /* O display: flex; si el <li> lo requiere */
    /* Ocultar el botón de menú hamburguesa en tablet y desktop */
    .menu-button {display: none;}
    /* Asegurarse de que el sidebar esté oculto en pantallas grandes */
    .sidebar {right: -100%;}
    /* Mostrar el botón de tema de escritorio y ocultar el móvil */
    .cotizar-desktop {display: block;}
    .cotizar-mobile {display: none;}
    /* Pequeño ajuste para el logo de código en desktop, si quieres que esté a la izquierda y el resto a la derecha */
    .hero-text {
        align-items: center;
        text-align: center;
    }
    .bottom-content {
        flex-direction: column;
    }
    .footer-credits {
        justify-content: center;
        flex-direction: row;
    }
    .separator {
        display: block; /* Ocultamos la barra separadora en móvil */
    }
}

/* --- Desktop (min-width: 1026px) --- */
@media (min-width: 1026px) {
    /* --- Nav para Desktop --- */
    #navbar {
        padding: 2rem 4rem; /* Más padding en escritorio */
    }
     /* Mostrar los enlaces principales de la nav y el botón de tema en desktop */
    #navbar > ul:first-of-type 
    {
        display: flex; /* Asegura que la lista principal se muestre en desktop */
        flex-grow: 1; /* Permite que ocupe el espacio disponible */
        justify-content: flex-start; /* Alinear los enlaces a la derecha si es necesario */
        align-items: center; /* Centrar verticalmente */
        gap: 3rem; /* Espacio entre los ítems */
    }
    /* En los li que NO sean el primero, aplica el hover al enlace */
    #navbar > ul:first-of-type li:not(:first-child) a:hover {
        background: var(--color-secondary);
        padding: 0.5rem;
    }
    /* Ocultar elementos específicos que eran 'hideOnMobile' */
    .hideOnMobile {display: block;} /* O display: flex; si el <li> lo requiere */
    /* Ocultar el botón de menú hamburguesa en talet y desktop */
    .menu-button {display: none;}
    /* Asegurarse de que el sidebar esté oculto en pantallas grandes */
    .sidebar {right: -100%;}
    /* Mostrar el botón de tema de escritorio y ocultar el móvil */
    .cotizar-desktop {display: block;}
    .cotizar-mobile {display: none;}
    .hero-text {
        align-items: flex-start;
        text-align: left;
    }
    .title-wrapper {
        text-align: left;
        align-items: flex-start;
    }
    .header-text {
        align-items: flex-start;
        text-align: left;
    }
    .bottom-content {
        flex-direction: column;
    }
    .footer-credits {
        justify-content: center;
        flex-direction: row;
    }
    .separator {
        display: block; /* Ocultamos la barra separadora en móvil */
    }
}
/* =========================================
   6. ANIMACIONES
   ========================================= */
/* Animación de rotación continua */
@keyframes autoRun{
    from{
        transform: translate(-50%, -50%) perspective(1000px) rotateX(-16deg) rotateY(0deg);
    }to{
        transform: translate(-50%, -50%) perspective(1000px) rotateX(-16deg) rotateY(360deg);
    }
}
/* Animación de flotación suave */
@keyframes floatImage {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px); } /* Sube un poco */
    100% { transform: translateY(0); }
}
/* Animación de parpadeo del cursor */
@keyframes typing {
    from { max-width: 0; }
    to { max-width: 100%; } /* Ajusta esto al ancho máximo de tu texto */
}