:root {
  --bs-body-font-family: 'Poppins', sans-serif;
}

@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  /* background: #6a0b25; */
  background-color: #000000;
  overflow-x: hidden;
  font-family: 'Poppins', sans-serif;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
}

.bg-primary-custom {
  background-color: #6a0b25;
}

.text-primary-custom {
  color: #6a0b25;
}

.text-primary-blue {
  color: #18506f;
}

.main-container {
  height: 100vh;
  overflow: hidden;
  background-color: #fff;
}

.background-mask {
  mask-image: url('../img/logo.png');
  mask-position: 48.2% center;
  mask-repeat: no-repeat;
  mask-size: 500px;
}

.revealed {
  animation: logo-reveal 4s forwards ease-in;
}

@keyframes logo-reveal {
  0% {
    mask-size: 50px;
  }

  100% {
    mask-size: 4000vh;
  }
}

/* navbar custom css */
.navbar {
  z-index: 1000;
  max-width: 100vw;
}

.custom-navbar {
  background-color: transparent;
  transition: background-color 0.3s ease;
}

.bg-navbar-custom.scrolled {
  background-color: rgba(120, 49, 70, 0.8) !important;
}

.bg-navbar-custom-a1.scrolled {
  background-color: rgba(24, 80, 111, 0.8);
}

.bg-navbar-custom-a2.scrolled {
  background-color: rgba(93, 15, 54, 0.8);
}

.bg-navbar-custom-a3.scrolled {
  background-color: rgba(188, 153, 97, 0.8);
}

.bg-navbar-custom-a4.scrolled {
  background-color: rgba(39, 69, 67, 0.8);
}

/* hero */

.hero {
  width: 100%vw;
  background-image: url('../img/homebg.jpg');
  background-position: center bottom;
  background-size: cover;
  object-fit: contain;
  background-repeat: no-repeat;
  height: 100vh;
  position: relative;
  scale: inherit;
}

.hero-acuerdo1 {
  background-image: url('../img/ACUERDO-1.jpg');
}

.hero-acuerdo2 {
  background-image: url('../img/ACUERDO-2.jpg');
}

.hero-acuerdo3 {
  background-image: url('../img/ACUERDO-3.jpg');
}

.hero-acuerdo4 {
  background-image: url('../img/Acuerdo-4.jpg');
}

@media (max-width: 480px) {
  .hero {
    height: 30vh;
  }

  .hero-acuerdo1,
  .hero-acuerdo2,
  .hero-acuerdo3,
  .hero-acuerdo4 {
    height: 100vh;
  }

  .hero-acuerdo1 {
    background-image: url('../img/ACUERDO-1_with_bgc.png');
  }

  .hero-acuerdo2 {
    background-image: url('../img/ACUERDO-2_with_bgc.png');
  }

  .hero-acuerdo3 {
    background-image: url('../img/ACUERDO-3_with_bgc.png');
  }

  .hero-acuerdo4 {
    background-image: url('../img/Acuerdo-4_with_bgc.png');
  }
}

@media (min-width: 768px) {
  .hero {
    height: 60vh;
    background-position: -130px center;
  }
}

@media (min-width: 1024px) {
  .hero {
    height: 100vh;
    background-position: center;
  }
}

/* acuerdos */

.cards-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
}

/* Estilos de las cards */
.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  font-size: 20px;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.7s ease-out;
}

/* Cuando aparece */
.card.show {
  opacity: 1;
  transform: translateY(0px);
}

.card-image {
  border-radius: 50%;
  border: 3px solid #6a0b25;
}

.btn-card {
  background-color: #6a0b25;
  border-radius: 5px;
  text-decoration: none;
  color: #ffffff;
  padding: 5px 10px;
  transition: all 0.3s ease;
}

.btn-card:hover {
  background-color: rgba(120, 49, 70, 0.8);
}

.section-separator {
  height: 3px;
  background-color: #a98652;
  width: 100%;
  margin: 20px auto;
}

/* carousel */
.fade-carousel {
  position: relative;
  width: 100vw;
  min-height: 60vh; /* antes height */
  height: auto;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
}

/* Cada slide */
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  opacity: 0;
  transition: opacity 1.5s ease-in-out; /* fade suave */
}

/* Slide activo */
.slide.active {
  position: relative;
  opacity: 1;
}

/* Imagen */
.slide img {
  width: 60%; /* imagen a la izquierda */
  height: 100%;
  object-fit: cover;
}

/* Bloque de texto */
.info {
  width: 40%;
  background: #6a0b25; /* fondo guinda */
  color: white;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.info h2 {
  margin: 0 0 10px;
  font-size: 2rem;
}

.info p,
.info li {
  font-size: 1.1rem;
  line-height: 1.55;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .fade-carousel {
    height: auto;
    overflow: hidden;
  }

  .slide {
    position: absolute; /* MISMO comportamiento que desktop */
    inset: 0;
    flex-direction: column;
    opacity: 0;
    transition: opacity 1s ease-in-out;
  }

  .slide.active {
    position: relative; /* SOLO el activo entra al flujo */
    opacity: 1;
  }

  .slide img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    flex-shrink: 0;
  }

  .info {
    width: 100%;
    height: auto;
    padding: 20px;
  }

  .info h2 {
    font-size: 1.4rem;
  }

  .info p,
  .info li {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .info ul {
    padding-left: 18px;
  }
}

/* modal */
.modal-content.custom-scroll {
  max-height: 85vh;
  overflow-y: auto;
}
.custom-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: justify;
  padding: 20px;
}

#modalInterventionTitle {
  text-align: center;
}

/* ACUERDOS TRANSVERSALES */

.politicas-section {
  max-width: 800px;
  margin: 40px auto;
  font-family: 'Inter', sans-serif;
}

.policy-item {
  background: #f7f7f7;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.policy-header {
  background: #6a0b25;
  color: #fff;
  border: none;
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.policy-header:hover {
  background: rgba(120, 49, 70, 0.8);
}

.policy-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition:
    max-height 0.35s ease,
    padding 0.35s ease;
}

.policy-content p {
  margin: 15px 0;
}

.policy-item.active .policy-content {
  max-height: 500px; /* suficiente para expandir */
  padding: 15px 20px 20px;
}

.arrow {
  transform: rotate(180deg);
  transition: transform 0.3s ease;
  color: #fff;
}

.policy-item.active .arrow {
  transform: rotate(360deg);
}

/*  acuerdo 1*/

/* .title {
  text-align: center;
  margin-bottom: 40px;
  font-size: 32px;
}

.timeline {
  position: relative;
  width: 80%;
  margin: auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 25px;
  width: 4px;
  height: 100%;
  background: #bbb;
  top: 0;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 50px;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s ease-out;
  width: 100vw;
}

@media (max-width: 600px) {
  .timeline-item {
    width: 80%;
  }
}

.timeline-item.show {
  opacity: 1;
  transform: translateY(0);
}

.timeline-dot {
  width: 20px;
  height: 20px;
  background: #bbb;
  border-radius: 50%;
  margin-right: 30px;
  transition: 0.4s ease;
}

.timeline-item.show .timeline-dot {
  background: #18506f;
  box-shadow: 0 0 10px rgba(24, 80, 111, 0.8);
}

.timeline-content {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  width: 80%;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.timeline-title {
  display: flex;
  justify-content: space-between;
}

.toggle-btn {
  margin-top: 10px;
  padding: 8px 14px;
  background: #18506f;
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

.extra {
  margin-top: 15px;
  display: none;
}

.extra.show {
  display: block;
} */

.timeline {
  position: relative;
  max-width: 1200px;
  margin: auto;
  padding-left: 40px;
  padding-right: 20px;
}

/* Línea vertical */
.timeline::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #bbb;
}

/* =======================
   ITEM
======================= */
.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 50px;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease-out;
  width: 100%;
}

.timeline-item.show {
  opacity: 1;
  transform: translateY(0);
}

/* Punto */
.timeline-dot {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background: #bbb;
  border-radius: 50%;
  margin-top: 10px;
  transition: 0.4s ease;
}

.timeline-item.show .timeline-dot {
  background: #18506f;
  box-shadow: 0 0 10px rgba(24, 80, 111, 0.8);
}

/* =======================
   CONTENIDO
======================= */
.timeline-content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  width: 100%;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* Título + ícono */
.timeline-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.timeline-title h2 {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  margin: 0;
}

.timeline-title svg {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}

/* Botón */
.toggle-btn {
  margin-top: 12px;
  padding: 8px 16px;
  background: #18506f;
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

/* Extra */
.extra {
  margin-top: 15px;
  display: none;
}

.extra.show {
  display: block;
}

/* =======================
   MOBILE
======================= */
@media (max-width: 768px) {
  .timeline {
    padding-left: 32px;
    padding-right: 12px;
  }

  .timeline::before {
    left: 14px;
  }

  .timeline-dot {
    width: 14px;
    height: 14px;
  }

  .timeline-title {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline-title svg {
    align-self: flex-end;
  }
}

/* Acuerdo 2 */

.category-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.cat-btn {
  background: #6a0b25;
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.cat-btn.active,
.cat-btn:hover {
  background: #803a4d;
  transform: scale(1.05);
}

.strategy-matrix {
  max-width: 900px;
  margin: auto;
}

.strategy-item {
  background: #f7f7f7;
  padding: 15px;
  margin: 12px 0;
  border-left: 6px solid #6a0b25;
  border-radius: 6px;
  opacity: 0;
  transform: translateY(15px);
  transition: 0.4s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.strategy-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.strategy-item .check {
  color: #6a0b25;
  font-size: 22px;
  font-weight: bold;
}

/* =======================
   MOBILE SCROLL
======================= */
@media (max-width: 768px) {
  .category-buttons {
    flex-wrap: nowrap;
    justify-content: flex-start;

    overflow-x: auto;
    overflow-y: hidden;

    padding: 10px 16px;
    margin-left: calc(-1 * env(safe-area-inset-left));
    margin-right: calc(-1 * env(safe-area-inset-right));

    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .category-buttons::-webkit-scrollbar {
    display: none;
  }

  .cat-btn {
    flex: 0 0 auto;
    white-space: nowrap;

    scroll-snap-align: start;
  }
}

@media (max-width: 768px) {
  .category-buttons::after {
    content: '';
    position: sticky;
    right: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(to left, white, transparent);
    pointer-events: none;
  }
}

/* Acuerdo 3 */

.acuerdos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 20px;
}

@media (max-width: 480px) {
  .acuerdos-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

.acuerdo-card {
  background: white;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(188, 153, 97, 0.8);
  cursor: pointer;
  transition: all 0.2s;
}

.acuerdo-card:hover {
  transform: translateY(-15px);
  background-color: #bc9961;
  color: white;

  & h3 {
    color: white;
  }

  & svg {
    stroke: #fff;
  }
}

.acuerdo-header {
  display: flex;
  gap: 1rem;
}

.acuerdo-header h3 {
  color: #bc9961;
}

/* Fondo del modal */
.custom-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);

  display: none;
  justify-content: center;
  align-items: center;

  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);

  z-index: 9999;
}

/* Contenido del modal */
.custom-modal-content {
  background: #fff;
  width: 800px;
  max-width: 100%;

  max-height: calc(100svh - 2rem);
  overflow-y: auto;

  border-radius: 14px;
  padding: 2.5rem 2rem 2rem;
  position: relative;

  animation: fadeIn 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);

  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Ajustes móviles */
@media (max-width: 768px) {
  .custom-modal {
    align-items: flex-end;
  }

  .custom-modal-content {
    width: 100%;
    max-height: calc(100svh - env(safe-area-inset-top));
    border-radius: 16px 16px 0 0;
    padding-top: 3rem;
  }
}

/* Título */
.custom-modal-title {
  color: #bc9961;
  margin-bottom: 1rem;
}

/* Botón cerrar */
.custom-close {
  position: sticky;
  top: 0;
  margin-left: auto;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 28px;
  font-weight: bold;
  color: #444;

  background: #fff;
  border-radius: 50%;
  width: 40px;
  height: 40px;

  cursor: pointer;
  z-index: 10;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Acuerdo 4 */

.acuerdos-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  padding: 20px;
  margin-bottom: 50px;
}

@media (max-width: 480px) {
  .acuerdos-layout {
    display: flex;
    flex-direction: column;
  }
}

@media (min-width: 1240px) {
  .acuerdos-layout {
    height: 80vh;
  }
}

/* SIDEBAR */
.sidebar {
  background: #f7f9fb;
  border-radius: 12px;
  padding: 15px;
  height: fit-content;
  border: 1px solid #e5e9f0;
}

@media (min-width: 1240px) {
  .sidebar {
    height: 80vh;
    overflow-y: scroll;
    scrollbar-width: thin;
  }
}

@media (max-width: 480px) {
  .sidebar-ul {
    display: flex;
    flex-direction: row;
    /* max-width: 90%; */
    overflow-x: scroll;
    height: 250px;
  }
}

.sidebar ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.sidebar .item {
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 2px;
  transition: background 0.2s;
}

.sidebar .item:hover {
  background: #e0eee7;
}

.sidebar .item.active {
  background: #e0eee7;
  border-left: 4px solid #274543;
}

.sidebar .item .title {
  display: block;
  font-weight: 600;
  color: #274543;
}

.sidebar .item .date {
  font-size: 12px;
  color: #6c7a92;
}

/* CONTENIDO */
.acuerdo-content {
  background: white;
  border-radius: 12px;
  padding: 25px;
  border: 1px solid #e3e6ec;
}

.acuerdo-content h2 {
  font-size: 24px;
  margin-bottom: 5px;
}

.acuerdo-content h4 {
  margin-top: 25px;
  margin-bottom: 8px;
  color: #34445c;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.volver {
  border: none;
  background: #f1f3f6;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
}

/* Columnas */
.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

@media (max-width: 480px) {
  .columns {
    display: flex;
    flex-direction: column;
  }
}

.big-image {
  width: 100%;
  border-radius: 12px;
  margin-top: 20px;
}

/* gallery */

.gallery {
  margin: 60px auto;
  max-width: 1200px;
}

.gallery-viewer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.image-container {
  position: relative;
  width: 100%;
  height: 800px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background-color: #e9e9e9;
}

.image-container img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;

  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  inset: 0;
}

.image-container img.active {
  opacity: 1;
  z-index: 2;
}

.image-container img.fade-out {
  opacity: 0;
  z-index: 1;
}

.next-button,
.prev-button {
  font-size: 30px;
  background: none;
  border: none;
  cursor: pointer;
  height: 55px;
  width: 60px;
  background-color: #6a0b25;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;

  transition: all 0.3s ease;

  &:hover {
    background-color: #bc9961;
  }
}

@media (max-width: 768px) {
  .gallery {
    max-width: 100%;
    padding: 0 10px;
  }

  .image-container {
    height: 65vh;
    width: 100%;
  }

  .image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .gallery-viewer {
    position: relative;
    gap: 0;
  }

  .prev-button,
  .next-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    width: 44px;
    height: 44px;
    font-size: 26px;

    background: rgba(0, 0, 0, 0.45);
    color: white;
    border-radius: 50%;
    z-index: 5;
  }

  .prev-button {
    left: 10px;
  }

  .next-button {
    right: 10px;
  }
}

.acuerdo-informe {
  position: relative;
  width: 100vw;
  left: 50%;
  margin-left: -50vw;
  text-align: center; /* centra la imagen */
}

.acuerdo-informe img {
  max-width: 100%;
  width: auto;
  height: auto;
  display: inline-block;
}

.resultados-title {
  text-align: center;
}

/* Footer */
.footer-institucional {
  background-color: #6a0b25;
  color: #ffffff;
  font-size: 0.95rem;
}

/* Contenido principal */
.footer-content {
  display: flex;
  gap: 2rem;
  padding: 2.5rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Columna izquierda */
.footer-info {
  flex: 1;
}

.footer-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-info address {
  font-style: normal;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.footer-contacto a {
  color: #ffffff;
  text-decoration: none;
}

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

/* Columna derecha */
.footer-mapa {
  flex: 1;
  min-height: 220px;
}

.footer-mapa iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Franja inferior */
.footer-bottom {
  background-color: #bc955c;
  color: #ffffff;
  text-align: center;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
}

.footer-bottom a {
  color: #ffffff;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
  }

  .footer-mapa {
    height: 200px;
  }
}
