/*
 * Herrera y Sato, S.C. — Actualización visual 2026
 * Se carga DESPUÉS de bootstrap.css y style.css.
 * Conserva la identidad original: rojo #c00000, guinda #91142B,
 * rojo de alertas #DC0408 y tipografía Times New Roman.
 */

:root {
  --hs-red: #c00000;
  --hs-red-dark: #9a0000;
  --hs-wine: #91142B;
  --hs-alert: #DC0408;
  --hs-ink: #1b1b1b;
  --hs-text: #2b2b2b;
  --hs-muted: #666;
  --hs-line: #e8e3e3;
  --hs-soft: #faf7f7;
  --hs-font: "Times New Roman", Times, serif;
  --hs-shadow: 0 2px 14px rgba(20, 0, 0, .08);
  --hs-shadow-lg: 0 12px 32px rgba(20, 0, 0, .14);
  --hs-radius: 6px;
  --hs-nav-h: 76px;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body {
  overflow-x: hidden;   /* navegadores antiguos */
  overflow-x: clip;     /* moderno: no rompe el menú fijo (sticky) */
}
body {
  font-family: var(--hs-font);
  color: var(--hs-text);
  background: #fff;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, iframe, video { max-width: 100%; }
img { height: auto; }
::selection { background: var(--hs-red); color: #fff; }
a { color: var(--hs-red); }
a:hover { color: var(--hs-red-dark); }
a:focus-visible, button:focus-visible, label:focus-visible {
  outline: 2px solid var(--hs-red);
  outline-offset: 3px;
}
/* Los tamaños de texto son los originales de style.css (p = 15px) */

.hs-skip {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--hs-red); color: #fff; padding: .6rem 1rem;
}
.hs-skip:focus { left: 1rem; top: 1rem; color: #fff; }

/* ---------- Barra superior (antes images/hr.png) ---------- */
.hs-topbar { height: 22px; background: var(--hs-wine); }

/* ---------- Encabezado ---------- */
.hs-masthead {
  text-align: center;
  padding: 18px 16px 0;
  background: #fff;
}
.hs-masthead__logo { display: inline-block; }
.hs-masthead__logo img {
  width: min(742px, 92vw);
  height: auto;
  display: block;
}

.hs-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1030;
}
.hs-nav.navbar {
  background: rgba(255, 255, 255, .97);
  padding: 0;
  border-bottom: 1px solid var(--hs-line);
  transition: box-shadow .25s ease;
}
@supports ((-webkit-backdrop-filter: blur(6px)) or (backdrop-filter: blur(6px))) {
  .hs-nav.navbar { background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
}
.hs-nav.is-stuck { box-shadow: 0 4px 18px rgba(0, 0, 0, .08); }
.hs-nav__inner,
.navbar-expand-xl > .container.hs-nav__inner {
  max-width: 1400px;
  min-height: var(--hs-nav-h);
  padding-left: 20px;
  padding-right: 20px;
}
@media (max-width: 575.98px) {
  .hs-nav__inner,
  .navbar-expand-xl > .container.hs-nav__inner { padding-left: 16px; padding-right: 16px; }
  .hs-nav .navbar-collapse { margin: 0 -16px !important; padding-left: 16px !important; padding-right: 16px !important; }
}
/* Logo HS: mismo tamaño que el original (columna col-3, ~21% del ancho) */
.hs-nav__brand { padding: 8px 0; margin-right: 1.5rem; flex: 0 0 auto; }
.hs-nav__brand img { width: clamp(220px, 21vw, 422px); height: auto; display: block; }

/* Texto del menú: tamaño original (16px, peso 500, espaciado 0.5px) */
.hs-nav .navbar-nav .nav-link {
  font-family: var(--hs-font);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--hs-ink);
  padding: .5rem .7rem;
  border: 0;
  background: transparent;
  position: relative;
  text-align: center;
  line-height: 1.3;
}
/* Hover y página actual: rojo, igual que el original (sin subrayado) */
.hs-nav .navbar-nav .nav-link:hover,
.hs-nav .navbar-nav .nav-link:focus,
.hs-nav .navbar-nav .nav-link.active,
.hs-nav .navbar-nav .show > .nav-link {
  color: var(--hs-red);
  background: transparent;
}

/* Flecha y submenú: estilo original de Bootstrap; cada opción en un solo renglón */
.hs-nav .dropdown-menu { margin-top: 0; }
.hs-nav .dropdown-item {
  font-family: var(--hs-font);
  font-size: 16px;
  white-space: nowrap;
}
.hs-nav .dropdown-item.active,
.hs-nav .dropdown-item:active {
  background: transparent;
  color: var(--hs-red);
}

/* Banderas de idioma */
.hs-nav .hs-lang .nav-link { padding: .4rem .3rem; }
.hs-nav .hs-lang { flex: 0 0 auto; }
.hs-flag {
  width: 48px; height: 48px;   /* tamaño original */
  max-width: none;
  flex-shrink: 0;
  transition: transform .2s ease;
}
.hs-lang .nav-link:hover .hs-flag { transform: scale(1.08); }

/* Botón hamburguesa */
.hs-burger {
  width: 46px; height: 42px;
  border: 0 !important;
  border-radius: var(--hs-radius);
  background: var(--hs-red) !important;
  padding: 0 !important;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.hs-burger span {
  display: block; width: 22px; height: 2px; background: #fff;
  transition: transform .25s ease, opacity .25s ease;
}
.hs-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hs-burger.is-open span:nth-child(2) { opacity: 0; }
.hs-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Escritorio: desplegable también con hover */
@media (min-width: 1200px) {
  .hs-nav .dropdown:hover > .dropdown-menu,
  .hs-nav .dropdown:focus-within > .dropdown-menu { display: block; }
  .hs-nav .dropdown:hover > .dropdown-toggle { color: var(--hs-red); }
}

/* Móvil y tableta: menú desplegable a pantalla completa */
@media (max-width: 1199.98px) {
  :root { --hs-nav-h: 64px; }
  .hs-burger { display: flex; }
  .hs-nav__brand img { width: min(300px, calc(100vw - 110px)); }
  .hs-nav .navbar-collapse {
    border-top: 1px solid var(--hs-line);
    max-height: calc(100vh - var(--hs-nav-h));
    overflow-y: auto;
    margin: 0 -20px;
    padding: .25rem 20px 1rem;
    background: #fff;
  }
  .hs-nav .navbar-nav { text-align: left; flex-direction: row; flex-wrap: wrap; }
  .hs-nav .navbar-nav > .nav-item:not(.hs-lang) { flex: 0 0 100%; border-bottom: 1px solid var(--hs-line); }
  .hs-nav .navbar-nav .nav-link { font-size: 16px; padding: .95rem .25rem; text-align: left; }
  .hs-nav .dropdown-item { white-space: normal; }
  .hs-nav .dropdown-menu {
    position: static;
    float: none;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    background: var(--hs-soft);
    margin: 0 0 .75rem;
    text-align: left !important;
  }
  .hs-nav .navbar-nav .hs-lang { display: inline-block; margin-top: .9rem; margin-right: .6rem; }
  .hs-nav .hs-lang .nav-link { padding: .25rem; }
}

/* ---------- Cinta de alertas (reemplaza <marquee>) ---------- */
.hs-ticker {
  background: var(--hs-alert);
  color: #fff;
  overflow: hidden;
  position: relative;
}
.hs-ticker__viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.hs-ticker__track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 1.6rem 0;
  animation: hs-ticker var(--hs-dur, 60s) linear infinite;
  will-change: transform;
}
.hs-ticker:hover .hs-ticker__track,
.hs-ticker:focus-within .hs-ticker__track { animation-play-state: paused; }
.hs-ticker__track a {
  color: #fff;
  font-size: 25px;          /* original */
  font-weight: 300;
  letter-spacing: normal;
  padding: 0 1.25rem;
  text-decoration: none;
}
.hs-ticker__track a:hover { text-decoration: underline; color: #fff; }
.hs-ticker__sep { opacity: .6; font-size: .8em; }
@keyframes hs-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .hs-ticker__track { animation: none; }
  .hs-ticker__viewport { overflow-x: auto; }
}

/* ---------- Portada ---------- */
.banner .bg1 {
  height: clamp(260px, 44vw, 680px);
  background-position: center 60%;
  background-size: cover;
  position: relative;
}
.banner .bg1::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 65%, rgba(0,0,0,.25) 100%);
  pointer-events: none;
}
.banner .banner-text { padding: 0; }

/* ---------- Encabezados con imagen de las páginas interiores ---------- */
.hs-banner {
  min-height: clamp(220px, 30vw, 420px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-position: center !important;
  background-size: cover !important;
  padding: clamp(2.5rem, 6vw, 5rem) 1rem !important;
}
.hs-banner > .container { padding-top: 0 !important; margin-top: 0 !important; }
/* Tamaños originales: h1 = 88px, h2 ("Perfil del despacho") = 40px; solo se reducen en pantallas chicas */
.hs-banner .heading-agileinfo {
  font-family: var(--hs-font);
  font-size: clamp(2.25rem, 7.5vw, 88px);
  font-weight: 600;
  letter-spacing: 2px;
  line-height: 1.1;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .45);
  margin: 0;
}
.hs-banner h2.heading-agileinfo { font-size: clamp(1.75rem, 5vw, 40px); }
.hs-banner__lead {
  color: #fff;
  max-width: 62ch;
  margin: 1.5rem auto 0;
  font-size: 17px;
  letter-spacing: 4px;
  font-weight: 500;
  line-height: 1.7;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .5);
}

/* Títulos de páginas sin imagen (Alertas, Eventos, Libros, Revistas, Videos) */
h1.text-center.text-danger {
  color: var(--hs-red) !important;
  font-size: 2.5rem;   /* original (h1 de Bootstrap) */
  padding-top: clamp(1.5rem, 4vw, 3rem);
  margin-bottom: .5rem;
}

/* ---------- Texto de secciones ---------- */
.welcome .container { max-width: 980px; }
@media (max-width: 767.98px) {
  p[align="justify"], [style*="text-align: justify"] { text-align: left !important; }
}

/* Lista numerada (Prácticas en materia de...) */
#lista3 { margin: 0 auto 2rem; max-width: 820px; padding-left: 0; }
@media (max-width: 575.98px) {
  #lista3 li { margin-left: 2.75rem; padding: .85rem 1rem; }
  #lista3 li::before { left: -2.75rem; }
  #lista3 p { line-height: 1.55; }
}
#lista3 li {
  margin: 0 0 .9rem 3.25rem;
  padding: 1rem 1.25rem;
  background: var(--hs-soft);
  border: 1px solid var(--hs-line);
  border-radius: var(--hs-radius);
  transition: transform .2s ease, box-shadow .2s ease;
}
#lista3 li:hover { transform: translateX(4px); box-shadow: var(--hs-shadow); }
#lista3 li::before {
  left: -3.25rem;
  width: 2.4rem; height: 2.4rem; line-height: 2.4rem;
  margin-top: -1.2rem;
  border-radius: 50%;
  color: #fff;
  font-family: var(--hs-font);
}
#lista3 li::after { display: none; }
#lista3 p { margin: 0; font-size: 20px; color: #000; }

/* Lista con palomitas (Asuntos representativos) */
#lista { padding: 0; margin: 0 auto; max-width: 900px; }
#lista li {
  line-height: 1.7;
  padding: 1.1rem 0 1.1rem 2.4rem;
  border-bottom: 1px solid var(--hs-line);
  position: relative;
  list-style: none;
}
#lista li .fa-check-circle {
  color: var(--hs-red) !important;
  position: absolute;
  left: 0; top: 1.4rem;
}

/* ---------- Acordeones (Alertas, Eventos, Libros, Revistas, Videos, perfiles) ---------- */
.acordeon { max-width: 1100px; margin: 1.5rem auto 3.5rem; }
.acordeon__item {
  background: #fff;
  border: 1px solid var(--hs-line);
  border-radius: var(--hs-radius);
  margin-bottom: .8rem;
  overflow: hidden;
  transition: box-shadow .2s ease;
}
.acordeon__item:hover { box-shadow: var(--hs-shadow); }
.acordeon input {
  display: block;
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  pointer-events: none;
}
.acordeon__titulo {
  font-family: var(--hs-font);
  font-size: 20px !important;     /* original */
  font-weight: bolder !important;
  line-height: 1.5;
  color: #000;
  padding: 1.05rem 3.25rem 1.05rem 1.35rem;
  margin: 0;
  border-bottom: 0;
  position: relative;
  transition: background .2s ease, color .2s ease;
}
.acordeon__titulo::after {
  content: "";
  position: absolute;
  right: 1.35rem; top: 50%;
  width: 9px; height: 9px;
  margin-top: -7px;
  border-right: 2px solid var(--hs-red);
  border-bottom: 2px solid var(--hs-red);
  transform: rotate(45deg);
  transition: transform .25s ease, border-color .2s ease;
}
.acordeon__titulo:hover,
.acordeon input:checked + .acordeon__titulo {
  background: var(--hs-red);
  color: #fff;
}
.acordeon__titulo:hover::after,
.acordeon input:checked + .acordeon__titulo::after { border-color: #fff; }
.acordeon input:checked + .acordeon__titulo::after { transform: rotate(-135deg); margin-top: -2px; }
.acordeon input:focus-visible + .acordeon__titulo { outline: 2px solid var(--hs-red); outline-offset: -2px; }

.acordeon__contenido { padding: 0 1.35rem; font-size: 16px; }
.acordeon input:checked ~ .acordeon__contenido {
  margin: 0;
  padding: 1.25rem 1.35rem 1.5rem;
  border-top: 1px solid var(--hs-line);
}
.acordeon__panel { padding: .45rem 0; line-height: 1.7; }
.acordeon__contenido img { max-width: 100%; height: auto; border-radius: 4px; box-shadow: var(--hs-shadow); }
.acordeon__contenido a { color: var(--hs-red); }

.hs-embed--doc {
  display: block;
  width: 100% !important;
  height: min(85vh, 900px) !important;
  border: 1px solid var(--hs-line) !important;
  border-radius: 4px;
  background: var(--hs-soft);
}
.hs-embed--video {
  display: block;
  width: 100% !important;
  max-width: 880px;
  height: auto !important;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  border: 0;
  border-radius: 4px;
  background: #000;
}
.hs-pdf-link {
  display: inline-block;
  margin-bottom: .8rem;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .03em;
}

/* ---------- Miembros ---------- */
.card-deck {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(230px, 300px));
  justify-content: center;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  margin: 0 0 clamp(1.25rem, 3vw, 2.25rem) !important;
  padding-top: 0 !important;
}
.wthree-row .card-deck:first-child { margin-top: 1rem !important; }
.card-deck .card {
  margin: 0 !important;
  border: 0;
  border-radius: var(--hs-radius);
  overflow: hidden;
  box-shadow: var(--hs-shadow);
  transition: transform .3s ease, box-shadow .3s ease;
  background: #fff;
}
.card-deck .card:hover { transform: translateY(-5px); box-shadow: var(--hs-shadow-lg); }
.card-deck .card > a { display: block; overflow: hidden; }
.card-deck .card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  transition: transform .5s ease;
}
.card-deck .card:hover img { transform: scale(1.04); }
.card-deck .card-body { padding: 1.1rem 1rem 1.2rem; text-align: center; border-top: 3px solid var(--hs-red); }
.card-deck .card-title {
  font-family: var(--hs-font);
  color: #000 !important;
  font-size: 20px;
  letter-spacing: 2px;
  margin: 0;
  transition: color .2s ease;
}
.card-deck .card:hover .card-title { color: var(--hs-red) !important; }

/* ---------- Perfiles de miembros ---------- */
.hs-profile { max-width: 1280px; margin: clamp(1.5rem, 4vw, 3.5rem) auto; }
.hs-profile > .row { align-items: stretch; }
.hs-profile img {
  width: 100% !important;
  max-width: 440px;
  display: block;
  margin: 0 auto 1.75rem;
  border-radius: var(--hs-radius);
  box-shadow: var(--hs-shadow-lg);
}
@media (min-width: 768px) {
  .hs-profile img { position: sticky; top: calc(var(--hs-nav-h) + 1.5rem); }
}
.hs-profile h3 {
  color: var(--hs-red) !important;
  margin-bottom: .75rem;
}
.hs-profile address {
  border-left: 3px solid var(--hs-red);
  padding: .25rem 0 .25rem 1rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}
.hs-profile p { line-height: 1.8; }

.hs-awards { margin-top: 1rem; margin-bottom: 2rem; }
.hs-awards .row { align-items: center; }
.hs-awards [class*="col-"] { text-align: center; padding-top: 1rem; padding-bottom: 1rem; }
.hs-awards img { max-width: 190px; width: 70% !important; }

/* ---------- Asociaciones ---------- */
.hs-logo-cell { display: flex; align-items: center; justify-content: center; padding: 1.25rem; }
.hs-logo-cell img { max-height: 120px; width: auto !important; max-width: 100%; object-fit: contain; transition: transform .25s ease; }
.hs-logo-cell img:hover { transform: scale(1.05); }

/* ---------- Contacto ---------- */
.contact_grid_right h2 { font-size: 40px; margin-bottom: 1rem; }   /* original */
.contact_grid_right input[type="text"],
.contact_grid_right input[type="email"],
.contact_grid_right textarea {
  font-family: var(--hs-font);
  font-size: 14px;
  color: var(--hs-ink);
  background: #fff;
  border: 1px solid #d9d2d2;
  border-radius: 4px;
  padding: .9rem 1rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.contact_grid_right input:focus,
.contact_grid_right textarea:focus {
  border-color: var(--hs-red);
  box-shadow: 0 0 0 3px rgba(192, 0, 0, .12);
}
.contact_grid_right input[type="submit"] {
  width: auto;
  min-width: 170px;
  padding: 1rem 2.5rem;
  border-radius: 4px;
  background: var(--hs-red);
  font-family: var(--hs-font);
}
.contact_grid_right input[type="submit"]:hover { background: var(--hs-wine); }
.hs-map {
  width: 100%;
  height: clamp(320px, 45vw, 480px);
  border: 0;
  border-radius: var(--hs-radius);
  box-shadow: var(--hs-shadow);
  margin-top: 3rem;
}

/* ---------- Pie de página ---------- */
main { display: block; padding-bottom: clamp(2rem, 5vw, 4rem); }
.hs-footer {
  background: #fff;
  border-top: 1px solid var(--hs-line);
  padding: 1.75rem 0;
}
.hs-footer__inner {
  max-width: 1400px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-left: 20px;
  padding-right: 20px;
}
.hs-footer__brand img { width: 150px; height: auto; display: block; }
.hs-footer__links a {
  color: #000;
  font-weight: 600;
  font-size: .95rem;        /* original */
  text-transform: uppercase;
}
.hs-footer__links a:hover { color: var(--hs-red); }
.hs-footer__copy { margin: 0; font-size: 15px; color: #000; letter-spacing: 1px; }   /* original */
@media (max-width: 767.98px) {
  .hs-footer__inner { flex-direction: column; text-align: center; }
}

/* ---------- Ajustes generales responsive ---------- */
@media (max-width: 767.98px) {
  .container-fluid > .row > .col-md-1 { display: none; }
  .table-responsive, table { display: block; max-width: 100%; overflow-x: auto; }
}
