:root{
  --text:#111;
  --muted:#555;
  --line:#e6e6e6;
  --max:980px;
}

/* =========================
   BASE
   ========================= */
*{
  box-sizing:border-box;
}

html{
  font-size:16px;
}

body{
  margin:0;
  color:var(--text);
  background:#fff;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  line-height:1.6;
}

.wrap{
  max-width:var(--max);
  margin:0 auto;
  padding:32px 18px;
}

/* =========================
   ENLACES Y TIPOGRAFÍA
   ========================= */
a{
  color:inherit;
  text-decoration:underline;
}

a:hover{
  opacity:.8;
}

h2{
  font-size:1.25rem;
  margin:0 0 10px;
}

p{
  margin:0 0 14px;
  color:var(--text);
}

.card-title-link{
  color:inherit;
  text-decoration:none;
}

.card-title-link:hover,
.card-title-link:focus-visible{
  text-decoration:underline;
}

.page-title.subtle{
  margin:0 0 24px;
  color:#555;
  font-size:1rem;
  font-weight:500;
}

/* =========================
   CABECERA Y NAVEGACIÓN
   ========================= */
header{
  margin-bottom:24px;
  padding-bottom:18px;
  border-bottom:1px solid var(--line);
}

header h1{
  margin:0 0 10px;
  font-size:2.5rem;
  line-height:1.2;
}

#site-header{
  position:sticky;
  top:0;
  z-index:1000;
  background:#fff;
}

.site-title{
  display:flex;
  align-items:center;
  gap:14px;
  margin:0;
  color:inherit;
  font-size:2.5rem;
  font-weight:700;
  text-decoration:none;
}

.site-title:hover{
  opacity:1;
  text-decoration:none;
}

.site-title:focus-visible{
  outline:2px solid currentColor;
  outline-offset:4px;
}

.site-title .logo-ga{
  display:block;
  width:auto;
  height:80px;
}

.menu-toggle{
  display:none;
  padding:0;
  background:none;
  border:0;
  font-size:1.5rem;
  cursor:pointer;
}

.menu-toggle:focus{
  outline:none;
}

.menu-toggle:focus-visible{
  outline:2px solid currentColor;
  outline-offset:3px;
}

.main-nav{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:14px;
  padding-top:8px;
}

.main-nav ul{
  gap:8px;
}

.main-nav a{
  padding:4px 0;
  border-bottom:1px solid transparent;
  text-decoration:none;
  line-height:1.3;
}

.main-nav a:hover{
  border-bottom:1px solid var(--text);
}

nav a.active{
  font-weight:600;
  text-decoration:underline;
  text-underline-offset:4px;
}

nav a.active:hover{
  border-bottom:none;
}

.small{
  margin-left:auto;
  color:var(--muted);
  font-size:.95rem;
}

.main-nav .small{
  margin-top:1rem;
  padding-top:.8rem;
  border-top:1px solid #ddd;
}

.main-nav .small a{
  display:inline;
  padding:0;
}

/* =========================
   COMPONENTES
   ========================= */
.row{
  display:flex;
  gap:20px;
  margin:24px 0;
}

.card{
  display:flex;
  flex:1;
  flex-direction:column;
  margin-bottom:1.5rem;
  padding:16px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
}

.row .card{
  margin-bottom:0;
}

.card-subtitle{
  margin:-12px 0 20px;
  color:var(--muted);
  font-size:.95rem;
}

.card-cta{
  margin-top:auto;
  margin-bottom:14px;
}

.card.hero{
  padding:40px;
}

.card.hero .card-cta{
  text-align:center;
}

.card.hero h1,
.card.hero h2{
  font-size:1.8rem;
}

.card.hero h1{
  margin:0 0 10px;
  line-height:1.25;
}

.card.hero .hero-subtitle{
  margin:6px 0 8px;
  font-size:1.25rem;
  font-weight:600;
  line-height:1.4;
}

.card.hero .hero-subtitle:last-of-type{
  margin-bottom:24px;
}

.card.hero .hero-subtitle a{
  color:inherit;
  text-decoration:none;
}

.card.minor{
  margin-top:24px;
  opacity:.85;
}

.card.minor h2{
  font-size:1.1rem;
}

.cta{
  display:inline-block;
  min-width:180px;
  padding:8px 14px;
  border:1px solid var(--text);
  border-radius:8px;
  font-size:.95rem;
  text-align:center;
  text-decoration:none;
}

.cta:hover{
  color:#fff;
  background:#000;
}

.pdf-document-cta .cta{
  width:280px;
  max-width:100%;
}


.cta-full{
  display:block;
  width:100%;
  text-align:center;
}

.video{
  position:relative;
  width:100%;
  padding-top:56.25%;
}

.video iframe{
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  border:0;
}

.editorial-visual{
  display:flex;
  align-items:flex-start;
  justify-content:center;
  gap:28px;
  margin:12px 0;
}

.editorial-img{
  width:auto;
  height:160px;
  border-radius:8px;
  box-shadow:0 4px 12px rgba(0,0,0,.08);
}

.test-circle{
  width:64px;
  height:64px;
  overflow:hidden;
  background:#fff;
  border-radius:50%;
}

.test-circle img{
  width:100%;
  height:100%;
  object-fit:contain;
}

.legal-quote{
  margin:20px 0;
  padding:16px 20px;
  border-left:4px solid #000;
  font-size:.95em;
}

.legal-quote .signature{
  margin-top:14px;
  font-size:.9rem;
  font-style:normal;
  text-align:right;
  opacity:.75;
}

/* =========================
   PÁGINAS DOCUMENTALES
   ========================= */
.breadcrumb a{
  text-decoration:none;
}

.breadcrumb a:hover{
  text-decoration:underline;
}

.cta-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:16px 0 0;
}

.cta-row .cta{
  min-width:280px;
  margin:0;
  text-align:center;
}

.toc{
  margin:0;
  padding-left:1.2rem;
}

.toc li{
  margin:0 0 6px;
}

.back-top{
  margin-top:12px;
  margin-bottom:0;
  color:var(--muted);
  font-size:.9rem;
}

.el-correo-page .back-top{
  margin-bottom:1.5rem;
}

.back-top a{
  text-decoration:none;
}

.back-top a:hover{
  text-decoration:underline;
}

.back-top + h2{
  margin-top:2rem;
}

.card + .back-top{
  margin-top:-.75rem;
}

.doc-meta{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.doc-meta h3{
  margin-top:0;
}

.card h2[id]{
  scroll-margin-top:180px;
}

/* =========================
   PIE DE PÁGINA
   ========================= */
.site-footer{
  margin-top:48px;
  padding:0;
  color:var(--muted);
  font-size:.9rem;
}

.site-footer .wrap{
  padding-top:16px;
  border-top:1px solid var(--line);
}

.site-footer a{
  text-decoration:none;
}

.site-footer a:hover{
  text-decoration:underline;
}

.site-footer .footer-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}

.site-footer .footer-row p{
  margin-bottom:0;
}

.footer-copy{
  flex:1 1 auto;
  min-width:0;
}

.footer-links{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:center;
  margin-top:.6rem;
}

.footer-links a:nth-child(1){
  text-align:left;
}

.footer-links a:nth-child(2){
  text-align:center;
}

.footer-links a:nth-child(3){
  text-align:right;
}

.footer-lang{
  flex:0 0 auto;
  white-space:nowrap;
}

.footer-lang a{
  font-weight:400;
  text-decoration:none;
}

.footer-lang a.active{
  font-weight:600;
}
