/* ============================================================
   AT CLAVE · Hoja de estilos moderna (páginas internas)
   Paleta: ámbar #f3ba47 · negro · blanco · Fuentes: Archivo + Spectral
   ============================================================ */
:root {
  --amarillo: #f3ba47;
  --negro: #1e1e1e;
  --gris-texto: #333;
  --gris-suave: #f8f5f0;
  --blanco: #ffffff;
  --acento: #f3ba47;
  --acento-osc: #b8860b;
}
body.sec-servicios { --acento: #1d9e75; --acento-osc: #0f6e56; }
body.sec-clientes  { --acento: #378add; --acento-osc: #185fa5; }
body.sec-trabajos  { --acento: #d85a30; --acento-osc: #993c1d; }
body.sec-empresa,
body.sec-biblioteca { --acento: #f3ba47; --acento-osc: #b8860b; }
body.dep-naturaleza   { --acento: #1d9e75; --acento-osc: #14795a; }
body.dep-planificacion{ --acento: #2f7fb5; --acento-osc: #1f5c86; }
body.dep-consultoria  { --acento: #c8862a; --acento-osc: #95611b; }
body.dep-sistemas     { --acento: #6b5bb5; --acento-osc: #4c3f8a; }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Archivo', sans-serif;
  color: var(--gris-texto);
  background: var(--blanco);
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 78px;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ===================== CABECERA / MENÚ ===================== */
#header-wrapper {
  position: fixed; top: 0; left: 0; width: 100%; height: 78px; z-index: 1000;
  background: var(--amarillo); padding: 15px 30px;
  display: flex; justify-content: space-between; align-items: center;
}
.logo a { display: block; position: relative; width: 200px; height: 48px; }
.logo a::before, .logo a::after {
  content: ""; position: absolute; top: 4px; left: 0; width: 100%; height: 40px;
  background-repeat: no-repeat; background-position: left center; background-size: contain;
  transition: opacity .4s ease;
}
.logo a::before { background-image: url(../imagenes/logotipo_at_clave_negro.png); opacity: 1; z-index: 1; }
.logo a::after  { background-image: url(../imagenes/logotipo_at_clave_blanco.png); opacity: 0; z-index: 2; }
.logo a:hover::before { opacity: 0; }
.logo a:hover::after  { opacity: 1; }
nav { display: flex; flex-grow: 1; justify-content: center; align-items: center; }
nav ul { list-style: none; display: flex; gap: 20px; align-items: center; }
nav ul li { position: relative; }
nav ul li a {
  text-decoration: none; color: #000; font-weight: 300; padding: 10px;
  transition: .3s; display: block; text-align: left; white-space: nowrap;
}
nav ul li a:hover { color: #fff; }
nav ul li ul {
  display: none; position: absolute; left: 0; top: 100%; background: var(--amarillo);
  list-style: none; padding: 10px; border-radius: 5px; box-shadow: 0 5px 10px rgba(0,0,0,.15);
  min-width: 220px; z-index: 1000;
}
nav ul li ul li ul { left: 100%; top: 0; }
nav ul li:hover > ul { display: block; }
.language-switch { display: flex; gap: 10px; align-items: center; position: absolute; right: 30px; top: 50%; transform: translateY(-50%); }
.language-switch a { text-decoration: none; font-weight: bold; color: #fff; padding: 5px 8px; border-radius: 5px; transition: .3s; }
.language-switch a:hover { background: #fff; color: #000; }
.menu-toggle { display: none; font-size: 30px; cursor: pointer; position: absolute; left: 20px; top: 50%; transform: translateY(-50%); z-index: 1100; }

/* ===================== BANDA DE TÍTULO ===================== */
.page-hero { background: var(--negro); color: #fff; padding: 80px 10% 70px; text-align: center; border-bottom: 4px solid var(--acento); }
.page-hero .breadcrumb { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--acento); margin-bottom: 16px; }
.page-hero h1 { font-family: 'Spectral', serif; font-weight: 400; font-size: clamp(34px,5vw,56px); line-height: 1.1; display: inline-block; position: relative; padding-bottom: 18px; }
.page-hero h1::after { content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 64px; height: 3px; background: var(--acento); }
.page-hero .subtitulo { font-family: 'Spectral', serif; font-style: italic; font-size: 18px; margin: 16px auto 0; color: #ddd; max-width: 760px; }
.page-hero.has-image { background-size: cover; background-position: center; padding-top: 120px; padding-bottom: 100px; position: relative; }
.page-hero.has-image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,18,18,.42), rgba(18,18,18,.72)); z-index: 0; }
.page-hero.has-image > * { position: relative; z-index: 1; }
.page-hero.has-image h1 { text-shadow: 0 2px 14px rgba(0,0,0,.5); }
.page-hero.has-image .subtitulo { font-style: normal; font-family: 'Archivo', sans-serif; font-size: 16px; line-height: 1.6; color: #f1f1f1; max-width: 820px; text-shadow: 0 1px 8px rgba(0,0,0,.65); }
/* Mini-franja de título FIJA que aparece suave al hacer scroll (sin saltos) */
.hero-mini { position: fixed; top: 78px; left: 0; right: 0; z-index: 840; background: var(--negro); color: #fff; border-bottom: 3px solid var(--acento); padding: 9px 8%; transform: translateY(-130%); transition: transform .3s ease; text-align: center; will-change: transform; }
.hero-mini.show { transform: translateY(0); }
.hero-mini span { font-family: 'Spectral', serif; font-weight: 400; font-size: clamp(30px, 4.6vw, 48px); }

/* ===================== CONTENIDO ===================== */
.page-content { max-width: 980px; margin: 0 auto; padding: 60px 24px 80px; text-align: left; }
.page-content .wrapper, .page-content .container, .page-content .inner,
.page-content #content, .page-content section.box {
  display: block; width: 100%; max-width: 100%; margin: 0; padding: 0; float: none; background: none; border: none; box-shadow: none;
}
.page-content .row { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin-bottom: 16px; }
.page-content [class$="u"] { float: none !important; margin: 0 !important; padding: 0 !important; min-width: 0; }
.page-content .row > .12u { flex: 0 0 100%; }
.page-content .row > .11u { flex: 0 0 calc(91.6% - 24px); }
.page-content .row > .10u { flex: 0 0 calc(83.3% - 24px); }
.page-content .row > .9u  { flex: 0 0 calc(75% - 24px); }
.page-content .row > .8u  { flex: 0 0 calc(66.6% - 24px); }
.page-content .row > .7u  { flex: 1 1 calc(58% - 24px); }
.page-content .row > .6u  { flex: 1 1 calc(50% - 24px); }
.page-content .row > .5u  { flex: 1 1 calc(41% - 24px); }
.page-content .row > .4u  { flex: 1 1 calc(33.3% - 24px); }
.page-content .row > .3u  { flex: 1 1 calc(25% - 24px); }
.page-content .row > .2u  { flex: 1 1 calc(16.6% - 24px); }
.page-content .row > .1u  { flex: 1 1 calc(8.3% - 24px); }
.page-content img { margin: 20px auto; border-radius: 6px; max-width: 100%; height: auto; }
.page-content ul, .page-content ol { text-align: left; margin: 10px 0 18px 1.2em; }
.page-content li { margin-bottom: 6px; }
.page-content .box.search, .page-content .box.recent-posts, .page-content .box.recent-comments,
.page-content .box.calendar, .page-content #sidebar { display: none; }
.page-content h2 { font-family: 'Spectral', serif; font-weight: 500; font-size: 30px; margin: 40px 0 18px; color: var(--negro); text-align: left; }
.page-content h3 { font-family: 'Spectral', serif; font-weight: 500; font-size: 22px; margin: 28px 0 12px; text-align: left; }
.page-content p { margin: 0 0 16px; text-align: justify; }
.page-content a { color: var(--acento-osc); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .25s; }
.page-content a:hover { border-color: var(--acento-osc); }
.page-content hr { border: none; border-top: 1px solid #e3e3e3; margin: 40px 0; }
.acento { color: var(--acento); }

/* Botón "Volver" */
.page-content a.btn-volver {
  display: inline-flex; align-items: center; gap: 8px; background: var(--acento); color: #fff !important; border: none !important;
  padding: 10px 20px; border-radius: 9px; font-family: 'Spectral', serif; font-weight: 600; font-size: 15px;
  text-decoration: none; margin: 6px 0 26px; transition: filter .25s ease, transform .25s ease, box-shadow .25s ease;
}
.page-content a.btn-volver h4, .page-content a.btn-volver h5, .page-content a.btn-volver h6, .page-content a.btn-volver font { margin: 0; color: #fff !important; font: inherit; display: inline; }
.page-content a.btn-volver::before { content: "←"; font-weight: 700; }
.page-content a.btn-volver:hover { filter: brightness(.93); transform: translateX(-3px); box-shadow: 0 8px 18px -8px rgba(0,0,0,.3); }

/* Vídeo/audio */
.page-content iframe { display: block; width: 100%; max-width: 760px; aspect-ratio: 16/9; height: auto; margin: 20px auto; border: 0; border-radius: 10px; box-shadow: 0 10px 26px -12px rgba(0,0,0,.35); }
.page-content audio { display: block; margin: 20px auto; width: 100%; max-width: 560px; }
.yt-facade { position: relative; display: block; width: 100%; max-width: 760px; aspect-ratio: 16/9; margin: 20px auto; border-radius: 10px; overflow: hidden; cursor: pointer; box-shadow: 0 10px 26px -12px rgba(0,0,0,.35); background: #000; }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; opacity: .92; transition: opacity .3s ease, transform .4s ease; }
.yt-facade:hover img { opacity: 1; transform: scale(1.03); }
.yt-facade .yt-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 74px; height: 52px; background: #c4302b; border: none; border-radius: 13px; cursor: pointer; transition: background .25s ease, transform .25s ease; }
.yt-facade .yt-play::before { content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%,-50%); border-style: solid; border-width: 11px 0 11px 19px; border-color: transparent transparent transparent #fff; }
.yt-facade:hover .yt-play { background: #e0342c; transform: translate(-50%,-50%) scale(1.08); }
.page-content .yt-wrap { text-align: center; margin: 4px 0 26px; }
.page-content a.btn-youtube { display: inline-flex; align-items: center; gap: 8px; background: #c4302b; color: #fff !important; border: none !important; padding: 11px 22px; border-radius: 9px; font-weight: 600; font-size: 15px; text-decoration: none; transition: filter .25s, transform .25s, box-shadow .25s; }
.page-content a.btn-youtube:hover { filter: brightness(.92); transform: translateY(-2px); box-shadow: 0 8px 18px -8px rgba(0,0,0,.35); }

/* Fila imagen + texto */
.media-row { display: flex; gap: 36px; align-items: center; margin: 36px 0; flex-wrap: wrap; }
.media-row .media-img { flex: 0 0 320px; max-width: 320px; }
.media-row .media-img img { border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.12); margin: 0; }
.media-row .media-text { flex: 1; min-width: 260px; }
.media-row.invert { flex-direction: row-reverse; }

/* Banner de texto resaltado sobre imagen (Presentación) */
.pres-banner { position: relative; border-radius: 14px; overflow: hidden; margin: 42px 0; padding: 48px 46px; background-size: cover; background-position: center; box-shadow: 0 14px 34px -16px rgba(0,0,0,.45); min-height: 200px; display: flex; align-items: center; }
.pres-banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,18,18,.9) 0%, rgba(18,18,18,.6) 52%, rgba(18,18,18,.2) 100%); }
.pres-banner .pres-banner-text { position: relative; z-index: 1; max-width: 660px; }
.pres-banner.invert { justify-content: flex-end; }
.pres-banner.invert::before { background: linear-gradient(90deg, rgba(18,18,18,.2) 0%, rgba(18,18,18,.6) 48%, rgba(18,18,18,.9) 100%); }
.pres-banner p { color: #fff; text-align: left; text-shadow: 0 1px 8px rgba(0,0,0,.65); margin-bottom: 14px; font-size: 17px; line-height: 1.6; }
.pres-banner.invert p { text-align: right; }
.pres-banner p:last-child { margin-bottom: 0; }
.pres-banner strong { color: var(--acento); }
@media (max-width: 600px) {
  .pres-banner { padding: 30px 24px; }
  .pres-banner::before, .pres-banner.invert::before { background: rgba(18,18,18,.7); }
  .pres-banner .pres-banner-text { max-width: 100%; }
  .pres-banner.invert p { text-align: left; }
}

/* ===================== PUBLICACIONES (tarjetas) ===================== */
.page-content .licencia { text-align: center; font-size: 13px; color: #777; max-width: 760px; margin: 0 auto 40px; }
.page-content .licencia a { color: var(--acento-osc); }
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 16px; width: 100%; }
.page-content .row > .pub-grid, .page-content .12u > .pub-grid { flex: 1 1 100%; min-width: 0; }
.pub-card { background: var(--blanco); border: 1px solid #eaeaea; border-radius: 10px; overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; display: flex; flex-direction: column; }
.pub-card.reveal.visible:hover, .pub-card:hover { transform: translateY(-6px); box-shadow: 0 18px 30px -12px rgba(0,0,0,.30); }
.pub-card a { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; border: none; }
.pub-card .thumb { background: var(--gris-suave); padding: 18px; display: flex; align-items: center; justify-content: center; height: 260px; flex: 0 0 auto; }
.pub-card .thumb img { max-height: 100%; max-width: 100%; width: auto; object-fit: contain; opacity: .85; transition: opacity .5s ease; margin: 0; }
.pub-card:hover .thumb img { opacity: 1; }
.pub-card .pub-body { padding: 16px 18px 20px; border-top: 4px solid var(--acento); }
.pub-card .pub-title { font-family: 'Spectral', serif; font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--negro); }
.pub-card .pub-meta { font-size: 13px; color: #777; font-style: italic; }

/* ===================== FICHA CV (equipo) — con fondo scrabble ===================== */
.cv-header { position: relative; display: flex; gap: 34px; align-items: center; flex-wrap: wrap; margin: 8px 0 34px; padding: 32px 34px; border-radius: 14px; overflow: hidden; background-size: cover; background-position: center; box-shadow: 0 12px 30px -16px rgba(0,0,0,.4); }
.cv-header::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(245,245,245,.88) 0%, rgba(235,235,235,.74) 100%); }
.cv-header .cv-photo { position: relative; z-index: 1; flex: 0 0 190px; max-width: 190px; }
.cv-header .cv-photo img { width: 100%; border-radius: 12px; margin: 0; box-shadow: 0 10px 26px -14px rgba(0,0,0,.55); }
.cv-header .cv-info { position: relative; z-index: 1; flex: 1; min-width: 240px; background: rgba(24,24,24,.82); padding: 20px 24px; border-radius: 12px; box-shadow: 0 6px 20px -12px rgba(0,0,0,.5); }
.cv-header .cv-info .cv-name { font-family: 'Spectral', serif; font-weight: 600; font-size: 34px; line-height: 1.15; margin: 0 0 8px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.cv-header .cv-info .cv-role { font-family: 'Spectral', serif; font-weight: 500; font-size: 19px; color: var(--acento); margin: 0; }
.cv-header .cv-info .cv-role::before { content: ""; display: block; width: 46px; height: 3px; background: var(--acento); margin: 0 0 14px; }
@media (max-width: 600px) { .cv-header { gap: 20px; padding: 22px; } .cv-header .cv-photo { flex-basis: 140px; max-width: 140px; } .cv-header .cv-info .cv-name { font-size: 26px; } }

/* ===================== EQUIPO ===================== */
.team-intro {
  display: block; max-width: 780px; margin: 6px auto 42px;
  background: var(--gris-suave); border: 1px solid #ececec; border-top: 4px solid var(--acento);
  border-radius: 14px; padding: 24px 30px; text-align: center;
  font-family: 'Archivo', sans-serif; font-weight: 500; font-size: 18px; line-height: 1.6; color: var(--negro);
  box-shadow: 0 6px 18px -12px rgba(0,0,0,.25);
}
@media (max-width: 600px) { .team-intro { font-size: 16px; padding: 18px 20px; } }
.team-flow { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; max-width: 900px; margin: 0 auto 22px; }
.team-flow .team-card { width: 124px; }
.team-flow.rest { margin-top: 4px; }
.team-flow.lead .team-card { width: 150px; }
.team-flow.lead .tname { font-size: 18px; }
.team-flow.lead .trole { font-size: 14px; }
.team-card { text-align: center; }
.team-card a, .team-card > div { text-decoration: none; color: inherit; display: block; border: none; }
.team-card .photo { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 10px; filter: grayscale(100%); transition: filter .45s ease, transform .35s ease, box-shadow .35s ease; margin: 0; }
.team-card a:hover .photo { filter: grayscale(0); transform: translateY(-5px); box-shadow: 0 14px 26px -12px rgba(0,0,0,.4); }
.team-card .tname { font-family: 'Spectral', serif; font-weight: 600; font-size: 16.5px; margin-top: 10px; color: var(--negro); line-height: 1.25; }
.team-card .trole { font-size: 13.5px; color: #777; }
.team-card .photo.placeholder { display: flex; align-items: center; justify-content: center; background: #ededed; color: #c2c2c2; filter: none; }
.team-card a:hover .photo.placeholder { filter: none; transform: translateY(-5px); }
.team-card .photo.placeholder svg { width: 46%; height: 46%; }

/* ===================== SERVICIOS: rejilla de áreas (landing) ===================== */
.areas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.area-card { position: relative; display: block; height: 320px; border-radius: 14px; overflow: hidden; text-decoration: none; border: none !important; box-shadow: 0 8px 22px -12px rgba(0,0,0,.35); transition: transform .35s ease, box-shadow .35s ease; }
.area-card:hover { transform: translateY(-6px); box-shadow: 0 18px 34px -14px rgba(0,0,0,.45); }
.area-bg { position: absolute; inset: 0; background-size: cover; background-position: center; background-color: var(--dep, #1d9e75); transition: transform .5s ease; }
.area-card:hover .area-bg { transform: scale(1.06); }
.area-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,20,20,.12) 0%, rgba(20,20,20,.55) 60%, rgba(20,20,20,.85) 100%); transition: opacity .35s ease; }
.area-tint { position: absolute; inset: 0; background: var(--dep, #1d9e75); opacity: 0; transition: opacity .35s ease; }
.area-card:hover .area-tint { opacity: .55; }
.area-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 24px 24px; color: #fff; z-index: 2; }
.area-name { display: inline-block; font-family: 'Spectral', serif; font-weight: 600; font-size: 22px; line-height: 1.25; border-left: 4px solid #fff; padding: 0 0 0 12px; margin: 0; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.6); transition: background .35s ease, color .35s ease, padding .35s ease, border-color .35s ease; }
.area-card:hover .area-name { background: var(--dep, #1d9e75); border-left-color: transparent; border-radius: 10px; padding: 8px 16px; text-shadow: none; }
.area-desc { margin: 0; font-size: 15.5px; line-height: 1.6; color: #fff; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .45s ease, opacity .35s ease, margin .35s ease; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.area-card:hover .area-desc { max-height: 260px; opacity: 1; margin: 14px 0 0; }
.area-card:hover .area-body { transform: translateY(-6px); }
.area-body { transition: transform .4s ease; }
.area-more { display: inline-block; margin-top: 16px; background: #fff; color: var(--dep, #1d9e75); padding: 8px 18px; border-radius: 22px; font-weight: 700; font-size: 13px; letter-spacing: .5px; text-shadow: none; box-shadow: 0 4px 12px rgba(0,0,0,.3); }

/* ===================== SERVICIOS: botones de subservicios ===================== */
.service-nav { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; position: sticky; top: 78px; z-index: 6; background: #fff; margin: -30px -24px 30px; padding: 16px 24px; border-bottom: 3px solid var(--acento); }
.service-nav .service-dep { flex-basis: 100%; text-align: center; font-family: 'Spectral', serif; font-weight: 700; font-size: 21px; color: var(--acento-osc); background: none; padding: 0; border-radius: 0; margin: 0 0 6px; }
.service-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; background: var(--gris-suave); border: 1px solid #e6e2d8; border-radius: 9px; font-family: 'Spectral', serif; font-weight: 600; font-size: 15px; color: var(--negro); text-decoration: none; transition: transform .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease; }
.service-nav a::before { content: "→"; color: var(--acento); font-weight: 700; transition: color .25s ease; }
.service-nav a:hover, .service-nav a.current { background: var(--acento); color: #fff; border-color: var(--acento); transform: translateY(-2px); box-shadow: 0 8px 18px -8px rgba(0,0,0,.3); }
.service-nav a:hover::before, .service-nav a.current::before { color: #fff; }
/* Listado de trabajos de cada departamento (color del dpto) */
body[class*="dep-"] .page-content blockquote {
  background: #fbfaf7; border: 1px solid #eee; border-left: 5px solid var(--acento);
  border-radius: 9px; padding: 15px 20px; margin: 0 0 14px;
  box-shadow: 0 4px 12px -8px rgba(0,0,0,.18); transition: transform .2s ease, box-shadow .2s ease;
}
body[class*="dep-"] .page-content blockquote:hover { transform: translateX(3px); box-shadow: 0 8px 18px -10px rgba(0,0,0,.28); }
body[class*="dep-"] .page-content blockquote p { margin: 0; text-align: left; }
body[class*="dep-"] .page-content blockquote strong { color: var(--acento-osc); font-family: 'Spectral', serif; font-weight: 600; }
body[class*="dep-"] .page-content blockquote + br { display: none; }
body[class*="dep-"] .page-content .box.post header h5 { font-size: 12px; letter-spacing: 2px; color: var(--acento-osc); text-transform: uppercase; }

/* ===================== NOTICIAS ===================== */
.page-content .box.post { background: #fff; border: 1px solid #eaeaea; border-left: 4px solid var(--acento); border-radius: 10px; padding: 22px 26px; margin: 0 0 24px; box-shadow: 0 5px 16px -10px rgba(0,0,0,.25); }
.page-content .box.post header h7, .page-content .box.post h7 { font-family: 'Spectral', serif; font-weight: 600; font-size: 19px; color: var(--negro); display: block; line-height: 1.3; }
.page-content .news-toggle { display: block; text-decoration: none; cursor: pointer; margin: 6px 0 4px; }
.page-content .news-toggle div { display: inline-block; background: var(--acento); color: #1e1e1e !important; font-weight: 600; font-size: 13px; padding: 6px 15px; border-radius: 6px; transition: filter .2s ease, transform .2s ease; }
.page-content .news-toggle:hover div { filter: brightness(.94); transform: translateY(-1px); }
.year-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 0 36px; }
.year-bar a { display: inline-block; padding: 8px 16px; background: var(--gris-suave); border: 1px solid #e6e2d8; border-radius: 8px; font-family: 'Spectral', serif; font-weight: 600; color: var(--negro); text-decoration: none; transition: transform .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease; }
.year-bar a:hover { transform: scale(1.14); background: var(--acento); color: #fff; box-shadow: 0 8px 18px -8px rgba(0,0,0,.35); }
.year-bar a.current { background: var(--acento); color: #fff; border-color: var(--acento); }
.year-sticky { position: sticky; top: 78px; z-index: 830; background: #1e1e1e; border-bottom: 3px solid var(--acento); padding: 12px 16px; }
.year-sticky .year-bar { margin: 0; }
.year-sticky .year-bar a { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.28); color: #fff; padding: 6px 14px; }
.year-sticky .year-bar a:hover, .year-sticky .year-bar a.current { background: var(--acento); color: #1e1e1e; border-color: var(--acento); }

/* ===================== CLIENTES ===================== */
.clients-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.clients-col { border: 1px solid #eee; border-radius: 12px; padding: 0 18px 22px; background: #fcfbf8; }
.clients-col h2 { font-family: 'Spectral', serif; font-weight: 600; font-size: 22px; text-align: center; color: var(--acento-osc); position: sticky; top: 78px; z-index: 5; background: #fcfbf8; margin: 0 -18px 4px; padding: 16px 0 10px; border-bottom: 3px solid var(--acento); border-radius: 12px 12px 0 0; }
.logo-pile { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 20px; padding-top: 20px; }
.logo-pile .logo-tile { background: #fff; border: 1px solid #ececec; border-radius: 8px; height: 96px; display: flex; align-items: center; justify-content: center; padding: 14px; overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; }
.logo-pile .logo-tile img { width: 100%; height: 100%; object-fit: contain; opacity: 1; transition: transform .35s ease; margin: 0; }
.logo-pile .logo-tile:hover { transform: translateY(-3px); box-shadow: 0 10px 22px -10px rgba(0,0,0,.28); z-index: 2; }
.logo-pile .logo-tile:hover img { transform: scale(1.35); }

/* ===================== TRABAJOS (rejilla regiones + mapa) ===================== */
.region-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.region-card a { display: block; text-decoration: none; padding: 20px 16px; border: 1px solid #eaeaea; border-top: 4px solid var(--acento); border-radius: 10px; text-align: center; font-family: 'Spectral', serif; font-weight: 600; font-size: 16px; color: var(--negro); background: #fff; transition: transform .3s ease, box-shadow .3s ease, background .3s ease, color .3s ease; }
.region-card a:hover { transform: translateY(-5px); box-shadow: 0 14px 26px -12px rgba(0,0,0,.28); background: var(--acento); color: #fff; }
.trabajos-map { max-width: none; margin: 0; padding: 26px 3% 60px; }
.trabajos-map #map { width: 100%; border-radius: 12px; box-shadow: 0 10px 26px -14px rgba(0,0,0,.3); }
.trabajos-map h2 { text-align: center; font-family: 'Spectral', serif; margin: 34px 0 16px; }
/* --- Trabajos: hub 4 territorios --- */
.terr-hub-top { margin: 10px 0 22px; }
.terr-hub-top .terr-card { height: 240px; }
.terr-hub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 0 0 4px; }
@media (max-width: 720px) { .terr-hub { grid-template-columns: 1fr; } }
.terr-card { position: relative; display: block; height: 210px; border-radius: 14px; overflow: hidden; text-decoration: none; box-shadow: 0 12px 30px -16px rgba(0,0,0,.45); }
.terr-card img { width: 100%; height: 100%; object-fit: cover; margin: 0; transition: transform .5s ease; }
.terr-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.64) 100%); }
.terr-card span { position: absolute; z-index: 2; left: 22px; right: 22px; bottom: 18px; color: #fff; font-family: 'Spectral', serif; font-weight: 700; font-size: 26px; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.terr-card:hover img { transform: scale(1.06); }
/* --- Sub-navegación de territorios (pastillas) --- */
.terr-nav { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 30px; }
.terr-nav a { text-decoration: none; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid #e3e3e3; border-left: 3px solid var(--acento); font-family: 'Archivo', sans-serif; font-weight: 600; font-size: 14px; color: var(--negro); transition: background .25s ease, color .25s ease, transform .25s ease; }
.terr-nav a:hover { background: var(--acento); color: #fff; transform: translateY(-2px); }
.terr-nav a.current { background: var(--acento); color: #fff; border-left-color: var(--acento); }
/* --- Trabajos en pastillas --- */
.trabajos-pills { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 8px; }
.work-pill { background: #fff; border: 1px solid #ececec; border-left: 4px solid var(--acento); border-radius: 10px; padding: 14px 16px; transition: transform .3s ease, box-shadow .3s ease; }
.work-pill:hover { transform: translateY(-3px); box-shadow: 0 12px 24px -14px rgba(0,0,0,.25); }
.work-pill .wp-title { font-family: 'Spectral', serif; font-weight: 600; font-size: 15.5px; line-height: 1.35; color: var(--negro); }
.work-pill .wp-client { display: block; margin-top: 6px; font-size: 12.5px; color: #6a6a6a; }
/* --- Trabajos: tarjetas con foto --- */
.work-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin: 6px 0 26px; }
.work-card { background: #fff; border: 1px solid #ececec; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 22px -16px rgba(0,0,0,.4); transition: transform .3s ease, box-shadow .3s ease; }
.work-card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -16px rgba(0,0,0,.3); }
.work-card .wc-img { height: 150px; overflow: hidden; background: #f0f0f0; }
.work-card .wc-img img { width: 100%; height: 100%; object-fit: cover; margin: 0; transition: transform .5s ease; }
.work-card:hover .wc-img img { transform: scale(1.06); }
.work-card .wc-body { padding: 14px 16px; }
.work-card .wc-title { font-family: 'Spectral', serif; font-weight: 600; font-size: 15px; line-height: 1.35; color: var(--negro); }
.work-card .wc-client { display: block; margin-top: 6px; font-size: 12.5px; color: #6a6a6a; }
/* --- Trabajos: listado desplegable --- */
.works-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; background: var(--acento); color: #fff; border: none; border-radius: 999px; padding: 11px 22px; font-family: 'Archivo', sans-serif; font-weight: 600; font-size: 14px; margin: 4px 0 18px; transition: filter .2s ease; }
.works-toggle:hover { filter: brightness(.94); }
.works-toggle::after { content: "\25BE"; transition: transform .3s ease; }
.works-toggle.open::after { transform: rotate(180deg); }
.works-list[hidden] { display: none; }
.page-content a.trabajos-back, a.trabajos-back { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 20px; padding: 9px 20px 9px 16px; background: var(--negro); color: #fff !important; border: none; border-radius: 999px; font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 13.5px; letter-spacing: .3px; text-transform: uppercase; text-decoration: none; box-shadow: 0 8px 18px -10px rgba(0,0,0,.5); transition: transform .25s ease, background .25s ease; }
.trabajos-back::before { content: "\2190"; font-size: 16px; font-weight: 700; color: #fff; }
.page-content a.trabajos-back:hover, a.trabajos-back:hover { transform: translateX(-3px); background: var(--acento); color: #fff !important; }
/* Tarjeta de trabajo sin foto */
.work-card.noimg { border-top: 4px solid var(--acento); }
.work-card.noimg .wc-body { padding: 18px 16px; }

/* ===================== PIE DE PÁGINA (claro) ===================== */
.site-footer { background: var(--gris-suave); color: var(--gris-texto); padding: 60px 10% 40px; border-top: 4px solid var(--acento); text-align: center; }
.site-footer .footer-cols { display: flex; justify-content: center; align-items: flex-start; flex-wrap: wrap; gap: 60px; }
.site-footer .footer-col { flex: 0 1 240px; min-width: 200px; }
.site-footer h4 { font-family: 'Spectral', serif; font-weight: 500; font-size: 22px; margin-bottom: 18px; color: var(--negro); }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--gris-texto); text-decoration: none; transition: color .3s; }
.site-footer a:hover { color: #b8860b; }
.site-footer p { margin-bottom: 6px; }
.site-footer .footer-logos { display: flex; gap: 24px; align-items: center; justify-content: center; flex-wrap: wrap; }
.site-footer .footer-logos img { width: 130px; height: auto; margin: 0; }
.site-footer .footer-bottom { margin-top: 50px; padding-top: 22px; border-top: 1px solid #e0ddd4; font-size: 14px; color: #777; }
.site-footer .footer-bottom a { color: #b8860b; }

/* ===================== APARICIÓN AL SCROLL ===================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ===================== IR ARRIBA ===================== */
#IrArriba { position: fixed; bottom: 30px; right: 30px; z-index: 2000; display: none; }
#IrArriba a { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; background: var(--acento); color: #000; border-radius: 14px; text-decoration: none; font-size: 24px; box-shadow: 0 6px 16px rgba(0,0,0,.25); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .logo { display: none; }
  .menu-toggle { display: block; }
  nav { display: none; flex-direction: column; width: 100%; background: var(--amarillo); position: absolute; top: 78px; left: 0; padding: 10px; max-height: calc(100vh - 78px); overflow-y: auto; }
  nav.nav-active { display: flex; }
  nav ul { flex-direction: column; gap: 6px; width: 100%; }
  nav ul li a { text-align: center; }
  nav ul li ul { position: static; display: none; box-shadow: none; }
  nav ul li ul li ul { position: static; }
  nav ul li:hover > ul { display: none; }
  nav ul li.active > ul { display: block; }
  .page-hero { padding: 50px 24px 40px; }
  .media-row, .media-row.invert { flex-direction: column; }
  .media-row .media-img { max-width: 100%; flex-basis: auto; }
}
@media (max-width: 760px) {
  .page-content .row { gap: 14px; }
  .page-content .row > [class$="u"] { flex: 0 0 100% !important; }
}
@media (max-width: 720px) {
  .clients-cols { grid-template-columns: 1fr; gap: 34px; }
  .logo-pile { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}
@media (max-width: 600px) {
  .team-flow { gap: 14px; }
  .team-flow .team-card { width: 96px; }
  .year-sticky { padding: 8px 8px; }
  .year-sticky .year-bar a { padding: 5px 10px; font-size: 14px; }
}
