/* ============================================================
   Next Salud — Estilos específicos de la homepage
   ============================================================ */

/* ── Flash banner (notificaciones de sesión) ────────────── */
.flash-banner {
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.4rem;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  animation: slideDown 0.3s ease, fadeOut 0.4s ease 3.5s forwards;
  white-space: nowrap;
}
.flash-success { background: var(--success-light); color: var(--success); border: 1px solid rgba(46,125,82,0.2); }
.flash-error   { background: var(--danger-light);  color: var(--danger);  border: 1px solid rgba(192,57,43,0.2); }

@keyframes slideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes fadeOut {
  to { opacity: 0; pointer-events: none; }
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  padding: 8rem 5rem 6rem;
  max-width: 1400px;
  margin: 0 auto;
}

.hero-text h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.6rem, 4.5vw, 4.2rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--stone);
  margin-bottom: 1.5rem;
}
.hero-text h1 em { font-style: italic; color: var(--sage); }

.hero-text p {
  font-size: 1.1rem;
  color: var(--stone-mid);
  max-width: 480px;
  margin-bottom: 2.5rem;
  font-weight: 300;
  line-height: 1.8;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }

.hero-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.hero-card {
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 160px;
  background: var(--warm-white);
}
.hero-card:nth-child(1) { background: var(--sage-light);  grid-column: span 2; min-height: 130px; }
.hero-card:nth-child(2) { background: var(--terra-light); margin-top: 1.5rem; }
.hero-card:nth-child(3) { background: var(--lav-light); }
.hero-card:nth-child(4) { background: var(--gold-light); }
.hero-card:nth-child(5) { background: var(--sky-light);  margin-top: -1.5rem; }

.hero-card-img {
  width: 100%;
  height: 120px;
  overflow: hidden;
  flex-shrink: 0;
}
.hero-card:nth-child(1) .hero-card-img { height: 90px; }
.hero-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.hero-card:hover .hero-card-img img { transform: scale(1.04); }

.hero-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--stone);
  padding: 1rem 1.25rem 0;
}
.hero-card p { font-size: 0.82rem; color: var(--stone-mid); line-height: 1.5; padding: 0 1.25rem 1.25rem; }

/* ── Stats bar ──────────────────────────────────────────── */
.stats-bar {
  background: var(--stone);
  color: white;
  padding: 1.75rem 5rem;
  display: flex;
  justify-content: center;
  gap: 5rem;
}
.stat { text-align: center; }
.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 500;
  color: var(--sage-mid);
  display: block;
}
.stat-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Sections ───────────────────────────────────────────── */
section {
  padding: 6rem 5rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Categories ─────────────────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.cat-card {
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(74,69,64,0.12); }

.cat-card.cocina    { background: var(--terra-light); }
.cat-card.ejercicio { background: var(--sage-light); }
.cat-card.relajacion{ background: var(--lav-light); }
.cat-card.mental    { background: #EEF0F8; }
.cat-card.ocio      { background: var(--gold-light); }
.cat-card.consejos  { background: var(--sky-light); }

/* Imagen de categoría */
.cat-img {
  width: 100%;
  height: 160px;
  overflow: hidden;
  flex-shrink: 0;
}
.cat-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.cat-card:hover .cat-img img { transform: scale(1.05); }

/* Contenido de texto de la categoría */
.cat-body {
  padding: 1.5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}
.cat-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--stone);
}
.cat-body p { font-size: 0.88rem; color: var(--stone-mid); line-height: 1.6; }

.cat-count {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(74,69,64,0.1);
}
.cat-card.cocina    .cat-count { color: var(--terracotta); }
.cat-card.ejercicio .cat-count { color: var(--sage); }
.cat-card.relajacion.cat-count { color: var(--lavender); }
.cat-card.mental    .cat-count { color: #58649B; }
.cat-card.ocio      .cat-count { color: var(--gold); }
.cat-card.consejos  .cat-count { color: var(--sky); }

/* ── Featured articles ──────────────────────────────────── */
.featured-bg {
  background: var(--warm-white);
  border-top: 1px solid rgba(74,69,64,0.06);
  border-bottom: 1px solid rgba(74,69,64,0.06);
}

.featured-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1.5rem;
}

.article-card {
  border-radius: 20px;
  background: white;
  overflow: hidden;
  border: 1px solid rgba(74,69,64,0.07);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}
.article-card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(74,69,64,0.1); }

.article-img {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(74,69,64,0.35);
}
.article-card.small .article-img { font-size: 2.2rem; aspect-ratio: 16/7; }

.article-img.verde    { background: linear-gradient(135deg, #D4E8D4, #B5CEAE); }
.article-img.terracota{ background: linear-gradient(135deg, #F5E0D5, #E8C5AD); }
.article-img.lavanda  { background: linear-gradient(135deg, #E8E3F5, #CFC8EF); }

.article-body { padding: 1.4rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.article-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--stone);
  line-height: 1.35;
}
.article-card:not(.small) .article-body h3 { font-size: 1.4rem; }
.article-body p { font-size: 0.88rem; color: var(--stone-mid); line-height: 1.6; flex: 1; }

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(74,69,64,0.08);
  font-size: 0.78rem;
  color: var(--stone-mid);
}
.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

/* ── Recipes ────────────────────────────────────────────── */
.recipe-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.recipe-card {
  border-radius: 18px;
  overflow: hidden;
  background: white;
  border: 1px solid rgba(74,69,64,0.07);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.recipe-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(74,69,64,0.1); }

.recipe-img {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(74,69,64,0.35);
}
.recipe-img.v1 { background: linear-gradient(135deg, #E8F5E0, #C5E0AD); }
.recipe-img.v2 { background: linear-gradient(135deg, #FAE8D8, #F0C8A0); }
.recipe-img.v3 { background: linear-gradient(135deg, #E3F0F7, #B0D4E8); }
.recipe-img.v4 { background: linear-gradient(135deg, #F5EDD5, #EDD8A0); }

.recipe-info { padding: 1rem; }
.recipe-info h4 {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  color: var(--stone);
  margin-bottom: 0.4rem;
  line-height: 1.35;
}
.recipe-meta { font-size: 0.78rem; color: var(--stone-mid); display: flex; gap: 0.85rem; flex-wrap: wrap; }
.recipe-meta i { margin-right: 0.2rem; }

/* ── Tips ───────────────────────────────────────────────── */
.tips-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.tip-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(74,69,64,0.07);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  position: relative;
  overflow: hidden;
}
.tip-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.tip-card.sage::before  { background: var(--sage); }
.tip-card.terra::before { background: var(--terracotta); }
.tip-card.lav::before   { background: var(--lavender); }

.tip-number {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 400;
  color: rgba(74,69,64,0.07);
  line-height: 1;
  position: absolute;
  top: 1.25rem; right: 1.25rem;
}
.tip-card h4 { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 500; color: var(--stone); }
.tip-card p  { font-size: 0.88rem; color: var(--stone-mid); line-height: 1.65; }

/* ── Specialists ────────────────────────────────────────── */
.specialists-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

.specialist-card {
  background: white;
  border-radius: 20px;
  padding: 2rem 1.5rem;
  border: 1px solid rgba(74,69,64,0.07);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.specialist-card:hover { transform: translateY(-3px); box-shadow: 0 12px 35px rgba(74,69,64,0.1); }

.spec-avatar {
  width: 76px; height: 76px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.spec-name { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 500; color: var(--stone); }
.spec-role { font-size: 0.8rem; color: var(--stone-mid); }

.spec-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: center; margin-top: 0.15rem; }
.spec-tag {
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  background: var(--sage-light);
  color: var(--sage);
  font-weight: 500;
}

.available-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #2E7D52;
  font-weight: 500;
}
.available-badge::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #2E7D52;
}

.btn-consult {
  width: 100%;
  background: transparent;
  border: 1.5px solid rgba(74,69,64,0.18);
  color: var(--stone);
  padding: 0.5rem;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 0.15rem;
}
.btn-consult:hover { background: var(--sage-light); border-color: var(--sage); color: var(--sage); }

/* ── Consultation section ───────────────────────────────── */
.consult-section {
  background: var(--stone);
  border-radius: 28px;
  padding: 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin: 0 5rem 6rem;
  max-width: 1400px;
}

.consult-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.1rem;
  font-weight: 500;
  color: white;
  line-height: 1.25;
  margin-bottom: 1rem;
}
.consult-text h2 em { color: var(--sage-mid); font-style: italic; }
.consult-text p { color: rgba(255,255,255,0.55); font-weight: 300; margin-bottom: 1.5rem; line-height: 1.8; }

.specialist-list { display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: 1.75rem; }
.specialist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
}
.specialist-item::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--sage-mid);
  flex-shrink: 0;
}

.consult-form {
  background: var(--warm-white);
  border-radius: 22px;
  padding: 2.25rem;
}
.consult-form h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--stone);
  margin-bottom: 0.35rem;
}
.consult-form p.sub { font-size: 0.84rem; color: var(--stone-mid); margin-bottom: 1.5rem; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero                { grid-template-columns: 1fr; padding: 7rem 3rem 4rem; }
  .hero-visual         { display: none; }
  section              { padding: 4rem 3rem; }
  .categories-grid     { grid-template-columns: repeat(2, 1fr); }
  .featured-grid       { grid-template-columns: 1fr; }
  .recipe-strip        { grid-template-columns: repeat(2, 1fr); }
  .consult-section     { grid-template-columns: 1fr; margin: 0 3rem 4rem; padding: 3rem; gap: 2.5rem; }
  .specialists-grid    { grid-template-columns: repeat(2, 1fr); }
  .tips-grid           { grid-template-columns: 1fr; }
  .stats-bar           { gap: 3rem; padding: 1.75rem 3rem; }
}

@media (max-width: 640px) {
  .hero                { padding: 5rem 1.5rem 3rem; }
  section              { padding: 3rem 1.5rem; }
  .categories-grid     { grid-template-columns: 1fr; }
  .stats-bar           { gap: 1.75rem; padding: 1.5rem 2rem; flex-wrap: wrap; }
  .consult-section     { margin: 0 1.5rem 3rem; padding: 2rem; }
  .specialists-grid    { grid-template-columns: 1fr; }
  .recipe-strip        { grid-template-columns: 1fr; }
  .featured-grid       { grid-template-columns: 1fr; }
}
