/* ----------------------------
   VARIABLES Y BASE
---------------------------- */
:root {
  --color-primario: #0d47a1;
  --color-texto: #ffffff;
  --max-width: 940px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: #fff;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.ancla {
  position: absolute;
  top: -50px;
}

/* Estilo base común para todos los botones */
.btn {
  display: inline-block;
  padding: 1rem 1.2rem;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
  margin-top: 1rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Variante blanca (texto azul) */
.btn--white {
  background-color: white;
  color: var(--color-primario);
}

/* Variante azul (texto blanco) */
.btn--blue {
  background-color: var(--color-primario);
  color: white;
}

/* ----------------------------
   HEADER FIJO
---------------------------- */
.header {
  position: fixed;
  width: 100%;
  height: 45px;
  z-index: 1000;
  background-color: transparent;
  transition: background-color 0.3s ease;
  padding: 1rem 0;
}

@media (min-width: 768px) {
  .header--scrolled {
    background-color: var(--color-primario);
  }
}

@media (max-width: 768px) {
  .header {
    background-color: var(--color-primario);
  }
}

.header__container {
  position: relative;
  height: 45px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  font-weight: 700;
  font-size: 2rem;
  text-decoration: none;
}

.header__logo img {
  height: 70px;
}

/* ----------------------------
   NAVEGACIÓN DESKTOP
---------------------------- */
.nav {
  display: flex;
}

.nav__list {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__list li a {
  color: var(--color-texto);
  font-weight: 500;
  text-decoration: none;
}

/* ----------------------------
   BOTÓN HAMBURGUESA / CRUZ
---------------------------- */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
}

.nav__toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--color-texto);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.nav__toggle--open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle--open span:nth-child(2) {
  opacity: 0;
}

.nav__toggle--open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ----------------------------
   HERO GENERAL
---------------------------- */
.hero {
  position: relative;
  width: 100%;
  height: 75vh;
  overflow: hidden;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__backgrounds {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 75vh;
  z-index: -1;
}

.hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero__bg--1 {
  background-image: url("../images/hero-1-desktop.webp");
}
.hero__bg--2 {
  background-image: url("../images/hero-2-desktop.webp");
}
.hero__bg--3 {
  background-image: url("../images/hero-3-desktop.webp");
}

@media (max-width: 768px) {
  .hero__bg--1 {
    background-image: url("../images/hero-1-mobile.webp");
  }
  .hero__bg--2 {
    background-image: url("../images/hero-2-mobile.webp");
  }
  .hero__bg--3 {
    background-image: url("../images/hero-3-mobile.webp");
  }
}

.hero__bg--active {
  opacity: 1;
}

.hero__slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: block;
}

.hero__slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.hero__slide--active {
  opacity: 1;
  z-index: 2;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.hero__content h1 {
  font-size: 3.65rem;
  margin-bottom: 0;
}

.hero__content .subtitle {
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.hero__content .bajada {
  font-size: 2.1rem;
  font-weight: 500;
}

.hero__slide .container {
  display: flex;
  align-items: center;
  height: 100%;
}

/* ----------------------------
   HERO DOTS
---------------------------- */
.hero__dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 0.5rem;
}

.hero__dots button {
  width: 12px;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}

.hero__dots .active {
  background-color: white;
}

/* ----------------------------
   MEDIA QUERIES
---------------------------- */
@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 77px;
    padding-top: 45px;
    right: -100%;
    left: auto;
    width: 100%;
    height: 100vh;
    background-color: #0d6ca1;
    flex-direction: column;
    align-items: center;
    transition: right 0.3s ease;
  }

  .nav--visible {
    right: 0;
  }

  .nav__list {
    flex-direction: column;
    gap: 2rem;
    width: 85%;
    font-size: 1.5em;
  }

  .nav__toggle {
    display: flex;
  }

  .hero__content {
    align-items: center;
    text-align: center;
    top: -70px;
  }

  .hero__slide {
    justify-content: flex-start;
  }

  .hero__content h1 {
    font-size: 2.3rem;
  }

  .hero__content .subtitle {
    font-size: 0.7rem;
    margin: 0;
  }

  .hero__content .bajada {
    font-size: 1.35rem;
  }

  .header__logo img {
    height: 70px;
  }

  .header {
    position: fixed;
    top: 0px;
    height: auto;
  }

  .header__container {
    top: 0px;
  }
}

/* ----------------------------
   INFO BOXES: TELÉFONO + FAQ
---------------------------- */
.info-boxes {
  background-color: #ffffff;
  padding: 3rem 0;
}

.info-boxes__grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.info-box {
  background-color: #edf3f8;
  border-radius: 8px;
  padding: 2rem;
  display: flex;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  justify-content: center;
  align-items: center;
}

.info-box__icono img {
  width: 48px;
  height: 48px;
}

.info-box__label {
  font-weight: 500;
  font-size: 1.5rem;
  text-align: center;
  color: var(--color-primario);
  margin: 5px 0;
}

.info-box__dato {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primario);
  margin: 0;
}

.info-box__link {
  font-weight: 600;
  color: var(--color-primario);
  text-decoration: underline;
  font-size: 1.2rem;
}

/* ----------------------------
   DESKTOP
---------------------------- */
@media (min-width: 768px) {
  .info-boxes__grid {
    flex-direction: row;
    justify-content: space-between;
  }

  .info-box {
    flex: 1;
  }

  .nav__toggle {
    display: none;
  }
}

/* ----------------------------
   SECCIÓN SOBRE OSEMM
---------------------------- */
.sobre-osemm {
  position: relative;
  padding: 4rem 0;
  background-color: #ffffff;
}

.sobre-osemm__icono {
  width: 40px;
  height: auto;
  padding: 0px;
}

.sobre-osemm__titulo {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  flex-direction: column;
}

.sobre-osemm__titulo h2 {
  font-size: 3rem;
  color: var(--color-primario);
  margin: 0;
  text-align: center;
}

.sobre-osemm__texto p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #333;
  margin: 0;
  text-align: center;
}

.sobre-osemm__boxes {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 3rem;
}

.sobre-osemm__box {
  background-color: var(--color-primario);
  color: white;
  border-radius: 8px;
  padding: 2rem;
  flex: 1;
  text-align: center;
}

.sobre-osemm__box h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.sobre-osemm__box p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0;
}

@media (min-width: 768px) {
  .sobre-osemm__boxes {
    flex-direction: row;
  }
}

/* ----------------------------
   SECCIÓN AFILIADOS
---------------------------- */
.afiliados {
  position: relative;
  padding: 4rem 0;
  background-color: #edf3f8;
}

.afiliados__icono {
  width: 40px;
  height: auto;
  padding: 0px;
}

.afiliados__titulo {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  flex-direction: column;
}

.afiliados__titulo h2 {
  font-size: 3rem;
  color: var(--color-primario);
  margin: 0;
  text-align: center;
}

.afiliados__texto p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #333;
  margin: 0;
  text-align: center;
}

.afiliados__boxes {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
  grid-template-columns: 1fr;
}

.afiliados__box {
  background-color: white;
  color: #333;
  border-radius: 8px;
  padding: 2rem;
  flex: 1;
  text-align: center;
}

.afiliados__box h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.afiliados__box p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0;
}

@media (min-width: 768px) {
  .afiliados__boxes {
    grid-template-columns: repeat(2, 1fr); /* Desde 768px: 2 columnas */
  }
}

/* ----------------------------
   SECCIÓN NOVEDADES
---------------------------- */

.novedades {
  position: relative;
  padding: 4rem 0;
  background-color: white;
}

.novedades__icono {
  width: 40px;
  height: auto;
  padding: 0px;
}

.novedades__titulo {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  flex-direction: column;
}

.novedades__titulo h2 {
  font-size: 3rem;
  color: var(--color-primario);
  margin: 0;
  text-align: center;
}

.afiliados__texto p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #333;
  margin: 0;
  text-align: center;
}

/* Grilla general */
.novedades__grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Tarjetas */
.novedad {
  display: flex;
  background-color: var(--color-primario);
  color: white;
  border-radius: 10px;
  overflow: hidden;
  flex-wrap: wrap;
}

.novedad__img img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.novedad__contenido {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  flex: 1;
}

.novedad__fecha {
  display: flex;
  flex-direction: row;
  align-items: center;
  font-weight: 400;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.novedad__fecha span {
  width: 25px;
  margin-right: 1rem;
}

.novedad h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.novedad p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0;
  text-align: center;
}

/* Tarjetas simples */
.novedad.simple {
  flex-direction: column;
  text-align: left;
  padding: 2rem;
  align-items: center;
}

/* Responsive */
@media (min-width: 768px) {
  .novedades__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .novedad.destacada {
    grid-column: span 2;
    flex-direction: row;
  }

  .novedad.destacada .novedad__img {
    width: 50%;
  }

  .novedad.destacada .novedad__contenido {
    width: 50%;
  }
}

@media (max-width: 768px) {
  .novedad.destacada .novedad__img {
    width: 100%;
  }
}

/* Ocultar imágenes en mobile */
@media (max-width: 576px) {
  .d-none-mobile {
    display: none !important;
  }
}

/* ----------------------------
   SECCIÓN CONTACTO
---------------------------- */

.contacto {
  position: relative;
  padding: 4rem 0;
  background-color: #edf3f8;
}

.contacto__icono {
  width: 40px;
  height: auto;
  padding: 0px;
}

.contacto__titulo {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  flex-direction: column;
}

.contacto__titulo h2 {
  font-size: 3rem;
  color: var(--color-primario);
  margin: 0;
  text-align: center;
}

.contacto__texto {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
  margin: 0;
  text-align: center;
  margin-bottom: 30px;
}

.contacto__texto a {
  color: #333;
  text-decoration: underline;
  font-weight: 500;
}

.contacto__contenido {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}

.contacto__formulario,
.contacto__mapa {
  flex: 1;
}

.form__grupo {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.form__grupo label {
  font-weight: 600;
  color: var(--color-primario);
  margin-bottom: 0.5rem;
}

.form__grupo input,
.form__grupo textarea {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
}

.contacto__mapa {
  min-height: 300px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .contacto__contenido {
    flex-direction: row;
  }

  .contacto__formulario,
  .contacto__mapa {
    width: 50%;
  }

  .contacto__formulario {
    padding-right: 2rem;
  }
}

@media (max-width: 767px) {
  .contacto__mapa {
    height: 300px; /* o el valor que prefieras */
  }
}

/* ----------------------------
   SECCIÓN FOOTER
---------------------------- */
.footer {
  background-color: #0d47a1;
  color: white;
  padding: 2rem 0;
}

.footer__contenido {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
}

.footer span {
  color: white;
  font-weight: 700;
  font-size: 2rem;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer__logo img {
  height: 120px;
}

.footer__card {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  margin-top: 1rem;
  width: 25%;
}

.footer__card:nth-child(1) {
  width: 50%;
}

.footer__card a {
  text-decoration: none;
  color: inherit;
  font-size: 0.9rem;
  line-height: 1.8rem;
  text-decoration: underline;
}

.footer__card--box {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 1rem;
}

.box4 {
  margin-top: 31px;
}

@media (max-width: 767px) {
  .box4 {
    margin-top: 0px;
  }
  .footer__contenido {
    flex-direction: column;
  }

  .footer__card:nth-child(1) {
    width: 100%;
  }

  .footer__card {
    width: 100%;
  }

  .footer__cede {
    font-size: 0.95rem;
  }
}

.footer__creditos {
  background-color: #083479;
  color: white;
  padding: 1rem 0;
  margin-top: 0;
}

.footer__creditos a {
  color: white;
  text-decoration: underline;
  font-weight: 500;
}

.footer__accessibility {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ----------------------------
   SECCIÓN MODAL
---------------------------- */

/* Modal base */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.modal[aria-hidden="false"] {
  display: block;
}
.modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 51, 102, 0.6); /* azul oscuro semitransparente */
  backdrop-filter: blur(4px);
  cursor: pointer;
}
.modal__content {
  background: #fff;
  max-width: 600px;
  margin: 6% auto 3rem auto;
  padding: 2.5rem 3rem;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 51, 102, 0.15);
  color: #222;
  outline: none;
  border: 1px solid #e0e0e0;
}
.modal__close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: transparent;
  border: none;
  font-size: 2.2rem;
  cursor: pointer;
  color: #0d47a1; /* azul oscuro */
  transition: color 0.3s ease;
}
.modal__close:hover {
  color: #007bff; /* azul claro al hover */
}
.modal__title {
  margin-top: 0;
  margin-bottom: 1.2rem;
  font-weight: 700;
  font-size: 1.9rem;
  color: #0d47a1; /* azul oscuro */
}
.modal__body p {
  margin-bottom: 1.1rem;
  line-height: 1.6;
  font-size: 1rem;
  color: #444;
}
.modal__body dl dt {
  font-weight: 600;
  margin-top: 1rem;
  color: #083479;
}
.modal__body dl dd {
  margin-left: 1rem;
  margin-bottom: 0.8rem;
  color: #555;
}
.modal__body ul {
  padding-left: 1.4rem;
  margin-bottom: 1.2rem;
}
.modal__body ul li {
  margin-bottom: 0.5rem;
  color: #444;
  font-size: 1rem;
}
.modal__body a.pdf-link {
  color: #007bff;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.modal__body a.pdf-link:hover,
.modal__body a.pdf-link:focus {
  border-color: #007bff;
  outline: none;
}
