/* ================= VARIABLES CONFIGURABLES ================= */
:root {
  /* Foto perfil redimensionable */
  --profile-img-size: 200px;

  /* Configuración del slider de Redes Sociales */
  --icon-size: 45px;
  --icon-gap: 25px;

  /* Configuración del carrusel de la Galería */
  --gal-thumb-size: 100px;
  --gal-gap: 15px;

  /* Configuración del preload */
  --preload-bg: #121212;
  --spinner-color: #3498db;
  --spinner-size: 60px;
  --spinner-speed: 1s;
  --fade-speed: 0.5s;

  /* Configuración Nuevos Iconos */
  --new-margin-top: 5px;
  --new-margin-bottom: 10px;
  --new-icon-size: 50px;
  --new-icon-gap: 20px;
  --new-icon-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  --new-icon-shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ================= PRELOADER ================= */
#preload-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--preload-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity var(--fade-speed) ease, visibility var(--fade-speed);
}

.loader-icon {
  width: var(--spinner-size);
  height: var(--spinner-size);
  border: 5px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--spinner-color);
  border-radius: 50%;
  animation: spin var(--spinner-speed) linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

body.loading {
  overflow: hidden;
}

/* ================= ESTILOS GENERALES Y ESTRUCTURA ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
  background: #f4f4f4;
}

.bg-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../img/fondo.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(0px);
  transform: scale(1.05);
  z-index: -1;
}

.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.15);
  z-index: -1;
}

.container {
  background: rgba(255, 255, 255, 0.95);
  max-width: 450px;
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  overflow: hidden;
  text-align: center;
  padding: 10px 20px;
  backdrop-filter: blur(5px);
}

/* Cabecera y Enlaces */
.profile-img {
  width: var(--profile-img-size);
  height: var(--profile-img-size);
  border-radius: 25px;
  object-fit: cover;
  border: 8px solid #183F70;
  margin-bottom: 20px;
  max-width: 100%;
}

.title { font-size: 1.6rem; color: #222; margin-bottom: 5px; }
.subtitle { font-size: 1rem; color: #666; margin-bottom: 0px; }

.links-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 25px;
}

.btn-link, .btn-dropdown-toggle {
  display: block;
  width: 100%;
  padding: 15px;
  background: linear-gradient(1deg, rgba(116, 36, 145, 1) 0%, rgba(0, 0, 0, 1) 55%, rgba(0, 0, 0, 1) 100%);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s, background 0.2s;
  box-shadow: 0 4px 6px rgba(0,123,255,0.15);
  text-align: center;
}

.btn-link:hover, .btn-dropdown-toggle:hover {
  background: #742491;
  transform: translateY(-2px);
}

/* Desplegables */
.dropdown { width: 100%; }
.dropdown-content {
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  transition: max-height 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s ease-out, visibility 0.2s;
  background: #f8f9fa;
  border-radius: 0 0 12px 12px;
  margin-top: -5px;
  border: 1px solid #e9ecef;
  border-top: none;
}
.dropdown-content a {
  display: block;
  padding: 12px 20px;
  color: #333;
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid #e9ecef;
  transition: background 0.2s;
  text-align: center;
}
.dropdown-content a:last-child { border-bottom: none; }
.dropdown-content a:hover { background: #e2e6ea; }

/* CORREGIDO: Se aumentó el max-height a 600px para albergar las 14 líneas y se agregó scroll por seguridad */
.dropdown.active .dropdown-content { 
  max-height: 600px; 
  opacity: 1; 
  visibility: visible; 
  overflow-y: auto;
}

/* Opcional: Estilo elegante para la barra de scroll (solo si el contenido supera los 600px en pantallas pequeñas) */
.dropdown-content::-webkit-scrollbar {
  width: 6px;
}
.dropdown-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* Formulario WhatsApp */
.whatsapp-form-container {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 30px;
  border: 1px solid #e9ecef;
  text-align: left;
}
.whatsapp-form-container h3 { font-size: 1.1rem; margin-bottom: 15px; color: #222; text-align: center; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: #555; margin-bottom: 5px; }
.form-group input, .form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  background-color: #fff;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus { border-color: #25d366; }
.btn-whatsapp-submit {
  width: 100%;
  padding: 12px;
  background: #25d366;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}
.btn-whatsapp-submit:hover { background: #128c7e; }

/* ================= CAROUSEL DE LA GALERÍA PRINCIPAL ================= */
.slider-main-wrapper {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 15px 60px;
  background: transparent;
  box-sizing: border-box;
}

.slider-window {
  overflow: hidden;
  width: 100%;
  padding: 20px 0;
  margin: -20px 0;
}

.slider-grid {
  display: flex;
  gap: 12px;
  transition: transform 0.3s ease-out;
}

.gallery-item {
  flex: 0 0 calc(25% - 9px);
  position: relative;
  border-radius: 5px;
  background: transparent;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover { transform: translateY(-8px); }

.gallery-item img, .gallery-item video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  cursor: pointer;
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
}

.video-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  transition: background 0.2s ease, transform 0.2s ease;
}

.video-badge svg { width: 25px; height: 25px; fill: #111827; margin-left: 2px; }
.gallery-item:hover .video-badge { background: rgba(255, 255, 255, 0.40); transform: translate(-50%, -50%) scale(1.05); }

/* --- FLECHAS ESCRITORIO --- */
.arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #f3f4f6;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, transform 0.2s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  z-index: 10;
}
.arrow-btn:hover { background-color: #e5e7eb; }
.arrow-btn:active { transform: translateY(-50%) scale(0.95); }
.arrow-btn svg { width: 20px; height: 20px; stroke: #4b5563; fill: none; }
.arrow-left { left: 8px; }
.arrow-right { right: 8px; }

/* ================= ADAPTACIÓN MÓVIL (FLECHAS A LOS LADOS) ================= */
@media (max-width: 900px) {
  .slider-main-wrapper { 
    padding: 15px 45px; /* Crea el espacio perfecto en los lados para las flechas */
  }
  .slider-window {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
  .slider-window::-webkit-scrollbar { display: none; }
  .slider-window { -ms-overflow-style: none; scrollbar-width: none; }

  .slider-grid { gap: 16px; padding: 0 5px; }
  .gallery-item { flex: 0 0 85%; scroll-snap-align: center; }
  
  /* ¡CORREGIDO! Flechas visibles a los lados en pantallas móviles sin pisar la foto */
  .arrow-btn { 
    display: flex !important; 
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }
  .arrow-left { left: 2px; }
  .arrow-right { right: 2px; }
}

/* ================= LIGHTBOX / MODAL DE PANTALLA COMPLETA ================= */
.lightbox-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-color: rgba(0, 0, 0, 0.96) !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999999 !important;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  box-sizing: border-box;
}
.lightbox-overlay.active { opacity: 1; pointer-events: auto; visibility: visible; }

.lightbox-controls { position: absolute; top: 20px; right: 20px; display: flex; gap: 16px; z-index: 10000000; }
.control-btn { width: 42px; height: 42px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.15); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.control-btn:hover { background-color: rgba(255, 255, 255, 0.3); }
.control-btn svg { width: 20px; height: 20px; stroke: #ffffff; fill: none; }

.lightbox-stage { position: relative; width: 100%; max-width: 1000px; height: 60vh; padding: 0 20px; display: flex; align-items: center; justify-content: center; user-select: none; touch-action: pan-y; box-sizing: border-box; }
.lightbox-stage img, .lightbox-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7); transition: opacity 0.15s ease; }

/* Carrete de miniaturas dentro de Lightbox */
.thumbs-container { width: 100%; max-width: 600px; margin-top: 30px; padding: 0 40px; position: relative; box-sizing: border-box; }
.thumbs-window { overflow: hidden; width: 100%; }
.thumbs-wrapper { display: flex; gap: 12px; transition: transform 0.3s ease-out; }
.thumb-item { width: 80px; height: 55px; object-fit: cover; border-radius: 6px; border: 2px solid transparent; opacity: 0.4; cursor: pointer; transition: all 0.2s ease; flex-shrink: 0; }
.thumb-item.active { border-color: #ffffff; opacity: 1; transform: scale(1.05); }

.thumb-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.15); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.thumb-arrow:hover { background-color: rgba(255, 255, 255, 0.3); }
.thumb-arrow svg { width: 14px; height: 14px; stroke: #ffffff; fill: none; }
.thumb-arrow-left { left: 0; }
.thumb-arrow-right { right: 0; }

/* ================= SLIDER DE REVIEWS NATIVO ================= */
.native-slider-scope {
  background: transparent !important;
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 10px 0;
}

.native-slider-track {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 15px 5px;
  scrollbar-width: none;
}
.native-slider-track::-webkit-scrollbar { display: none; }

.native-slider-item {
  scroll-snap-align: start;
  width: 100px !important;
  height: 100px !important;
  flex: 0 0 100px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.native-slider-item:hover { transform: scale(1.1); box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25); z-index: 5; }
.native-slider-item img, .native-slider-item video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

.native-slider-nav { display: flex; justify-content: center; gap: 20px; margin-top: 10px; }
.native-nav-btn { background: #e0e0e0; border: none; color: #666; font-size: 18px; width: 35px; height: 35px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.native-nav-btn:hover { background: #cccccc; }

/* Modal HTML5 Expansión Nativa */
.native-modal {
  border: none;
  background: transparent;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  padding: 0;
  margin: 0;
  position: fixed;
  top: 0;
  left: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}
.native-modal[open] { display: flex; }
.native-modal::backdrop { background: rgba(0, 0, 0, 0.88); backdrop-filter: blur(2px); }
.native-modal-media-box { max-width: 90%; max-height: 60vh; display: flex; align-items: center; justify-content: center; }
.native-modal-media-box img, .native-modal-media-box video { max-width: 100%; max-height: 60vh; object-fit: contain; border-radius: 4px; }
.native-modal-caption { color: #ffffff; font-family: sans-serif; font-size: 18px; margin: 15px 0; text-align: center; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }

.native-modal-thumbs { display: flex; gap: 10px; max-width: 90%; overflow-x: auto; padding: 5px; }
.native-thumb-preview { width: 50px; height: 50px; border-radius: 2px; cursor: pointer; opacity: 0.5; transition: opacity 0.2s, transform 0.2s; object-fit: cover; border: 5px solid transparent; }
.native-thumb-preview.active { opacity: 1; border-color: #000000; transform: scale(1.05); }

.native-modal-close {
  position: absolute; top: 50px; right: 50px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: #000000; color: #fff; font-size: 18px; border-radius: 50%; border: none !important; outline: none !important; cursor: pointer; transition: all 0.25s ease;
}
.native-modal-close:hover { background: blue; transform: scale(1.08); }

/* ================= SLIDER REDES SOCIALES (ICONOS TÁCTILES) ================= */
.new-slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 420px;
  margin: var(--new-margin-top) auto var(--new-margin-bottom) auto;
  padding: 0 35px;
  box-sizing: border-box;
}

.new-slider-container {
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  background: transparent !important;
  padding: 15px 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.new-slider-container::-webkit-scrollbar { display: none; }

.new-slider-track { display: flex; gap: var(--new-icon-gap); width: max-content; background: transparent !important; }
.new-slider-item { flex: 0 0 var(--new-icon-size); width: var(--new-icon-size); height: var(--new-icon-size); background: transparent !important; scroll-snap-align: start; }
.new-slider-item a { display: block; width: 100%; height: 100%; background: transparent !important; }
.new-slider-item img { width: 80%; height: 80%; object-fit: contain; display: block; background: transparent !important; filter: drop-shadow(var(--new-icon-shadow)); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease; }
.new-slider-item img:hover { transform: scale(1.25); filter: drop-shadow(var(--new-icon-shadow-hover)); }

/* Botones e Iconos Redes */
.new-slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, 0.06); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.1); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; z-index: 10; display: flex; justify-content: center; align-items: center; transition: all 0.3s ease;
}
.new-slider-btn:hover { background: #ffffff; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); transform: translateY(-50%) scale(1.08); }
.new-slider-btn::after { content: ''; display: block; width: 8px; height: 8px; border-top: 2px solid #333333; border-right: 2px solid #333333; }
.new-slider-wrapper .prev-btn { left: -5px; }
.new-slider-wrapper .prev-btn::after { transform: rotate(-135deg); margin-left: 3px; }
.new-slider-wrapper .next-btn { right: -5px; }
.new-slider-wrapper .next-btn::after { transform: rotate(45deg); margin-right: 3px; }

.new-slider-track.is-centered { width: 100% !important; justify-content: center !important; margin: 0 auto !important; }
.new-slider-wrapper.no-controls .new-slider-btn { display: none !important; }
.new-slider-wrapper.no-controls .new-slider-container { overflow-x: hidden !important; }

/* ================= MODAL CÓDIGO QR ================= */
.custom-qr-replacement-container { position: absolute; top: 10px; right: 10px; z-index: 999; }
.custom-mini-trigger { width: 32px; height: 32px; cursor: pointer; border-radius: 5px; border: 3px solid #000; }

.custom-isolated-overlay {
  position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important; background-color: #000000 !important; z-index: 999999 !important;
  display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease;
}
.custom-isolated-overlay.custom-active { opacity: 1 !important; visibility: visible !important; }
.custom-modal-image-wrapper { max-width: 100%; max-height: 100%; display: flex; justify-content: center; align-items: center; }
.custom-solo-fullscreen-image { max-width: 100vw; max-height: 100vh; object-fit: contain; }

.custom-close-btn-elegant {
  position: absolute !important; top: 25px !important; right: 25px !important; background: rgba(255, 255, 255, 0.1) !important; border: 1px solid rgba(255, 255, 255, 0.3) !important;
  width: 50px !important; height: 50px !important; border-radius: 50% !important; cursor: pointer !important; display: flex !important; align-items: center !important; justify-content: center !important; z-index: 1000000 !important; transition: transform 0.2s ease, background-color 0.2s ease !important;
}
.custom-close-icon-img { width: 24px; height: 24px; object-fit: contain; pointer-events: none; }
.custom-close-btn-elegant:hover { background-color: rgba(255, 255, 255, 0.25) !important; transform: scale(1.05); }

/* PIE DE PÁGINA */
.brand-footer { text-align: center; padding: 20px; width: 100%; border-top: 1px solid #eee; margin-top: 20px; }
.footer-logo { max-width: 150px; height: auto; display: inline-block; margin-bottom: 10px; }




        /* =======================================================
           CONTADOR
           ======================================================= */
        :root {
            --counter-size: 18px; /* <--- Cambia el tamaño aquí (ej: 40px, 90px, etc.) */
            --flip-bg: #1a1a1a;    /* Color de fondo de las tarjetas */
            --flip-color: #ffffff; /* Color de los números */
        }

        body {
            margin: 0; padding: 0; display: flex; justify-content: center;
            align-items: center; min-height: 100vh; background-color: #f4f6f9;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        }

        .interface-container {
            background: transparent; padding: calc(var(--counter-size) * 0.5) calc(var(--counter-size) * 0.7);
            border-radius: 16px; box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
            text-align: center; border: 1px solid #eef0f3;
        }

        .interface-title {
            font-size: calc(var(--counter-size) * 0.23); color: #8a94a6;
            text-transform: uppercase; letter-spacing: 2px; margin-bottom: calc(var(--counter-size) * 0.35); font-weight: 700;
        }

        .flip-counter { display: flex; gap: calc(var(--counter-size) * 0.1); justify-content: center; }

        .flip-card {
            position: relative; width: var(--counter-size); height: calc(var(--counter-size) * 1.4);
            background-color: var(--flip-bg); color: var(--flip-color); border-radius: calc(var(--counter-size) * 0.12);
            font-size: calc(var(--counter-size) * 0.9); font-weight: bold; line-height: calc(var(--counter-size) * 1.4);
            text-align: center; box-shadow: 0 5px 15px rgba(0,0,0,0.3); overflow: hidden;
        }

        /* Línea central del pliegue */
        .flip-card::after {
            content: ''; position: absolute; top: 50%; left: 0; width: 100%; height: 1px;
            background-color: rgba(0, 0, 0, 0.6); z-index: 2;
        }

        /* Sombreado de la tarjeta física */
        .flip-card-inner {
            position: absolute; width: 100%; height: 100%; left: 0; top: 0; pointer-events: none; z-index: 3;
            background: linear-gradient(to bottom, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.3) 100%);
        }

        /* =======================================================
           CONTADOR
           ======================================================= */