/* =====================================================================
   Madprof · style.css
   Hoja de estilos única · minimalista premium · móvil primero
   ---------------------------------------------------------------------
   Índice
   1.  Tokens de diseño (:root)
   2.  Reset y base
   3.  Utilidades (container, botones)
   4.  Cabecera y navegación (hamburguesa solo-CSS)
   5.  Hero + ola de firma
   6.  Pilares (Grid)
   7.  Sección "Servicios acuáticos"
   8.  Footer
   9.  Botón flotante de WhatsApp
   10. Media queries (tablet y escritorio)
   11. Accesibilidad (focus / movimiento reducido)
   ===================================================================== */

/* ------------------------------------------------------------------ */
/* 1. TOKENS DE DISEÑO                                                 */
/* ------------------------------------------------------------------ */
:root {
    /* Paleta acuática + acento coral (color de los flotadores de rescate) */
    --ink:         #0A2540;   /* navy profundo: texto y fondos oscuros   */
    --ocean:       #0E7490;   /* azul teal corporativo                   */
    --ocean-deep:  #075E6B;   /* hover de azules                         */
    --aqua:        #38BDF8;   /* cian luminoso para degradados           */
    --surface:     #F4FAFE;   /* fondo claro general                     */
    --surface-2:   #E0F2FE;   /* fondo de tarjetas / secciones suaves    */
    --line:        #D7E8F2;   /* bordes finos                            */
    --coral:       #FF5A3C;   /* acento llamativo para acciones (CTA)    */
    --coral-deep:  #E8431F;   /* hover del acento                        */
    --white:       #FFFFFF;
    --wa-green:    #25D366;   /* verde oficial de WhatsApp               */

    --text:        #103047;   /* color de texto principal                */
    --text-soft:   #4B6577;   /* texto secundario                        */

    /* Tipografías */
    --font-display: 'Montserrat', system-ui, sans-serif;
    --font-body:    'Inter', system-ui, sans-serif;

    /* Radios, sombras y medidas */
    --radius:      16px;
    --radius-sm:   10px;
    --shadow:      0 10px 30px rgba(10, 37, 64, .08);
    --shadow-lg:   0 20px 45px rgba(10, 37, 64, .16);
    --maxw:        1140px;
    --header-h:    72px;
}

/* ------------------------------------------------------------------ */
/* 2. RESET Y BASE                                                     */
/* ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
    font-family: var(--font-display);
    line-height: 1.15;
    color: var(--ink);
    margin: 0 0 .5em;
    letter-spacing: -0.02em;
}

p { margin: 0 0 1rem; }

/* ------------------------------------------------------------------ */
/* 3. UTILIDADES                                                       */
/* ------------------------------------------------------------------ */
.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Botones reutilizables */
.btn {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .95rem;
    padding: .85rem 1.6rem;
    border-radius: 999px;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

/* CTA principal: acento coral */
.btn--accent {
    background: var(--coral);
    color: var(--white);
    box-shadow: 0 8px 20px rgba(255, 90, 60, .35);
}
.btn--accent:hover {
    background: var(--coral-deep);
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(255, 90, 60, .45);
}

/* Botón secundario translúcido (sobre el hero oscuro) */
.btn--ghost {
    background: rgba(255, 255, 255, .12);
    color: var(--white);
    border-color: rgba(255, 255, 255, .55);
}
.btn--ghost:hover {
    background: rgba(255, 255, 255, .22);
    transform: translateY(-2px);
}

/* ------------------------------------------------------------------ */
/* 4. CABECERA Y NAVEGACIÓN                                            */
/* ------------------------------------------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-h);
    position: relative;
}

/* Logotipo */
.logo {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--ink);
}
.logo__mark {
    color: var(--ocean);
    font-size: 1.6rem;
    line-height: 1;
}
.logo__img {
    height: 2rem;
    width: auto;
    display: block;
}

/* Lista de navegación */
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: .35rem;
}
.nav-list a {
    display: block;
    font-weight: 500;
    color: var(--text);
    padding: .55rem .9rem;
    border-radius: var(--radius-sm);
    transition: color .15s ease, background .15s ease;
}
.nav-list a:hover { color: var(--ocean); background: var(--surface-2); }

/* Enlace de contacto destacado dentro del menú */
.nav-cta {
    background: var(--ink);
    color: var(--white) !important;
}
.nav-cta:hover { background: var(--ocean-deep) !important; }

/* Botón hamburguesa (visible solo en móvil) */
.nav-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    cursor: pointer;
    border-radius: var(--radius-sm);
}
.nav-burger span {
    height: 2px;
    width: 100%;
    background: var(--ink);
    border-radius: 2px;
    transition: transform .25s ease, opacity .25s ease;
}

/* MÓVIL PRIMERO: el menú está oculto y se despliega con la casilla */
@media (max-width: 860px) {
    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
    }
    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: .5rem 1.25rem 1rem;
    }
    .nav-list a { padding: .85rem .5rem; border-radius: 0; }
    .nav-cta { text-align: center; margin-top: .5rem; border-radius: var(--radius-sm); }

    /* Al marcar la casilla oculta se abre el menú (crece lo necesario y
       hace scroll si no cabe, para que nunca se corte el último enlace) */
    .nav-toggle:checked ~ .site-nav {
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
    }

    /* ...y la hamburguesa se transforma en una "X" */
    .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
    .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* En escritorio no hace falta la hamburguesa */
@media (min-width: 861px) {
    .nav-burger { display: none; }
}

/* ------------------------------------------------------------------ */
/* 5. HERO + OLA DE FIRMA                                              */
/* ------------------------------------------------------------------ */
.hero {
    position: relative;
    background: linear-gradient(160deg, var(--ink) 0%, var(--ocean) 55%, var(--aqua) 130%);
    color: var(--white);
    padding: 4rem 0 6rem;
    overflow: hidden;
}
.hero__inner { max-width: 760px; }

.hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: .78rem;
    font-weight: 600;
    color: var(--aqua);
    margin-bottom: 1rem;
}
.hero__title {
    color: var(--white);
    font-size: clamp(2rem, 6vw, 3.4rem);
    font-weight: 800;
    margin-bottom: 1rem;
}
.hero__lead {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: rgba(255, 255, 255, .9);
    max-width: 560px;
}
.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: 1.8rem;
}

/* Ola SVG que conecta el hero con la sección clara siguiente */
.hero__wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 90px;
}
.hero__wave path { fill: var(--surface); }

/* ------------------------------------------------------------------ */
/* 6. PILARES (GRID)                                                   */
/* ------------------------------------------------------------------ */
.pillars { background: var(--surface); padding: 3.5rem 0 4rem; }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.section-head h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
.section-head p { color: var(--text-soft); margin: 0; }

/* Cuadrícula: 1 columna en móvil, se amplía en las media queries */
.pillars__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.pillar-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem 1.75rem;
    box-shadow: var(--shadow);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.pillar-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--aqua);
}
.pillar-card__icon {
    font-size: 2.4rem;
    width: 64px; height: 64px;
    display: grid; place-items: center;
    background: var(--surface-2);
    border-radius: 18px;
    margin-bottom: 1.1rem;
}
.pillar-card h3 { font-size: 1.4rem; }
.pillar-card p { color: var(--text-soft); flex: 1; }
.pillar-card__link {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--ocean);
    margin-top: .5rem;
    transition: gap .2s ease, color .2s ease;
}
.pillar-card:hover .pillar-card__link { color: var(--coral); }

/* ------------------------------------------------------------------ */
/* 7. SECCIÓN "SERVICIOS ACUÁTICOS"                                    */
/* ------------------------------------------------------------------ */
.about { padding: 4rem 0; }
.about__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
}
.about__text h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
.about__text p { color: var(--text-soft); }
.about__text strong { color: var(--ink); }
.about__text .btn { margin-top: .8rem; }

.about__stats {
    list-style: none;
    margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: center;
}
.about__stats li {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem .5rem;
}
.stat__num {
    display: block;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--ocean);
}
.stat__label { font-size: .82rem; color: var(--text-soft); }

/* ------------------------------------------------------------------ */
/* 8. FOOTER                                                           */
/* ------------------------------------------------------------------ */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .75); }

.footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 1.25rem 2.5rem;
}
.footer__logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: .6rem;
}
.footer__claim { max-width: 320px; }

.footer__col h2 {
    color: var(--white);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 1rem;
}
.footer__col ul { list-style: none; margin: 0; padding: 0; }
.footer__col li { margin-bottom: .55rem; }
.footer__col a { transition: color .15s ease; }
.footer__col a:hover { color: var(--aqua); }

.footer__contact { font-style: normal; line-height: 1.8; }
.footer__email {
    color: var(--aqua);
    border-bottom: 1px solid transparent;
    transition: border-color .15s ease;
}
.footer__email:hover { border-color: var(--aqua); }

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: .85rem;
    /* Espacio extra a la derecha para que el botón de WhatsApp
       no tape el texto del copyright en pantallas pequeñas */
    padding: 1.1rem 0 calc(1.1rem + 70px);
}
.footer__bottom p { margin: 0; }

/* ------------------------------------------------------------------ */
/* 9. BOTÓN FLOTANTE DE WHATSAPP                                       */
/* ------------------------------------------------------------------ */
.whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 999;
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    background: var(--wa-green);
    color: var(--white);
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(37, 211, 102, .45);
    transition: transform .2s ease, box-shadow .2s ease;
}
/* Efecto sutil al pasar el cursor: crece ligeramente y se ilumina */
.whatsapp-float:hover {
    transform: scale(1.1) rotate(4deg);
    box-shadow: 0 14px 32px rgba(37, 211, 102, .6);
}
.whatsapp-float__icon { position: relative; z-index: 2; }

/* Anillo de pulso que llama la atención de forma discreta */
.whatsapp-float__pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--wa-green);
    z-index: 1;
    animation: wa-pulse 2.2s ease-out infinite;
}
@keyframes wa-pulse {
    0%   { transform: scale(1);   opacity: .6; }
    70%  { transform: scale(1.6); opacity: 0;  }
    100% { transform: scale(1.6); opacity: 0;  }
}

/* ------------------------------------------------------------------ */
/* 10. MEDIA QUERIES (escalado progresivo)                            */
/* ------------------------------------------------------------------ */

/* Tablet: la cuadrícula de pilares pasa a 2/3 columnas */
@media (min-width: 600px) {
    .pillars__grid { grid-template-columns: repeat(2, 1fr); }
    .footer__grid  { grid-template-columns: repeat(2, 1fr); }
}

/* Escritorio: 3 pilares en fila, footer a 4 columnas, sección a 2 */
@media (min-width: 900px) {
    .pillars__grid { grid-template-columns: repeat(3, 1fr); }
    .footer__grid  { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
    .about__inner  { grid-template-columns: 1.2fr .8fr; }
    .hero          { padding: 6rem 0 8rem; }
}

/* En pantallas grandes el botón se separa un poco más del borde */
@media (min-width: 1024px) {
    .whatsapp-float { right: 28px; bottom: 28px; }
}

/* ------------------------------------------------------------------ */
/* 11. ACCESIBILIDAD                                                   */
/* ------------------------------------------------------------------ */

/* Foco visible y claro para navegación con teclado */
a:focus-visible,
.btn:focus-visible,
.nav-burger:focus-visible {
    outline: 3px solid var(--coral);
    outline-offset: 3px;
}

/* Respeta a quien prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; scroll-behavior: auto !important; }
    .whatsapp-float:hover { transform: none; }
}

/* =====================================================================
   12. COMPONENTES DE PÁGINAS INTERNAS (portadas de silo y servicios)
   ===================================================================== */

/* Estado activo del enlace de menú según el silo */
.nav-list a.is-active { color: var(--ocean); background: var(--surface-2); }

/* --- Héroe interior (más compacto que el de la home) --- */
.page-hero {
    background: linear-gradient(155deg, var(--ink) 0%, var(--ocean) 90%);
    color: var(--white);
    padding: 2.75rem 0 3.25rem;
}
.page-hero h1 {
    color: var(--white);
    font-size: clamp(1.8rem, 5vw, 2.8rem);
}
.page-hero__lead {
    color: rgba(255, 255, 255, .9);
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    max-width: 620px;
    margin-bottom: 1.5rem;
}
.page-hero .btn--ghost { border-color: rgba(255,255,255,.55); }

/* Migas de pan */
.breadcrumb { font-size: .85rem; color: rgba(255, 255, 255, .75); margin-bottom: 1rem; }
.breadcrumb a:hover { color: var(--white); text-decoration: underline; }
.breadcrumb .sep { opacity: .5; margin: 0 .45rem; }

/* --- Secciones genéricas de contenido --- */
.section { padding: 3.25rem 0; }
.section--tint { background: var(--surface); }
.section__head { max-width: 700px; margin: 0 auto 2rem; }
.section__head.is-center { text-align: center; }
.section h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
.lead { font-size: 1.1rem; color: var(--text-soft); }

/* Lista de beneficios con check */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; max-width: 720px; }
.checklist li { position: relative; padding-left: 2rem; color: var(--text-soft); }
.checklist li strong { color: var(--ink); }
.checklist li::before {
    content: "✓";
    position: absolute; left: 0; top: 0;
    width: 1.3rem; height: 1.3rem;
    display: grid; place-items: center;
    background: var(--surface-2); color: var(--ocean);
    border-radius: 50%; font-size: .8rem; font-weight: 800;
}

/* --- Tarjetas de precio --- */
.price-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.price-card {
    position: relative;
    display: flex; flex-direction: column;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.85rem 1.6rem;
    box-shadow: var(--shadow);
}
.price-card--featured { border: 2px solid var(--coral); box-shadow: var(--shadow-lg); }
.price-card__tag {
    position: absolute; top: -13px; left: 1.5rem;
    background: var(--coral); color: var(--white);
    font-family: var(--font-display); font-weight: 700;
    font-size: .7rem; letter-spacing: .07em; text-transform: uppercase;
    padding: .3rem .75rem; border-radius: 999px;
}
.price-card h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.price-card__price { font-family: var(--font-display); font-weight: 800; font-size: 2.1rem; color: var(--ink); line-height: 1; }
.price-card__price small { font-size: .9rem; font-weight: 600; color: var(--text-soft); }
.price-card__desc { color: var(--text-soft); margin: .9rem 0 1.3rem; flex: 1; }
.price-card .btn { margin-top: auto; text-align: center; }

/* --- Banda CTA final --- */
.cta-band {
    background: linear-gradient(120deg, var(--ocean) 0%, var(--ink) 100%);
    color: var(--white);
    border-radius: var(--radius);
    padding: 2.5rem 1.75rem;
    text-align: center;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255, 255, 255, .9); max-width: 540px; margin: 0 auto 1.5rem; }

/* --- FAQ (acordeón nativo con <details>) --- */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.faq summary {
    font-family: var(--font-display); font-weight: 700; color: var(--ink);
    cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ocean); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: .8rem 0 0; color: var(--text-soft); }

/* Responsive de los componentes internos */
@media (min-width: 600px) {
    .price-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
    .price-grid { grid-template-columns: repeat(3, 1fr); }
    .cta-band { padding: 3rem; }
}

/* =====================================================================
   13. COMPONENTES DE CONTENIDO SEO (texto largo, zonas, pasos, tablas)
   ===================================================================== */

/* Bloques de texto largo legibles */
.prose { max-width: 780px; }
.prose p { color: var(--text-soft); }
.prose h3 { margin-top: 2.2rem; font-size: 1.25rem; }
.prose strong { color: var(--ink); }

/* Lista de zonas/barrios (SEO local) en forma de "chips" */
.zonas { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1.25rem 0 0; }
.zonas li {
    background: var(--surface-2); color: var(--ocean-deep);
    border-radius: 999px; padding: .4rem .95rem;
    font-size: .85rem; font-weight: 500;
}

/* Rejilla de fichas de beneficio / "por qué nosotros" */
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.feature-card {
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.5rem;
    box-shadow: var(--shadow);
}
.feature-card__icon { font-size: 1.7rem; display: block; margin-bottom: .6rem; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.feature-card p { color: var(--text-soft); margin: 0; font-size: .95rem; }

/* Pasos numerados "cómo funciona" */
.steps { display: grid; gap: 1.1rem; counter-reset: step; }
.step { display: flex; gap: 1rem; align-items: flex-start; }
.step__n {
    counter-increment: step; flex: none;
    width: 2.3rem; height: 2.3rem; border-radius: 50%;
    background: var(--ocean); color: var(--white);
    display: grid; place-items: center;
    font-family: var(--font-display); font-weight: 700;
}
.step__n::before { content: counter(step); }
.step__body h3 { font-size: 1.1rem; margin-bottom: .2rem; }
.step__body p { color: var(--text-soft); margin: 0; }

/* Tabla comparativa */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 480px; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: .85rem 1rem; text-align: left; }
.table th { font-family: var(--font-display); color: var(--ink); background: var(--surface); }
.table td { color: var(--text-soft); }

/* Enlaces a servicios relacionados */
.related { display: flex; flex-wrap: wrap; gap: .75rem; padding: 0; list-style: none; margin: 0; }
.related a {
    display: inline-block; border: 1px solid var(--line);
    border-radius: 999px; padding: .55rem 1.1rem;
    font-weight: 600; color: var(--ocean-deep);
    transition: background .15s ease, border-color .15s ease;
}
.related a:hover { background: var(--surface-2); border-color: var(--aqua); }

@media (min-width: 700px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
    .feature-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ------------------------------------------------------------------ */
/* GALERÍA DE IMÁGENES (responsive y uniforme)                         */
/* ------------------------------------------------------------------ */
.media-feature {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 440px;
    object-fit: cover;
    border-radius: var(--radius);
    display: block;
    margin-top: 1.25rem;
}
.media-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
}
.media-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius-sm);
    display: block;
}
@media (min-width: 700px) {
    .media-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}

/* ------------------------------------------------------------------ */
/* PÁGINA "QUIÉN SOY" + DIPLOMAS + LIGHTBOX                            */
/* ------------------------------------------------------------------ */
.about-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 820px) { .about-grid { grid-template-columns: 340px 1fr; } }
.about-photo,
.about-photo--placeholder {
    width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
    border-radius: var(--radius); display: block;
}
.about-photo--placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: .3rem; background: var(--surface-2);
    color: var(--text-soft); border: 2px dashed #cbd5e1; font-weight: 600;
}
.about-photo--placeholder small { font-weight: 400; opacity: .8; }

.diploma-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .85rem; }
.diploma-item {
    border: 0; padding: 0; background: transparent; cursor: zoom-in;
    font: inherit; color: inherit; text-align: center;
}
.diploma-item img {
    width: 100%; height: 120px; object-fit: contain; background: #fff; padding: .5rem;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    box-shadow: 0 1px 3px rgba(10,37,64,.08);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; display: block;
}
.diploma-item:hover img { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(10,37,64,.14); border-color: var(--cian, #38BDF8); }
.diploma-item span { display: block; margin-top: .4rem; font-size: .78rem; color: var(--text-soft); line-height: 1.3; }

.lightbox {
    position: fixed; inset: 0; z-index: 2000; display: none;
    align-items: center; justify-content: center; padding: 4vw;
    background: rgba(10, 37, 64, .93); cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 92vw; max-height: 90vh; object-fit: contain;
    border-radius: 6px; box-shadow: 0 10px 50px rgba(0,0,0,.55); cursor: default;
}
.lightbox__close {
    position: absolute; top: .75rem; right: 1.25rem; font-size: 2.4rem; line-height: 1;
    color: #fff; background: none; border: 0; cursor: pointer;
}

/* ------------------------------------------------------------------ */
/* MENÚ "SERVICIOS" DESPLEGABLE (auto-rellenado con los silos)         */
/* ------------------------------------------------------------------ */
.nav-has-sub { position: relative; }
.nav-sub-toggle {
    font: inherit; font-weight: 500; color: var(--text);
    background: none; border: 0; cursor: pointer;
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .55rem .9rem; border-radius: var(--radius-sm);
    transition: color .15s ease, background .15s ease;
}
.nav-sub-toggle:hover,
.nav-has-sub.is-active > .nav-sub-toggle { color: var(--ocean); background: var(--surface-2); }
.nav-caret { font-size: .72em; transition: transform .2s ease; }
.nav-has-sub.open > .nav-sub-toggle .nav-caret { transform: rotate(180deg); }
.nav-sub { list-style: none; margin: 0; padding: 0; }

/* Escritorio: tarjeta flotante */
@media (min-width: 861px) {
    .nav-sub {
        position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px;
        background: var(--white); border: 1px solid var(--line);
        border-radius: var(--radius-sm); box-shadow: var(--shadow);
        padding: .4rem; display: none; z-index: 50;
    }
    /* Puente invisible: cubre el hueco entre "Servicios" y el submenú
       para que el hover no se pierda al bajar el ratón. */
    .nav-sub::before {
        content: ""; position: absolute; left: 0; right: 0;
        top: -12px; height: 12px;
    }
    .nav-has-sub:hover .nav-sub,
    .nav-has-sub:focus-within .nav-sub,
    .nav-has-sub.open .nav-sub { display: block; }
    .nav-sub a { white-space: nowrap; }
}

/* Móvil: lista indentada dentro del menú desplegable */
@media (max-width: 860px) {
    .nav-sub-toggle { width: 100%; justify-content: space-between; padding: .85rem .5rem; }
    .nav-sub { max-height: 0; overflow: hidden; transition: max-height .25s ease; padding-left: .75rem; }
    .nav-has-sub.open .nav-sub { max-height: 32rem; }
    .nav-sub a { padding: .7rem .5rem; }
}

/* ------------------------------------------------------------------ */
/* PÁGINA DE ERROR (404, etc.)                                         */
/* ------------------------------------------------------------------ */
.error-page { text-align: center; padding: 1rem 0 2rem; }
.error-page__code {
    font-size: clamp(4.5rem, 20vw, 10rem); font-weight: 800; line-height: 1;
    margin: 0; color: var(--cian, #38BDF8);
    background: linear-gradient(90deg, var(--teal, #0E7490), var(--cian, #38BDF8));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.error-page h1 { margin: .3rem 0 1rem; }
.error-page .page-hero__lead { margin-left: auto; margin-right: auto; text-align: center; }
.error-page .hero__actions { justify-content: center; }
