:root {
  color-scheme: dark;
  --color-primary: #fe9200;
  --color-accent: #000000;
  --color-text: #ffffff;
  --color-muted: #111111;
  --font-heading: "Fredoka One", sans-serif;
  --font-body: "Poppins", sans-serif;
  --max-width: 960px;
  --card-radius: 28px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-body);
  background: var(--color-accent);
  color: var(--color-text);
}

/* Fondo global detrás de todo */
body {
  position: relative;
  overflow-x: hidden;
  /* podés dejar el color para el caso "Ninguno" */
  background: var(--color-accent);
}

/* Capas de fondo (visibles) */
#background-media,
#background-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;   /* no bloquean clics */
}

#background-media { z-index: 0; }
#background-overlay { z-index: 1; }

/* Contenido arriba */
.site-shell { position: relative; z-index: 2; }

/* Que el video/imagen ocupen todo y recorten bien */
#background-media > video,
#background-media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

[data-img-frame] {
  position: relative;
  overflow: hidden;
  display: block;
}

[data-img-frame] > img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform-origin: center center;
}

[data-img-frame][data-fit="contain"] > img {
  object-fit: contain;
}

[data-img-frame][data-fit="cover"] > img {
  object-fit: cover;
}

[data-img-frame][data-fit="fill"] > img {
  object-fit: fill;
}

[data-img-frame][data-fit="scale-down"] > img {
  object-fit: scale-down;
}

[data-img-frame][data-crop-mode="legacy-transform"] > img,
[data-img-frame][data-crop-mode="custom-transform"] > img {
  will-change: transform;
}

.site-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.top-nav__brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
}

.top-nav__links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.top-nav__links a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.top-nav__links a.is-active,
.top-nav__links a:hover {
  background: rgba(255, 255, 255, 0.15);
}

main {
  flex: 1;
}

.section-wrapper {
  position: relative;
  padding: 1rem 1.5rem 4rem;
}

.section-wrapper:first-of-type {
  padding-top: 0;
}

.section {
  max-width: var(--max-width);
  margin: 0 auto 3rem;
  padding: 2.5rem;
  border-radius: var(--card-radius);
  background: rgba(17, 17, 17, 0.68);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
}

.section--hero {
  padding: clamp(1.5rem, 4vw, 2rem) clamp(1.5rem, 4vw, 2rem);
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 5vw, 2.625rem);
  line-height: 1.15;
  margin: 0;
}

.hero__subtitle {
  font-size: 1.2rem;
  margin: clamp(0.35rem, 2vw, 0.55rem) 0 0;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.button--primary {
  background: var(--color-primary);
  color: #111;
  box-shadow: 0 12px 30px rgba(254, 146, 0, 0.35);
}

.button--ghost {
  background: rgba(255,255,255,0.08);
  color: var(--color-text);
  border: 1px solid rgba(255,255,255,0.15);
}

.button:hover {
  transform: translateY(-1px);
}

.section--textoInformativo {
  text-align: center;
}

.section--textoInformativo h2 {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  margin-bottom: 1.5rem;
}

.section--textoInformativo p {
  margin: 0.5rem 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
}

.section--opcionesCompra h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 1.75rem;
  text-align: center;
}

.link-cards {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.link-card {
  position: relative;
  padding: 1.75rem;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.link-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.45);
}

.link-card [data-img-frame] {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  margin-bottom: 1rem;
}

.link-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.link-card__subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
}

.section--galeriaImagenes .image-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  grid-template-columns: minmax(0, 1fr);
}

.section--galeriaImagenes .image-card {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

@media (min-width: 720px) {
  .section--galeriaImagenes .image-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.section--galeriaImagenes .image-card__media {
  display: block;
  border-radius: 20px;
  overflow: hidden;
}

.section--galeriaImagenes .image-card__media [data-img-frame] {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
}

.section--galeriaImagenes .image-card__media [data-img-frame] > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section--galeriaImagenes .image-card__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.section--galeriaImagenes .image-card__heading {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  margin: 0;
}

.section--galeriaImagenes .image-card__description {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
}

.section--imageCarousel h2 {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.section--imageCarousel p {
  text-align: center;
}

.carousel {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
}

.carousel [data-img-frame] {
  border-radius: 18px;
  width: clamp(190px, 32vw, 280px);
  aspect-ratio: 9 / 16;
  scroll-snap-align: center;
}

.section--detalleVisual {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
  align-items: center;
}

.imageHighlight__media [data-img-frame] {
  width: 100%;
  aspect-ratio: 5 / 6; /* Portada – 5:6 cover */
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
}

.imageHighlight__body h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.imageHighlight__body p {
  line-height: 1.7;
  color: rgba(255,255,255,0.8);
}

.section--botonAccion {
  text-align: center;
}

.section--botonAccion [data-img-frame] {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1; /* Logos/elementos sensibles – contener */
  border-radius: 18px;
  margin: 0 auto 1.5rem;
}
.section--botonAccion [data-img-frame] > img {
  object-fit: contain;
}

.winner-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.winner-card {
  padding: 1.75rem;
  border-radius: 22px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.winner-card [data-img-frame] {
  width: 100%;
  aspect-ratio: 1 / 1; /* Miniaturas ganadores – 1:1 cover */
  border-radius: 16px;
}

.winner-card__title {
  font-size: 1.2rem;
  font-weight: 700;
}

.winner-card__meta {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}

/* Key-Value section */
.key-value {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0.5rem 1rem;
}
.key-value dt {
  font-weight: 700;
  color: #fff;
}
.key-value dd {
  margin: 0;
  color: rgba(255,255,255,0.85);
}

/* FAQ section */
.section--faq h3 { margin-top: 0; }
.faq-list details {
  background: #141414;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 8px 0;
  border: 1px solid rgba(255,255,255,0.08);
}
.faq-list summary { cursor: pointer; font-weight: 600; }
.faq-list .answer { margin-top: 8px; color: #ddd; line-height: 1.6; }

.section--faq h3 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 1.75rem;
  text-align: center;
}

.section--faq .faq-list details {
  background: var(--color-primary);
  border-radius: 999px;
  padding: 12px 14px;
  margin: 8px 0;
  border: 1px solid rgba(0,0,0,0.2);
}

.section--faq .faq-list summary {
  color: #111;
  font-weight: 600;
}

.section--faq .faq-list .answer {
    color: #111;
}

.section--tarjetaValidacion h2 {
  font-family: var(--font-heading);
  font-size: 2.1rem; /* igual que otras tarjetas (texto/galería) */
  margin-bottom: 1.5rem;
  text-align: center;
}

.section--tarjetaValidacion p {
  margin: 0.5rem 0;
  font-size: 1.05rem; /* igual que subtítulos en texto informativo */
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
  text-align: center;
}

.section--tarjetaValidacion .validation-box {
  max-width: 520px;
  margin: 0 auto;
  display: grid;
  gap: 0.5rem;
}

.section--tarjetaValidacion .validation-input {
  width: 100%;
  font-size: 1rem; /* igual que FAQ summary por defecto */
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.section--tarjetaValidacion .button {
  font-family: var(--font-body);
  font-size: 1rem; /* igual que los textos de los desplegables FAQ */
}

.section--tarjetaValidacion .validation-feedback {
  font-size: 0.98rem;
  text-align: center; /* Centrar mensaje de confirmación */
}

.site-footer {
  padding: 2rem 1.5rem 3rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

@media (max-width: 720px) {
  .section {
    padding: 1.75rem;
  }

  .top-nav {
    padding: 1rem 1.25rem;
  }
}
/* Editor overlay */
.editor-toggle {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #111;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 18px 38px rgba(0,0,0,0.35);
  z-index: 50;
}

.editor-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100vh;
  background: rgba(12,12,12,0.95);
  backdrop-filter: blur(18px);
  border-left: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 60;
  display: flex;
  flex-direction: column;
  overflow-x: hidden; /* Prevent horizontal scrollbar on the panel itself */
}

.editor-panel.is-open {
  transform: translateX(0);
}

.editor-panel__header {
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-family: var(--font-heading);
  letter-spacing: 0.04em;
}

.editor-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.editor-panel fieldset {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 1rem 1.1rem 1.3rem;
}

.editor-panel legend {
  padding: 0 0.4rem;
  font-weight: 600;
}

.editor-panel label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
  color: rgba(255,255,255,0.75);
}
.editor-image-field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
  padding: 0 1.1rem; /* Added for consistent internal spacing */
}

.editor-image-field label {
  margin-bottom: 0;
}

.editor-image-field input[type="file"] {
  font-size: 0.85rem;
  color: inherit;
}

.editor-image-preview {
  width: 80%; /* Reduced width as per user suggestion */
  margin: 0 auto; /* Center the image preview */
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background-color: rgba(255,255,255,0.04);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transition: border-color 0.2s ease;
}

.editor-image-preview.is-empty {
  border-style: dashed;
  border-color: rgba(255,255,255,0.18);
  background-image: linear-gradient(45deg, rgba(255,255,255,0.04) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.04) 50%, rgba(255,255,255,0.04) 75%, transparent 75%, transparent);
  background-size: 32px 32px;
}

.editor-image-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  width: 80%; /* Match the width of the preview */
  margin: 0 auto; /* Center the controls */
  justify-content: center;
}

.editor-image-controls input[type="file"] {
  flex: 1;
}

.editor-image-controls button {
  padding: 0.55rem 0.95rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.1);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  min-width: 0; /* Allow to shrink below content size */
}

.editor-image-controls button:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}

.editor-cropper-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.78);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 120;
}

.editor-cropper-overlay.is-open {
  display: flex;
}

.editor-cropper {
  width: min(920px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #111;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 28px 48px rgba(0,0,0,0.45);
  overflow: hidden;
}

.editor-cropper__title {
  font-weight: 600;
  padding: 1.1rem 1.5rem 0 1.5rem;
}

.editor-cropper__body {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 0 1.5rem 1.25rem 1.5rem;
  justify-content: center;
  flex: 1;
  overflow-y: auto;
}

.editor-cropper__canvas {
  width: min(600px, 65vw);
  max-width: 100%;
  border-radius: 12px;
  background: #000;
  border: 1px solid rgba(255,255,255,0.08);
}

.editor-cropper__aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: clamp(200px, 25vw, 240px);
}

.editor-cropper__label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
}

.editor-cropper__preview {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #000;
}

.editor-cropper__zoom {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

.editor-cropper__zoom input[type="range"] {
  width: 100%;
}

.editor-cropper__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 0 1.5rem 1.5rem;
}

.editor-cropper__actions button {
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.1);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.editor-cropper__confirm {
  background: var(--color-primary);
  border-color: rgba(0,0,0,0.2);
  color: #111;
  font-weight: 600;
}

.editor-cropper__confirm:hover {
  background: #ffac39;
}

.editor-cropper__cancel:hover {
  background: rgba(255,255,255,0.16);
}

@media (max-width: 720px) {
  .editor-cropper__body {
    flex-direction: column;
    align-items: center;
  }

  .editor-cropper__aside {
    width: 100%;
    min-width: 0;
  }

  .editor-cropper__preview {
    max-width: 320px;
    margin: 0 auto;
  }
}


.editor-panel input,
.editor-panel textarea,
.editor-panel select {
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-family: inherit;
  word-break: break-word; /* Ensure long words break */
  overflow-wrap: break-word; /* Ensure long words wrap */
  width: 100%; /* Make them take full available width */
  min-width: 0; /* Allow them to shrink below content size */
}

.editor-panel textarea {
  min-height: 90px;
  resize: vertical;
}

.editor-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.editor-panel__actions button,
.editor-panel__actions a {
  padding: 0.65rem 1.1rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
}

.editor-color-field {
  display: grid;
  gap: 0.5rem;
}

.editor-color-field__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.editor-color-field__label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 220px;
  font-weight: 500;
}

.editor-color-field__label input {
  width: 100%;
  font-weight: 400;
}

.editor-color-field__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
  font-weight: 500;
}

.editor-color-field__preview {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.45);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25);
  background: transparent;
}

.editor-color-field__preview.is-empty {
  background: repeating-conic-gradient(#bbb 0% 25%, transparent 0% 50%) 0 0 / 8px 8px;
}

.editor-color-field__palette {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  background: rgba(0,0,0,0.55);
  padding: 0.75rem;
  display: grid;
  gap: 0.75rem;
}

.editor-color-field__swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.editor-color-field__swatch {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.4);
  background: var(--swatch-color);
  cursor: pointer;
}

.editor-color-field__custom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.editor-color-field__custom input[type="color"] {
  width: 48px;
  height: 36px;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.editor-color-field__code {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 500;
  flex: 1; /* Allow to grow and shrink */
  min-width: 0; /* Allow to shrink below content size */
}

.editor-color-field__code input {
  font-weight: 400;
}

.editor-color-field__pick-btn {
  padding: 0.55rem 0.95rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.1);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  width: 100%; /* Make it take full width */
}

.editor-color-field__pick-btn:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}

.section-editor {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 1rem 1.1rem 1.3rem;
  margin-bottom: 1rem;
}

.section-editor__heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  cursor: pointer;
  list-style: none; /* For Firefox */
}

.section-editor__heading::-webkit-details-marker {
  display: none;
}

.section-editor__controls {
  display: flex;
  gap: 0.4rem;
}

.section-editor__controls button {
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.5);
  color: #fff;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
}

.section-editor__grid {
  display: grid;
  gap: 0.75rem;
}

.editor-inline-list {
  display: grid;
  gap: 0.75rem;
}

.editor-inline-item {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 0.75rem;
}

.editor-inline-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.editor-inline-item__header button {
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
}

.editor-add-section {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

@media (max-width: 720px) {
  .editor-panel {
    width: 100vw;
  }
}
/* === HERO === */
.hero {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 3vw, 1.25rem);
}

.hero__media {
  width: 100%;
}

.hero-banner {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--card-radius);
  display: block;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0,0,0,0.35);
}

.hero-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.hero__profile-wrapper {
  width: clamp(4.25rem, 12vw, 5.5rem);
  height: clamp(4.25rem, 12vw, 5.5rem);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: clamp(0.75rem, 2vw, 1rem);
}

.hero-profile {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  overflow: hidden;
  border: 3px solid #111;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  object-fit: cover;
  display: block;
}

.hero-body--with-profile {
  position: relative;
  padding-top: clamp(0.25rem, 1.5vw, 0.75rem);
}

.hero-body--with-profile .hero__profile-wrapper {
  position: absolute;
  bottom: 0;
  right: 0;
  /* Desktop size (>= 1024px) */
  width: 10rem;
  height: 10rem; /* Explicit height */
  margin-bottom: 0;
  z-index: 1; /* Lift avatar above parent's clipping path */
}

.hero-body .button-row {
  justify-content: flex-start;
  margin: clamp(1rem, 3vw, 1.25rem) 0 clamp(1rem, 3vw, 1.25rem)
}

.hero-body .social-list {
  margin-top: clamp(0.75rem, 2vw, 1rem);
  justify-content: flex-start;
}

/* Tablet size */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-body--with-profile .hero__profile-wrapper {
    width: 9rem;
    height: 9rem; /* Explicit height */
  }
}

@media (max-width: 767px) {
  .hero {
    gap: 1.25rem;
  }

  .hero-body {
    align-items: flex-start;
  }

  .hero-body--with-profile {
    padding-left: 0;
    padding-top: 0;
  }

  .hero-body--with-profile .hero__profile-wrapper {
    /* Mobile size */
    width: 7.5rem;
    height: 7.5rem; /* Explicit height */
  }
}
.social-list {
  display: flex;
  justify-content: center; /* Center the group */
  gap: clamp(1rem, 4vw, 1.5rem); /* More space: 16px to 24px */
  align-items: center;
  padding: 0;
  margin: 0;
  list-style: none;
}

.social-list li {
  margin: 0;
  padding: 0;
}

.social-list a {
  display: inline-block; /* Allow padding */
  padding: 0.5rem; /* 8px clickable area */
  background: transparent; /* No background */
  border-radius: 0; /* No circle */
  box-shadow: none; /* No shadow */
  transition: opacity 0.2s ease; /* Subtle hover transition */
  color: #fff;
  /* Remove fixed width/height and grid centering */
}

.social-list a:hover {
  opacity: 0.85; /* Subtle hover effect */
  transform: none; /* Remove previous transform */
  box-shadow: none; /* Ensure no shadow on hover */
}

.social-list a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px; /* Slight radius for the outline */
}


.social-list svg {
  width: clamp(1.5rem, 5vw, 1.75rem); /* 24px to 28px */
  height: clamp(1.5rem, 5vw, 1.75rem);
  fill: currentColor;
  display: block; /* Remove extra space below */
}
@media (prefers-reduced-motion: reduce) {
  video { animation: none; }
}
/* Lightbox minimal */
.lightbox[hidden] { display: none !important; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-rows: 1fr;
}
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.9);
}
.lightbox__stage {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 6vh 4vw;
}
.lightbox__img {
  max-width: 92vw;
  max-height: 82vh;
  transition: transform 0.08s ease-out;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox__caption {
  position: absolute;
  left: 0; right: 0; bottom: 14px;
  text-align: center;
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  padding: 0 16px;
}
.lightbox__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
/* Utilities: relación y ajuste */
.image--cover, .image--contain {
  width: 100%;
  height: 100%;
}
.image--cover { object-fit: cover !important; }
.image--contain { object-fit: contain !important; }

.editor-rich-text-toolbar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.format-button {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 4px;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

[data-img-frame] {
  position: relative;            /* para hit area consistente */
  touch-action: manipulation;    /* mejora tap en mobile */
}

/* Prevents "double cropping" when using legacy transform crop mode */
.carousel [data-img-frame][data-crop-mode="legacy-transform"] > img {
  object-fit: fill;
}

/* Toggle Switch Styles */
.editor-toggle-switch {
  position: relative;
  display: flex;
  align-items: center;
  height: 22px; /* Match the height of the slider */
  margin-bottom: 0.9rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  width: fit-content; /* Allow the label to shrink to fit its content */
}

.editor-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  right: 0;
  cursor: pointer;
  top: 0;
  left: auto;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
  width: 40px;
  height: 22px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--color-primary);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--color-primary);
}

input:checked + .slider:before {
  -webkit-transform: translateX(18px);
  -ms-transform: translateX(18px);
  transform: translateX(18px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Radio Group Styles */
.editor-radio-group {
  margin-bottom: 1.5rem;
}

.editor-radio-group > div:first-of-type {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 0.5rem;
}

.editor-radio-options {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.editor-radio-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.9rem;
  color: #fff;
}

.editor-radio-option input[type="radio"] {
  margin-right: 0.5rem;
  width: auto;
  height: auto;
  min-width: 0;
}

.dev-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  text-decoration: underline;
  opacity: .55;
  cursor: pointer;
}
.dev-link:hover { opacity: .85; }

/* Modal */
.modal.hidden { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: rgba(0,0,0,.45);
}
.modal-box {
  width: min(92vw, 380px);
  background: #111;
  color: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,.6);
}
.modal-box input {
  width: 100%;
  margin-top: 6px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.1);
  background: #0b0b0b;
  color: #fff;
}
.modal-actions {
  display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px;
}
.modal-actions button {
  border: 0; padding: 10px 14px; border-radius: 8px; cursor: pointer;
}
.modal-actions button[type="submit"] { background: #2b7fff; color: #fff; }
.modal-actions #dev-cancel { background: #333; color: #ddd; }
.error { color: #ff6961; min-height: 1.2em; }

/* Ocultar UI de edición para visitantes */
#edit-toggle, .editor-panel { display: none; }
.admin #edit-toggle { display: inline-flex; }
.admin .editor-panel.is-open { display: flex; }

.page-selector-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-selector-wrapper .editor-toggle-switch {
  transform: scale(0.8);
}
