/* styles.css — Estilos. Las reglas adaptables están al final y en bloques de medios. */

:root {
  --blue: #002CAA;
  --red: #ed0035;
  --body: "Montserrat", Arial, sans-serif;
  --heading: "Barlow Condensed", "Arial Narrow", sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}
body {
  margin: 0;
  color: var(--blue);
  background: #fff;
  font-family: var(--body);
}
button,
input,
select {
  font: inherit;
}
button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #ed0035;
  outline-offset: 4px;
}
button {
  border: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3,
.eyebrow {
  font-family: var(--heading);
  font-weight: 700;
}
header {
  height: 120px;
  border-bottom: 7px solid var(--red);
}
.header-inner {
  max-width: 1320px;
  height: 100%;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 70px;
  position: relative;
}
.logo {
  width: 402px;
  display: block;
}
.top-search {
  display: flex;
  align-items: center;
  gap: 17px;
  flex: 1;
  margin-right: 203px;
  position: relative;
}
.top-search label {
  font-family: var(--heading);
  font-size: 24px;
  line-height: 1;
  color: #151515;
  text-align: center;
  font-weight: 700;
}
.top-search input {
  min-width: 0;
  width: 100%;
  border: 1px solid #666;
  border-radius: 40px;
  height: 56px;
  padding: 0 45px 0 23px;
  font: 700 24px var(--heading);
}
.top-search input::placeholder {
  color: #999;
}
.top-search button {
  position: absolute;
  right: 15px;
  background: transparent;
  color: var(--blue);
  font-size: 30px;
}
.mascot {
  position: absolute;
  right: 0;
  top: 0;
  width: 195px;
  z-index: 2;
}
.menu-toggle {
  display: none;
}
nav {
  background: var(--blue);
  height: 50px;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  padding: 0 max(5%, calc((100% - 1340px) / 2));
  color: white;
}
nav a {
  font: 600 28px var(--heading);
  padding: 7px 12px;
  transition: color 0.2s;
}
nav a:hover {
  color: red;
}
nav a[aria-current="page"] {
  box-shadow: inset 0 -4px var(--red);
}
.red-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  background: var(--red);
  color: white;
  padding: 11px 24px;
  font-size: 16px;
  transition:
    background 0.2s,
    transform 0.2s;
}
.red-button:hover {
  background: #c9002c;
  transform: translateY(-1px);
}
.small-label {
  font-size: 13px;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: var(--red);
}
footer {
  background: var(--blue);
  color: white;
  padding: 50px max(5.1%, calc((100% - 1350px) / 2)) 0;
  border-top: 6px solid var(--red);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1.4fr 1.2fr;
  gap: 40px;
  padding-bottom: 38px;
}
.footer-brand img {
  width: 240px;
  max-width: 100%;
  background: white;
  padding: 8px;
  border-radius: 3px;
}
.footer-brand p {
  font: 600 24px/1.1 var(--heading);
  text-transform: uppercase;
  margin-top: 15px;
}
.footer-top h3 {
  font-size: 23px;
  margin: 0 0 18px;
}
.footer-top a {
  display: block;
  font-size: 14px;
  margin: 12px 0;
}
.footer-top a:hover {
  text-decoration: underline;
}
.footer-top p {
  font-size: 14px;
  line-height: 1.6;
}
.footer-cta {
  border-bottom: 2px solid var(--red);
  width: max-content;
  padding-bottom: 7px;
}
.footer-bottom {
  border-top: 1px solid #ffffff30;
  padding: 23px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
  color: #d9dfef;
}
dialog {
  border: 0;
  border-radius: 18px;
  padding: 42px;
  max-width: 670px;
  width: 90%;
  color: var(--blue);
  box-shadow: 0 20px 100px #0004;
}
dialog::backdrop {
  background: #0c184b99;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font-size: 40px;
  margin: 12px 0 20px;
}
.close-dialog {
  position: absolute;
  right: 13px;
  top: 8px;
  background: transparent;
  font-size: 32px;
  color: var(--blue);
}
#results-content p {
  line-height: 1.8;
  color: #59637a;
  margin-bottom: 20px;
}
.result-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.result-categories div {
  padding: 18px 12px;
  border: 1px solid #dbe0eb;
  border-radius: 10px;
}
.result-categories strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--heading);
  font-size: 23px;
}
.result-categories span {
  font-size: 13px;
  line-height: 1.5;
  color: #59637a;
}
/* ADAPTACIÓN DE PANTALLA O PREFERENCIAS */
@media (max-width: 1350px) and (min-width: 901px) {
  .header-inner {
    margin: 0 6%;
    gap: 6%;
  }
  .logo {
    width: 31vw;
  }
  .top-search {
    margin-right: 15vw;
  }
  .mascot {
    width: 15vw;
  }
}
/* ADAPTACIÓN DE PANTALLA O PREFERENCIAS */
@media (max-width: 900px) {
  header {
    height: 90px;
  }
  .header-inner {
    margin: 0 5%;
    gap: 20px;
  }
  .logo {
    width: 285px;
    max-width: 65vw;
  }
  .mascot {
    display: none;
  }
  .top-search {
    display: none;
  }
  .menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    background: none;
    color: var(--blue);
    font-size: 25px;
  }
  .menu-toggle span {
    font-size: 14px;
  }
  nav {
    height: auto;
    padding: 10px 3%;
    flex-wrap: wrap;
    gap: 5px;
    display: none;
  }
  nav.open {
    display: flex;
  }
  nav a {
    font-size: 22px;
    width: 30%;
    text-align: center;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-wrap: wrap;
    font-size: 12px;
  }
}
/* ADAPTACIÓN DE PANTALLA O PREFERENCIAS */
@media (max-width: 480px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 25px 15px;
  }
  .footer-brand {
    grid-column: 1/-1;
  }
  .footer-top h3 {
    font-size: 20px;
  }
  .footer-top a {
    font-size: 13px;
  }
  .footer-top > div:last-child {
    grid-column: 1/-1;
  }
  .result-categories {
    grid-template-columns: 1fr;
  }
  dialog {
    padding: 32px 22px;
  }
  dialog h2 {
    font-size: 31px;
  }
}
/* ADAPTACIÓN DE PANTALLA O PREFERENCIAS */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

/* Shared header: reserve independent space and anchor the mascot to the navigation. */
/* ADAPTACIÓN DE PANTALLA O PREFERENCIAS */
@media (min-width: 901px) {
  .header-inner {
    width: 90%;
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(220px, 402px) minmax(0, 1fr) clamp(125px, 14vw, 195px);
    gap: clamp(18px, 2.4vw, 36px);
  }
  .header-inner > a {
    min-width: 0;
  }
  .header-inner .logo {
    width: 100%;
    max-width: 402px;
  }
  .top-search {
    min-width: 0;
    width: 100%;
    margin: 0;
    gap: clamp(10px, 1.2vw, 17px);
  }
  .top-search label {
    flex: 0 0 auto;
    font-size: clamp(20px, 1.8vw, 24px);
  }
  .top-search input {
    flex: 1 1 0;
    min-width: 0;
    font-size: clamp(18px, 1.8vw, 24px);
    padding-left: clamp(12px, 1.7vw, 23px);
  }
  .header-inner .mascot {
    position: static;
    align-self: end;
    justify-self: end;
    width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
    object-position: right bottom;
    transform: translateY(7px);
  }
  nav a {
    font-size: clamp(22px, 2.1vw, 28px);
    white-space: nowrap;
  }
}
/* ADAPTACIÓN DE PANTALLA O PREFERENCIAS */
@media (max-width: 900px) {
  .header-inner {
    min-width: 0;
    gap: 12px;
  }
  .header-inner > a {
    min-width: 0;
    flex: 0 1 285px;
  }
  .header-inner .logo {
    width: 100%;
    max-width: 100%;
  }
  .menu-toggle {
    flex: 0 0 auto;
    padding: 8px 0 8px 8px;
  }
  nav.open {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  nav a {
    width: auto;
    min-width: 0;
    padding: 9px 4px;
  }
}
/* ADAPTACIÓN DE PANTALLA O PREFERENCIAS */
@media (max-width: 380px) {
  .menu-toggle span {
    display: none;
  }
  nav.open {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Banner del aviso de privacidad (footer.php + includes/js/privacy-banner.js). */
.privacy-banner {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 1100;
  width: min(880px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 22px;
  background: white;
  color: #1b2d49;
  border-top: 5px solid var(--red);
  border-radius: 12px;
  box-shadow: 0 10px 34px #00143f40;
  font-size: 14px;
  line-height: 1.55;
}
.privacy-banner[hidden] {
  display: none;
}
.privacy-banner p {
  flex: 1;
}
.privacy-banner a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
}
.privacy-banner-accept {
  flex: none;
  padding: 11px 26px;
  border-radius: 30px;
  background: var(--blue);
  color: white;
  font: 700 20px var(--heading);
  transition: background 0.2s;
}
.privacy-banner-accept:hover {
  background: var(--red);
}
/* ADAPTACIÓN DE PANTALLA O PREFERENCIAS */
@media (max-width: 600px) {
  .privacy-banner {
    bottom: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
    font-size: 13px;
  }
}
