:root {
  --bg: #f5f4ef;
  --surface: #fffdfa;
  --ink: #1f2a2e;
  --muted: #4b5b60;
  --brand: #2e6f73;
  --brand-dark: #1e4b4e;
  --accent: #d5a15d;
  --line: #d8ddd8;
  --radius: 16px;
  --max: 1120px;
  --card-gap: 8px;
  --card-padding: 15px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Avenir Next", "Avenir", "Segoe UI", sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.74)),
    url("/Multimedia/Archivos%20del%20sitio/fondo-global.avif");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--brand);
}

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

h1, h2, h3, h4 {
  color: #4a3191;
}

/* Reserve space before JS hydrates shared header/footer to reduce CLS. */
#site-header { display: block; min-height: 76px; }
#site-footer { display: block; min-height: 40px; }

.container {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
}

.top-header-icon-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 12;
  margin: 0.45rem 0 0.85rem;
  pointer-events: none;
}

.top-header-icon {
  width: 128px;
  height: 128px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 14px rgba(74, 49, 145, 0.22));
}

/* Home uses .hero (not .page-hero); reduce top spacing so the icon distance matches other pages. */
.top-header-icon-wrap + main .hero {
  padding-top: 0.9rem;
}

header.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(8px);
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  overflow: visible;
}

.nav-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.8rem;
  padding: 0.75rem 0;
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  width: 100%;
}

.header-actions-mobile {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.site-header .logo-wrap {
  flex: 0 0 auto;
}

.site-header .primary-nav {
  width: 100%;
  margin: 0;
}

.site-header .btn.primary {
  width: 100%;
}

.logo-wrap { display: flex; align-items: center; gap: 0.75rem; }
.logo-wrap img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 0;
}

.site-header .logo-wrap {
  min-width: 0;
  overflow: visible;
  position: relative;
  z-index: 45;
  display: flex;
  align-items: center;
}

.site-header .header-logo-img {
  width: min(220px, 62vw);
  height: auto;
  max-height: 64px;
  object-fit: contain;
  transform: scale(1.15);
  transform-origin: left center;
  position: relative;
  z-index: 46;
  filter: drop-shadow(0 10px 18px rgba(31, 42, 46, 0.28));
}

.site-footer .footer-logo-img {
  width: 210px;
  height: auto;
}

.site-footer .footer-col:first-child {
  align-items: center;
  text-align: center;
  justify-content: space-between;
  min-height: 260px;
  gap: 0.9rem;
}

.site-footer .footer-col:first-child .logo-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}
.logo-text { font-weight: 700; letter-spacing: 0.3px; }

nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  justify-content: center;
}

nav a {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  color: #4a3191;
  font-size: 0.9rem;
}

nav a:hover,
nav a.active {
  color: #3f2a7c;
  background: #e6defa;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid #d9d5ea;
  border-radius: 10px;
  background: #ffffff;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #4a3191;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-wa-float {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #d9d5ea;
}

.mobile-wa-float img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn.primary {
  background: #4a3191;
  color: #fff;
}
.btn.primary:hover { background: #3f2a7c; }

.btn.ghost {
  background: transparent;
  border-color: var(--brand);
  color: var(--brand-dark);
}
.btn.ghost:hover { background: #e0eceb; }

.hero {
  padding: 4rem 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.hero .card {
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 28px rgba(31, 42, 46, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(1px) saturate(106%);
  -webkit-backdrop-filter: blur(1px) saturate(106%);
}

.card {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: var(--radius);
  box-shadow:
    0 10px 24px rgba(31, 42, 46, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px) saturate(112%);
  -webkit-backdrop-filter: blur(4px) saturate(112%);
  border-radius: var(--radius);
}

.hero-copy {
  padding: 1.2rem;
}
.hero-copy h1 {
  margin: 0 0 0.8rem;
  line-height: 1.1;
  font-size: clamp(1.8rem, 2.8vw, 3rem);
  color: #4a3191;
}
.hero-copy p { color: var(--muted); margin: 0 0 1.1rem; }

.hero-question-btn {
  margin-bottom: 0.75rem;
}

.hero-media {
  overflow: hidden;
  min-height: 220px;
}
.hero-media img,
.hero-media video {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.page-hero {
  margin: 1rem auto 0.2rem;
}

.page-hero .page-hero-media {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #111;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: 0 14px 28px rgba(31, 42, 46, 0.14);
}

.page-hero .page-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: none;
}

.page-hero-sobre-mi .page-hero-media img {
  object-position: center 22%;
}

.page-hero .page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 10, 14, 0.2) 0%, rgba(8, 10, 14, 0.5) 100%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.2rem;
  backdrop-filter: blur(1px) saturate(104%);
  -webkit-backdrop-filter: blur(1px) saturate(104%);
}

.page-hero .page-hero-overlay h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.3rem, 2.6vw, 2.1rem);
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.38);
  text-align: center;
}

.error-404 .page-hero-overlay {
  align-items: center;
  justify-content: center;
}

.error-404 .page-hero-content {
  width: min(92%, 680px);
  margin: 0 auto;
  text-align: center;
  display: grid;
  gap: 0.75rem;
}

.error-404 .page-hero-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(1.02rem, 1.8vw, 1.2rem);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.error-404 .hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 0.35rem;
}

.error-404 .hero-actions .btn {
  min-width: 140px;
}

.error-404 .hero-actions .btn.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.13);
}

.error-404 .hero-actions .btn.ghost:hover {
  background: rgba(255, 255, 255, 0.22);
}

.section { padding: 1.1rem 0; }
.section h2 { margin: 0 0 0.9rem; font-size: clamp(1.4rem, 2.4vw, 2rem); }
.section p { color: var(--muted); }

/* Keep vertical rhythm consistent when multiple cards are stacked in the same container. */
.section .container > .card + .card {
  margin-top: var(--card-gap);
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.padded { padding: var(--card-padding); }

.video-embed,
.setmore-embed {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: #fff;
}
.video-embed { aspect-ratio: 16 / 9; }
.setmore-embed { min-height: 75vh; }
.setmore-embed.citas-embed {
  min-height: clamp(1800px, 250dvh, 3200px);
  height: clamp(1800px, 250dvh, 3200px);
  display: block;
}


footer.site-footer {
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.footer-symbols {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  padding: 0.55rem 0 0.1rem;
}

.footer-symbols a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-symbols a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.footer-symbols img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.hero-symbols {
  gap: 0.9rem;
  padding-top: 0.35rem;
}

.hero-symbols img {
  width: 64px;
  height: 64px;
}
.footer-wrap {
  padding: 1rem 0 0.85rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
}

.footer-links,
.socials { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.footer-links.vertical,
.socials.vertical {
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.footer-link-item {
  color: var(--brand-dark);
  font-weight: 600;
}

.wa-svg-btn {
  background: #4a3191;
  color: #b8cde2;
}

.site-header .btn.primary {
  background: #4a3191;
  color: #b8cde2;
}

.site-header .btn.primary:hover {
  background: #3f2a7c;
}

.wa-svg-btn svg,
.social-item svg {
  width: 18px;
  height: 18px;
}

.social-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #4a3191;
  font-weight: 600;
}

.socials-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.social-icon {
  color: #4a3191;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-icon svg {
  width: 26px;
  height: 26px;
}

.privacy-under-social {
  margin-top: 0.45rem;
}
.tag {
  background: #e4eceb;
  color: var(--brand-dark);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.9rem;
}

.small { font-size: 0.92rem; color: var(--muted); }

.wa-float {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 90;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.wa-float:hover {
  transform: translateY(-3px) scale(1.03);
}

.wa-float img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.equilibrio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
  margin: 1.4rem auto 1.6rem;
  max-width: 760px;
}

.equilibrio-item {
  text-align: center;
}

.equilibrio-item img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.75rem;
  border: 3px solid #d7dde2;
  filter: grayscale(100%);
  box-shadow: 0 6px 18px rgba(31, 42, 46, 0.16);
}

.equilibrio-item h3 {
  margin: 0;
  color: #4b1bb4;
  font-size: clamp(1.1rem, 2vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.2px;
}

.equilibrio-copy h2,
h2[style*="text-align:center;"] {
  color: #4a3191;
}

.equilibrio-copy {
  max-width: 900px;
  margin: 0 auto;
}

.blog-list-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding-top: 1.1rem;
}

.blog-item {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.blog-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 26px rgba(31, 42, 46, 0.16);
}

.blog-item > a {
  display: block;
}

.blog-item-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: #e9ece8;
}

.blog-item .padded {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.blog-item h2 {
  margin: 0;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.28;
  color: var(--text);
}

.blog-item p {
  margin: 0;
}

.blog-item .btn {
  margin-top: auto;
  align-self: flex-start;
}

.subscribe-card {
  max-width: none;
  margin: 0;
}

.subscribe-card h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.subscribe-card p {
  margin-top: 0;
}

.subscribe-form label {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-weight: 600;
  color: var(--brand-dark);
}

.subscribe-row {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: stretch;
}

.subscribe-row input[type="email"] {
  flex: 1;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  font-size: 1rem;
  background: #fff;
  color: var(--ink);
}

.subscribe-row input[type="email"]:focus {
  outline: 2px solid #9bc3c4;
  outline-offset: 1px;
}

.comments-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.comments-head h2 {
  margin: 0;
  margin-right: auto;
}

.comment-sort {
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 38px;
  padding: 0.35rem 0.6rem;
  background: #fff;
}

.comments-list {
  display: grid;
  gap: 0.9rem;
}

.comment-item {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.42);
  padding: 0.9rem;
  box-shadow: 0 14px 28px rgba(31, 42, 46, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.comment-item h4,
.comment-item p {
  margin: 0;
}

.comment-meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.35rem;
}

.comment-body {
  margin-top: 0.55rem;
  white-space: pre-line;
}

.comment-like {
  margin-top: 0.65rem;
  color: #d12f3f;
  font-weight: 700;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.comment-like:disabled {
  opacity: 0.65;
  cursor: wait;
}

.comment-like-icon {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

.footer-webmaster-logo-link {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.footer-webmaster-logo {
  height: 24px;
  width: auto;
  display: block;
  border-radius: 3px;
}

.comments-actions {
  margin: 1rem 0 0;
}

.comment-form {
  display: grid;
  gap: 0.45rem;
}

.comment-form input,
.comment-form select,
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

.comment-form-actions {
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  justify-content: stretch;
}

.paypal-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 0.6rem;
}

.paypal-wrap > div {
  width: min(100%, 360px);
}

.pagos-card-bg {
  position: relative;
  overflow: hidden;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.84) 100%),
    url("/Multimedia/Backgrounds/pagos-unsplash.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.pagos-card-bg > * {
  position: relative;
  z-index: 1;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.contact-copy p {
  margin-top: 0;
}

.contact-form {
  border-radius: 14px;
  box-shadow: none;
}

.contact-form h2 {
  margin: 0 0 0.25rem;
}

.contact-map-block {
  margin-top: 1.2rem;
}

.contact-socials-center {
  margin-top: 1.1rem;
  text-align: center;
}

.contact-socials-center .socials-row {
  justify-content: center;
  gap: 1rem;
}

.contact-socials-center .social-icon svg {
  width: 34px;
  height: 34px;
}

.contact-map-block h2 {
  margin: 0 0 0.35rem;
}

.contact-map-block p {
  margin-top: 0;
}

.map-embed {
  width: 100%;
  min-height: 360px;
  border: 0;
  border-radius: 12px;
  background: #fff;
}

.services-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}

.service-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.service-title svg {
  width: 20px;
  height: 20px;
  color: #4a3191;
  flex: 0 0 auto;
}

@media (min-width: 681px) {
  .blog-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .comment-form-actions {
    flex-direction: row;
    justify-content: flex-end;
  }
}

@media (min-width: 981px) {
  .header-top-row {
    width: auto;
    flex: 1 1 0;
  }
  .nav-wrap {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
  }
  .menu-toggle {
    display: none;
  }
  .mobile-wa-float {
    display: none;
  }
  .site-header .logo-wrap {
    min-width: 260px;
  }
  .site-header .primary-nav {
    width: auto;
    flex: 0 1 auto;
    margin: 0 auto;
  }
  .site-header .btn.primary {
    width: auto;
    flex: 1 1 0;
    margin-left: auto;
    max-width: max-content;
  }
  .site-header .header-logo-img {
    width: 260px;
    max-height: 72px;
    transform: scale(1.15);
  }
  nav a {
    font-size: 0.95rem;
  }
  .hero-grid {
    grid-template-columns: 1.2fr 1fr;
  }
  .hero-grid.hero-grid-full {
    grid-template-columns: 1fr;
  }
  .hero-copy {
    padding: 2rem;
  }
  .hero-media {
    min-height: 300px;
  }
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer-wrap {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
  .footer-col {
    align-items: flex-start;
    text-align: left;
  }
  .footer-links.vertical,
  .socials.vertical {
    align-items: flex-start;
  }
  .socials-row {
    justify-content: flex-start;
  }
  .footer-symbols {
    gap: 1rem;
    padding-top: 0.65rem;
  }
  .footer-symbols img {
    width: 40px;
    height: 40px;
  }
  .hero-symbols {
    gap: 1.25rem;
    padding-top: 0.45rem;
  }
  .hero-symbols img {
    width: 128px;
    height: 128px;
  }
  .page-hero .page-hero-media {
    aspect-ratio: 16 / 6;
  }
  .equilibrio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .blog-list-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .setmore-embed {
    min-height: 75vh;
  }
  .setmore-embed.citas-embed {
    min-height: clamp(1500px, 210dvh, 2800px);
    height: clamp(1500px, 210dvh, 2800px);
  }
  .subscribe-row {
    flex-direction: row;
    align-items: center;
  }
  .subscribe-row .btn {
    width: auto;
  }
  .wa-float {
    width: 64px;
    height: 64px;
    right: 18px;
    bottom: 18px;
  }
  .contact-layout {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
    gap: 1.4rem;
  }
  .services-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.6rem;
  }
}

@media (max-width: 980px) {
  .hero {
    padding: 2.4rem 0 2rem;
  }
  .section {
    padding: 1.6rem 0;
  }
  .hero-copy {
    padding: 1rem;
  }
  .hero-copy .btn {
    display: flex;
    width: min(100%, 320px);
    min-height: 46px;
    margin: 0.5rem auto 0;
    text-align: center;
  }
  .comments-actions .btn,
  .comment-form-actions .btn,
  .subscribe-row .btn {
    display: flex;
    width: min(100%, 320px);
    min-height: 46px;
    margin-inline: auto;
    justify-content: center;
  }
  .comments-actions {
    display: flex;
    justify-content: center;
  }
  .site-header .primary-nav {
    display: none;
  }
  .site-header .primary-nav.is-open {
    display: block;
  }
  .site-header .btn.primary {
    display: none;
  }
  .site-header .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding-top: 0.4rem;
  }
  .site-header .primary-nav a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.62rem 0.75rem;
    border: 1px solid #ebe8f4;
    background: #fff;
  }
}

.titulos-grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.titulo-item {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.42);
  padding: 0.35rem;
  display: block;
  box-shadow: 0 14px 28px rgba(31, 42, 46, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.titulo-item img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}

.titulo-pdf {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  color: #4a3191;
  background: #f5efff;
}

@media (min-width: 641px) {
  .titulos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 981px) {
  .titulos-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cert-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 120;
}

.cert-modal.open {
  display: block;
}

.cert-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 21, 0.78);
}

.cert-modal-content {
  position: relative;
  z-index: 1;
  width: min(96vw, 1100px);
  max-height: 92vh;
  margin: 3vh auto;
  background: #fff;
  border-radius: 10px;
  padding: 0.7rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.cert-modal-content img {
  width: 100%;
  max-height: 86vh;
  object-fit: contain;
  display: block;
}

.cert-modal-close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #4a3191;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.meditaciones-grid {
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.meditacion-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  height: 100%;
}

.video-thumb-btn {
  display: block;
  border: 0;
  padding: 0;
  margin: 0 0 0.8rem;
  border-radius: 12px;
  overflow: hidden;
  background: #e9edf0;
  cursor: pointer;
  position: relative;
}

.video-thumb-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 0.35s ease;
}

.video-thumb-btn::after {
  content: "▶";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: rgba(20, 22, 34, 0.62);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  opacity: 0.92;
  transition: transform 0.25s ease, opacity 0.25s ease, background 0.25s ease;
}

.video-thumb-btn:hover .video-thumb-img,
.video-thumb-btn:focus-visible .video-thumb-img {
  transform: scale(1.06);
}

.video-thumb-btn:hover::after,
.video-thumb-btn:focus-visible::after {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  background: rgba(74, 49, 145, 0.84);
}

.meditacion-card h2.meditacion-title {
  margin: 0 0 0.9rem;
  font-size: 16px;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.open-video-btn {
  margin-top: auto;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: none;
}

.video-modal.open {
  display: block;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(7, 11, 24, 0.78);
}

.video-modal-content {
  position: relative;
  z-index: 2;
  width: min(94vw, 1020px);
  margin: 4vh auto;
  padding: 1rem;
}

.video-modal-content .video-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.video-modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 0;
  background: #4a3191;
  color: #fff;
  font-size: 1.45rem;
  cursor: pointer;
}

.consent-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 220;
  max-width: 740px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #d9d5ea;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(31, 42, 46, 0.2);
  padding: 1rem;
}

.niw-cookie-card {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 220;
  max-width: 760px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #d9d5ea;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(31, 42, 46, 0.2);
  padding: 1rem;
}

.niw-cookie-card__header h2 {
  margin: 0.25rem 0;
  font-size: 1.1rem;
  color: #3f2a7c;
}

.niw-cookie-card__header p {
  margin: 0;
  color: #3a3f52;
  font-size: 0.95rem;
}

.niw-cookie-card__eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  color: #6a5f89;
  text-transform: uppercase;
}

.niw-cookie-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.niw-cookie-card__config {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid #ece8f5;
}

.niw-cookie-btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.68rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

.niw-cookie-btn--primary {
  background: #4a3191;
  color: #fff;
}

.niw-cookie-btn--muted {
  background: #e6defa;
  color: #3f2a7c;
}

.niw-cookie-btn--ghost {
  background: #fff;
  border-color: #d9d5ea;
  color: #4a3191;
}

.niw-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.45rem 0;
}

.niw-toggle span {
  display: grid;
  gap: 0.1rem;
}

.niw-toggle small {
  color: #566175;
}

@media (max-width: 640px) {
  .niw-cookie-card__actions .niw-cookie-btn {
    width: 100%;
  }
}

.consent-banner-title {
  margin: 0 0 0.25rem;
  font-weight: 700;
  color: #3f2a7c;
}

.consent-banner-text {
  margin: 0;
  color: #3a3f52;
  font-size: 0.95rem;
}

.consent-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.consent-btn-primary {
  background: #4a3191;
  color: #fff;
}

.consent-btn-soft {
  background: #e6defa;
  color: #3f2a7c;
}

.consent-btn-outline {
  background: #fff;
  border-color: #d9d5ea;
  color: #4a3191;
}

.consent-banner-panel {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid #ece8f5;
}

.consent-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.45rem 0;
  color: #333b4a;
}

.consent-panel-actions {
  margin-top: 0.6rem;
}

@media (max-width: 640px) {
  .consent-banner-actions .btn,
  .consent-panel-actions .btn {
    width: 100%;
  }
}
