/* =====================================================================
   ProstatVida — "Jardín Vivo" site shell
   Light, vibrant botanical-wellness aesthetic. Visual layer only.
   ===================================================================== */

:root {
  /* palette */
  --ink: #14271d;
  --ink-soft: #46594f;
  --paper: #f4faf3;
  --surface: #ffffff;

  --green: #18a558;
  --green-deep: #0d7a3e;
  --green-darker: #0a5a2e;
  --lime: #8fd14f;
  --lime-bright: #b6e94a;
  --honey: #f6a623;
  --coral: #fb7185;
  --teal: #16c2a3;
  --sky: #5bb8e8;

  --line: rgba(13, 60, 33, 0.10);
  --line-soft: rgba(13, 60, 33, 0.06);

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --pill: 999px;

  --shadow-sm: 0 2px 10px rgba(16, 90, 46, 0.07);
  --shadow-md: 0 14px 36px -12px rgba(16, 90, 46, 0.20);
  --shadow-lg: 0 30px 70px -24px rgba(16, 90, 46, 0.32);
  --shadow-glow: 0 10px 30px -6px rgba(24, 165, 88, 0.45);

  --maxw: 1180px;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.7;
  font-size: 17px;
  background-color: var(--paper);
  /* layered mesh-gradient atmosphere */
  background-image:
    radial-gradient(60% 50% at 12% 8%, rgba(143, 209, 79, 0.22), transparent 70%),
    radial-gradient(55% 45% at 92% 4%, rgba(22, 194, 163, 0.18), transparent 70%),
    radial-gradient(50% 50% at 85% 70%, rgba(246, 166, 35, 0.14), transparent 70%),
    radial-gradient(45% 45% at 5% 80%, rgba(251, 113, 133, 0.12), transparent 70%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }
a { color: var(--green-deep); }
::selection { background: var(--lime-bright); color: var(--ink); }

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

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--green-deep); color: #fff;
  padding: 10px 16px; z-index: 1000; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

@keyframes jvFadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes jvFloat { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(6deg); } }
@keyframes jvPop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }

/* ============================ HEADER / NAV ============================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 70px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 13px;
  font-size: 1.25rem;
  background: linear-gradient(140deg, var(--lime), var(--green) 55%, var(--teal));
  box-shadow: var(--shadow-glow);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.45rem; letter-spacing: -0.4px;
  color: var(--green-darker);
}
.brand-name span {
  background: linear-gradient(100deg, var(--green), var(--honey));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.site-nav { display: flex; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-list a, .sub-label {
  display: block; color: var(--ink-soft); text-decoration: none;
  padding: 9px 14px; border-radius: var(--pill);
  font-size: 0.95rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: color .2s, background .2s, transform .2s;
}
.nav-list a:hover, .sub-label:hover, .nav-list a:focus { color: var(--green-darker); background: rgba(24, 165, 88, 0.10); }
.nav-list a.active {
  color: #fff;
  background: linear-gradient(120deg, var(--green), var(--green-deep));
  box-shadow: var(--shadow-glow);
}

.has-sub { position: relative; }
.sub-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 256px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow-lg); padding: 10px;
  margin: 0; list-style: none; display: none; z-index: 120;
}
.sub-menu::before {
  content: ""; position: absolute; top: -7px; left: 26px;
  width: 14px; height: 14px; background: var(--surface);
  border-left: 1px solid var(--line); border-top: 1px solid var(--line);
  transform: rotate(45deg);
}
.has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu { display: block; animation: jvPop .18s ease both; }
.sub-menu a { color: var(--ink); padding: 10px 13px; font-weight: 600; border-radius: 12px; }
.sub-menu a:hover { background: linear-gradient(100deg, rgba(143,209,79,.18), rgba(22,194,163,.16)); color: var(--green-darker); }

.nav-toggle { display: none; }
.nav-burger { display: none; cursor: pointer; padding: 10px; border-radius: 12px; }
.nav-burger span { display: block; width: 26px; height: 3px; margin: 5px 0; background: var(--green-deep); border-radius: 3px; transition: .25s; }

@media (max-width: 920px) {
  .nav-burger { display: block; }
  .site-nav {
    position: absolute; top: 70px; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .32s ease;
    box-shadow: var(--shadow-md);
  }
  .nav-toggle:checked ~ .site-nav { max-height: 88vh; overflow-y: auto; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 18px 20px; }
  .nav-list > li { border-bottom: 1px solid var(--line-soft); }
  .sub-menu { position: static; display: block; box-shadow: none; border: none; background: rgba(24,165,88,.05); margin: 0 0 6px; padding: 4px 0 4px 10px; }
  .sub-menu::before { display: none; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ============================ BREADCRUMBS ============================ */
.breadcrumbs { background: transparent; border: none; }
.breadcrumbs-inner {
  max-width: var(--maxw); margin: 14px auto 0; padding: 8px 22px;
  list-style: none; display: flex; flex-wrap: wrap; gap: 4px;
  font-size: 0.85rem; color: var(--ink-soft);
}
.breadcrumbs-inner li { display: inline-flex; align-items: center; }
.breadcrumbs-inner li + li::before { content: "❧"; margin: 0 9px 0 3px; color: var(--lime); font-size: .8em; }
.breadcrumbs-inner a { color: var(--green-deep); text-decoration: none; font-weight: 600; }
.breadcrumbs-inner a:hover { text-decoration: underline; }
.breadcrumbs-inner [aria-current="page"] { color: var(--ink); font-weight: 700; }

/* ============================ MAIN / PROSE ============================ */
main { display: block; }

.prose-container {
  max-width: 800px; margin: 0 auto; padding: 30px 22px 70px;
}
.prose-container h1 { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.7rem); line-height: 1.1; color: var(--green-darker); margin: .2em 0 .5em; letter-spacing: -0.5px; }
.prose-container h2 { font-family: var(--font-display); font-size: 1.6rem; color: var(--green-deep); margin-top: 1.8em; letter-spacing: -0.3px; }
.prose-container h3 { font-size: 1.2rem; color: var(--green-deep); font-weight: 700; }
.prose-container a { color: var(--green); font-weight: 600; }
.prose-container ul, .prose-container ol { padding-left: 1.3em; }
.prose-container li { margin: .35em 0; }
.prose-container table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.6em 0; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.prose-container th, .prose-container td { border-bottom: 1px solid var(--line); padding: 12px 14px; text-align: left; }
.prose-container th { background: linear-gradient(120deg, var(--green), var(--green-deep)); color: #fff; }
.prose-container tr:nth-child(even) td { background: rgba(143, 209, 79, 0.07); }
.page-content img { height: auto; }

/* ============================ FOOTER ============================ */
.site-footer { position: relative; margin-top: 70px; color: #d8f0e1; background: linear-gradient(160deg, #0e6b39 0%, #0a5230 55%, #073f26 100%); }
.site-footer::before {
  content: ""; position: absolute; top: -28px; left: 0; right: 0; height: 30px;
  background: var(--paper);
  -webkit-mask: radial-gradient(22px at 50% 0, transparent 98%, #000) repeat-x;
  mask: radial-gradient(22px at 50% 0, transparent 98%, #000) repeat-x;
  -webkit-mask-size: 56px 30px; mask-size: 56px 30px;
}
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 54px 22px 30px; display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 34px; }
.footer-brand { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: 12px; }
.footer-about { font-size: 0.92rem; color: #a7d4ba; margin: 0; max-width: 38ch; }
.footer-col h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--lime-bright); margin: 0 0 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: #cdeada; text-decoration: none; font-size: 0.93rem; transition: color .2s, padding-left .2s; }
.footer-col a:hover { color: #fff; padding-left: 4px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.14); text-align: center; padding: 20px 22px 34px; font-size: 0.85rem; color: #8fbfa1; }
.footer-bottom p { margin: 4px 0; }
.footer-bottom .disclaimer { font-size: 0.8rem; color: #6fa888; max-width: 72ch; margin: 6px auto 0; }

@media (max-width: 820px) { .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 520px) { body { font-size: 16px; } .footer-inner { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
