:root {
    /* Colores Corporativos */
    --p: #0B2545; /* Azul oscuro corporativo */
    --s: #13599F; /* Azul medio */
    --a: #FF6B1A; /* Naranja industrial de contraste */
    --l: #F3F5F7; /* Gris muy claro para fondos */
    --t: #1b2430; /* Color de texto base */
    --border: #dde1e5;
    --success: #2e7d32; /* Verde WhatsApp */
    
    /* Espaciado fluido */
    --space-sm: clamp(10px, 2vw, 15px);
    --space-md: clamp(20px, 4vw, 30px);
    --space-lg: clamp(40px, 6vw, 70px);
    --space-xl: clamp(60px, 10vw, 100px);
}

* { 
    box-sizing: border-box; 
    margin: 0;
    padding: 0;
}

body { 
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; 
    color: var(--t); 
    line-height: 1.65; 
    background-color: #fff; 
    font-size: 16px; 
    overflow-x: hidden;
    scroll-behavior: smooth; 
}

.wrap { 
    max-width: 1200px; 
    margin: auto; 
    padding: 0 clamp(15px, 5vw, 30px); 
}

/* HEADER Y NAVEGACIÓN */
header { 
    background: var(--p); 
    position: sticky; 
    top: 0; 
    z-index: 100; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
}
.nav { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    flex-wrap: wrap; 
    padding: clamp(10px, 2vw, 15px) clamp(15px, 5vw, 30px); 
    gap: 15px; 
}
.logo { 
    color: #fff; 
    font-weight: 800; 
    font-size: clamp(22px, 4vw, 26px); 
    letter-spacing: 0.5px; 
}
.logo span { 
    color: var(--a); 
    font-weight: 400; 
}
nav { 
    display: flex; 
    gap: clamp(15px, 3vw, 25px); 
    flex-wrap: wrap; 
    justify-content: center; 
    align-items: center; 
}
nav a { 
    color: #fff; 
    text-decoration: none; 
    font-size: clamp(14px, 2vw, 15px); 
    font-weight: 500; 
    transition: color 0.3s ease; 
}
nav a:hover { 
    color: var(--a); 
}

/* ========================================================
   BOTONES CON TRANSICIONES Y DEGRADADOS SUAVES AL BLANCO
   ======================================================== */
.btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    background: var(--a); 
    color: #fff; 
    padding: clamp(10px, 2vw, 12px) clamp(20px, 4vw, 24px); 
    border-radius: 4px; 
    font-weight: 700; 
    text-decoration: none; 
    border: 2px solid transparent; 
    cursor: pointer; 
    font-size: clamp(14px, 2vw, 15px); 
    /* Aumentamos el tiempo a 0.5s para que la transición no sea abrupta */
    transition: all 0.5s ease; 
    text-align: center; 
}
.btn:hover { 
    /* Degradado hacia un naranja muy claro / blanco para dar un brillo sutil */
    background: linear-gradient(90deg, var(--a) 0%, #ffdfcc 150%);
    color: var(--p); /* Oscurecemos el texto para mantener contraste con el blanco */
    transform: translateY(-2px); 
    box-shadow: 0 6px 15px rgba(255, 107, 26, 0.3);
}

.btn.o { 
    background: transparent; 
    border-color: #fff; 
}
.btn.o:hover { 
    /* Degradado blanco semitransparente suave */
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 100%);
    transform: translateY(-2px);
    box-shadow: none;
}
.btn-small { 
    padding: clamp(8px, 1.5vw, 10px) clamp(16px, 3vw, 20px); 
    font-size: 14px; 
}

/* SECCIONES COMUNES Y TRANSICIONES DE FONDO */
.sec { 
    padding: var(--space-xl) 0; 
}

/* En lugar del color sólido, usamos un degradado hacia el blanco en los bordes.
   Esto elimina la línea dura y abrupta entre secciones blancas y grises */
.alt { 
    background: linear-gradient(180deg, #ffffff 0%, var(--l) 15%, var(--l) 85%, #ffffff 100%); 
}

/* TIPOGRAFÍA FLUIDA Y ESPACIADO */
h1, h2, h3, h4 { 
    line-height: 1.25; 
    margin-bottom: var(--space-sm); 
    font-weight: 700;
}
h1 { 
    font-size: clamp(2rem, 5vw, 3.5rem); 
    margin-bottom: var(--space-md); 
}
h2 { 
    font-size: clamp(1.6rem, 4vw, 2.2rem); 
    margin-bottom: var(--space-md); 
    color: var(--p); 
    border-left: 4px solid var(--a); 
    padding-left: clamp(12px, 2vw, 16px); 
}
h3 { 
    font-size: clamp(1.2rem, 3vw, 1.5rem); 
    color: var(--s); 
}
h4 { 
    font-size: clamp(1.1rem, 2vw, 1.2rem); 
    color: var(--p); 
    margin-bottom: 8px;
}
p { 
    margin-bottom: var(--space-sm); 
    font-size: clamp(1rem, 2vw, 1.05rem); 
}
p:last-child {
    margin-bottom: 0;
}

/* IMÁGENES */
img { 
    max-width: 100%; 
    height: auto; 
    display: block; 
    object-fit: cover; 
}
.img-featured { 
    width: 100%; 
    height: 100%; 
    min-height: 350px; 
    border-radius: 8px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.1); 
}
/* HERO SECTION CON DEGRADADO SUAVE HACIA BLANCO */
.hero { 
    /* El degradado pasa del azul oscuro a un blanco perlado para fundirse con la siguiente sección */
    background: linear-gradient(135deg, rgba(11, 37, 69, 0.95) 0%, rgba(255, 255, 255, 0.35) 100%), url('img/fondo_hero.jpeg') center/cover no-repeat; 
    color: #fff; 
    padding: clamp(80px, 12vw, 140px) 0; 
    text-align: center; 
}
.hero h1 { 
    max-width: 900px; 
    margin-left: auto; 
    margin-right: auto; 
    text-shadow: 0 2px 4px rgba(0,0,0,0.4); /* Sombra para que no se pierda en el fondo claro */
}
.hero p { 
    max-width: 800px; 
    margin: 0 auto var(--space-md); 
    font-size: clamp(1.1rem, 2vw, 1.25rem); 
    opacity: 0.95; 
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.hero .btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* GRIDS TOTALMENTE RESPONSIVOS */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--space-md); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr)); gap: var(--space-md); align-items: stretch; }
.grid-2-center { align-items: flex-start; }

/* ESTRUCTURA DE TARJETAS (CARDS) */
.card { background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--a); border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.04); transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; overflow: hidden; }
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.08); }
.card-img { height: 200px; }
.card-img-sm { height: 160px; }
.card-img-lg { height: 260px; }
.card-img, .card-img-sm, .card-img-lg { width: 100%; border-bottom: 1px solid var(--border); }
.card-body { padding: clamp(20px, 4vw, 30px); display: flex; flex-direction: column; flex-grow: 1; }
.card-body > *:last-child { margin-bottom: 0; }
.card-body-content { flex-grow: 1; margin-bottom: var(--space-md); }

/* LISTAS */
ul.check-list, ul.dash-list { padding-left: 0; margin-bottom: var(--space-sm); }
ul.check-list li { padding-left: 28px; position: relative; margin-bottom: 8px; list-style: none; }
ul.check-list li::before { content: '✓'; position: absolute; left: 0; color: var(--a); font-weight: bold; font-size: 1.1rem; top: -1px; }
ul.dash-list li { margin-bottom: 8px; margin-left: 20px; }

/* CAJAS DE INFORMACIÓN */
.info-box { background: var(--l); border-left: 4px solid var(--s); padding: clamp(15px, 3vw, 20px); margin: var(--space-md) 0; border-radius: 0 6px 6px 0; }
.info-box.accent { border-left-color: var(--a); background: #fff; box-shadow: 0 2px 15px rgba(0,0,0,0.05); }

/* FORMULARIO DE CONTACTO */
.contact-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: var(--space-lg); align-items: start; }
.contact-info h3 { margin-top: var(--space-md); }
form { display: grid; gap: 16px; background: #fff; padding: clamp(25px, 5vw, 40px); border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); border-top: 4px solid var(--s); }
input, select, textarea { padding: clamp(12px, 2vw, 14px); border: 1px solid #ccc; border-radius: 4px; font: inherit; width: 100%; background: #fafafa; transition: border-color 0.3s, background 0.3s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--s); background: #fff; box-shadow: 0 0 0 3px rgba(19, 89, 159, 0.1); }

/* 1. Estructura de dos columnas */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* 2. Zona de subida de archivos (Drag & Drop) */
.file-upload { border: 2px dashed #ccc; padding: 20px; text-align: center; border-radius: 4px; background: #fafafa; cursor: pointer; transition: all 0.3s ease; display: flex; flex-direction: column; align-items: center; }
.file-upload:hover { border-color: var(--s); background: #f0f7ff; }
.file-upload span { font-size: 0.95rem; color: #666; margin-top: 8px; }

/* WIDGETS FLOTANTES */
.floating-wsp { position: fixed; bottom: 30px; right: 30px; background-color: var(--success); color: #fff; width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 32px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); z-index: 1000; transition: transform 0.3s ease, background-color 0.3s ease; text-decoration: none; }
.floating-wsp:hover { transform: scale(1.1); background-color: #256628; color: #fff; }

.scroll-top { position: fixed; bottom: 100px; right: 40px; background-color: var(--p); color: #fff; width: 40px; height: 40px; border-radius: 4px; display: flex; justify-content: center; align-items: center; font-size: 18px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); z-index: 999; text-decoration: none; opacity: 0.8; transition: opacity 0.3s ease, background-color 0.3s ease; }
.scroll-top:hover { opacity: 1; background-color: var(--a); color: #fff; }

/* FOOTER */
footer { background: var(--p); color: #dfe5ea; padding: var(--space-lg) 0 clamp(20px, 4vw, 30px); font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: var(--space-md); margin-bottom: var(--space-md); border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: var(--space-md); }
footer h3 { color: #fff; margin-bottom: 12px; font-size: 1.1rem; }
footer p { margin-bottom: 6px; }
footer a { color: var(--a); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: #fff; }
.footer-bottom { text-align: center; color: rgba(255,255,255,0.5); font-size: 0.85rem; }

/* =========================================================
   ACCESIBILIDAD (A11Y) - ESTADOS DE FOCO PARA TECLADO
   ========================================================= */
nav a:focus-visible { outline: 2px dashed var(--a); outline-offset: 4px; border-radius: 2px; }
.btn:focus-visible, .floating-wsp:focus-visible, .scroll-top:focus-visible { outline: 3px solid var(--p); outline-offset: 3px; box-shadow: 0 0 0 5px rgba(11, 37, 69, 0.2); }
.top-contact a:focus-visible, footer a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* RESPONSIVE AJUSTES */
@media (max-width: 768px) {
    .nav { flex-direction: column; text-align: center; padding: 15px; }
    nav { margin: 10px 0; }
    .hero .btn-group { flex-direction: column; }
    .hero .btn { width: 100%; }
    h2 { border-left: none; border-bottom: 3px solid var(--a); padding-left: 0; padding-bottom: 8px; display: inline-block; }
    h2[style*="border: none"] { border-bottom: none; display: block; }
    .img-featured { min-height: 250px; margin-top: var(--space-md); }
    .form-row { grid-template-columns: 1fr; }
    .floating-wsp { bottom: 20px; right: 20px; width: 50px; height: 50px; font-size: 26px; }
    .scroll-top { bottom: 80px; right: 25px; }
}

/* UTILIDADES */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }
.mb-sm { margin-bottom: var(--space-sm) !important; }
.mb-md { margin-bottom: var(--space-md) !important; }
.mb-lg { margin-bottom: var(--space-lg) !important; }
.mt-lg { margin-top: var(--space-lg) !important; }
