/* ============ SENSIUS WELLNESS — Hub "Aprende Más" + artículos ============ */
@import url('fonts.css');

:root {
  --navy: #050A18;
  --navy-2: #0A1220;
  --card: #0D1626;
  --card-2: #111C30;
  --blue: #2563EB;
  --blue-soft: rgba(37, 99, 235, 0.16);
  --cyan: #22D3EE;
  --cyan-soft: rgba(34, 211, 238, 0.14);
  --green: #22C55E;
  --lime: #A3E635;
  --ink: #EAF1FF;
  --muted: #9BB0D0;
  --muted-2: #6E829F;
  --line: rgba(148, 178, 224, 0.14);
  --line-strong: rgba(34, 211, 238, 0.32);
  --font: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --maxw: 1200px;
  --radius: 18px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::selection { background: var(--cyan-soft); }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { width: min(var(--maxw), 92vw); margin-inline: auto; }

.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cyan);
}

/* ============ NAV ============ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(20px, 4vw, 56px);
  background: rgba(5, 10, 24, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand img { height: 40px; filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.3)); }
.topbar nav { display: flex; align-items: center; gap: clamp(14px, 2.6vw, 36px); }
.topbar nav a {
  font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); padding: 6px 2px; transition: color 0.22s, text-shadow 0.22s;
}
.topbar nav a:hover { color: var(--ink); }
.topbar nav a.active { color: var(--ink); text-shadow: 0 0 16px rgba(34, 211, 238, 0.55); }
.topbar nav a.active::after {
  content: ''; display: block; height: 2px; margin-top: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

/* ============ HERO ============ */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(70px, 12vw, 130px) 0 clamp(48px, 7vw, 84px);
  text-align: center;
  background:
    radial-gradient(1100px 480px at 50% -8%, rgba(37, 99, 235, 0.28), transparent 60%),
    radial-gradient(700px 360px at 84% 12%, rgba(34, 211, 238, 0.14), transparent 62%),
    var(--navy);
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0; opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='96' viewBox='0 0 56 96'%3E%3Cpath d='M28 1 54 16v32L28 63 2 48V16z M28 63 54 78v32M28 63 2 78v32' fill='none' stroke='%232563EB' stroke-opacity='0.12' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 56px 96px;
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 72%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 {
  margin: 16px auto 0; max-width: 15ch;
  font-size: clamp(36px, 6.4vw, 74px); font-weight: 800; letter-spacing: -0.01em; line-height: 1.05;
}
.hero .lead {
  margin: 20px auto 0; max-width: 62ch;
  font-size: clamp(15px, 1.7vw, 20px); color: var(--muted); font-weight: 400;
}

/* ============ FILTRO DE CATEGORÍAS ============ */
.filter {
  position: sticky; top: 72px; z-index: 30;
  padding: 16px 0;
  background: linear-gradient(180deg, var(--navy) 55%, transparent);
}
.filter .chips {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}
.chip {
  font-family: var(--font); font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--muted); cursor: pointer;
  padding: 9px 18px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
}
.chip:hover { color: var(--ink); border-color: var(--line-strong); transform: translateY(-1px); }
.chip[aria-pressed="true"] {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, var(--blue), #1D4ED8);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.35);
}

/* ============ SECCIONES ============ */
section { position: relative; }
.section-pad { padding: clamp(40px, 6vw, 72px) 0; }
.section-head { margin-bottom: 28px; }
.section-head h2 {
  font-size: clamp(24px, 3.4vw, 38px); font-weight: 800; letter-spacing: -0.01em; line-height: 1.15;
}
.section-head p { margin-top: 12px; max-width: 64ch; color: var(--muted); font-size: 16px; }

/* ============ ARTÍCULO DESTACADO ============ */
.featured {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 0;
  border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.featured:hover { border-color: var(--line-strong); }
.featured .visual {
  position: relative; min-height: 300px;
  background:
    radial-gradient(420px 300px at 40% 40%, rgba(34, 211, 238, 0.4), transparent 70%),
    radial-gradient(360px 280px at 70% 70%, rgba(37, 99, 235, 0.5), transparent 72%),
    linear-gradient(160deg, #10233F, #071021);
  display: grid; place-items: center;
}
.featured .visual .hexbig {
  width: 148px; height: 168px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: radial-gradient(circle at 50% 40%, rgba(34, 211, 238, 0.9), rgba(37, 99, 235, 0.5) 60%, transparent);
  box-shadow: 0 0 60px rgba(34, 211, 238, 0.5);
  animation: floaty 6s ease-in-out infinite;
}
.featured .body { padding: clamp(26px, 3.4vw, 44px); }
.featured .body h3 {
  margin: 14px 0 12px; font-size: clamp(22px, 2.8vw, 32px); font-weight: 800; line-height: 1.18;
}
.featured .body p { color: var(--muted); font-size: 16px; }
.featured .meta { margin-top: 18px; }

@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ============ TAGS / META ============ */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
  background: var(--blue-soft); color: #A9C4FF; border: 1px solid rgba(37, 99, 235, 0.32);
}
.tag.cat-Hidratación { background: rgba(34, 211, 238, 0.12); color: #7DE9F7; border-color: rgba(34, 211, 238, 0.32); }
.tag.cat-Iones { background: rgba(163, 230, 53, 0.12); color: #CBE97F; border-color: rgba(163, 230, 53, 0.3); }
.tag.cat-Electrolitos { background: rgba(34, 197, 94, 0.12); color: #86E0A6; border-color: rgba(34, 197, 94, 0.3); }
.tag.cat-Sueros { background: rgba(96, 165, 250, 0.14); color: #A9C4FF; border-color: rgba(96, 165, 250, 0.34); }
.tag.cat-Minerales { background: rgba(37, 99, 235, 0.16); color: #A9C4FF; border-color: rgba(37, 99, 235, 0.34); }
.tag.cat-Vitaminas { background: rgba(251, 191, 36, 0.12); color: #F5D488; border-color: rgba(251, 191, 36, 0.3); }
.readtime { font-size: 13px; color: var(--muted-2); font-weight: 600; }
.meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ============ GRID DE TARJETAS ============ */
.grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; min-height: 250px;
  transition: transform 0.24s ease, border-color 0.24s, box-shadow 0.24s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(34, 211, 238, 0.12), 0 0 34px rgba(34, 211, 238, 0.12);
}
.card .icon {
  width: 46px; height: 52px; margin-bottom: 16px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(150deg, var(--blue-soft), var(--cyan-soft));
  display: grid; place-items: center; color: var(--cyan);
}
.card .icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 18px; font-weight: 700; line-height: 1.3; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; flex: 1; }
.card .foot { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; }
.card .read {
  font-size: 14px; font-weight: 700; color: var(--cyan);
  display: inline-flex; align-items: center; gap: 6px;
  transition: gap 0.2s;
}
.card:hover .read { gap: 10px; }
.card .read svg { width: 16px; height: 16px; }

/* ============ NUTRIENTES ============ */
.nutrients { background: linear-gradient(180deg, transparent, rgba(37, 99, 235, 0.05)); }
.nutrient-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.nutrient {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
}
a.nutrient:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 0 28px rgba(34, 211, 238, 0.14); }
.nutrient .hex {
  flex: none; width: 52px; height: 58px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: radial-gradient(circle at 50% 40%, rgba(34, 211, 238, 0.32), rgba(37, 99, 235, 0.22));
  border: 1px solid rgba(34, 211, 238, 0.4);
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: #CFF6FD; letter-spacing: 0.02em;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.2);
}
.nutrient .name { font-size: 16px; font-weight: 700; }
.nutrient .nick { font-size: 12.5px; font-weight: 600; color: var(--cyan); font-style: italic; margin-top: 1px; }
.nutrient .ndesc { font-size: 13.5px; color: var(--muted); margin-top: 7px; }

/* ============ BOTONES ============ */
.btn {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font-family: var(--font); font-size: 15px; font-weight: 700; letter-spacing: 0.01em;
  padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
  transition: transform 0.2s, box-shadow 0.25s, background 0.25s, border-color 0.25s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  color: #fff; background: linear-gradient(135deg, var(--blue), #1D4ED8);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(37, 99, 235, 0.55); }
.btn-ghost { color: var(--ink); border-color: var(--line-strong); background: rgba(34, 211, 238, 0.06); }
.btn-ghost:hover { background: rgba(34, 211, 238, 0.14); transform: translateY(-2px); }

/* ============ MISIÓN ============ */
.mission { text-align: center; }
.mission .inner {
  max-width: 760px; margin-inline: auto;
  padding: clamp(34px, 5vw, 60px);
  background: linear-gradient(135deg, var(--card-2), var(--card));
  border: 1px solid var(--line); border-radius: var(--radius);
}
.mission h2 { font-size: clamp(24px, 3.4vw, 38px); font-weight: 800; }
.mission p { margin-top: 18px; color: var(--muted); font-size: 17px; }
.mission .closing {
  margin-top: 24px; font-size: clamp(18px, 2.2vw, 24px); font-weight: 700;
  color: transparent; background: linear-gradient(90deg, var(--cyan), #7DD3FC); -webkit-background-clip: text; background-clip: text;
}

/* ============ CTA FINAL ============ */
.finalcta { text-align: center; }
.finalcta .inner {
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 56px);
  border-radius: var(--radius);
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(34, 211, 238, 0.18), transparent 70%),
    linear-gradient(135deg, #0C1B34, #0A1220);
  border: 1px solid var(--line-strong);
}
.finalcta h2 { font-size: clamp(26px, 4vw, 44px); font-weight: 800; max-width: 18ch; margin-inline: auto; }
.finalcta p { margin: 16px auto 28px; max-width: 56ch; color: var(--muted); font-size: 17px; }
.finalcta .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 40px; text-align: center;
}
.footer img { height: 40px; margin: 0 auto 14px; opacity: 0.9; }
.footer .legal { color: var(--muted-2); font-size: 13px; font-style: italic; max-width: 60ch; margin: 0 auto; }
.footer .copy { margin-top: 12px; color: var(--muted-2); font-size: 12px; letter-spacing: 0.08em; }
.footer a.home { color: var(--cyan); font-weight: 600; }

/* ============ CHATBOT (placeholder) ============ */
.chatbot { position: fixed; right: 22px; bottom: 22px; z-index: 60; }
.chat-bubble {
  width: 56px; height: 56px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line-strong); color: var(--ink);
  background: linear-gradient(150deg, rgba(34, 211, 238, 0.3), rgba(10, 18, 32, 0.9));
  display: grid; place-items: center;
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.3), 0 8px 22px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s, box-shadow 0.2s;
}
.chat-bubble:hover { transform: scale(1.07); box-shadow: 0 0 34px rgba(34, 211, 238, 0.55); }
.chat-panel {
  position: absolute; right: 0; bottom: 70px; width: min(320px, calc(100vw - 40px));
  padding: 22px 20px; border-radius: 18px;
  background: rgba(10, 18, 32, 0.92); border: 1px solid var(--line-strong);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.chat-panel h4 { color: var(--cyan); font-size: 17px; }
.chat-panel p { margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.chat-panel .soon {
  display: inline-block; margin-top: 14px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px; background: var(--cyan); color: var(--navy);
}

/* ============ PÁGINA DE ARTÍCULO ============ */
.article-hero {
  padding: clamp(40px, 7vw, 96px) 0 clamp(24px, 4vw, 44px);
  background:
    radial-gradient(900px 380px at 50% -10%, rgba(37, 99, 235, 0.24), transparent 62%),
    var(--navy);
}
.breadcrumb { font-size: 13px; color: var(--muted-2); font-weight: 600; }
.breadcrumb a:hover { color: var(--cyan); }
.article-hero h1 {
  margin: 16px 0 14px; max-width: 22ch;
  font-size: clamp(30px, 5vw, 52px); font-weight: 800; line-height: 1.1; letter-spacing: -0.01em;
}
.article { padding-bottom: clamp(48px, 7vw, 90px); }
.article .col { max-width: 720px; margin-inline: auto; }
.article .intro {
  font-size: clamp(18px, 2vw, 22px); line-height: 1.55; color: var(--ink);
  padding-bottom: 8px;
}
.article h2 {
  margin: 34px 0 10px; font-size: clamp(19px, 2.2vw, 24px); font-weight: 700; color: #fff;
}
.article p { color: var(--muted); font-size: 17px; margin-top: 6px; }
.article .divider { height: 1px; background: var(--line); margin: 40px 0; border: 0; }
.legalbox {
  margin-top: 36px; padding: 18px 22px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 13.5px; font-style: italic; color: var(--muted-2);
}
.related { margin-top: 48px; }
.related h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted-2); margin-bottom: 16px; }
.related .rgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.related a {
  display: block; padding: 16px 18px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line);
  transition: border-color 0.2s, transform 0.2s;
}
.related a:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.related a .rt { font-size: 15px; font-weight: 700; margin-top: 6px; }
.backbar { margin-top: 40px; }

.notfound { text-align: center; padding: clamp(60px, 12vw, 140px) 0; }
.notfound h1 { font-size: clamp(28px, 5vw, 48px); font-weight: 800; }
.notfound p { margin: 14px auto 26px; color: var(--muted); max-width: 46ch; }

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .featured { grid-template-columns: 1fr; }
  .featured .visual { min-height: 200px; }
  .filter { top: 66px; }
}
@media (max-width: 620px) {
  .topbar { padding: 12px 18px; }
  .topbar nav { gap: 12px; }
  .topbar nav a { font-size: 11px; letter-spacing: 0.1em; }
  .topbar .brand img { height: 32px; }
  .grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .featured .visual .hexbig { animation: none; }
}
