/* ==========================================================================
   SEKININ LEGAL · HOJA DE ESTILOS
   1. Marca y base      5. Especialidades      9. Contacto
   2. Piezas comunes    6. Casos y equipo     10. Banner y pie
   3. Cabecera y menú   7. Páginas interiores 11. Cookies
   4. Portada           8. Noticias           12. Tablet y móvil
   ========================================================================== */

/* 1. MARCA Y BASE ========================================================== */
:root {
    --tinta: #2b3131;
    --texto: #4a5252;
    --verde: #2d7774;
    --verde-claro: #d6ebe9;
    --bosque: #2c5755;
    --salmon: #dd997e;
    --arena: #f8ead8;
    --fondo: #f6f9f9;
    --capa: #e9f0f0;
    --linea: #d5e0df;
    --margen: 28px;
    --aire: clamp(64px, 7vw, 100px);
    --titular: 'Bebas Neue', 'Arial Narrow', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fondo); color: var(--texto); font: 400 16px/1.6 Inter, Arial, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, p, ul, figure, address { margin: 0; padding: 0; font-style: normal; }
h1, h2, h3 { color: var(--tinta); font-family: var(--titular); font-weight: 400; text-wrap: balance; }
h1 { font-size: clamp(46px, 5.6vw, 80px); line-height: .95; }
h2 { font-size: clamp(34px, 3.7vw, 52px); line-height: 1; }
h3 { font-size: 26px; line-height: 1.05; }
ul { list-style: none; }
img, svg, iframe, audio { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--verde); outline-offset: 3px; }
::selection { background: var(--verde-claro); color: var(--tinta); }

/* 2. PIEZAS COMUNES ======================================================== */
.caja { width: min(1140px, 100% - 2 * var(--margen)); margin-inline: auto; }
.seccion { padding: var(--aire) 0; }
.seccion.gris { background: var(--capa); }
.saltar { position: fixed; z-index: 99; top: -60px; left: 12px; padding: 10px 16px; background: #fff; }
.saltar:focus { top: 12px; }
.etiqueta { margin-bottom: 12px; color: var(--verde); font: 400 18px/1.2 var(--titular); letter-spacing: .1em; }
.entradilla { max-width: 40em; margin-top: 18px; }
.botones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.boton { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 26px; border: 1px solid var(--verde); border-radius: 50px; background: var(--verde); color: #fff; font-size: 13px; font-weight: 600; line-height: 1.2; letter-spacing: .03em; text-align: center; text-decoration: none; text-transform: uppercase; transition: background-color .3s, color .3s, border-color .3s; }
.boton.linea { background: transparent; color: var(--verde); }
.boton.claro { border-color: #fff; background: #fff; color: var(--verde); }
.banner .boton.linea, .banda .boton.linea { border-color: rgba(255, 255, 255, .55); color: #fff; }
.mas { display: inline-block; margin-top: 14px; color: var(--verde); font-size: 15px; font-weight: 500; text-decoration: none; }
.cabecera-seccion { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }

@media (hover: hover) {
    .boton:hover { border-color: var(--bosque); background: var(--bosque); color: #fff; }
    .banner .boton:hover, .banda .boton:hover { border-color: var(--salmon); background: var(--salmon); color: var(--tinta); }
    .mas:hover { opacity: .65; }
}

/* 3. CABECERA Y MENÚ ======================================================= */
.cab { position: sticky; z-index: 50; top: 0; display: flex; align-items: center; justify-content: space-between; height: 76px; padding: 0 max(var(--margen), (100% - 1140px) / 2); background: #fff; }
.cab-logo img { width: 112px; }
.cab-nav { display: flex; align-items: center; gap: 30px; color: var(--tinta); font: 400 18px/1.2 var(--titular); letter-spacing: .08em; }
.cab-nav > a, .cab-desplegable > button { padding: 12px 0; border: 0; background: none; letter-spacing: inherit; text-decoration: none; transition: opacity .25s; }
.cab-nav a[aria-current] { color: var(--verde); }
.cab-nav .cab-tel { padding: 10px 20px 9px; border-radius: 50px; background: var(--verde); color: #fff; white-space: nowrap; }
.cab-desplegable { position: relative; }
.cab-desplegable > button::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 4px 9px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.cab-sub { position: absolute; top: 100%; left: -28px; display: grid; grid-template-columns: repeat(2, 270px); gap: 24px; padding: 26px 28px; border: 1px solid var(--linea); border-radius: 12px; background: #fff; visibility: hidden; opacity: 0; transition: opacity .2s, visibility .2s; }
button[aria-expanded="true"] + .cab-sub { visibility: visible; opacity: 1; }
.cab-sub p { margin-bottom: 8px; color: var(--verde); }
.cab-sub a { display: block; padding: 7px 0; font: 400 15px/1.4 Inter, sans-serif; letter-spacing: 0; text-decoration: none; transition: color .2s; }
.cab-boton { display: none; width: 44px; height: 44px; padding: 0; border: 0; background: none; }
.cab-boton span { display: block; width: 24px; height: 1.5px; margin: 8px auto; background: var(--tinta); transition: transform .3s; }
.cab-boton[aria-expanded="true"] span:first-child { transform: translateY(4.75px) rotate(45deg); }
.cab-boton[aria-expanded="true"] span:last-child { transform: translateY(-4.75px) rotate(-45deg); }

@media (hover: hover) {
    .cab-nav > a:hover, .cab-desplegable > button:hover { opacity: .6; }
    .cab-sub a:hover { color: var(--verde); }
}

/* 4. PORTADA =============================================================== */
.portada { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); align-items: center; gap: clamp(32px, 5vw, 72px); padding: clamp(44px, 5.4vw, 80px) 0 var(--aire); }
h1 em, h2 em { color: var(--verde); font-style: normal; }
.portada h1 em { display: block; color: var(--verde); }
.portada img { width: 100%; border-radius: 14px; }
.portada p:not(.etiqueta) { max-width: 33em; margin-top: 22px; }
.banda { padding: clamp(48px, 5vw, 72px) 0; background: var(--verde); color: #fff; }
.banda .caja { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 24px 64px; }
.banda h2, .banda h2 em, .banner h2 em { color: #fff; }
.banda.suave { background: var(--verde-claro); color: var(--texto); }
.banda.suave h2 { color: var(--tinta); }
.banda.suave .boton.linea { border-color: var(--verde); color: var(--verde); }
.banda .botones { margin-top: 22px; }

/* 5. ESPECIALIDADES ======================================================== */
.tarjetas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tarjeta { position: relative; display: flex; flex-direction: column; padding: 26px; border-radius: 16px; background: var(--verde-claro); text-decoration: none; }
.tarjeta.personas { background: var(--arena); }
.tarjeta::after { content: ""; position: absolute; top: 20px; right: 20px; width: 42px; height: 42px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b3131' stroke-width='1.6'%3E%3Cpath d='M4 12h16M14 6l6 6-6 6'/%3E%3C/svg%3E") center / 18px no-repeat; transition: transform .3s; }
.tarjeta svg { width: 28px; height: 28px; margin-bottom: 22px; fill: none; stroke: var(--tinta); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.tarjeta h3 + p { margin-top: 8px; font-size: 15px; line-height: 1.5; }
.tarjeta small { margin-top: auto; padding-top: 18px; color: var(--tinta); font: 400 15px/1.2 var(--titular); letter-spacing: .1em; }

@media (hover: hover) {
    .tarjeta:hover::after { transform: translateX(5px); }
}

/* 6. CASOS Y EQUIPO ======================================================== */
.casos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.casos a { padding-left: 22px; border-left: 2px solid var(--verde); text-decoration: none; transition: opacity .25s; }
.casos strong { display: block; margin-bottom: 10px; color: var(--tinta); font: 400 clamp(42px, 4.4vw, 60px)/1 var(--titular); }
.nota { margin-top: 28px; font-size: 14px; }
.dos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: clamp(32px, 5vw, 72px); }
.dos img { width: 100%; border-radius: 14px; }
.lista-checks { display: grid; gap: 10px; margin-top: 24px; color: var(--tinta); font-weight: 500; }
.lista-checks li { position: relative; padding-left: 32px; }
.lista-checks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--salmon) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b3131' stroke-width='3'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E") center / 11px no-repeat; }
.equipo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.miembro { position: relative; overflow: hidden; border-radius: 16px; text-decoration: none; }
.miembro img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.miembro::before { content: ""; position: absolute; inset: 0 0 50%; background: linear-gradient(rgba(28, 40, 39, .7), rgba(28, 40, 39, 0)); }
.miembro .cargo { position: absolute; top: 20px; left: 20px; right: 20px; color: #fff; font: 400 30px/1 var(--titular); }
.miembro h2 { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 68px; padding: 12px 16px; border-radius: 10px; background: var(--verde-claro); font: 600 15px/1.4 Inter, sans-serif; }
.miembro:nth-child(even) h2 { background: var(--arena); }
.miembro h2::after { content: ""; flex: none; width: 22px; height: 22px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b3131' stroke-width='1.6'%3E%3Cpath d='M2 12h19M15 6l6 6-6 6'/%3E%3C/svg%3E"); transition: transform .3s; }

@media (hover: hover) {
    .casos a:hover { opacity: .65; }
    .miembro:hover h2::after { transform: translateX(4px); }
}

/* 7. PÁGINAS INTERIORES ==================================================== */
.migas { display: flex; flex-wrap: wrap; gap: 4px 8px; padding-top: 26px; font-size: 14px; }
.migas a { text-decoration: none; }
.migas a::after { content: "/"; margin-left: 8px; opacity: .5; }
.titular { padding: clamp(32px, 4vw, 56px) 0 clamp(36px, 4vw, 56px); }
.titular h1 { max-width: 19em; }
.titular.largo h1 { max-width: 24em; font-size: clamp(34px, 3.7vw, 52px); line-height: 1; }
.ancha { padding-bottom: var(--aire); }
.titular .datos { margin-top: 18px; }
.servicio { display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: start; gap: clamp(32px, 6vw, 88px); padding-bottom: var(--aire); }
.lateral { position: sticky; top: 104px; padding: 26px; border-radius: 12px; background: var(--capa); font-size: 16px; }
.lateral h2 { margin-bottom: 8px; font-size: 32px; }
.lateral .boton { width: 100%; margin-top: 18px; }
.lateral .boton + .boton { margin-top: 10px; }
.texto > * + * { margin-top: 16px; }
.texto strong { color: var(--tinta); font-weight: 600; }
.texto a:not(.boton) { color: var(--verde); text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.texto h2 { margin-top: 40px; font-size: clamp(30px, 2.8vw, 38px); }
.texto h3 { margin-top: 28px; }
.texto > :first-child { margin-top: 0; }
.texto li { position: relative; padding-left: 20px; }
.texto li + li { margin-top: 10px; }
.texto li::before { content: ""; position: absolute; left: 2px; top: .58em; width: 6px; height: 6px; border-radius: 50%; background: var(--salmon); }
.texto blockquote { margin: 28px 0; padding-left: 22px; border-left: 2px solid var(--salmon); color: var(--tinta); font-size: 19px; font-weight: 500; }
.puntos { margin-top: 36px; }
.punto { border: 1px solid var(--linea); border-radius: 12px; background: #fff; }
.punto + .punto { margin-top: 10px; }
.punto summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 24px; cursor: pointer; list-style: none; transition: opacity .25s; }
.punto summary::-webkit-details-marker { display: none; }
.punto summary::after { content: "+"; flex: none; color: var(--verde); font-size: 24px; font-weight: 400; line-height: 1; }
.punto[open] summary::after { content: "–"; }
.punto summary h2, .punto summary h3 { font: 600 17px/1.4 Inter, sans-serif; }
.punto .texto { padding: 2px 24px 24px; }
.preguntas { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 32px 64px; }
.preguntas .puntos { margin-top: 0; }
.legal { max-width: 760px; padding-bottom: var(--aire); }

@media (hover: hover) {
    .punto summary:hover { opacity: .65; }
}

/* 8. NOTICIAS ============================================================== */
.noticias { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
.noticia a { display: block; text-decoration: none; }
.noticia img { width: 100%; aspect-ratio: 3 / 2; margin-bottom: 18px; border: 1px solid var(--linea); border-radius: 12px; background: #fff; object-fit: cover; object-position: top; transition: opacity .3s; }
.noticia time, .datos { color: var(--verde); font-size: 14px; font-weight: 500; }
.noticia h2, .noticia h3 { margin-top: 6px; font: 600 17px/1.4 Inter, sans-serif; }
.noticia p { margin-top: 8px; font-size: 15px; }
.articulo { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: clamp(32px, 6vw, 80px); padding-bottom: var(--aire); }
.articulo figure img { width: 100%; border: 1px solid var(--linea); border-radius: 12px; }
.articulo audio { width: 100%; }
.articulo iframe { width: 100%; height: 360px; border: 0; border-radius: 12px; }

@media (hover: hover) {
    .noticia a:hover img { opacity: .8; }
}

/* 9. CONTACTO ============================================================== */
.formulario { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 88px); padding-bottom: var(--aire); }
.formulario address > * + * { margin-top: 20px; }
.formulario address strong { display: block; color: var(--tinta); font-weight: 500; }
.formulario address a { text-decoration: none; }
.formulario form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-self: start; gap: 18px; padding: clamp(22px, 3vw, 38px); border-radius: 14px; background: #fff; }
.formulario form > * { grid-column: 1 / -1; }
.formulario form > .media { grid-column: auto; }
.formulario label { font-size: 15px; }
.formulario input:not([type="checkbox"]), .formulario select, .formulario textarea { display: block; width: 100%; min-height: 48px; margin-top: 6px; padding: 11px 14px; border: 1px solid #7f8c8b; border-radius: 8px; background: #fff; font-size: 16px; }
.formulario textarea { min-height: 150px; resize: vertical; }
.formulario .acepto { display: flex; gap: 10px; align-items: start; }
.formulario .acepto input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--verde); }
.formulario .boton { justify-self: start; }
.formulario form .trampa { position: absolute; left: -9999px; }
.form-estado { color: #a3291b; font-weight: 500; }
.form-estado:empty { display: none; }
.letra-pequena { font-size: 14px; line-height: 1.45; }

/* 10. BANNER Y PIE ========================================================= */
.banner { padding: clamp(56px, 6vw, 84px) 0; background: var(--verde); color: #fff; text-align: center; }
.banner h2 { color: #fff; }
.banner p { margin-top: 12px; }
.banner .botones { justify-content: center; }
.pie { padding: 60px 0 26px; background: var(--bosque); color: #d3e1e0; font-size: 15px; }
.pie a { text-decoration: none; transition: color .2s; }
.pie-rejilla { display: grid; grid-template-columns: 1.15fr 1.15fr 1.15fr .75fr 1.2fr; gap: 36px 28px; }
.pie-rejilla > div:first-child img { width: 120px; }
.pie-rejilla > div:first-child p { margin: 18px 0; }
.pie-titulo { margin-bottom: 10px; color: #fff; font: 400 21px/1.2 var(--titular); letter-spacing: .06em; }
.pie li a { display: block; padding: 5px 0; }
.pie address p:nth-child(n + 3) { margin-top: 10px; }
.pie-legal { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 44px; padding-top: 22px; border-top: 1px solid #4b7371; font-size: 14px; }
.pie-legal span { margin-right: auto; }
.pie-legal button { padding: 0; border: 0; background: none; }

@media (hover: hover) {
    .pie a:hover, .pie-legal button:hover { color: #fff; }
}

/* Botón de volver arriba */
.subir { position: fixed; z-index: 40; right: 20px; bottom: 20px; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--linea); border-radius: 50%; background: #fff; color: var(--verde); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s, background-color .3s, color .3s; }
.subir.visible { opacity: 1; visibility: visible; }
.subir svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }

@media (hover: hover) {
    .subir:hover { background: var(--verde-claro); }
}

/* 11. COOKIES ============================================================== */
.cookies { position: fixed; z-index: 60; left: 20px; bottom: 20px; width: min(390px, 100% - 40px); padding: 22px; border: 1px solid var(--linea); border-radius: 12px; background: #fff; font-size: 15px; line-height: 1.45; }
.cookies div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.cookies button { min-height: 44px; border: 1px solid var(--verde); border-radius: 50px; background: #fff; color: var(--verde); font-weight: 500; }

/* 12. TABLET Y MÓVIL ======================================================= */
@media (max-width: 1020px) {
    .cab-boton { display: block; }
    .cab-nav { position: fixed; inset: 76px 0 0; flex-direction: column; align-items: stretch; gap: 0; padding: 14px var(--margen) 40px; overflow: auto; background: #fff; font-size: 24px; visibility: hidden; opacity: 0; transition: opacity .25s, visibility .25s; }
    .menu-abierto .cab-nav { visibility: visible; opacity: 1; }
    .menu-abierto, .menu-abierto body { overflow: hidden; }
    .cab-nav > a, .cab-desplegable > button { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--linea); text-align: left; }
    .cab-sub { position: static; display: none; grid-template-columns: 1fr; padding: 16px 0 20px; border: 0; }
    button[aria-expanded="true"] + .cab-sub { display: grid; }
    .cab-sub a { font-size: 16px; }
    .cab-nav .cab-tel { margin-top: 22px; padding: 15px; border: 0; text-align: center; }
    .pie-rejilla { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tarjetas, .equipo, .noticias { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .servicio, .articulo { grid-template-columns: minmax(0, 1fr); }
    .lateral { position: static; }
    .articulo figure { max-width: 420px; }
}

@media (max-width: 720px) {
    :root { --margen: 20px; }
    .portada, .banda .caja, .dos, .casos, .equipo, .tarjetas, .noticias, .preguntas, .formulario, .formulario form { grid-template-columns: minmax(0, 1fr); }
    .formulario form > .media { grid-column: 1 / -1; }
    .pie-rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pie-rejilla > div:first-child { grid-column: 1 / -1; }
    .pie-legal span { width: 100%; }
    .cabecera-seccion { display: block; }
    .punto summary { padding: 16px 18px; }
    .punto .texto { padding: 0 18px 20px; }
    .tarjeta { padding: 22px; }
    .tarjeta svg { margin-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}
