:root {
  --header-height: 80px;
}
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
}
main {
  margin-top: var(--header-height);
}
/* ================= INTRO CATÁLOGO ================= */
.catalog-intro {
  background: var(--white);
  padding: 6rem 1.5rem;
  text-align: center;
}
.catalog-intro .subtitle {
  display: block;
  text-transform: uppercase;
  color: var(--yellow);
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}
.catalog-intro h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
}
.catalog-intro .lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}
/* ================= FILTRO DE CATEGORÍAS ================= */
.blog-filter {
  text-align: right;
  margin: 30px 40px 20px auto;
  max-width: 300px;
}
.blog-filter select {
  width: 100%;
  padding: 10px 14px;
  font-size: 1rem;
  font-family: 'Montserrat', sans-serif;
  background: #fff;
  color: #333;
  border: 2px solid #E6A600;
  border-radius: 8px;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
.blog-filter select:hover,
.blog-filter select:focus {
  border-color: #cc8400;
  box-shadow: 0 0 0 4px rgba(230, 166, 0, 0.2);
  outline: none;
}

/* ================= SECCIÓN DEL BLOG ================= */
.blog-section {
  background: var(--secondary);
  padding: 6rem 1.5rem;
}

/* =============== GRID DE TARJETAS =============== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 3rem 2rem;
}

/* =============== TARJETA =============== */
.blog-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
}
.blog-card:hover {
  transform: translateY(-5px);
}

/* =============== IMAGEN DE FONDO =============== */
.card-image {
  background-size: cover;
  background-position: center;
  height: 220px;
  position: relative;
}
.card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.2),
    rgba(0,0,0,0.65)
  );
}

/* =============== CONTENIDO ENCIMA =============== */
.card-content {
  position: absolute;
  bottom: 0;
  padding: 1rem;
  width: 100%;
  box-sizing: border-box;
  z-index: 2;
  backdrop-filter: blur(4px);
  background: rgba(0, 0, 0, 0.3);
  color: white !important;
}
.card-content h3,
.card-content p,
.card-content time,
.card-content .card-category {
  color: white !important;
}
.card-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  font-weight: 600;
}
.card-content p {
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

/* ================= PAGINACIÓN ================= */
.pagination {
  text-align: center;
  margin: 2rem 0;
}
.pagination a {
  display: inline-block;
  margin: 0 0.25rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--text-muted);
  border-radius: 0.25rem;
  color: var(--text-dark);
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
}
.pagination a:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--black);
}
.pagination a.active {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--black);
}
.pagination .prev,
.pagination .next {
  font-weight: 700;
}
.blog-filter-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin: 30px 40px 20px auto;
  max-width: 300px;
}

.admin-add-wrapper {
  margin-top: 10px;
}

.admin-add-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--yellow);
  color: var(--black);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
  font-family: 'Montserrat', sans-serif;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.admin-add-button:hover {
  background-color: var(--red);
  color: white;
  transform: translateY(-2px);
}
/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  }
}