/* =========================================
   LocalWebBase - Base estructural mínima
   Este archivo NO define el diseño visual fuerte.
   Los colores, menú, hero y footer están en themes/fusion_latina.css
========================================= */

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
}

img {
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

/* =========================================
   Fase 15C - Estructura común de secciones
   El diseño visual detallado corresponde a cada tema.
========================================= */

.lwb-sections {
  display: grid;
  gap: 32px;
}

.lwb-section {
  width: 100%;
}

.lwb-section-container {
  box-sizing: border-box;
}

.lwb-section-title {
  margin-bottom: 10px;
}

.lwb-section-subtitle {
  margin-bottom: 18px;
}

.lwb-section-body > :last-child {
  margin-bottom: 0;
}

.lwb-section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.lwb-section-image {
  display: block;
  width: 100%;
  height: auto;
}

.lwb-section-button {
  display: inline-block;
  margin-top: 18px;
  text-decoration: none;
}

.lwb-section-hero .lwb-section-body {
  position: relative;
  z-index: 1;
}

@media (max-width: 760px) {
  .lwb-section-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================
   FASE 15E - MODOS DE AJUSTE DE IMAGEN
========================================= */
.lwb-section-media {
  min-width: 0;
  overflow: hidden;
}

.lwb-section-image.lwb-image-fit-cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.lwb-section-image.lwb-image-fit-contain {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.lwb-section-image.lwb-image-fit-natural {
  width: auto;
  max-width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  margin-inline: auto;
}

/* =========================================
   FASE 16A - SERVICIOS DINÁMICOS
========================================= */
.lwb-services-header {
  max-width: 760px;
  margin-bottom: 28px;
}

.lwb-services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.lwb-service-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}

.lwb-service-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e5e7eb;
}

.lwb-service-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.lwb-service-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 24px 24px 0;
  border-radius: 50%;
  background: #f1f5f9;
  font-size: 2rem;
  line-height: 1;
}

.lwb-service-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
}

.lwb-service-title {
  margin: 0;
  color: #111827;
  font-size: 1.3rem;
  line-height: 1.25;
}

.lwb-service-price {
  margin: 10px 0 0;
  color: #111827;
  font-weight: 800;
}

.lwb-service-description {
  margin-top: 14px;
  color: #4b5563;
  line-height: 1.65;
}

.lwb-service-description p:first-child { margin-top: 0; }
.lwb-service-description p:last-child { margin-bottom: 0; }

.lwb-service-button {
  margin-top: auto;
  padding-top: 18px;
  color: #111827;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.lwb-services-footer { margin-top: 28px; }
.lwb-services-empty { margin: 0; color: #64748b; font-style: italic; }

@media (max-width: 900px) {
  .lwb-services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .lwb-services-grid { grid-template-columns: 1fr; }
}

/* =========================================
   FASE 16B - GALERÍA DE IMÁGENES
========================================= */
.lwb-gallery-header {
  max-width: 780px;
  margin: 0 auto 28px;
  text-align: center;
}

.lwb-gallery-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 22px;
  width: 100%;
}

.lwb-gallery-item {
  flex: 0 1 calc(33.333% - 15px);
  width: calc(33.333% - 15px);
  min-width: 0;
  max-width: 340px;
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
}

.lwb-gallery-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #e5e7eb;
  cursor: zoom-in;
}

.lwb-gallery-thumbnail {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .25s ease;
}

.lwb-gallery-open:hover .lwb-gallery-thumbnail,
.lwb-gallery-open:focus-visible .lwb-gallery-thumbnail {
  transform: scale(1.035);
}

.lwb-gallery-open:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.lwb-gallery-zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(15, 23, 42, .82);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
}

.lwb-gallery-caption {
  padding: 18px 20px 20px;
}

.lwb-gallery-caption h3 {
  margin: 0;
  font-size: 1.15rem;
}

.lwb-gallery-caption p {
  margin: 8px 0 0;
  color: #64748b;
  line-height: 1.55;
}

.lwb-gallery-item:only-child { grid-column: 1 / -1; }
.lwb-gallery-footer { margin-top: 28px; text-align: center; }
.lwb-gallery-empty { margin: 0; color: #64748b; font-style: italic; }

.lwb-lightbox[hidden] { display: none; }
.lwb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
}

.lwb-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .88);
}

.lwb-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  align-items: center;
}

.lwb-lightbox-figure {
  min-width: 0;
  max-height: calc(100vh - 48px);
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lwb-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 170px);
  object-fit: contain;
  background: #111;
}

.lwb-lightbox-caption {
  box-sizing: border-box;
  width: min(760px, 100%);
  padding: 14px 18px;
  background: #fff;
  color: #111827;
  text-align: center;
}

.lwb-lightbox-caption h3,
.lwb-lightbox-caption p { margin: 0; }
.lwb-lightbox-caption p { margin-top: 6px; color: #4b5563; }

.lwb-lightbox-close,
.lwb-lightbox-nav {
  border: 0;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  cursor: pointer;
}

.lwb-lightbox-close {
  position: absolute;
  top: -12px;
  right: 0;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 2rem;
}

.lwb-lightbox-nav {
  width: 46px;
  height: 64px;
  border-radius: 8px;
  font-size: 3rem;
  line-height: 1;
}

.lwb-lightbox-nav:hover,
.lwb-lightbox-nav:focus-visible,
.lwb-lightbox-close:hover,
.lwb-lightbox-close:focus-visible { background: rgba(255, 255, 255, .28); }

body.lwb-lightbox-open { overflow: hidden; }

@media (max-width: 900px) {
  .lwb-gallery-item {
    flex-basis: calc(50% - 11px);
    width: calc(50% - 11px);
    max-width: 360px;
  }
}

@media (max-width: 620px) {
.lwb-gallery-grid {
    gap: 18px;
  }

  .lwb-gallery-item {
    flex-basis: 100%;
    width: 100%;
    max-width: 360px;
  }

  .lwb-lightbox {
    padding: 12px;
  }

  .lwb-lightbox-dialog {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }

  .lwb-lightbox-nav {
    width: 36px;
    height: 52px;
    font-size: 2.3rem;
  }

  .lwb-lightbox-close {
    top: 4px;
    right: 4px;
  }

  .lwb-lightbox-image {
    max-height: calc(100vh - 150px);
  }
}


/* =========================================
   FASE 16D - GALERÍA DE VIDEOS
========================================= */
.lwb-video-gallery-header { max-width: 780px; margin: 0 auto 28px; text-align: center; }
.lwb-video-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
}
.lwb-video-item {
  flex: 0 1 560px;
  width: min(100%, 560px);
  min-width: 0;
  max-width: 560px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(15,23,42,.08);
}
.lwb-video-item:only-child { margin-inline: auto; }
.lwb-video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #111; }
.lwb-video-frame iframe, .lwb-video-frame video { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; }
.lwb-video-external { position: relative; width: 100%; height: 100%; display: grid; place-items: center; background: #111 center/cover no-repeat; }
.lwb-video-external.has-thumbnail::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.42); }
.lwb-video-external a { position: relative; z-index: 1; display: inline-flex; padding: 12px 20px; border-radius: 999px; background: #fff; color: #111827; font-weight: 800; text-decoration: none; }
.lwb-video-caption { padding: 18px 20px 20px; }
.lwb-video-caption h3 { margin: 0; font-size: 1.15rem; }
.lwb-video-caption div { margin-top: 8px; color: #64748b; line-height: 1.55; }
.lwb-video-caption p:first-child { margin-top: 0; }
.lwb-video-caption p:last-child { margin-bottom: 0; }
.lwb-video-footer { margin-top: 28px; text-align: center; }
.lwb-video-empty { margin: 0; color: #64748b; font-style: italic; }
@media (max-width: 720px) {
  .lwb-video-grid { gap: 20px; }
  .lwb-video-item { max-width: 100%; }
}

/* Fase 16E: publicaciones y Reels de Instagram */
.lwb-instagram-header {
    max-width: 780px;
    margin: 0 auto 28px;
    text-align: center;
}
.lwb-instagram-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 28px;
    width: 100%;
}
.lwb-instagram-item {
    flex: 0 1 540px;
    width: min(100%, 540px);
    min-width: 0;
    max-width: 540px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(15,23,42,.12);
    border-radius: 14px;
    box-shadow: 0 10px 26px rgba(15,23,42,.08);
}
.lwb-instagram-item:only-child {
    margin-inline: auto;
}
.lwb-instagram-item .instagram-media {
    display: block !important;
    min-width: 0 !important;
    width: calc(100% - 2px) !important;
    max-width: 540px !important;
    margin: 1px auto !important;
}
.lwb-instagram-caption { padding: 18px 20px 20px; border-top: 1px solid rgba(15,23,42,.08); }
.lwb-instagram-caption h3 { margin: 0; font-size: 1.15rem; }
.lwb-instagram-caption div { margin-top: 8px; color: #64748b; line-height: 1.55; }
.lwb-instagram-caption p:first-child { margin-top: 0; }
.lwb-instagram-caption p:last-child { margin-bottom: 0; }
.lwb-instagram-footer { margin-top: 28px; text-align: center; }
@media (max-width: 620px) {
    .lwb-instagram-grid { gap: 20px; }
    .lwb-instagram-item { border-radius: 10px; }
    .lwb-instagram-caption { padding: 16px; }
}

/* =========================================
   FASE 16F - HORARIOS DINÁMICOS
========================================= */
.lwb-schedule-section { overflow: hidden; }
.lwb-schedule-header { max-width: 780px; margin: 0 auto 24px; text-align: center; }
.lwb-schedule-header h2 { margin-top: 0; }
.lwb-schedule-status {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 26px;
  padding: 10px 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  border-radius: 999px;
  font-size: .98rem;
}
.lwb-schedule-status.is-open { background: #dcfce7; color: #166534; }
.lwb-schedule-status.is-closed { background: #fee2e2; color: #991b1b; }
.lwb-schedule-status span { font-weight: 500; }
.lwb-schedule-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 24px;
  align-items: start;
}
.lwb-schedule-card {
  min-width: 0;
  padding: 22px;
  background: #fff;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(15,23,42,.08);
}
.lwb-schedule-card h3 { margin: 0 0 14px; text-align: center; }
.lwb-schedule-week { margin: 0; }
.lwb-schedule-day {
  display: grid;
  grid-template-columns: minmax(110px, .75fr) minmax(150px, 1.25fr);
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid rgba(15,23,42,.09);
}
.lwb-schedule-day.is-first { border-top: 0; }
.lwb-schedule-day dt { font-weight: 800; }
.lwb-schedule-day dd { margin: 0; text-align: right; }
.lwb-schedule-day dd span,
.lwb-schedule-special-time span { display: block; }
.lwb-schedule-day small,
.lwb-schedule-special small { display: block; margin-top: 4px; color: #64748b; }
.lwb-schedule-special {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(130px, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid rgba(15,23,42,.09);
}
.lwb-schedule-special:first-of-type { border-top: 0; }
.lwb-schedule-special time,
.lwb-schedule-special strong { display: block; }
.lwb-schedule-special time { margin-top: 8px; color: #64748b; font-size: .92rem; }
.lwb-schedule-special-title { margin-top: 3px; font-size: 1rem; }
.lwb-schedule-special-note { margin: 5px 0 0; color: #64748b; font-size: .92rem; line-height: 1.4; }
.lwb-schedule-special-time { align-self: center; text-align: right; font-weight: 800; }
.lwb-schedule-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: #fff3cd;
  color: #7a5200;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .02em;
}
.lwb-schedule-footer { margin-top: 26px; text-align: center; }
@media (max-width: 620px) {
  .lwb-schedule-card { padding: 18px; }
  .lwb-schedule-day,
  .lwb-schedule-special { grid-template-columns: 1fr; gap: 6px; }
  .lwb-schedule-day dd,
  .lwb-schedule-special-time { text-align: left; }
  .lwb-schedule-status { border-radius: 14px; }
}

/* =========================================
   FASE 16G - CONTACTO DINÁMICO
========================================= */
.lwb-contact-section { overflow: hidden; }
.lwb-contact-header { max-width: 780px; margin: 0 auto 28px; text-align: center; }
.lwb-contact-header h2 { margin-top: 0; }
.lwb-contact-layout { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(340px, 1.35fr); gap: 24px; align-items: stretch; }
.lwb-contact-layout.no-map { grid-template-columns: minmax(280px, 720px); justify-content: center; }
.lwb-contact-card, .lwb-contact-map { min-width: 0; background: #fff; border: 1px solid rgba(15,23,42,.12); border-radius: 14px; box-shadow: 0 10px 26px rgba(15,23,42,.08); }
.lwb-contact-card { padding: 24px; }
.lwb-contact-card h3 { margin: 0 0 16px; text-align: center; }
.lwb-contact-list { display: grid; }
.lwb-contact-row { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 12px; padding: 14px 0; border-top: 1px solid rgba(15,23,42,.09); }
.lwb-contact-row:first-child { border-top: 0; }
.lwb-contact-symbol { display: grid; place-items: start center; font-size: 1.25rem; }
.lwb-contact-row strong, .lwb-contact-row span, .lwb-contact-row small, .lwb-contact-row a { display: block; }
.lwb-contact-row strong { margin-bottom: 3px; }
.lwb-contact-row small { margin-top: 4px; color: #64748b; }
.lwb-contact-row a { color: inherit; overflow-wrap: anywhere; }
.lwb-contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.lwb-contact-action { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 18px; border-radius: 999px; background: #111827; color: #fff; font-weight: 800; text-decoration: none; }
.lwb-contact-action.is-whatsapp { background: #168c4b; }
.lwb-social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(15,23,42,.09); }
.lwb-social-link { display: inline-flex; padding: 8px 13px; border: 1px solid rgba(15,23,42,.14); border-radius: 999px; color: inherit; font-weight: 700; text-decoration: none; }
.lwb-contact-map { overflow: hidden; min-height: 380px; }
.lwb-contact-map iframe { display: block; width: 100%; height: 100%; min-height: 380px; border: 0; }
.lwb-contact-footer { margin-top: 26px; text-align: center; }
@media (max-width: 820px) { .lwb-contact-layout { grid-template-columns: 1fr; } .lwb-contact-map, .lwb-contact-map iframe { min-height: 320px; } }
@media (max-width: 520px) { .lwb-contact-card { padding: 18px; } .lwb-contact-actions { align-items: stretch; flex-direction: column; } .lwb-contact-action { width: 100%; } }

/* =========================================
   FASE 16H - HERO DINÁMICO CON CARRUSEL
========================================= */
.lwb-hero-carousel {
  position: relative;
  min-height: clamp(420px, 62vw, 680px);
  overflow: hidden;
  isolation: isolate;
  padding: 0;
}

.lwb-hero-track,
.lwb-hero-slide {
  position: absolute;
  inset: 0;
}

.lwb-hero-slide {
  display: grid;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transition: opacity .65s ease, visibility .65s ease;
}

.lwb-hero-slide.is-active {
  visibility: visible;
  opacity: 1;
  z-index: 1;
}

.lwb-hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 48px, 1180px);
  margin-inline: auto;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .4);
}

.lwb-hero-content .lwb-section-title {
  max-width: 850px;
  margin-top: 0;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 1.02;
}

.lwb-hero-content .lwb-section-subtitle,
.lwb-hero-content .lwb-section-body {
  max-width: 720px;
}

.lwb-hero-control {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 48px;
  height: 64px;
  border: 0;
  border-radius: 12px;
  background: rgba(0, 0, 0, .42);
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background .2s ease, transform .2s ease;
}

.lwb-hero-control:hover,
.lwb-hero-control:focus-visible {
  background: rgba(0, 0, 0, .7);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.lwb-hero-prev { left: 20px; }
.lwb-hero-next { right: 20px; }

.lwb-hero-dots {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 22px;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.lwb-hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 999px;
  background: transparent;
  box-shadow: 0 1px 8px rgba(0, 0, 0, .4);
  cursor: pointer;
  transition: width .2s ease, background .2s ease;
}

.lwb-hero-dot.is-active {
  width: 30px;
  background: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .lwb-hero-slide,
  .lwb-hero-control,
  .lwb-hero-dot {
    transition: none;
  }
}

@media (max-width: 760px) {
  .lwb-hero-carousel {
    min-height: 520px;
  }

  .lwb-hero-content {
    width: min(100% - 40px, 680px);
    padding-inline: 30px;
    box-sizing: border-box;
  }

  .lwb-hero-control {
    width: 38px;
    height: 52px;
    font-size: 2rem;
  }

  .lwb-hero-prev { left: 8px; }
  .lwb-hero-next { right: 8px; }
}

/* =========================================
   AJUSTE FASE 14 - LOGOS Y REDES GLOBALES
   Estructura común compatible con todos los temas.
========================================= */
.fusion-logo-image {
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
}

.fusion-header-logo-image {
  max-width: min(280px, 52vw);
  max-height: var(--lwb-header-logo-height, 56px);
}

.fusion-footer-logo-image {
  max-width: min(360px, 78vw);
  max-height: var(--lwb-footer-logo-height, 72px);
}

@media (max-width: 760px) {
  .fusion-header-logo-image {
    max-width: min(230px, 58vw);
    max-height: var(--lwb-header-logo-mobile-height, 42px);
  }

  .fusion-footer-logo-image {
    max-width: min(320px, 82vw);
    max-height: var(--lwb-footer-logo-mobile-height, 56px);
  }
}

.fusion-logo-copy {
  min-width: 0;
}

.fusion-site-footer a {
  color: inherit;
}

.fusion-site-footer p a {
  text-decoration: none;
}

.fusion-site-footer p a:hover,
.fusion-site-footer p a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fusion-social-link {
  flex: 0 0 auto;
  text-decoration: none;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.fusion-social-link:hover,
.fusion-social-link:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.fusion-social-symbol {
  line-height: 1;
}
