/* ── Retos (hub) page styles (nav/footer via common.css) ── */

/* HERO */
.hero {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 9rem 2rem 5rem;
  background: var(--warm-white);
  border-bottom: 1px solid rgba(74,69,64,0.06);
}

.section-eyebrow {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.75rem;
}

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

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

.hero-pills {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--stone-mid);
  background: white;
  border: 1px solid rgba(74,69,64,0.12);
  padding: 0.45rem 1.1rem;
  border-radius: 100px;
}

/* SECTIONS */
.section {
  padding: 5rem 5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--stone);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}
.section-sub {
  font-size: 1rem;
  color: var(--stone-mid);
  font-weight: 300;
  max-width: 520px;
  margin-bottom: 3rem;
  line-height: 1.8;
}

/* BREATHING SECTION */
.breathing-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);
}

.technique-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.tab-btn {
  padding: 0.5rem 1.2rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 400;
  border: 1.5px solid rgba(74,69,64,0.15);
  background: white;
  color: var(--stone-mid);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.tab-btn:hover { border-color: var(--sage); color: var(--sage); }
.tab-btn.active { background: var(--sage-light); border-color: var(--sage); color: var(--sage); }

.breathing-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

/* Breathing circle */
.breath-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.breath-ring-wrap {
  position: relative;
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.breath-ring-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(122,158,126,0.2);
}
.breath-ring-mid {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  border: 1px solid rgba(122,158,126,0.1);
}

.breath-circle {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--sage-light);
  border: 2px solid var(--sage-mid);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: transform 0.1s linear;
}

.breath-circle.inhale  { animation: expand var(--inhale-dur, 4s) ease-in-out forwards; }
.breath-circle.hold    { animation: hold-big var(--hold-dur, 7s) ease-in-out forwards; }
.breath-circle.exhale  { animation: contract var(--exhale-dur, 8s) ease-in-out forwards; }
.breath-circle.hold2   { animation: hold-small var(--hold2-dur, 4s) ease-in-out forwards; }

@keyframes expand  { from { transform:scale(1); } to { transform:scale(1.7); } }
@keyframes hold-big { from,to { transform:scale(1.7); } }
@keyframes hold-small { from,to { transform:scale(1); } }
@keyframes contract { from { transform:scale(1.7); } to { transform:scale(1); } }

.breath-label {
  font-family: 'Playfair Display', serif;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--sage);
  font-style: italic;
  pointer-events: none;
}
.breath-count {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 500;
  color: var(--stone);
  line-height: 1;
  pointer-events: none;
}

.breath-controls { display: flex; gap: 0.75rem; align-items: center; }

.btn-primary {
  background: var(--sage);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-family: 'Inter', sans-serif;
}
.btn-primary:hover { background: #6A8E6E; transform: translateY(-1px); }

.btn-secondary-sm {
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  font-size: 0.9rem;
  background: white;
  color: var(--stone-mid);
  border: 1.5px solid rgba(74,69,64,0.15);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
  display: none;
}
.btn-secondary-sm:hover { border-color: var(--terracotta); color: var(--terracotta); }
.btn-secondary-sm.visible { display: block; }

.cycles-label { font-size: 0.8rem; color: var(--stone-mid); }

/* Breath info */
.breath-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--stone);
  margin-bottom: 0.4rem;
}

.breath-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--gold);
  border: 1px solid rgba(191,160,96,0.3);
  background: var(--gold-light);
  padding: 0.28rem 0.8rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}

.breath-info p {
  font-size: 0.92rem;
  color: var(--stone-mid);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.phase-list { display: flex; flex-direction: column; gap: 0.6rem; }

.phase-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  background: white;
  border: 1px solid rgba(74,69,64,0.08);
}
.phase-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.phase-name { font-size: 0.85rem; font-weight: 500; color: var(--stone); min-width: 65px; }
.phase-dur { font-family: 'Playfair Display', serif; font-size: 1.1rem; color: var(--stone-mid); }
.phase-desc { font-size: 0.78rem; color: var(--stone-mid); margin-left: auto; }

/* TECHNIQUES GRID */
.techniques-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.tech-card {
  background: white;
  border: 1px solid rgba(74,69,64,0.08);
  border-radius: 20px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.tech-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
}
.tech-card.sage-c::before  { background: var(--sage); }
.tech-card.lav-c::before   { background: var(--lavender); }
.tech-card.gold-c::before  { background: var(--gold); }
.tech-card.terra-c::before { background: var(--terracotta); }
.tech-card.sky-c::before   { background: var(--sky); }
.tech-card.mint-c::before  { background: #5ECBA1; }

.tech-card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(74,69,64,0.08); }

.tech-icon { font-size: 1.9rem; line-height: 1; }

.tech-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--stone);
}
.tech-card p { font-size: 0.85rem; color: var(--stone-mid); line-height: 1.65; flex: 1; font-weight: 300; }

.tech-pattern {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  align-self: flex-start;
}
.tech-card.sage-c  .tech-pattern { background: var(--sage-light); color: var(--sage); }
.tech-card.lav-c   .tech-pattern { background: var(--lav-light); color: var(--lavender); }
.tech-card.gold-c  .tech-pattern { background: var(--gold-light); color: var(--gold); }
.tech-card.terra-c .tech-pattern { background: var(--terra-light); color: var(--terracotta); }
.tech-card.sky-c   .tech-pattern { background: var(--sky-light); color: var(--sky); }
.tech-card.mint-c  .tech-pattern { background: #E8F7F2; color: #3A9E7A; }

.tech-benefits { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.1rem; }
.benefit-tag {
  font-size: 0.72rem;
  color: var(--stone-mid);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  border: 1px solid rgba(74,69,64,0.12);
}

/* MEDITATION */
.alt-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);
}

.meditation-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.med-card {
  background: white;
  border: 1px solid rgba(74,69,64,0.08);
  border-radius: 20px;
  padding: 1.75rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  transition: transform 0.2s;
  cursor: pointer;
}
.med-card:hover { transform: translateY(-2px); }

.med-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 400;
  line-height: 1;
  flex-shrink: 0;
  color: rgba(74,69,64,0.1);
}

.med-body h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--stone);
  margin-bottom: 0.4rem;
}
.med-body p { font-size: 0.85rem; color: var(--stone-mid); line-height: 1.65; font-weight: 300; }

.med-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
  font-size: 0.78rem;
  color: var(--stone-mid);
  flex-wrap: wrap;
}
.med-pill {
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 500;
}

/* TIPS */
.tips-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.tip-item {
  background: white;
  border: 1px solid rgba(74,69,64,0.08);
  border-radius: 18px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.tip-emoji { font-size: 1.75rem; line-height: 1; }
.tip-item h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--stone);
  line-height: 1.3;
}
.tip-item p { font-size: 0.82rem; color: var(--stone-mid); line-height: 1.6; font-weight: 300; }

/* STEP GUIDE */
.guide-steps { display: flex; flex-direction: column; max-width: 680px; }

.guide-step {
  display: flex;
  gap: 1.75rem;
  padding: 1.75rem 0;
  position: relative;
}
.guide-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 19px;
  top: 4rem;
  bottom: 0;
  width: 1px;
  background: rgba(74,69,64,0.1);
}

.step-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(122,158,126,0.4);
  background: var(--sage-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--sage);
  position: relative;
  z-index: 1;
}

.step-content h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--stone);
  margin-bottom: 0.35rem;
}
.step-content p { font-size: 0.88rem; color: var(--stone-mid); line-height: 1.7; font-weight: 300; }

/* TRACKER */
.tracker-card {
  background: white;
  border: 1px solid rgba(74,69,64,0.08);
  border-radius: 20px;
  padding: 2.25rem;
  margin-top: 2.5rem;
}
.tracker-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--stone);
  margin-bottom: 0.3rem;
}
.tracker-card > p { font-size: 0.85rem; color: var(--stone-mid); margin-bottom: 1.75rem; }

.week-grid { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

.day-cell {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1.5px solid rgba(74,69,64,0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--cream);
}
.day-cell:hover { border-color: var(--sage); }
.day-cell.done { background: var(--sage-light); border-color: var(--sage-mid); }

.day-letter { font-size: 0.62rem; font-weight: 500; letter-spacing: 0.04em; color: var(--stone-mid); text-transform: uppercase; }
.day-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(74,69,64,0.15); }
.day-cell.done .day-dot { background: var(--sage); }

.streak-info { display: flex; gap: 2.5rem; align-items: center; }
.streak-stat { display: flex; flex-direction: column; gap: 0.15rem; }
.streak-num { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 500; color: var(--stone); line-height: 1; }
.streak-lbl { font-size: 0.75rem; color: var(--stone-mid); text-transform: uppercase; letter-spacing: 0.08em; }

.btn-reset {
  background: none;
  border: 1.5px solid rgba(74,69,64,0.15);
  color: var(--stone-mid);
  padding: 0.45rem 1rem;
  border-radius: 100px;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
  margin-left: auto;
}
.btn-reset:hover { border-color: var(--terracotta); color: var(--terracotta); }


/* RESPONSIVE */
@media (max-width: 1024px) {
  .section { padding: 4rem 2.5rem; }
  .breathing-layout { grid-template-columns: 1fr; gap: 3rem; }
  .breath-visual { order: -1; }
  .techniques-grid { grid-template-columns: repeat(2, 1fr); }
  .meditation-grid { grid-template-columns: 1fr; }
  .tips-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .section { padding: 3rem 1.25rem; }
  .hero { padding: 6rem 1.25rem 3.5rem; }
  .techniques-grid { grid-template-columns: 1fr; }
  .tips-row { grid-template-columns: 1fr; }
  .breath-ring-wrap { width: 210px; height: 210px; }
  .tab-btn { white-space: nowrap; flex-shrink: 0; }
  .technique-tabs::-webkit-scrollbar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .breath-circle { animation: none !important; }
}

/* ── Modal de ejecución de retos del hub ────────────────── */
.reto-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(74,69,64,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
}
.reto-modal-overlay.open { display: flex; }
.reto-modal {
  background: #fff;
  border-radius: 24px;
  max-width: 540px;
  width: 100%;
  padding: 2.25rem 2rem;
  position: relative;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 24px 70px rgba(0,0,0,0.25);
  animation: retoModalIn 0.25s ease;
}
@keyframes retoModalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.reto-modal-close {
  position: absolute;
  top: 0.9rem;
  right: 1.1rem;
  border: none;
  background: transparent;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: var(--stone-mid);
}
.reto-modal-close:hover { color: var(--stone); }
.reto-modal h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--stone);
  text-align: center;
  margin-bottom: 1.5rem;
  padding-right: 1.5rem;
}

/* ── Filtros de categoría del hub ───────────────────────── */
.reto-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.reto-filtro {
  --cat: var(--stone-mid);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 0.45rem 1.1rem;
  border-radius: 100px;
  border: 1px solid rgba(74,69,64,0.15);
  background: #fff;
  color: var(--stone-mid);
  cursor: pointer;
  transition: all 0.18s;
}
.reto-filtro:hover { border-color: var(--cat); color: var(--cat); }
.reto-filtro.active { background: var(--cat); border-color: var(--cat); color: #fff; }
.reto-filtro[data-cat="all"].active { background: var(--stone); border-color: var(--stone); }

.reto-cat-tag {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.18rem 0.6rem;
  border-radius: 100px;
}

/* progreso de hábito en la tarjeta */
.hub-habito-prog { margin-top: 0.6rem; display: flex; flex-direction: column; gap: 0.35rem; }
.hub-habito-bar { height: 7px; border-radius: 100px; background: rgba(74,69,64,0.1); overflow: hidden; }
.hub-habito-bar > i { display: block; height: 100%; width: 0; border-radius: 100px; }
.hub-habito-prog span { font-size: 0.78rem; color: var(--stone-mid); font-weight: 500; }

/* ── Popup de recompensa ────────────────────────────────── */
.reward-pop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(74,69,64,0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 1.5rem;
}
.reward-pop-overlay.open { display: flex; }
.reward-pop {
  background: #fff;
  border-radius: 24px;
  max-width: 380px;
  width: 100%;
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  position: relative;
  animation: rewardPopIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes rewardPopIn {
  from { opacity: 0; transform: scale(0.8) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.reward-pop-burst {
  width: 72px; height: 72px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold, #BFA060), var(--terracotta, #C4714A));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 8px 24px rgba(191,160,96,0.4);
}
.reward-pop img { width: 88px; height: 88px; object-fit: contain; margin: 0 auto 1rem; display: block; }
.reward-pop-tag {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold, #BFA060); margin-bottom: 0.4rem;
}
.reward-pop h3 {
  font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 500;
  color: var(--stone); margin-bottom: 0.5rem;
}
.reward-pop p { font-size: 0.9rem; color: var(--stone-mid); line-height: 1.55; margin-bottom: 1.25rem; }
