/* GENENRAL */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Bebas Neue", sans-serif;
  background-color: #680303;
  color: #2b2b2b;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
 /* CABECERA */
 .header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #333;
  color: #FF0000;
  height: 100px;
  padding: 0 20px;
  box-sizing: border-box;
  gap: 10px;
  top: 0;
  z-index: 999;
}
.logo {
  height: 80px;
  width: auto;
  cursor: pointer;
 }
body h1 {
  text-align: center;
  font-size: 45px;
}
.menu {
  position: relative;
  display: flex;
  align-items: center;
}
.side {
  font-size: 60px;
  cursor: pointer;
  color: #ffffff;
  padding: 5px 20px;
}
.menu-items {
  display: none;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  right: 0;
  top: 100%;
  background-color: #000;
  width: 220px;
  border-radius: 15px;
  box-shadow: 0px 4px 8px rgb(124, 231, 195);
  overflow: hidden;
  z-index: 1000;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
.menu-items.show {
  transform: scaleY(1); 
  display: block;
  opacity: 1;
  visibility: visible;
}
.menu-items a {
  font-family: "Oswald", sans-serif;
  display: flex;
  font-size: 20px;
  align-items: center;
  padding: 12px;
  color: white;
  text-decoration: none;
  border-bottom: 1px solid #444;
  gap: 10px;
}
.menu-items a:hover {
  background-color: #410000;
}
.menu-items a:last-child {
  border-bottom: none;
}
.menu-icon {
  width: 30px;
  height: 30px;
  margin-left: 10px;
  margin-right: 15px;
}
/* ===== Estilos para filtros ===== */
.filtros {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    align-items: center;
    justify-content: center; 
    flex-wrap: wrap;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.filtros select {
    padding: 0.5rem 1rem;
    border: 1.8px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    font-size: 1rem;
    color: #333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.filtros select:hover,
.filtros select:focus {
    border-color: #007BFF;
    box-shadow: 0 0 6px rgba(0,123,255,0.5);
    outline: none;
}

.btn-filtro {
    padding: 0.55rem 1.5rem;
    background: linear-gradient(135deg, #007BFF, #0056b3);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-filtro:hover,
.btn-filtro:focus {
    background: linear-gradient(135deg, #0056b3, #003d7a);
    outline: none;
}
/* Principal */
.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem; /* Añade margen lateral para móviles */
    box-sizing: border-box;
}

/* Estilo individual de tarjeta */
.card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    width: calc(25% - 2rem); /* 4 tarjetas por fila con espacio entre ellas */
    min-width: 260px;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
}

/* Imágenes y videos dentro de tarjetas */
.card img,
.card video {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 200px;
}

/* Cuerpo de la tarjeta */
.card-body {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

.card-text {
    flex-grow: 1;
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 1rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

/* Leer más botón */
.btn-leer-mas {
    padding: 0.3rem 0.8rem;
    background-color: #007BFF;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-leer-mas:hover {
    background-color: #0056b3;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  overflow-y: auto;
  padding: 2rem;
}

.modal-content {
  background: white;
  margin: auto;
  padding: 2rem;
  max-width: 700px;
  border-radius: 8px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #888;
}
.modal-close:hover {
  color: #000;
}

.modal-media {
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
  border-radius: 4px;
}
/* ===== Estilos para paginación ===== */
.paginacion {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.paginacion a {
    padding: 0.5rem 0.9rem;
    border: 1.8px solid #007BFF;
    border-radius: 6px;
    text-decoration: none;
    color: #007BFF;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
    user-select: none;
}

.paginacion a:hover {
    background-color: #007BFF;
    color: #fff;
}

.paginacion a.active {
    background-color: #0056b3;
    border-color: #003d7a;
    color: #fff;
    cursor: default;
    pointer-events: none;
}

/* ===== Separación visual del pie de página ===== */
.paginacion {
    border-top: 1.5px solid #ddd;
    padding-top: 1rem;
    margin-bottom: 3rem; /* para separar del footer o pie de página */
}
.btn-leer-mas {
    background: #007BFF;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
    margin-top: 1rem;
    align-self: flex-end;
}

.btn-leer-mas:hover {
    background: #0056b3;
}
/* Fondo oscuro semi-transparente */
.modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.7); /* fondo oscurecido */
    backdrop-filter: blur(4px);
    padding: 2rem 1rem;
    box-sizing: border-box;
}

/* Contenido del modal */
.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 100%;
    max-width: 700px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: fadeIn 0.3s ease-out;
    box-sizing: border-box;
}

/* Animación suave al aparecer */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Botón de cerrar */
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #d9534f;
}

/* Título del modal */
.modal-content h2 {
    margin-top: 0;
    font-size: 1.6rem;
    color: #222;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.modal-media {
    width: 100%;
    height: auto; /* mantiene proporción natural */
    max-height: 400px; /* opcional, para limitar altura */
    object-fit: contain; /* asegura que no se recorte ni distorsione */
    margin-bottom: 1rem;
    border-radius: 6px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.modal-content p {
  font-family: "Oswald";  
  font-size: 1rem;
    color: #444;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Fecha en el modal */
.modal-content small {
    display: block;
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.5rem;
}

/* MODAL ADMINISTRADOR */
.admin-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  align-items: center;
  justify-content: center;
}

.admin-content {
  background: #fff;
  padding: 30px 25px;
  border-radius: 12px;
  width: 400px;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.modal-buttons {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
}

.modal-buttons button {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

#btnAceptar {
  background-color: #007bff;
  color: #fff;
}

#btnCancelar {
  background-color: #ccc;
}

/* PIE DE PAGINA */
footer {
  background-color: #1a1a1a;
  color: #ffffff;
  width: 100%;
  padding: 20px 0;
  text-align: center;
  margin-top: auto;
}
footer .row.primary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between; 
  align-items: flex-start;
  width: 100%;
  max-width: 1700px;
  margin: 0 auto;
}
footer h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #FF0000;
  text-transform: uppercase;
}
footer .column {
  flex: 1;
  min-width: 200px; 
  text-align: center;
  box-sizing: border-box;
}
footer .column.about {
  flex: 1.5; 
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 50%;
}
footer .column.contact,
footer .column.subscribe,
footer .column.links {
  flex: 1;
  min-width: 200px;
}
footer .logo-text {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
}
footer .logo-text img.logo {
  width: 80px; 
  height: auto;
  flex-shrink: 0; 
}
footer .contact p {
  margin: 5px 0;
  font-size: 1rem;
}
footer .contact a {
  color: #f7c606;
  text-decoration: none;
}
footer .contact i {
  font-size: 1.5rem;
  margin-right: 5px;
  vertical-align: middle;
}
footer .social img {
  width: 40px;
  margin-right: 10px;
  cursor: pointer;
}
footer .social img:hover {
  opacity: 0.8;
}
footer .subscribe input {
  width: 80%;
  padding: 10px;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
}
footer .subscribe button {
  font-size: 1.1rem;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  background-color: #f7c606;
  color: #000000;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
footer .subscribe button:hover {
  background-color: #d4a505;
}
footer .column.links {
  text-align: center;
}
footer .column.links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
footer .column.links ul li {
  margin-bottom: 10px;
}
footer .column.links ul li a {
  color: #f7c606;
  text-decoration: none;
  font-size: 1rem;
}
footer .column.links ul li a:hover {
  text-decoration: underline;
}
footer .row.copyright {
  width: 100%;
  background-color: #25262e;
  padding: 15px 0;
  text-align: center;
}
footer .copyright p {
  font-size: 1rem;
  color: #e5d335;
}

/* RESPONSIVIDAD */
@media screen and (max-width: 768px) {
  .header {
    flex-direction: column;
    height: auto;
    padding: 10px;
    text-align: center;
  }
  .menu-items {
    position: static; 
    width: 100%;
    border-radius: 0;
    max-height: none; 
    overflow-y: auto; 
  }
  .filtros-elegantes {
    flex-direction: column;
    align-items: stretch;
  }

  .filtros-elegantes select,
  .filtros-elegantes .btn-filtro {
    width: 100%;
  }
  .card {
        width: calc(50% - 2rem);
    }
  .modal-content {
        padding: 1.5rem;
    }

    .modal-content h2 {
        font-size: 1.3rem;
    }
  footer .row.primary {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  footer .column.about,
  footer .column.contact,
  footer .column.social,
  footer .column.subscribe,
  footer .column.links {
    max-width: 100%;
    margin-bottom: 20px;
  }
  footer .logo-text {
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }
  footer .logo-text img.logo {
    margin-bottom: 10px;
  }
}
@media screen and (max-width: 992px) {
  .card {
        width: calc(33.333% - 2rem);
    }
}

@media screen and (max-width: 600px) {
   .card {
        width: 100%;
        max-width: 100%;
    }

    .card-container {
        padding: 1rem 1rem; /* margen lateral para móviles */
    }
  .filtros-elegantes {
    flex-direction: column;
    align-items: stretch;
  }

  .filtros-elegantes select,
  .filtros-elegantes .btn-filtro {
    width: 100%;
  }
}