/* ============================================================
TH BioData — v21 (clean build)
Hero con gradiente integrado · Drawer móvil OK · Toggle móvil OK
About: índice oculto sólo en móvil
============================================================ */

/* ---------- Paleta + tokens ---------- */
:root{
  --th-color-corporate-blue:#0F3D73;
  --th-color-corporate-light-blue:#7CC6FF;
  --th-content-max:1600px;
  --th-gap:24px;
}

/* Tema (claro/oscuro) */
[data-md-color-scheme="default"],
[data-md-color-scheme="slate"]{
  --md-primary-fg-color:var(--th-color-corporate-blue);
  --md-accent-fg-color:var(--th-color-corporate-light-blue);
}

/* ---------- Header ---------- */
.md-header,.md-tabs{ background:#0F3D73!important; color:#fff!important; }
body:has(#th-hero){ overflow-x:hidden; }
body:has(#th-hero) .md-header{ backdrop-filter:none!important; }

/* ============================================================
HERO (Home) — full bleed sin franja + GRADIENTE INTEGRADO
============================================================ */
#th-hero{
  position:relative; width:100vw;
  left:50%; right:50%; margin-left:-50vw; margin-right:-50vw;
  margin-top:0!important; padding:0!important;
  min-height:100vh; background:#0F3D73; overflow:hidden; z-index:0;
}
#th-hero .hero__bg{
  position:absolute; inset:0;
  background:
    linear-gradient(to bottom,
      rgba(10,35,80,.35) 0%,
      rgba(10,35,80,.55) 40%,
      rgba(10,35,80,.85) 100%),
    url('../assets/home_hero_v2.jpg');
  background-position:center; background-size:cover; background-repeat:no-repeat;
  transition:transform 15s linear, filter 2s ease; z-index:0;
}
#th-hero .hero__bg:hover{ transform:scale(1.05); filter:brightness(1.08); }
#th-hero .hero__content{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  z-index:2; display:flex; flex-direction:column; align-items:center;
  text-align:center; color:#fff; width:min(1100px,92vw);
}
#th-hero .hero__title{
  color:#fff!important; font-size:clamp(40px,7vw,72px);
  font-weight:800; margin:0 0 20px; text-shadow:0 6px 18px rgba(0,0,0,.75);
}
#th-hero .hero__tag{
  color:#fff!important; font-size:clamp(18px,2vw,26px);
  font-weight:400; margin:0 0 38px; text-shadow:0 4px 14px rgba(0,0,0,.65);
}
#th-hero .hero__cta{
  display:inline-block; padding:16px 36px;
  font-size:clamp(16px,1.8vw,20px); font-weight:700; border-radius:10px;
  color:#fff!important; background:var(--th-color-corporate-blue);
  text-decoration:none; box-shadow:0 5px 14px rgba(0,0,0,.35);
  transition:transform .25s, background .25s, box-shadow .25s;
}
#th-hero .hero__cta:hover{ background:#004B8E; transform:translateY(-4px);
  box-shadow:0 10px 22px rgba(0,0,0,.45); }

/* FIX franja blanca bajo header en Home */
body:has(#th-hero) .md-main,
body:has(#th-hero) .md-main__inner,
body:has(#th-hero) .md-container{ margin-top:0!important; padding-top:0!important; }
.md-header + .md-container{ margin-top:0!important; padding-top:0!important; }
body:has(#th-hero) #th-hero{ margin-top:-1px!important; }

/* ============================================================
Bloque principal bajo hero (Home)
============================================================ */
body:has(#th-hero) #th-hero ~ *{
  max-width:var(--th-content-max);
  margin:0 auto; padding:2rem 1rem; box-sizing:border-box;
}
body:has(#th-hero) #th-hero ~ * h2{
  color:var(--md-primary-fg-color); font-weight:800;
  margin-top:1.25rem; margin-bottom:.45rem;
  border-bottom:3px solid var(--th-color-corporate-light-blue);
  display:inline-block; padding-bottom:.35rem;
}

/* ============================================================
Tarjetas — estilos base compartidos (NO fijan columnas)
============================================================ */
.th-cards{
  display:grid; gap:var(--th-gap,24px);
  align-items:stretch; justify-items:stretch;
  max-width:var(--th-content-max); margin:2.5rem auto 3rem; padding:0 1rem;
}
.th-card{
  display:flex; flex-direction:column; background:#f9fbfd;
  border:1px solid rgba(0,0,0,.06); border-radius:14px;
  box-shadow:0 2px 6px rgba(0,0,0,.05);
  transition:transform .25s, box-shadow .25s, background .25s;
  padding:1.25rem;
}
.th-card:hover{ transform:translateY(-5px); box-shadow:0 8px 20px rgba(0,0,0,.08); background:#fff; }
.th-card__body{ flex:1; }
.th-card h3{ color:var(--th-color-corporate-blue); font-size:1.15rem; font-weight:800; margin:0 0 .45rem; line-height:1.3; }
.th-card p{ color:#2a2f35; font-size:.96rem; line-height:1.55; }

/* Botones uniformes en tarjetas */
.th-card a,
.th-card a.md-button,
.th-card a.md-button--primary{
  display:inline-block; background:var(--th-color-corporate-blue)!important;
  color:#fff!important; border:none!important; border-radius:10px;
  padding:.6rem 1.1rem; font-weight:700;
  box-shadow:0 5px 14px rgba(0,0,0,.12);
  transition:transform .2s, box-shadow .2s, background .2s;
}
.th-card a:hover{ background:#004B8E!important; transform:translateY(-2px); }

/* Modo oscuro tarjetas */
[data-md-color-scheme="slate"] .th-card{
  background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.15);
  box-shadow:0 2px 10px rgba(0,0,0,.25);
}
[data-md-color-scheme="slate"] .th-card:hover{ background:rgba(255,255,255,.10); box-shadow:0 6px 18px rgba(0,0,0,.35); }
[data-md-color-scheme="slate"] .th-card h3{ color:var(--th-color-corporate-light-blue)!important; }
[data-md-color-scheme="slate"] .th-card p{ color:#f2f4f8!important; }

/* ============================================================
Variantes de grilla (evita sobreescrituras entre páginas)
============================================================ */
/* Home / About: 4×1 desktop, 2×1 tablet, 1×1 móvil */
.th-cards--home,
.th-cards:not(.th-cards--services){             /* fallback para páginas que usan sólo .th-cards */
  grid-template-columns:repeat(4, minmax(0,1fr));
}
@media (max-width:1100px){
  .th-cards--home,
  .th-cards:not(.th-cards--services){ grid-template-columns:repeat(2, minmax(0,1fr)); }
}
@media (max-width:640px){
  .th-cards--home,
  .th-cards:not(.th-cards--services){ grid-template-columns:1fr; }
}

/* Services: 2×2 desktop, 2×1 tablet, 1×1 móvil */
.th-cards--services{ grid-template-columns:repeat(2, minmax(0,1fr)); }
@media (max-width:900px){ .th-cards--services{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width:640px){ .th-cards--services{ grid-template-columns:1fr; } }

/* (Opcional) alturas uniformes si querés: activa el min-height que prefieras */
/* .th-card{ min-height: 220px; } */

/* ============================================================
Tipografía / espaciado
============================================================ */
.md-typeset h1{ margin:0 0 .55rem!important; }
.md-typeset h2{ margin:1rem 0 .4rem!important; }
.md-typeset h3{ margin:.85rem 0 .35rem!important; }
.md-typeset p{ margin:.4rem 0!important; line-height:1.6; }
.md-typeset h1 + p,.md-typeset h2 + p,.md-typeset h3 + p{ margin-top:.2rem!important; }
.md-typeset ul,.md-typeset ol{ margin:.35rem 0 .5rem!important; }
.md-typeset li{ margin:.15rem 0!important; }
.md-typeset hr{ margin:.8rem 0!important; }

/* ============================================================
Bilingüe — contenido y TOC
============================================================ */
.lang{ display:none; }
:root[data-lang="en"] .lang-en{ display:block!important; }
:root[data-lang="en"] .lang-es{ display:none !important; }
:root[data-lang="es"] .lang-es{ display:block!important; }
:root[data-lang="es"] .lang-en{ display:none !important; }

/* TOC (sidebar) mostrar solo idioma activo */
.md-nav .md-ellipsis .lang,
.md-nav__link .lang{ display:none!important; }
:root[data-lang="en"] .md-nav .md-ellipsis .lang-en,
:root[data-lang="en"] .md-nav__link .lang-en{ display:inline!important; }
:root[data-lang="es"] .md-nav .md-ellipsis .lang-es,
:root[data-lang="es"] .md-nav__link .lang-es{ display:inline!important; }
.md-nav .md-ellipsis{ display:inline-block; }

/* Botón EN/ES */
.th-lang-switch{
  position:fixed; top:.7rem; right:1.2rem; z-index:9999;
  background:var(--th-color-corporate-blue,#0F3D73); color:#fff;
  border:none; border-radius:999px; padding:.35rem .9rem;
  font-size:.85rem; font-weight:600; cursor:pointer;
  box-shadow:0 2px 8px rgba(0,0,0,.2);
  transition:background .3s, transform .3s;
}
.th-lang-switch:hover{ background:var(--th-color-corporate-light-blue,#7CC6FF);
  color:#0F3D73; transform:translateY(-2px); }
[data-md-color-scheme="slate"] .th-lang-switch{ background:#1d3664; color:#fff; }
[data-md-color-scheme="slate"] .th-lang-switch:hover{
  background:var(--th-color-corporate-light-blue,#7CC6FF); color:#0F3D73; }

/* ============================================================
ABOUT — escopado a la página About
============================================================ */
@media (min-width:769px){
  .md-main:has(.th-about-layout) .md-sidebar--secondary,
  .md-main:has(.th-about-layout) .md-nav--secondary,
  .md-main:has(.th-about-layout) nav[data-md-component="toc"],
  .md-main:has(.th-about-layout) .md-nav__title,
  .md-main:has(.th-about-layout) .md-sidebar--primary{ display:none!important; }
}
.md-main:has(.th-about-layout) .md-typeset{
  max-width:80rem !important; margin-left:auto!important; margin-right:auto!important;
  padding-left:0!important; padding-right:0!important;
}
.th-about-layout{
  display:grid; grid-template-columns:280px 1fr;
  gap:36px; align-items:start; margin:0 auto; padding:0 1rem;
}
.th-sideindex{
  position:sticky; top:calc(var(--md-header-height,64px) + 24px);
  align-self:start; padding:.75rem .75rem .9rem;
  border:1px solid rgba(0,0,0,.08); border-radius:12px; background:#f9fbfd;
  box-shadow:0 2px 6px rgba(0,0,0,.04); width:280px; z-index:1;
}
.th-sideindex ul{ list-style:none!important; padding-left:0!important; margin:0!important; }
.th-sideindex li{ margin:.2rem 0; }
.th-sideindex a{ display:block; padding:.35rem .5rem; border-radius:8px; text-decoration:none; color:#1f2a37; border:1px solid transparent; }
.th-sideindex a:hover{ background:#eef5ff; border-color:#cfe3ff; }
.th-sideindex__label{ font-weight:800; color:var(--th-color-corporate-blue); margin:.1rem 0 .35rem; }
[data-md-color-scheme="slate"] .th-sideindex{ background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.15); }
[data-md-color-scheme="slate"] .th-sideindex a{ color:#e5eaf3; }
[data-md-color-scheme="slate"] .th-sideindex a:hover{ background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.18); }

/* Título principal con franja azul */
.th-page-title{ position:relative; padding-top:.9rem; margin-top:.2rem; color:var(--th-color-corporate-blue)!important; font-weight:800; }
.th-page-title::before{ content:""; position:absolute; top:0; left:0; width:84px; height:6px; background:var(--th-color-corporate-blue); border-radius:4px; box-shadow:0 1px 0 rgba(0,0,0,.06); }

/* Responsive About */
@media (max-width:1280px){ .th-about-layout{ grid-template-columns:260px 1fr; gap:28px; } .th-sideindex{ width:260px; } }
@media (max-width:1100px){ .th-about-layout{ grid-template-columns:1fr; gap:16px; padding:0 1rem; } .th-sideindex{ position:relative; top:auto; width:100%; z-index:0; } }

/* ============================================================
Accesibilidad + scroll suave
============================================================ */
@media(prefers-reduced-motion:reduce){ *{ transition:none!important; } }
html{ scroll-behavior:smooth; }

/* ============================================================
HOME — quitar sidebars sólo en DESKTOP
============================================================ */
@media (min-width:769px){
  body:has(#th-hero) .md-sidebar--primary,
  body:has(#th-hero) .md-sidebar--secondary,
  body:has(#th-hero) nav[data-md-component="toc"]{ display:none!important; }
}

/* Quita márgenes laterales reservados (home) */
body:has(#th-hero) .md-main,
body:has(#th-hero) .md-main__inner,
body:has(#th-hero) .md-content,
body:has(#th-hero) .md-content__inner{
  margin-left:0!important; padding-left:0!important;
  margin-right:0!important; padding-right:0!important;
}
body:has(#th-hero) .md-main,
body:has(#th-hero) .md-main__inner,
body:has(#th-hero) .md-container,
body:has(#th-hero) .md-content,
body:has(#th-hero) .md-content__inner{
  max-width:100% !important; width:100vw !important;
}

/* ============================================================
MÓVIL — toggle, ocultar índice About, drawer funcional
============================================================ */
@media (max-width:768px){

  :root { --th-header-h:56px; }
  .th-lang-switch{
    position:fixed!important;
    top:calc(var(--th-header-h) + 8px)!important;
    right:12px!important;
    z-index:9999;
    padding:6px 10px; font-size:14px; border-radius:999px;
    background:var(--th-color-corporate-blue); color:#fff; border:0;
    box-shadow:0 2px 10px rgba(0,0,0,.15); opacity:.95;
  }
  .md-header .md-header__button,.md-header .md-search,.md-header .md-icon{ z-index:10000; }

  /* Ocultar índice/menú lateral de About en móvil */
  .th-sideindex,
  #about-index,.about-index,.about-menu,.about-sidebar,.about-floating-menu{
    display:none!important; visibility:hidden!important;
  }

  /* Drawer móvil */
  .md-sidebar--primary{
    position:fixed!important;
    top:var(--md-header-height,56px)!important; left:0!important;
    height:calc(100% - var(--md-header-height,56px))!important;
    width:85vw!important; max-width:320px!important;
    background:var(--md-default-bg-color,#fff)!important;
    transform:translateX(-100%)!important;
    box-shadow:0 8px 24px rgba(0,0,0,.25)!important;
    z-index:12000!important; display:block!important; visibility:visible!important;
  }
  input[data-md-toggle="drawer"]:checked ~ .md-container .md-sidebar--primary{ transform:translateX(0)!important; }
  .md-overlay{ z-index:11000!important; }
  input[data-md-toggle="drawer"]:checked ~ .md-container #th-hero{ pointer-events:none!important; }
}


/* ============================================================
SERVICES — forzar grilla 2x2 y tipografía sin cortes raros
============================================================ */

/* Fuerza 2 columnas en Services (desactiva el fallback 4-col de .th-cards) */
.th-services .th-cards,
.th-cards--services {
  grid-template-columns: repeat(2, minmax(0,1fr)) !important;
}

/* Responsivo */
@media (max-width: 900px) {
  .th-services .th-cards,
  .th-cards--services { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 640px) {
  .th-services .th-cards,
  .th-cards--services { grid-template-columns: 1fr !important; }
}

/* Evita cortes feos de palabras en los títulos de tarjetas de Services */
.th-services .th-card h3 {
  word-break: normal;
  hyphens: manual;
}

/* (Opcional) alturas consistentes para las 4 tarjetas de Services */
.th-services .th-card { min-height: 240px; }


/* ============================================================
TH BioData — Uniformar altura de tarjetas y anclar botón al fondo
============================================================ */

/* Ajuste general para todas las tarjetas */
.th-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;  /* distribuye texto arriba, botón abajo */
  background: #f9fbfd;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
  padding: 1.5rem;
  transition: transform .25s, box-shadow .25s, background .25s;
  min-height: 260px; /* fuerza altura pareja */
}

/* Hover */
.th-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
  background: #fff;
}

/* Títulos y párrafos */
.th-card h3 {
  color: var(--th-color-corporate-blue);
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 .45rem;
  line-height: 1.3;
}
.th-card p {
  flex-grow: 1;
  color: #2a2f35;
  font-size: .96rem;
  line-height: 1.55;
  margin-bottom: 1rem;
}

/* Botón anclado abajo */
.th-card a {
  align-self: flex-start;
  margin-top: auto; /* empuja hacia abajo */
  background: var(--th-color-corporate-blue);
  color: #fff !important;
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  transition: background .25s ease, transform .25s ease;
  box-shadow: 0 5px 14px rgba(0,0,0,.12);
}
.th-card a:hover {
  background: var(--th-color-corporate-light-blue);
  color: #0F3D73 !important;
  transform: translateY(-2px);
}

/* ============================================================
ABOUT — cuadrícula 2x2 y botones simples en Founder
============================================================ */

/* --- Cuadrícula 2x2 para las tarjetas del bloque "Our Approach" --- */
.th-about-layout .th-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 28px;
}
@media (max-width: 900px) {
  .th-about-layout .th-cards {
    grid-template-columns: 1fr 1fr !important;
  }
}
@media (max-width: 640px) {
  .th-about-layout .th-cards {
    grid-template-columns: 1fr !important;
  }
}

/* --- Botones simples en Founder (sin color corporativo de fondo) --- */
.th-card--founder a {
  background: none !important;
  color: var(--th-color-corporate-blue) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.th-card--founder a:hover {
  background: #f3f6fa !important;
  border-color: var(--th-color-corporate-light-blue) !important;
  color: var(--th-color-corporate-blue) !important;
  text-decoration: none !important;
}


/* ============================================================
TH BioData — Visual polish para Services (íconos, barra lateral, fondo sutil)
Scope: .th-services (Services) y .th-servicepage (subpáginas: image/bioinfo/geo/consulting)
============================================================ */

/* ---------- 1) Barra azul degradada en tarjetas ---------- */
.th-services .th-card,
.th-servicepage .th-card {
  position: relative;
  overflow: hidden;
}
.th-services .th-card::before,
.th-servicepage .th-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: linear-gradient(180deg, var(--th-color-corporate-blue), var(--th-color-corporate-light-blue));
  opacity: .8;
  border-radius: 6px 0 0 6px;
}

/* ---------- 2) Íconos en títulos (Lucide) ---------- */
.th-services .th-card h3,
.th-servicepage .th-card h3 {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.th-icon[data-lucide] {
  display: inline-flex;
  width: 1.2rem;
  height: 1.2rem;
  color: var(--th-color-corporate-light-blue);
  opacity: .95;
}
.th-card:hover .th-icon[data-lucide] { opacity: 1; transform: translateY(-1px); transition: transform .2s ease; }

/* ---------- 3) Divisor con degradado ---------- */
.th-divider {
  height: 3px;
  width: 84px;
  margin: 2rem auto;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--th-color-corporate-blue), var(--th-color-corporate-light-blue));
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}

/* ---------- Opcional: altura pareja + botón anclado (ya compatible con tu v21) ---------- */
.th-services .th-card,
.th-servicepage .th-card {
  min-height: 260px;
}


/* ============================================================
PROJECTS — grilla, tipografía y botones (match con Services)
============================================================ */

/* 2×2 desktop, 2×1 tablet, 1×1 móvil */
.th-cards--projects{
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: var(--th-gap, 24px);
}
@media (max-width: 900px){
  .th-cards--projects{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px){
  .th-cards--projects{ grid-template-columns: 1fr; }
}

/* Títulos con iconos Lucide alineados */
.th-cards--projects .th-card h3{
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .45rem;
  color: var(--th-color-corporate-blue);
  font-weight: 800;
  line-height: 1.25;
}
.th-cards--projects .th-card h3 .th-icon[data-lucide]{
  width: 1.2rem;
  height: 1.2rem;
  color: var(--th-color-corporate-light-blue);
  opacity: .95;
}

/* Texto y altura pareja */
.th-cards--projects .th-card{
  min-height: 260px;                 /* mismo alto que Services */
  display: flex;
  flex-direction: column;
  justify-content: space-between;    /* texto arriba, botón abajo */
}

/* Botón “View” anclado abajo (matching Services/Home) */
.th-cards--projects .th-card .th-btn,
.th-cards--projects .th-card a.md-button{
  align-self: flex-start;
  margin-top: auto;                  /* empuja hacia abajo */
  background: var(--th-color-corporate-blue);
  color: #fff !important;
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 5px 14px rgba(0,0,0,.12);
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}
.th-cards--projects .th-card .th-btn:hover,
.th-cards--projects .th-card a.md-button:hover{
  background: #004B8E;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}

/* Evitar cortes feos en títulos largos */
.th-cards--projects .th-card h3{
  word-break: normal;
  hyphens: manual;
}

/* Modo oscuro: hereda estilos globales de .th-card */


/* ============================================================
PROJECTS — Hero personalizado
============================================================ */

#th-hero.th-hero--projects .hero__bg{
  background:
    linear-gradient(to bottom,
      rgba(10,35,80,.35) 0%,
      rgba(10,35,80,.55) 40%,
      rgba(10,35,80,.85) 100%),
    url('../assets/hero_projects.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}


/* === Quitar barra azul decorativa de títulos === */
.th-page-title::before {
  display: none !important;
  content: none !important;
}


/* ============================================================
CONTACT — Layout y formulario
============================================================ */
.th-contact {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.th-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 900px) {
  .th-contact-grid { grid-template-columns: 1fr; }
}

.th-contact-info ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.th-contact-info li {
  margin: .5rem 0;
  font-size: 1rem;
}
.th-contact-info a {
  color: var(--th-color-corporate-blue);
  text-decoration: none;
}
.th-contact-info a:hover {
  text-decoration: underline;
}

/* --- Formulario --- */
.th-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.th-form label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  color: var(--th-color-corporate-blue);
  font-size: .95rem;
}
.th-form input,
.th-form textarea {
  margin-top: .3rem;
  padding: .7rem .9rem;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  resize: vertical;
}
.th-form input:focus,
.th-form textarea:focus {
  outline: none;
  border-color: var(--th-color-corporate-light-blue);
  box-shadow: 0 0 0 3px rgba(124,198,255,.25);
}

/* --- Botón --- */
.th-btn {
  align-self: flex-start;
  background: var(--th-color-corporate-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .8rem 1.6rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(0,0,0,.12);
  transition: transform .2s, box-shadow .2s, background .25s;
}
.th-btn:hover {
  background: var(--th-color-corporate-light-blue);
  color: var(--th-color-corporate-blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
}

/* --- Oscuro --- */
[data-md-color-scheme="slate"] .th-form input,
[data-md-color-scheme="slate"] .th-form textarea {
  background: rgba(255,255,255,.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,.15);
}
[data-md-color-scheme="slate"] .th-form input:focus,
[data-md-color-scheme="slate"] .th-form textarea:focus {
  border-color: var(--th-color-corporate-light-blue);
  box-shadow: 0 0 0 3px rgba(124,198,255,.3);
}

/* ============================================================
CONTACT — quitar sidebar y margen (desktop)
============================================================ */
@media (min-width: 769px){
  /* oculta ambos sidebars y el título del TOC */
  .md-main:has(.th-contact) .md-sidebar--primary,
  .md-main:has(.th-contact) .md-sidebar--secondary,
  .md-main:has(.th-contact) nav[data-md-component="toc"],
  .md-main:has(.th-contact) .md-nav--secondary,
  .md-main:has(.th-contact) .md-nav__title{
    display: none !important;
    visibility: hidden !important;
  }

  /* elimina el espacio reservado por el sidebar */
  .md-main:has(.th-contact) .md-content,
  .md-main:has(.th-contact) .md-content__inner{
    margin-left: 0 !important;
    padding-left: 0 !important;
  }
}

/* Por si algún tema aplica ancho distinto, centramos el contenido de Contact */
.md-main:has(.th-contact) .md-typeset{
  max-width: 80rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}


/* ============================================================
CONTACT — reducir espacio superior bajo la barra azul
============================================================ */
.md-main:has(.th-contact) .md-content__inner {
  padding-top: 0.5rem !important;  /* antes suele ser 2–3rem */
}

.md-main:has(.th-contact) h1.th-page-title {
  margin-top: 0.3rem !important;   /* antes suele ser 2rem */
}
