body {
  background-color: #ffffff;
  color: #fff;
  font-family: 'Poppins', sans-serif;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 20px;
}
.blog-card {
  background: #fff;
  color: #333;
  border-radius: 15px;
  overflow: hidden;
  width: 320px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
}
.blog-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}
.blog-card h3 {
  color: #2a004f;
  margin: 15px;
}
.blog-card p {
  margin: 0 15px 15px;
  font-size: 0.95em;
}
.blog-btn {
  display: inline-block;
  margin: 0 0 20px 15px;
  padding: 8px 18px;
  background: #6a0dad;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s ease;
}
.blog-btn:hover {
  background: #8b27e6;
}

.blog-card.visible {
  opacity: 1;
  transform: translateY(0);
}
/* === HERO SECTION === */
.blog-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  background: 
    linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url('../img/fondo.jpg') center/cover no-repeat;
  display: flex;
  justify-content: center;   /* Centra verticalmente */
  align-items: center;       /* Centra horizontalmente */
  text-align: center;
  color: #fff;
  overflow: hidden;
  padding: 0 20px;
}

.blog-hero .hero-content {
  display: flex;
  flex-direction: column;    /* Coloca el h1 y p en columna */
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;              /* 💡 Asegura que ocupe todo el alto */
  z-index: 2;
  padding: 20px;
}

.blog-hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.blog-hero p {
  font-size: 1.2rem;
  font-weight: 300;
}

/* === BLOG GRID SECTION === */
.blog-grid-section {
  position: relative;
  margin-top: -200px; /* 🔥 Subimos las tarjetas sobre el hero */
  background: transparent; /* Sin fondo */
  z-index: 5;
}

/* === 1er post === */
.post-hero {
  position: relative;
  height: 90vh;
  background: 
    linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url('../img/fondo.jpg') center/cover no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
}

.post-hero h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}

.post-hero p {
  font-size: 1.3rem;
  font-weight: 300;
}

/* === CONTENIDO === */
.post-content {
  max-width: 850px;
  margin: 60px auto;
  padding: 0 20px;
  color: #333;
  line-height: 1.7;
  position: relative;
  margin-top: -200px; /* 🔥 Subimos las tarjetas sobre el hero */
  background: transparent; /* Sin fondo */
  z-index: 5;
  background-color: #fff;
}
.post-content h2 {
  color: #6a0dad;
  margin-top: 40px;
}

.post-content ul {
  margin-left: 20px;
  list-style: disc;
}

.post-tip {
  background: #f8f0ff;
  border-left: 5px solid #6a0dad;
  padding: 15px 20px;
  margin: 30px 0;
  border-radius: 8px;
}

.back-btn {
  display: inline-block;
  margin-top: 40px;
  background: #6a0dad;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
}

.back-btn:hover {
  background: #8b27e6;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}