@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/* ==========================================
   1. ESTILOS GLOBALES Y RESET
   ========================================== */
header,
footer,
.barra_gov,
.main-menu-main,
#block-govco-breadcrumbs {
  display: none;
}

body {
  background-color: #221b30 !important;
  box-sizing: border-box;
  margin: 0;
  padding: 20px;
  height: auto !important;
  border: 2px solid;
  border-image: repeating-linear-gradient(
    to bottom,
    #d4af37,
    #b8860b 50px,
    #ffcc00 100px,
    #d4af37 150px
  ) 5;
}

.h-100 {
  height: auto !important;
}

h1, h2, h3, h4 {
  color: #FFFFFF;
}

h1 {
  display: none;
}

h2 {
  font-family: "Montserrat", system-ui;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  position: relative;
}

h2::before,
h2::after {
  content: '';
  flex: 1;
  border-bottom: 2px solid #ffc107;
  margin: 0 15px;
}

h2::before {
  margin-right: 15px;
}

h2::after {
  margin-left: 15px;
}


/* ==========================================
   2. ANIMACIONES
   ========================================== */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

@keyframes pendulum {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(5deg); }
}

@keyframes slidein {
  0% { left: 100%; }
  100% { left: -100%; }
}


/* ==========================================
   3. COMPONENTES: ICONO MEGAFONO
   ========================================== */
.icono-megafono {
  max-width: 180px;
  position: absolute;
  top: -33px;
  animation: float 1.1s ease-in-out infinite;
  transform-origin: center bottom;
}

.icono-megafono img {
  width: 100%;
  height: auto;
}


/* ==========================================
   4. COMPONENTES: TARJETAS (CARDS)
   ========================================== */
.card-container {
  perspective: 1000px;
  display: inline-block;
  margin: 20px;
}

.card {
  width: 260px;
  height: 250px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s ease-in-out;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-container:hover .card,
.card-container:focus-within .card {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-front {
  background-color: #3d465f;
  color: white;
  font-family: "Montserrat", system-ui;
  font-optical-sizing: auto;
  font-weight: 900;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.card-back {
  background-color: #3d465f;
  color: white;
  transform: rotateY(180deg);
  overflow-y: auto;
  padding: 10px;
  display: block;
  text-align: left;
}

.card-back p {
  margin: 0;
  line-height: 1.5;
  font-size: 14px;
}


/* ==========================================
   5. SECCIÓN: GANADORES / BLOQUE DE IMÁGENES
   ========================================== */
.image-block-container {
  margin: 0;
  padding: 30px;
  border-radius: 20px;
}

.image-block {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.image-item {
  flex: 1 1 260px;
  max-width: 300px;
  text-align: center;
  padding: 0 20px;
}

.img-circle {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  border: 0px solid #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.img-circle:hover {
  transform: scale(1.1);
}

.image-item h3 {
  margin-top: 5px;
  font-size: 17px;
  font-weight: bold;
  color: #ffffff;
}

.image-item p {
  font-size: 15px;
  color: #fff;
  margin: 5px 0 0;
}


/* ==========================================
   6. MODALES Y VIDEOS
   ========================================== */
.custom-modal-content {
  background: linear-gradient(to bottom, #1a2b4c, #0e162d);
  border-radius: 15px;
  color: white;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.custom-modal-header {
  border-bottom: none;
  padding: 10px;
  text-align: right;
}

.custom-modal-header .btn-close {
  background-color: white;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.custom-modal-header .btn-close:hover {
  opacity: 1;
}

.modal-top-content {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.modal-text h2 {
  font-size: 28px;
  font-weight: bold;
  margin: 0;
  color: #00b3ff;
}

.modal-text h2::before {
  margin: 0;
}

.modal-text h4 {
  font-size: 18px;
  margin: 5px 0;
  color: #00e0e0;
}

.modal-text p {
  font-size: 14px;
  line-height: 1.6;
  color: #c4c4c4;
}

.modal-video {
  display: block;
  max-width: 100%;
  height: auto;
}

.modal-video iframe,
.modal-video video {
  width: 100%;
  height: auto;
}

.modal-video iframe {
  height: 315px;
  border-radius: 10px;
  border: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

body.modal-open::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.05) 10px,
    rgba(255, 255, 255, 0.1) 10px,
    rgba(255, 255, 255, 0.1) 20px
  );
  z-index: -1;
}

.livestream-img {
  width: 100%;
  max-width: 300px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.embed-responsive {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
}

.embed-responsive-16by9 {
  padding-top: 56.25%;
}

.embed-responsive-item {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
  border: none;
}


/* ==========================================
   7. GALERÍAS (MASONRY)
   ========================================== */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-gap: 20px;
  padding: 10px;
}

.masonry-item {
  break-inside: avoid;
  margin: 10px;
  max-width: 280px;
  width: 100%;
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 5px;
}


/* ==========================================
   8. MEDIA QUERIES (RESPONSIVE)
   ========================================== */
@media (max-width: 768px) {
  body {
    padding: 5px;
    border-width: 1px;
  }

  h2 {
    font-size: 18px;
  }

  h2::before,
  h2::after {
    margin: 0 10px;
  }

  .icono-megafono {
    max-width: 100px;
  }

  .image-block-container {
    padding: 15px;
  }

  .image-block {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .image-item img {
    max-width: 50%;
  }

  .img-circle {
    width: 150px;
    height: 150px;
  }

  .modal-text h2 {
    font-size: 22px;
  }

  .modal-text h4 {
    font-size: 16px;
  }

  .masonry-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    grid-gap: 15px;
  }

  .masonry-item {
    max-width: 90%;
  }

  .livestream-img {
    max-width: 200px;
  }

  .p-5 {
    padding: 15px !important;
  }

  .card {
    width: 71vw;
  }
}

@media (max-width: 576px) {
  .modal-dialog {
    max-width: 100%;
    margin: 0;
  }

  .modal-body-content {
    padding: 10px;
  }

  .modal-text h2,
  .modal-text h4,
  .modal-text p {
    font-size: 16px;
    text-align: justify;
  }

  .modal-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
  }
}