/* ---------- Estilos esenciales y limpieza (modal, close, swiper) ---------- */
body{
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  background: #3d3d3d;
  color: #fff;
  line-height: 1.6;
  text-align: left;
}

/* ---------- Contenedor y tarjetas ---------- */
.container {
  max-width: 1200px;
  margin: 30px auto;
  padding: 10px;
  display: grid;
  grid-template-areas:
    "big card2 card3"
    "big card4 card5";
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
}

.card {
  background: #3d3d3d;
  border-radius: 15px;
  overflow: hidden;
}

.big { 
  grid-area: big; 
}

.card img {
  width: 100%;
  border-radius: 15px;
  display: block;
}
.card-content {
  padding: 2px;
}

.card-content 
* {
  margin-bottom: 4px;
}

/* ---------- Tipografía ---------- */
.date {
   font-size: 12px; 
   color: #ddd; 
   margin-bottom: 1px; }
.category { 
  font-size: 20px; 
  font-weight: 400; 
  color: #ffffff; 
  margin-bottom: 4px; }
.title {
   font-size: 28px; 
   font-weight: bold; 
   margin-bottom: 10px; 
   line-height: 1.4;  
    }
.place {
  font-size: 20px; 
  color: #ddd; 
  margin-bottom: 6px;
 }
.author { 
  font-size: 18px; 
  color: #ddd; 
  margin-bottom: 1px; }
.origin { 
  font-size: 20px; 
  color: rgb(62, 190, 45); 
  margin-bottom:6px 0 12px 0; }
.excerpt { 
  font-size: 20px; 
  color: #dfdfdfff; 
  margin-bottom: 10px; 
  line-height: 1.2; 
  text-align: justify; 
  hyphens: auto; 
  letter-spacing: 0;
}
  
/* Pie de foto debajo de la imagen */
.pie-foto {
  font-size: 12px;
  color: #ccc;
  text-align: left;
  margin: 6px 0 12px 0;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  background: #fff;
  color: #000;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 18px;
  cursor: pointer;
  border: none;
}
.btn:hover { 
  background: #FFD700; 
  color: #000; }
.btn span { 
  margin-left: 6px; 
  font-size: 13px; }

/* ---------- Modal ---------- */
.modal {
  display: none;  
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; 
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.7);
  -webkit-overflow-scrolling: touch;
}

.modal-content {
  background-color: #2c2c2c;
  margin: 0% auto;
  padding: 60px;
  border-radius: 10px;
  max-width: 900px;
  color: #fff;
  font-size: 19px; 
  position: relative;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
  animation: fadeIn .3s ease;
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.2;
  hyphens: auto;
}

.modal-content h2 { 
  color: #fff; 
  margin: 8px 0px; 
  font-size: 28px;
   line-height: 1.1; }
.modal-content img { 
  width: 100%; 
  border-radius: 10px; 
  margin-bottom: 10px; }

/* La X */
.close {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 20;
  font-size: 26px;
  font-weight: bold;
  cursor: pointer;
  background: rgba(0,0,0,0.35);
  color: #ddd;
  padding: 6px 10px;
  border-radius: 500%;
  line-height: 1;
}
.close:hover { 
  background: rgba(255,255,255,0.06); color: #fff; }

/* Animación */
@keyframes fadeIn { from { opacity:0; transform:scale(.98); } to { opacity:1; transform:scale(1); } }

/* ---------- Swiper ---------- */
.swiper-container-wrapper { width: 100%; margin: 0 auto 20px auto; position: relative; }
.swiper { width: 100%; max-height: 400px; }
.swiper-slide { display: flex; flex-direction: column; align-items: center; }
.swiper-slide img { max-width: 100%; max-height: 400px; border-radius: 8px; }
.swiper-button-prev, .swiper-button-next {
  color: #fff; width: 50px; height: 50px;
  background-color: rgba(0,0,0,0.5);
  border-radius: 50%; top: 50%; transform: translateY(-50%);
}
.swiper-pagination { bottom: 8px !important; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
    grid-template-areas:
      "big"
      "card2"
      "card3"
      "card4"
      "card5";
  }
}

/* ---------- Buscador ---------- */
.buscador { display: flex; justify-content: center; align-items: center; gap: 15px; margin-top: 30px; }
.buscador form { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.buscador input[type="text"] { padding: 10px; width: 240px; font-size: 15px; border-radius: 6px; border: 1px solid #ccc; background: #fff; color: #222; }
.btn-search { background: #3786bb; color: #fff; padding: 9px 14px; border-radius: 6px; }
.btn-reset { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.15); padding: 8px 12px; border-radius: 6px; }





@media (max-width: 768px) {
  .buscador {
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
  }

  .buscador form {
    flex-direction: column;
    gap: 10px;
  }

  .buscador input[type="text"] {
    width: 90%; /* se ajusta al ancho del contenedor */
  }

  .btn-search, .btn-reset {
    width: 90%; /* botones más grandes en móvil*/ 
    text-align: center;
  }
}

@media (max-width: 480px) {
  .buscador input[type="text"] {
    width: 100%;
    font-size: 14px;
  }

  .btn-search, .btn-reset {
    width: 100%;
    font-size: 14px;
    padding: 10px;
  }
}


