/* ==========================================================================
   VALLEJO GROWERS - HOJA DE ESTILOS UNIFICADA
   ========================================================================== */

/* 1. VARIABLES RAÍZ Y MODO OSCURO */
:root {
  --primary: #0003ac;
  --primary-hover: #3b3ee3;
  --primary-light: #eef2ff;
  --accent-blue: #2563eb;
  
  /* Fondos y Estructura */
  --bg-main: #e6ecf3;
  --bg-header: rgba(230, 236, 243, 0.8);
  --bg-card: rgba(242, 246, 250, 0.8);
  --bg-section: #dbe3ed;

  /* Tipografía */
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-color: rgba(196, 208, 222, 0.7);
  
  /* Fuentes */
  /* Estilo Apple: en iPhone/iPad/Mac se usa SF Pro (la letra del sistema);
     en Windows/Android, Inter (Google Fonts), la más parecida a SF Pro. */
  --font-heading: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif;
  
  /* Sombras, Radios y Transiciones */
  --radius-sm: 6px;
  --radius-md: 12px;
  --shadow-sm: 0 2px 8px rgba(23, 23, 154, 0.06);
  --shadow-md: 0 8px 24px rgba(23, 23, 154, 0.12);
  --transition: all 0.25s ease;
}

/* Modo Oscuro - Activación por clase en html/body o atributo data-theme */
html.dark-mode,
body.dark-mode,
html[data-theme="dark"] {
  --primary: #4f52f5;
  --primary-hover: #3b3ee3;
  --primary-light: #1e2548;
  --accent-blue: #60a5fa;
  --bg-main: #131629;
  --bg-header: rgba(19, 22, 41, 0.75);
  --bg-card: rgba(22, 28, 51, 0.65);
  --bg-section: #11162b;
  --text-main: #f0f4f8;
  --text-muted: #94a3b8;
  --border-color: rgba(36, 44, 76, 0.7);
}

/* 2. RESETEO GLOBAL Y BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text-main);
  line-height: 1.25;
}

/* Títulos al estilo Apple: negrita real y letras un poco más juntas */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.022em;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.825rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent-blue);
  display: block;
  margin-bottom: 0.5rem;
}

.section-head {
  margin-bottom: 2.5rem;
}

.section-head.center {
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.section-head h2 {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
}

.section-head p {
  color: var(--text-muted);
}

/* 3. BOTONES Y ACCIONES */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  border: 2px solid var(--primary);
  cursor: pointer;
  transition: var(--transition);
}

.btn:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-outline {
  background-color: transparent;
  color: var(--accent-blue);
  border-color: var(--accent-blue);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* 4. HEADER Y NAVEGACIÓN */
.main-header {
  position: sticky;
  top: 0;
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.logo .mark {
  width: 32px;
  height: 32px;
  color: var(--accent-blue);
}

.logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  background: transparent;
  padding: 0.25rem 0;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.nav-links a:hover {
  color: var(--accent-blue);
}

.nav-links a.active {
  color: var(--accent-blue);
  font-weight: 700;
  border-bottom: 2px solid var(--accent-blue);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.icon-moon { display: none; }
body.dark-mode .icon-sun,
html.dark-mode .icon-sun { display: none; }
body.dark-mode .icon-moon,
html.dark-mode .icon-moon { display: block; }

/* 5. SECCIÓN HERO Y CARRUSEL PRINCIPAL */
.hero {
  padding: 5rem 0 6rem;
  /* Halos suaves que se desvanecen antes de los bordes: sin cortes con la sección siguiente */
  background:
    radial-gradient(ellipse 55% 60% at 85% 35%, var(--primary-light) 0%, transparent 70%),
    radial-gradient(ellipse 45% 50% at 8% 70%, rgba(37, 99, 235, 0.07) 0%, transparent 70%),
    var(--bg-main);
}

/* Entrada suave del hero al cargar la página (solo CSS, sin parpadeos) */
.hero-content,
.hero-art {
  animation: heroEnter 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-art {
  animation-delay: 0.15s;
}

@keyframes heroEnter {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1.25rem;
}

.hero-content .lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
}

.stat-row {
  display: flex;
  gap: 2.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

.stat b {
  display: block;
  font-size: 1.75rem;
  color: var(--accent-blue);
}

.stat span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.hero-art {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.media-carousel {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 480px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  flex-shrink: 0;
}

.carousel-slide img,
.carousel-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(12, 16, 33, 0.6);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
  backdrop-filter: blur(4px);
}

.carousel-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--transition);
}

.carousel-dots .dot.active {
  background: var(--accent-blue);
  width: 24px;
  border-radius: 12px;
}

/* 6. PLACEHOLDERS Y FORMATOS */
.sketch-placeholder {
  width: 100%;
  height: 100%;
  background-color: var(--border-color);
  border: 2px dashed #9ca3af;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-align: center;
  padding: 1rem;
  box-sizing: border-box;
  user-select: none;
}

.sketch-placeholder svg {
  width: 48px;
  height: 48px;
  margin-bottom: 0.5rem;
  opacity: 0.6;
}

.sketch-placeholder span {
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.8;
}

.aspect-portrait { height: 480px; }
.aspect-square { height: 260px; }
.aspect-landscape { height: 280px; }
.aspect-banner { width: 100%; height: 220px; }

.history-gallery {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 1.5em;
  margin-top: 2.5rem;
}

.why-hero-image {
  margin-bottom: 3rem;
}

/* 7. TARJETAS GENERALES Y EFECTO CRISTAL (GLASSMORPHISM) */
.rose-card,
.compact-card,
.timeline-card,
.modal-card,
.overview-card,
.reason-card,
.chatbot-card {
  background-color: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Elevación suave al pasar el cursor */
.overview-card:hover,
.reason-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Secciones con tono alterno: entran y salen en degradado desde el fondo principal,
   así no hay líneas de corte entre bloques ni con el footer */
.overview-section,
.catalog-section,
.why-section {
  background: linear-gradient(
    180deg,
    var(--bg-main) 0%,
    var(--bg-section) 22%,
    var(--bg-section) 78%,
    var(--bg-main) 100%
  );
}

/* Overview */
.overview-section {
  padding: 5rem 0;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.overview-card {
  padding: 2rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.overview-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.overview-card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.link-btn {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.925rem;
}

/* Catálogo Grid */
.catalog-section {
  padding: 5rem 0;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.rose-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.rose-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.rose-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.rose-card h3 {
  font-size: 1.35rem;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
}

.color-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  min-height: 2.8rem;
  margin-bottom: auto;
  line-height: 1.3;
}

.rose-card button {
  margin-top: 1.25rem;
  width: 100%;
  max-width: 200px;
  flex-shrink: 0;
}

/* Historia */
.history-section {
  padding: 5rem 0;
}

.history-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
}

/* Línea del tiempo (página Historia) */
.history-section-compact {
  padding: 5rem 0;
}

.history-section-compact .history-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.history-section-compact .compact-card {
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.history-section-compact .compact-card:hover {
  transform: translateY(-6px);
}

.history-section-compact .compact-card-media .sketch-placeholder {
  border-radius: 0;
  border: none;
  min-height: 170px;
}

.history-section-compact .compact-card-body {
  padding: 1.75rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.history-section-compact .compact-card-body h4 {
  font-size: 1.15rem;
  margin: 0;
}

.history-section-compact .compact-card-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.history-section-compact .timeline-year {
  align-self: flex-start;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background-color: var(--primary-light);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.history-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  border-left: 2px solid var(--primary);
  padding-left: 1.5rem;
}

.timeline-year {
  font-weight: 700;
  color: var(--accent-blue);
  display: block;
  font-size: 0.875rem;
}

.timeline-item h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.timeline-item p {
  color: var(--text-muted);
  font-size: 0.925rem;
}

/* Por Qué Nosotros */
.why-section {
  padding: 5rem 0;
}

.reasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.reason-card {
  padding: 2rem;
  border-radius: var(--radius-md);
}

.reason-icon {
  width: 48px;
  height: 48px;
  background-color: var(--primary-light);
  color: var(--accent-blue);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.reason-icon svg {
  width: 24px;
  height: 24px;
}

.reason-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.reason-card p {
  color: var(--text-muted);
  font-size: 0.925rem;
}

/* 8. CONTACTO, FORMULARIOS Y CHATBOT INLINE */
.contact-section {
  padding: 5rem 0;
  background:
    radial-gradient(ellipse 50% 55% at 90% 15%, var(--primary-light) 0%, transparent 70%),
    radial-gradient(ellipse 40% 45% at 5% 85%, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  align-items: start;
}

.chatbot-card {
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.chatbot-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.chatbot-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--accent-blue);
}

.chatbot-title svg {
  width: 24px;
  height: 24px;
}

.chatbot-messages {
  height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-right: 0.5rem;
  margin-bottom: 1rem;
}

.message {
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  max-width: 85%;
  white-space: pre-line; /* respeta los saltos de línea de las respuestas del chatbot */
}

.message.bot {
  background-color: var(--primary-light);
  color: var(--text-main);
  align-self: flex-start;
  border: 1px solid var(--border-color);
}

.message.user {
  background-color: var(--primary);
  color: #ffffff;
  align-self: flex-end;
}

.message.msg-typing {
  font-style: italic;
  opacity: 0.7;
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  from { opacity: 0.4; }
  to { opacity: 0.9; }
}

.chatbot-quick-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.quick-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.quick-btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.chatbot-input-form {
  display: flex;
  gap: 0.5rem;
}

.chatbot-input-form input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-main);
  color: var(--text-main);
}

.contact-info-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-list {
  font-style: normal;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.925rem;
}

.contact-list a {
  color: var(--accent-blue);
  text-decoration: none;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
}

.form-group input, 
.form-group textarea {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  color: var(--text-main);
  font-family: var(--font-body);
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #25d366;
  border-color: #25d366;
  color: #ffffff;
}

.btn-whatsapp:hover:not(:disabled) {
  background-color: #1ebe5a;
  border-color: #1ebe5a;
}

.btn-whatsapp:disabled {
  opacity: 0.7;
  cursor: wait;
}

.form-hint {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.form-status {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.form-status:empty { display: none; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status.success { color: #16a34a; }
.form-status.error { color: #dc2626; }

.form-group input[aria-invalid],
.form-group textarea[aria-invalid] {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.form-group input:focus, 
.form-group textarea:focus {
  outline: 2px solid var(--primary);
}

/* 9. MODAL DE CATÁLOGO DE ROSAS */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 200;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  max-width: 900px;
  width: 92%;
  padding: 2.5rem;
  position: relative;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  margin-top: 1.25rem;
}

.modal-carousel {
  position: relative;
  width: 100%;
  height: 380px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
}

.modal-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal-carousel-slide {
  min-width: 100%;
  height: 100%;
}

.modal-carousel-slide.sketch-placeholder {
  border-radius: 0;
  border: none;
  height: 100%;
}

.modal-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(12, 16, 33, 0.7);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.35rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

.modal-carousel-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.modal-carousel-btn.prev { left: 12px; }
.modal-carousel-btn.next { right: 12px; }

.modal-carousel-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.modal-carousel-dots .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--transition);
}

.modal-carousel-dots .dot.active {
  background: var(--accent-blue);
  width: 22px;
  border-radius: 10px;
}

.modal-info-side p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.modal-info-side ul {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.modal-info-side li {
  font-size: 0.9rem;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 0.45rem;
  color: var(--text-main);
}

.modal-info-side li strong {
  color: var(--accent-blue);
}

/* 10. PIE DE PÁGINA (FOOTER) */
.main-footer {
  position: relative;
  /* El footer nace del fondo principal y se oscurece poco a poco */
  background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-section) 65%);
  padding: 4rem 0 3rem;
}

/* Línea divisoria que se desvanece hacia los lados en vez de un borde duro */
.main-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%, 1100px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color) 20%, var(--border-color) 80%, transparent);
}

/* Sombra sutil del header al hacer scroll */
.main-header.is-scrolled {
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
}

/* Aparición progresiva de contenido al hacer scroll (la clase la añade script.js) */
html.js-reveal .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--reveal-delay, 0s);
}

html.js-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-content,
  .hero-art {
    animation: none;
  }

  html.js-reveal .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  font-size: 1.2rem;
}

.footer-brand p {
  font-size: 0.8rem;
  line-height: 1.4;
  margin-top: 0.5rem;
  color: var(--text-muted);
}

.footer-links h4 {
  font-size: 0.9rem;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent-blue);
}

.footer-copy {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-copy p {
  font-size: 0.775rem;
  color: var(--text-muted);
}

.footer-legal-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.footer-legal-links a {
  font-size: 0.775rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-legal-links a:hover {
  color: var(--accent-blue);
}

/* 10b. REDES SOCIALES (footer, contacto y página principal) */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--primary);
  transition: var(--transition);
}

.social-link svg {
  width: 18px;
  height: 18px;
}

.social-link:hover,
.social-link:focus-visible {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.social-facebook:hover,
.social-facebook:focus-visible { background: #1877f2; border-color: #1877f2; }
.social-instagram:hover,
.social-instagram:focus-visible { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); border-color: #dc2743; }
.social-tiktok:hover,
.social-tiktok:focus-visible { background: #010101; border-color: #010101; }

html.dark-mode .social-link,
html[data-theme="dark"] .social-link {
  color: var(--accent-blue);
}

.contact-social .social-links {
  margin-top: 0.5rem;
}

/* Sección de redes en la página principal */
.social-section {
  padding: 4rem 0 5rem;
}

.social-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.social-card:hover,
.social-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.social-card-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #ffffff;
}

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

.social-card.social-facebook .social-card-icon { background: #1877f2; }
.social-card.social-instagram .social-card-icon { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); }
.social-card.social-tiktok .social-card-icon { background: #010101; }

/* La tarjeta no cambia de fondo al pasar el cursor; solo el ícono lleva el color de marca */
.social-card.social-facebook:hover,
.social-card.social-instagram:hover,
.social-card.social-tiktok:hover,
.social-card.social-facebook:focus-visible,
.social-card.social-instagram:focus-visible,
.social-card.social-tiktok:focus-visible {
  background: var(--bg-card);
  border-color: var(--accent-blue);
}

html.dark-mode .social-card.social-tiktok .social-card-icon,
html[data-theme="dark"] .social-card.social-tiktok .social-card-icon {
  border: 1px solid #334155;
}

.social-card-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.social-card-text strong {
  font-family: var(--font-heading);
  font-size: 1.1rem;
}

.social-card-text small {
  color: var(--text-muted);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

/* 11. BARRA DE FILTROS DEL CATÁLOGO */
.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6em;
  margin-bottom: 2.5rem;
}

.filter-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.5rem 1.1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  transform: translateY(-1px);
}

.filter-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(79, 82, 245, 0.25);
}

/* Colores por filtro: cada botón se rellena con su color (o degradado si son dos) */
.filter-btn[data-filter="rojo"]     { --filter-color: #d32f2f; --filter-bg: #d32f2f; --filter-text: #ffffff; }
.filter-btn[data-filter="rosa"]     { --filter-color: #f06292; --filter-bg: linear-gradient(135deg, #f48fb1 0%, #d81b60 100%); --filter-text: #ffffff; }
.filter-btn[data-filter="blanco"]   { --filter-color: #d8c08a; --filter-bg: linear-gradient(135deg, #ffffff 0%, #f3e2b3 100%); --filter-text: #1f2937; }
.filter-btn[data-filter="amarillo"] { --filter-color: #fbc02d; --filter-bg: linear-gradient(135deg, #fdd835 0%, #fb8c00 100%); --filter-text: #1f2937; }
.filter-btn[data-filter="bicolor"]  { --filter-color: #ab47bc; --filter-bg: linear-gradient(135deg, #ec407a 0%, #7e57c2 100%); --filter-text: #ffffff; }

.filter-btn[data-filter]:not([data-filter="all"]):hover {
  border-color: var(--filter-color, var(--accent-blue));
  color: var(--text-main, inherit);
}

.filter-btn[data-filter]:not([data-filter="all"]).active {
  background: var(--filter-bg, var(--primary));
  border-color: var(--filter-color, var(--primary));
  color: var(--filter-text, #ffffff);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

/* 12. CHATBOT FLOTANTE Y WIDGET GLOBAL */
.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
}

.chat-toggle-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.chat-toggle-btn:hover {
  transform: scale(1.08);
  background-color: var(--primary-hover);
}

.chat-toggle-btn svg {
  width: 26px;
  height: 26px;
}

.chat-window {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 420px;
  max-width: 90vw;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px) scale(0.95);
  transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.chat-window.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chat-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.chat-close-btn:hover {
  color: var(--text-main);
}

/* 13. SECCIÓN SOBRE NOSOTROS Y ESLOGAN */
.about-section {
  padding-top: 5rem;
  margin-top: 3rem;
}

.about-cards-grid {
  margin-top: 3.5rem;
}

.slogan-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}

.slogan-text {
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--primary);
  font-size: 1.25rem;
  margin: auto 0;
  padding: 1.5rem 0;
  text-align: center;
}

/* 14. DESTINOS DE EXPORTACIÓN Y COBERTURA */
.destinations-section {
  padding: 4rem 0 6rem 0;
}

.destinations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.destination-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.destination-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.destination-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.dest-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.destination-card-header h3 {
  font-size: 1.25rem;
  margin: 0;
  color: var(--text-main);
}

.destination-card-header span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.destination-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dest-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  background-color: var(--bg-section);
  color: var(--text-main);
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

.dest-chip.highlight-chip {
  background-color: rgba(99, 102, 241, 0.12);
  color: var(--primary);
  font-weight: 600;
  border-color: rgba(99, 102, 241, 0.3);
}

.dest-note {
  margin-top: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* 15. ESTILOS PANEL ADMIN (SOLO MODO CLARO Y COMPATIBLE) */
.admin-page-body {
  background-color: #f8fafc !important;
  color: #1e293b !important;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  background-color: rgba(99, 102, 241, 0.1) !important;
  color: #4f46e5 !important;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.admin-header h2 {
  font-size: 2rem;
  margin: 0.5rem 0;
  color: #0f172a !important;
}

.admin-header p {
  color: #475569 !important;
}

.admin-card {
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px;
  padding: 2.5rem;
  margin-top: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.admin-form-grid {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #0f172a !important;
  font-size: 0.95rem;
}

.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px;
  background-color: #ffffff !important;
  color: #0f172a !important;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.form-input::placeholder {
  color: #94a3b8 !important;
}

.form-input:focus {
  outline: none;
  border-color: #4f46e5 !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* DROPZONE */
.upload-dropzone {
  border: 2px dashed #cbd5e1 !important;
  border-radius: 14px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  background-color: #f8fafc !important;
  transition: all 0.2s ease;
  position: relative;
}

.upload-dropzone:hover {
  border-color: #4f46e5 !important;
  background-color: rgba(79, 70, 229, 0.03) !important;
}

.file-input-hidden {
  display: none;
}

.dropzone-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  color: #4f46e5 !important;
}

.dropzone-text {
  margin: 0;
  font-size: 0.95rem;
  color: #1e293b !important;
}

.dropzone-sub {
  display: block;
  font-size: 0.8rem;
  color: #64748b !important;
  margin-top: 0.25rem;
}

.image-preview-box {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.preview-img {
  max-height: 260px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-remove-preview {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 28px;
  height: 28px;
  background: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

.btn-block {
  width: 100%;
  padding: 0.9rem;
  font-size: 1rem;
}

.admin-status-box {
  padding: 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
}

.admin-status-box.info { background: #dbeafe !important; color: #1d4ed8 !important; }
.admin-status-box.success { background: #dcfce7 !important; color: #15803d !important; }
.admin-status-box.error { background: #fee2e2 !important; color: #b91c1c !important; }

.hidden { display: none !important; }

/* HISTORIAL DE PUBLICACIONES ADMIN */
.admin-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 1rem;
}

.btn-refresh-history {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.85rem;
  color: #334155;
  transition: all 0.2s ease;
}

.btn-refresh-history:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.week-group-box {
  margin-bottom: 2.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
}

.week-group-title {
  margin: 0 0 1rem 0;
  color: #1e293b;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.week-count-badge {
  font-size: 0.75rem;
  background: #e2e8f0;
  color: #475569;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-weight: 600;
}

.media-grid-history {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.25rem;
}

.media-card-item {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.media-card-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.media-preview-container {
  width: 100%;
  height: 150px;
  background: #0f172a;
  position: relative;
}

.media-preview-container img,
.media-preview-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-badge-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.media-card-info {
  padding: 0.85rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.media-card-info h5 {
  margin: 0 0 0.3rem 0;
  font-size: 0.9rem;
  color: #0f172a;
  word-break: break-word;
}

.media-card-date {
  font-size: 0.75rem;
  color: #64748b;
  display: block;
}

.btn-delete-media {
  margin-top: 0.75rem;
  width: 100%;
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  padding: 0.45rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-delete-media:hover {
  background: #fca5a5;
  color: #991b1b;
}

/* 16. MODO OSCURO ESPECÍFICO - CHATBOT Y PREGUNTAS FRECUENTES */
html.dark-mode .chat-window,
html[data-theme="dark"] .chat-window {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

html.dark-mode .chat-header,
html[data-theme="dark"] .chat-header {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  border-bottom: 1px solid #334155 !important;
}

html.dark-mode .message.bot,
html[data-theme="dark"] .message.bot {
  background-color: #334155 !important;
  color: #f8fafc !important;
  border-color: #475569 !important;
}

html.dark-mode .message.user,
html[data-theme="dark"] .message.user {
  background-color: #4f46e5 !important;
  color: #ffffff !important;
}

html.dark-mode .quick-btn,
html[data-theme="dark"] .quick-btn {
  background-color: #334155 !important;
  color: #f8fafc !important;
  border: 1px solid #475569 !important;
}

html.dark-mode .quick-btn:hover,
html[data-theme="dark"] .quick-btn:hover {
  background-color: #475569 !important;
  color: #ffffff !important;
}

html.dark-mode #chatInput,
html[data-theme="dark"] #chatInput {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #ffffff !important;
}

html.dark-mode #chatInput::placeholder,
html[data-theme="dark"] #chatInput::placeholder {
  color: #94a3b8 !important;
}

/* 17. MEDIA QUERIES (ADAPTACIÓN MÓVIL) */
@media (max-width: 768px) {
  .hero-grid,
  .history-grid,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  /* En móvil el logo comparte fila con el botón de tema y "Cotizar Ahora" */
  .logo {
    font-size: 1.3rem;
    gap: 0.5rem;
  }

  .logo-img {
    width: 40px;
    height: 40px;
  }

  .hero-content h1 {
    font-size: 2.25rem;
  }

  .history-gallery {
    grid-template-columns: 1fr;
  }

  .modal-detail-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .modal-carousel {
    height: 250px;
  }
}

/* ==========================================================================
   CORRECCIÓN: SECCIÓN DE CONTACTO Y FORMULARIO (ÍCONOS Y MODO OSCURO)
   ========================================================================== */

/* 1. Control del tamaño del ícono del formulario/tarjeta */
.form-card-title svg,
.contact-grid svg,
.chatbot-title svg {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  flex-shrink: 0;
}

/* En caso de que el ícono esté suelto dentro de un contenedor de imagen/svg */
.contact-grid img,
.contact-info-form svg {
  max-width: 32px;
  max-height: 32px;
}

/* 2. Formulario de contacto y etiquetas */
.form-group label {
  color: var(--text-main) !important;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  display: block;
}

/* Inputs y Textareas en modo claro y oscuro */
.form-group input, 
.form-group textarea {
  background-color: var(--bg-main) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted) !important;
  opacity: 0.8;
}

/* 3. Reglas explícitas de Modo Oscuro para la sección de contacto */
html.dark-mode .contact-section,
html.dark-mode .contact-info-form,
html.dark-mode .form-group label,
html.dark-mode .contact-list,
html[data-theme="dark"] .contact-section,
html[data-theme="dark"] .contact-info-form,
html[data-theme="dark"] .form-group label,
html[data-theme="dark"] .contact-list {
  color: #f8fafc !important;
}

html.dark-mode .contact-list strong,
html[data-theme="dark"] .contact-list strong {
  color: #ffffff !important;
}

html.dark-mode .form-group input,
html.dark-mode .form-group textarea,
html[data-theme="dark"] .form-group input,
html[data-theme="dark"] .form-group textarea {
  background-color: #131629 !important;
  color: #ffffff !important;
  border-color: #334155 !important;
}

html.dark-mode .form-group input::placeholder,
html.dark-mode .form-group textarea::placeholder,
html[data-theme="dark"] .form-group input::placeholder,
html[data-theme="dark"] .form-group textarea::placeholder {
  color: #94a3b8 !important;
}

.chat-box.hidden {
  display: none !important;
}

.chat-box.active {
  display: flex !important;
}

/* WIDGET DEL CHATBOT */
.chat-window {
  display: none;
  position: fixed;
  bottom: 85px;
  right: 20px;
  width: 360px;
  max-width: 90vw;
  max-height: 520px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.chat-window.active {
  display: flex !important;
}

/* ENCABEZADO */
.chatbot-header {
  background: #f8fafc;
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* =========================================================================
   EFECTO TRANSLÚCIDO (GLASSMORPHISM) PARA EL CHATBOT
   ========================================================================= */

/* Limpieza del contenedor flotante */
.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
}

/* Ventana principal del chat translúcida */
.chat-window {
  display: none;
  position: fixed;
  bottom: 85px;
  right: 20px;
  width: 360px;
  max-width: 90vw;
  max-height: 520px;
  background: rgba(255, 255, 255, 0.75) !important; /* Fondo semitransparente */
  backdrop-filter: blur(12px) saturate(180%); /* Efecto cristal desenfocado */
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.chat-window.active {
  display: flex !important;
}

/* Encabezado translúcido */
.chatbot-header {
  background: rgba(248, 250, 252, 0.6) !important;
  padding: 1rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a !important;
}

.chatbot-header span {
  font-size: 0.75rem;
  color: #4f46e5 !important;
}

.chat-close-btn {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: #64748b !important;
  cursor: pointer;
}

/* Áreas de mensajes translúcidas */
.chatbot-messages {
  flex: 1;
  min-height: 180px;
  max-height: 250px;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: transparent !important;
}

/* Burbujas de chat con ligeras transparencias */
.chatbot-messages .message.bot {
  background: rgba(241, 245, 249, 0.85) !important;
  color: #1e293b !important;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.chatbot-messages .message.user {
  background: rgba(79, 70, 229, 0.9) !important;
  color: #ffffff !important;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

/* Preguntas rápidas */
.chatbot-quick-questions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 0.6rem 0.75rem;
  background: rgba(248, 250, 252, 0.5) !important;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
}

.quick-btn {
  background: rgba(255, 255, 255, 0.8) !important;
  border: 1px solid rgba(203, 213, 225, 0.8) !important;
  color: #334155 !important;
  padding: 0.35rem 0.65rem;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-btn:hover {
  background: #4f46e5 !important;
  color: #ffffff !important;
}

/* Formulario e Input */
.chatbot-input-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
  background: rgba(255, 255, 255, 0.6) !important;
}

.chatbot-input-form input {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 8px;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.8) !important;
  color: #0f172a !important;
}

/* =========================================================================
   EFECTO TRANSLÚCIDO REFORZADO PARA MODO OSCURO
   ========================================================================= */
.dark-mode .chat-window {
  background: rgba(15, 23, 42, 0.45) !important; /* Opacidad reducida para mayor transparencia */
  backdrop-filter: blur(18px) saturate(200%) !important; /* Desenfoque más pronunciado */
  -webkit-backdrop-filter: blur(18px) saturate(200%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
}

.dark-mode .chatbot-header {
  background: rgba(15, 23, 42, 0.35) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.dark-mode .chatbot-header h3 {
  color: #f8fafc !important;
}

.dark-mode .chatbot-messages {
  background: transparent !important;
}

.dark-mode .chatbot-messages .message.bot {
  background: rgba(30, 41, 59, 0.65) !important; /* Burbujas del bot translúcidas */
  backdrop-filter: blur(8px);
  color: #f1f5f9 !important;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.dark-mode .chatbot-messages .message.user {
  background: rgba(79, 70, 229, 0.85) !important;
  color: #ffffff !important;
}

.dark-mode .chatbot-quick-questions {
  background: rgba(15, 23, 42, 0.35) !important;
  border-top-color: rgba(255, 255, 255, 0.08);
}

.dark-mode .quick-btn {
  background: rgba(30, 41, 59, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #e2e8f0 !important;
  backdrop-filter: blur(4px);
}

.dark-mode .quick-btn:hover {
  background: #6366f1 !important;
  color: #ffffff !important;
  border-color: #6366f1 !important;
}

.dark-mode .chatbot-input-form {
  background: rgba(15, 23, 42, 0.35) !important;
  border-top-color: rgba(255, 255, 255, 0.08);
}

.dark-mode .chatbot-input-form input {
  background: rgba(30, 41, 59, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

.dark-mode .chatbot-input-form input::placeholder {
  color: #94a3b8 !important;
}

/* Si usas una clase específica en el párrafo del eslogan */
.slogan-card p,
.eslogan-text {
  color: #60a5fa; /* Reemplaza #1d4ed8 por el código HEX exacto de tu azul identificativo */
}

/* =========================================================================
   ESTILOS PARA AÑADIR / EDITAR VARIEDAD Y PREVISUALIZACIÓN DE IMAGEN
   ========================================================================= */

/* Ocultar elementos mediante clase utilitaria */
.hidden {
  display: none !important;
}

/* Previsualización de la imagen seleccionada */
#editImagePreview {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  object-fit: cover;
  margin-top: 10px;
  border: 1px solid #374151;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Campo para ingresar el nombre de una nueva variedad */
#newVarietyNameInput {
  margin-top: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #374151;
  background-color: #1f2937;
  color: #ffffff;
  font-size: 14px;
}

#newVarietyNameInput:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
/* ==========================================================================
   ACTUALIZACIÓN 2026-11 — ACCESIBILIDAD, CHAT GLASSMORPHIC Y PANEL ADMIN
   (Este bloque va al final para tener prioridad sobre las reglas anteriores)
   ========================================================================== */

/* Texto solo para lectores de pantalla */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Foco visible en tarjetas del catálogo (navegación con teclado) */
.rose-card:focus-visible,
.upload-dropzone:focus-visible,
.admin-tab:focus-visible {
  outline: 3px solid #6366f1;
  outline-offset: 3px;
}

/* ---------- Chat: cristal esmerilado según la guía (claro y oscuro) ---------- */
.chat-window {
  background: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(18px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(200%) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  width: 420px;
  max-width: calc(100vw - 40px);
  max-height: min(640px, calc(100vh - 120px));
}
html[data-theme="dark"] .chat-window,
.dark-mode .chat-window {
  background: rgba(15, 23, 42, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
html[data-theme="dark"] .chatbot-messages .message.bot {
  background: rgba(30, 41, 59, 0.65) !important;
  color: #f1f5f9 !important;
}
/* Los mensajes hacen scroll dentro de la tarjeta sin desbordarla */
.chatbot-messages {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.chatbot-messages .message {
  max-width: 85%;
  overflow-wrap: anywhere;
}
/* Enlaces dentro de las respuestas del chatbot (redes sociales) */
.chatbot-messages .message.bot a {
  color: var(--accent-blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.chatbot-messages .message.bot a:hover {
  color: var(--primary-hover);
}
.chatbot-header,
.chatbot-quick-questions,
.chatbot-input-form { flex: 0 0 auto; }

/* ---------- Panel de administración: Glassmorphism ---------- */
.admin-page-body {
  --admin-glass: rgba(255, 255, 255, 0.62);
  --admin-glass-strong: rgba(255, 255, 255, 0.82);
  --admin-border: rgba(255, 255, 255, 0.7);
  --admin-line: rgba(15, 23, 42, 0.1);
  --admin-text: #0f172a;
  --admin-muted: #475569;
  --admin-input: rgba(255, 255, 255, 0.78);
  --admin-input-border: rgba(15, 23, 42, 0.16);
  background:
    radial-gradient(circle at 10% 0%, rgba(99, 102, 241, 0.22), transparent 45%),
    radial-gradient(circle at 95% 90%, rgba(22, 163, 74, 0.16), transparent 45%),
    #eef0fb !important;
  background-attachment: fixed !important;
  color: var(--admin-text) !important;
  min-height: 100vh;
}
html[data-theme="dark"] .admin-page-body {
  --admin-glass: rgba(15, 23, 42, 0.45);
  --admin-glass-strong: rgba(30, 41, 59, 0.65);
  --admin-border: rgba(255, 255, 255, 0.12);
  --admin-line: rgba(255, 255, 255, 0.1);
  --admin-text: #e2e8f0;
  --admin-muted: #94a3b8;
  --admin-input: rgba(15, 23, 42, 0.55);
  --admin-input-border: rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at 10% 0%, rgba(79, 70, 229, 0.35), transparent 45%),
    radial-gradient(circle at 95% 90%, rgba(21, 128, 61, 0.22), transparent 45%),
    #0b1020 !important;
  background-attachment: fixed !important;
}

.admin-logo { width: 38px; height: 38px; object-fit: contain; }

/* Barra de pestañas fija justo debajo del encabezado */
.admin-tabs-bar {
  position: sticky;
  top: 80px;
  z-index: 90;
  background: var(--admin-glass);
  backdrop-filter: blur(18px) saturate(200%);
  -webkit-backdrop-filter: blur(18px) saturate(200%);
  border-bottom: 1px solid var(--admin-border);
}
.admin-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  width: min(1200px, 92%);
  margin: 0 auto;
  padding: 0.65rem 0;
  scrollbar-width: thin;
}
.admin-tab {
  flex: 0 0 auto;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--admin-border);
  background: var(--admin-glass);
  color: var(--admin-text);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.admin-tab:hover { transform: translateY(-1px); background: rgba(99, 102, 241, 0.14); }
.admin-tab[aria-selected="true"] {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  box-shadow: 0 8px 20px -8px rgba(79, 70, 229, 0.7);
}
.admin-tab.tab-green[aria-selected="true"] {
  background: linear-gradient(135deg, #16a34a, #15803d);
  box-shadow: 0 8px 20px -8px rgba(22, 163, 74, 0.6);
}

.admin-wrap { width: min(1200px, 92%); margin: 0 auto; padding: 1.5rem 0 6rem; }
.admin-header h2 { color: var(--admin-text) !important; }
.admin-header p { color: var(--admin-muted) !important; }

.admin-card {
  background: var(--admin-glass) !important;
  backdrop-filter: blur(18px) saturate(200%);
  -webkit-backdrop-filter: blur(18px) saturate(200%);
  border: 1px solid var(--admin-border) !important;
  box-shadow: 0 10px 40px -12px rgba(15, 23, 42, 0.3);
  margin-top: 1.25rem;
}

.admin-page-body .form-group label,
.admin-page-body .form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--admin-text) !important;
}
.admin-page-body .form-input {
  background: var(--admin-input) !important;
  border: 1px solid var(--admin-input-border) !important;
  color: var(--admin-text) !important;
}
.admin-page-body select.form-input option { color: #0f172a; background: #ffffff; }
.admin-page-body .form-input:focus { border-color: #6366f1 !important; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25); }

.admin-variety-box {
  padding: 1.25rem;
  border-radius: 14px;
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.3);
}
.admin-variety-box label { color: #15803d !important; text-transform: uppercase; font-size: 0.85rem !important; letter-spacing: 0.03em; }
html[data-theme="dark"] .admin-variety-box label { color: #4ade80 !important; }
.admin-select-box {
  padding: 1.25rem;
  border-radius: 14px;
  background: var(--admin-glass-strong);
  border: 1px solid var(--admin-border);
}

.limit-meter { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.85rem; font-size: 0.9rem; color: var(--admin-text); }
.limit-bar { flex: 1; height: 8px; border-radius: 999px; background: rgba(148, 163, 184, 0.35); overflow: hidden; }
.limit-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #16a34a, #15803d); transition: width 0.3s ease; }
.limit-meter.full .limit-bar span { background: #dc2626; }
.variety-notice { display: block; margin-top: 0.5rem; font-weight: 500; color: var(--admin-muted); }
.variety-notice.ok { color: #15803d; }
.variety-notice.error { color: #dc2626; }
html[data-theme="dark"] .variety-notice.ok { color: #4ade80; }
html[data-theme="dark"] .variety-notice.error { color: #f87171; }

/* Dropzone */
.admin-page-body .upload-dropzone {
  background: rgba(99, 102, 241, 0.08) !important;
  border: 2px dashed rgba(99, 102, 241, 0.5) !important;
}
.admin-page-body .upload-dropzone:hover,
.admin-page-body .upload-dropzone.dragover {
  background: rgba(99, 102, 241, 0.16) !important;
  border-color: #6366f1 !important;
}
.admin-page-body .upload-dropzone.dragover { transform: scale(1.01); }
.admin-page-body .upload-dropzone.disabled { opacity: 0.55; cursor: not-allowed; }
.admin-page-body .dropzone-icon { color: #6366f1 !important; }
.admin-page-body .dropzone-icon svg { width: 48px; height: 48px; }
.admin-page-body .dropzone-text { color: var(--admin-text) !important; }
.admin-page-body .dropzone-sub { color: var(--admin-muted) !important; }
.dropzone-content.compact .dropzone-icon svg { width: 30px; height: 30px; }

.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.75rem; margin-top: 0.85rem; }
.preview-grid:empty { display: none; }
.preview-item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #0f172a; border: 1px solid var(--admin-border); }
.preview-item img, .preview-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-item .btn-remove-preview { top: 6px; right: 6px; }
.preview-name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 0.25rem 0.45rem;
  font-size: 0.7rem; color: #ffffff; background: rgba(15, 23, 42, 0.7);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Botones del panel */
.btn-admin-primary,
.btn-admin-success,
.btn-admin-danger {
  border: none;
  border-radius: 10px;
  color: #ffffff !important;
  font-weight: 600;
  padding: 0.9rem 1.25rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.btn-admin-primary { background: linear-gradient(135deg, #4f46e5, #6366f1) !important; width: 100%; }
.btn-admin-success { background: linear-gradient(135deg, #16a34a, #15803d) !important; flex: 1; }
.btn-admin-danger { background: #dc2626 !important; }
.btn-admin-primary:disabled,
.btn-admin-success:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-admin-primary:not(:disabled):hover,
.btn-admin-success:not(:disabled):hover { transform: translateY(-1px); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
.admin-fields-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1rem 0; }
#varietyFieldsGroup > .form-group { margin-top: 1rem; }

.source-badge { display: inline-block; margin-top: 0.75rem; padding: 0.2rem 0.7rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.source-badge.server { color: #15803d; background: rgba(22, 163, 74, 0.15); }
.source-badge.default { color: #b45309; background: rgba(217, 119, 6, 0.15); }
.source-badge.new { color: #4f46e5; background: rgba(99, 102, 241, 0.15); }

.admin-page-body #editImagePreview { max-width: 180px; max-height: 180px; margin-top: 0.75rem; border-radius: 10px; border: 1px solid var(--admin-border); }
.admin-page-body #newVarietyNameInput { margin-top: 0.75rem; }

/* Historial */
.admin-history-header { border-bottom-color: var(--admin-line) !important; flex-wrap: wrap; gap: 1rem; }
.admin-history-header h3 { margin: 0; font-size: 1.4rem; color: var(--admin-text); }
.admin-history-header p { margin: 0.25rem 0 0; font-size: 0.85rem; color: var(--admin-muted); }
.admin-page-body .btn-refresh-history {
  background: var(--admin-glass-strong);
  border: 1px solid var(--admin-border);
  color: var(--admin-text);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
.admin-empty { text-align: center; color: var(--admin-muted); padding: 1.5rem 0; font-size: 0.9rem; }
.history-group { margin-bottom: 2rem; padding: 1.25rem; border-radius: 14px; border: 1px solid var(--admin-border); background: var(--admin-glass-strong); }
.history-group.catalog { background: rgba(22, 163, 74, 0.07); border-color: rgba(22, 163, 74, 0.25); }
.history-group-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--admin-line); }
.history-group-head h4 { margin: 0; font-size: 1.05rem; color: var(--admin-text); }
.count-pill { font-size: 0.75rem; font-weight: 700; padding: 0.25rem 0.65rem; border-radius: 999px; background: rgba(99, 102, 241, 0.15); color: #4f46e5; white-space: nowrap; }
.history-group.catalog .count-pill { background: rgba(22, 163, 74, 0.15); color: #15803d; }
.week-block { margin-bottom: 1.25rem; }
.week-block h5 { margin: 0 0 0.75rem; font-size: 0.9rem; color: #6366f1; }
.week-block h5 span { color: var(--admin-muted); font-weight: 500; }
.admin-page-body .history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.history-item { display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; background: var(--admin-glass-strong); border: 1px solid var(--admin-border); }
.history-thumb { position: relative; height: 140px; background: #0f172a; }
.history-thumb img, .history-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.history-tag { position: absolute; top: 8px; left: 8px; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.65rem; font-weight: 600; color: #ffffff; background: rgba(0, 0, 0, 0.7); }
.history-info { padding: 0.8rem; display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }
.history-info h6 { margin: 0; font-size: 0.88rem; color: var(--admin-text); word-break: break-word; }
.history-info span { font-size: 0.72rem; color: var(--admin-muted); }
.btn-delete-media {
  margin-top: auto; width: 100%; padding: 0.45rem; border-radius: 6px; cursor: pointer;
  font-size: 0.8rem; font-weight: 600; color: #dc2626; background: rgba(220, 38, 38, 0.1); border: 1px solid rgba(220, 38, 38, 0.35);
}
.btn-delete-media:hover:not(:disabled) { background: #dc2626; color: #ffffff; }
.btn-delete-media:disabled { opacity: 0.5; cursor: wait; }

@media (max-width: 640px) {
  .admin-tabs-bar { top: 80px; }
  .admin-badge { display: none; }
  .admin-card { padding: 1.25rem !important; }
}

/* ---------- Panel: eliminar / restaurar / crear variedades ---------- */
.admin-hint { margin: 0.75rem 0 0; font-size: 0.85rem; color: var(--admin-muted); }
.link-inline {
  background: none; border: none; padding: 0; font: inherit; font-weight: 700;
  color: #16a34a; cursor: pointer; text-decoration: underline;
}
html[data-theme="dark"] .link-inline { color: #4ade80; }
.btn-admin-secondary {
  border-radius: 10px; padding: 0.9rem 1.1rem; font-weight: 600; cursor: pointer;
  background: var(--admin-glass-strong) !important; color: var(--admin-text) !important;
  border: 1px solid var(--admin-border) !important;
}
.btn-admin-success.btn-block { width: 100%; flex: none; }
.req { color: #dc2626; }

.deleted-box {
  margin-top: 1.75rem; padding: 1.25rem; border-radius: 14px;
  background: rgba(220, 38, 38, 0.06); border: 1px dashed rgba(220, 38, 38, 0.35);
}
.deleted-box h4 { margin: 0 0 0.25rem; font-size: 1rem; color: var(--admin-text); }
.deleted-box p { margin: 0 0 0.85rem; font-size: 0.85rem; color: var(--admin-muted); }
.deleted-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.deleted-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 0.6rem 0.85rem; border-radius: 10px; background: var(--admin-glass-strong);
  border: 1px solid var(--admin-border); font-size: 0.9rem; color: var(--admin-text);
}
.deleted-list li span { color: var(--admin-muted); }
.deleted-list li strong { color: var(--admin-text); }
.btn-restore-variety {
  padding: 0.4rem 0.85rem; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 0.82rem;
  color: #15803d; background: rgba(22, 163, 74, 0.12); border: 1px solid rgba(22, 163, 74, 0.35);
}
.btn-restore-variety:hover:not(:disabled) { background: #16a34a; color: #ffffff; }

.color-row { display: flex; align-items: center; gap: 0.75rem; }

/* Filtros de color personalizados (Nueva Variedad) */
.new-filter-box {
  margin-top: 0.75rem; padding: 0.9rem; border-radius: 12px;
  background: rgba(22, 163, 74, 0.06); border: 1px dashed rgba(22, 163, 74, 0.4);
  display: grid; gap: 0.6rem;
}
.new-filter-box label { font-size: 0.85rem; }
.new-filter-row { display: flex; gap: 0.6rem; align-items: center; }
.new-filter-row .form-input { flex: 1; min-width: 0; }
.new-filter-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.btn-filter-cancel {
  padding: 0.4rem 0.85rem; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 0.82rem;
  color: var(--admin-text); background: var(--admin-glass-strong); border: 1px solid var(--admin-border);
}
.custom-filter-list { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.custom-filter-list li {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0.35rem 0.25rem 0.65rem;
  border-radius: 999px; font-size: 0.8rem; color: var(--admin-text);
  background: var(--admin-glass-strong); border: 1px solid var(--admin-border);
}
.filter-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.filter-preview { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; border: 3px solid rgba(255, 255, 255, 0.7); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
.filter-two-colors { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; cursor: pointer; }
.new-filter-row .color-input:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-remove-filter {
  width: 20px; height: 20px; border-radius: 50%; border: none; cursor: pointer; line-height: 1;
  background: rgba(220, 38, 38, 0.12); color: #dc2626; font-weight: 700;
}
.btn-remove-filter:hover { background: #dc2626; color: #ffffff; }
.color-input { width: 56px; height: 44px; padding: 0; border: 1px solid var(--admin-input-border); border-radius: 10px; background: none; cursor: pointer; }
.color-badge { width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.7); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }

/* =========================================================================
   PÁGINAS LEGALES (Términos de Servicio y Aviso de Privacidad)
   ========================================================================= */
.legal-page {
  padding: 4rem 0 5rem;
}

.legal-container {
  max-width: 820px;
}

.legal-head h1 {
  font-size: 2.25rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.legal-meta {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.legal-lead {
  font-size: 1.05rem;
  line-height: 1.7;
}

.legal-toc {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}

.legal-toc-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.legal-toc ol {
  padding-left: 1.25rem;
  columns: 2;
  column-gap: 2rem;
}

.legal-toc li {
  break-inside: avoid;
  padding: 0.2rem 0;
  font-size: 0.92rem;
}

.legal-toc a,
.legal-content a {
  color: var(--accent-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.legal-toc a:hover,
.legal-content a:hover {
  color: var(--primary-hover);
}

.legal-content {
  color: var(--text-main);
  line-height: 1.75;
}

.legal-content section {
  scroll-margin-top: 6rem;
  padding-bottom: 1.75rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-color);
}

.legal-content h2 {
  font-size: 1.4rem;
  margin-bottom: 0.85rem;
}

.legal-content h3 {
  font-size: 1.05rem;
  font-family: var(--font-body);
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
}

.legal-content p,
.legal-content ul,
.legal-content ol {
  margin-bottom: 0.85rem;
  color: var(--text-muted);
}

.legal-content strong {
  color: var(--text-main);
}

.legal-content ul,
.legal-content ol {
  padding-left: 1.4rem;
}

.legal-content li {
  margin-bottom: 0.4rem;
}

.legal-content code {
  font-size: 0.9em;
  background: var(--bg-section);
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
}

.legal-related {
  font-weight: 500;
}

.form-privacy-note a {
  color: var(--accent-blue);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .legal-page { padding: 2.5rem 0 3.5rem; }
  .legal-head h1 { font-size: 1.75rem; }
  .legal-toc ol { columns: 1; }
  .legal-content h2 { font-size: 1.2rem; }
}

/* ==========================================================================
   18. ADAPTACIÓN A TODOS LOS DISPOSITIVOS (celular, tablet, laptop y PC)
   Menú desplegable ☰ hasta 1080px; ajustes de tamaño para tablet (≤900px),
   celular (≤768px) y celular pequeño (≤480px).
   ========================================================================== */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-wrap: break-word;
}

img,
video {
  max-width: 100%;
}

.btn-sm {
  white-space: nowrap;
}

/* Las rejillas nunca exigen más ancho que el de la pantalla */
.overview-grid,
.reasons-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

.destinations-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}

.history-section-compact .history-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.social-cards {
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

/* Botón ☰ (oculto en escritorio) */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.nav-toggle .icon-close,
.main-header.nav-open .nav-toggle .icon-menu {
  display: none;
}

.main-header.nav-open .nav-toggle .icon-close {
  display: block;
}

.nav-cta-item {
  display: none;
}

/* La ficha técnica cabe en cualquier pantalla y hace scroll por dentro */
.modal-card {
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  top: 0.5rem;
  right: 0.5rem;
  border-radius: 50%;
  line-height: 1;
  z-index: 2;
}

/* En pantallas táctiles: letra de 16px en campos (evita el zoom automático del iPhone)
   y sin efectos de "hover" que se quedan pegados al tocar */
@media (max-width: 1080px), (pointer: coarse) {
  .form-group input,
  .form-group textarea,
  .chatbot-input-form input,
  #chatInput {
    font-size: 16px !important;
  }
}

@media (hover: none) {
  .overview-card:hover,
  .reason-card:hover,
  .rose-card:hover,
  .destination-card:hover,
  .social-card:hover,
  .history-section-compact .compact-card:hover,
  .chat-toggle-btn:hover {
    transform: none;
  }
}

/* ---------- Laptop pequeña y tablet horizontal (≤1080px): menú ☰ ---------- */
@media (max-width: 1080px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-actions {
    gap: 0.6rem;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 5% 1.25rem;
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.14);
    max-height: calc(100vh - 80px);
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }

  .main-header.nav-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-links li {
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    display: block;
    padding: 0.9rem 0.25rem;
    font-size: 1.05rem;
  }

  .nav-links a.active {
    border-bottom: none;
    box-shadow: inset 3px 0 0 var(--accent-blue);
    padding-left: 0.85rem;
  }
}

/* ---------- Tablet vertical (≤900px) ---------- */
@media (max-width: 900px) {
  .hero-grid,
  .contact-grid,
  .history-grid {
    grid-template-columns: 1fr;
  }

  .hero-art {
    max-width: 520px;
    margin: 0 auto;
  }
}

/* ---------- Celular (≤768px) ---------- */
@media (max-width: 768px) {
  .nav-wrap {
    height: 68px;
  }

  .nav-links {
    max-height: calc(100vh - 68px);
    max-height: calc(100dvh - 68px);
  }

  .hero {
    padding: 2.5rem 0 3.5rem;
  }

  .hero-grid {
    gap: 2.5rem;
  }

  .hero-cta {
    flex-wrap: wrap;
    margin-bottom: 2rem;
  }

  .hero-cta .btn {
    flex: 1 1 200px;
    text-align: center;
  }

  .stat-row {
    flex-wrap: wrap;
    gap: 1.25rem 1.5rem;
  }

  .stat {
    flex: 1 1 90px;
  }

  .section-head {
    margin-bottom: 2rem;
  }

  .section-head h2 {
    font-size: 1.75rem;
  }

  .overview-section,
  .catalog-section,
  .history-section,
  .history-section-compact,
  .why-section,
  .contact-section,
  .social-section {
    padding: 3.5rem 0;
  }

  .destinations-section {
    padding: 3rem 0 4rem;
  }

  .about-section {
    padding-top: 3rem;
    margin-top: 1.5rem;
  }

  .main-footer {
    padding: 3rem 0 2rem;
  }

  .modal-card {
    width: calc(100% - 1.5rem);
    padding: 3rem 1.25rem 1.5rem;
  }

  .chat-widget {
    bottom: 16px;
    right: 16px;
  }

  .chat-window {
    right: 16px;
    bottom: 84px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 110px);
    max-height: calc(100dvh - 110px);
  }
}

/* ---------- Celular pequeño (≤480px) ---------- */
@media (max-width: 480px) {
  .container {
    width: calc(100% - 32px);
  }

  .nav-links {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* "Cotizar Ahora" pasa al menú ☰ para que el header quepa en una línea */
  .nav-cta {
    display: none;
  }

  .nav-cta-item {
    display: block;
    padding-top: 1rem;
  }

  .nav-links .nav-cta-item a {
    display: flex;
    width: 100%;
    padding: 0.85rem 1rem;
    color: #ffffff;
    background-color: var(--primary);
    box-shadow: none;
  }

  .nav-actions {
    gap: 0.5rem;
  }

  .logo {
    font-size: 1.15rem;
  }

  .logo-img {
    width: 36px;
    height: 36px;
  }

  .hero-content h1 {
    font-size: 1.9rem;
  }

  .hero-content .lead {
    font-size: 1rem;
  }

  .hero-cta .btn {
    flex-basis: 100%;
  }

  .section-head h2 {
    font-size: 1.5rem;
  }

  /* Catálogo en 2 columnas para no hacer una lista interminable */
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .rose-card {
    padding: 1.25rem 0.75rem;
  }

  .rose-card h3 {
    font-size: 1.05rem;
  }

  .color-tag {
    font-size: 0.8rem;
    min-height: 2.4rem;
  }

  .rose-card button {
    margin-top: 0.85rem;
    padding: 0.55rem 0.5rem;
    font-size: 0.8rem;
  }

  .overview-card,
  .reason-card,
  .destination-card {
    padding: 1.5rem;
  }

  .modal-carousel {
    height: 220px;
  }
}

/* ==========================================================================
   19. DISTRIBUCIÓN EN TABLET Y CELULAR
   Tarjetas más compactas y parejas, para ver más contenido por pantalla.
   ========================================================================== */

/* Miniatura del catálogo: misma altura con foto o sin foto */
.rose-thumb {
  width: 100%;
  aspect-ratio: 5 / 4;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.9rem;
  background: #0f172a;
  flex-shrink: 0;
}

.rose-thumb img,
.rose-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rose-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-section, rgba(148, 163, 184, 0.08));
  border: 1px dashed var(--border-color);
}

.rose-thumb-empty .rose-badge {
  margin: 0;
}

.rose-card-cta {
  margin-top: 0.75rem;
}

/* ---------- Tablet (≤1080px) ---------- */
@media (max-width: 1080px) {
  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
    gap: 1rem;
  }

  .rose-card {
    padding: 1rem 1rem 1.25rem;
  }

  .rose-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.3rem;
  }

  /* Ícono a la izquierda del título: tarjetas más bajas */
  .reason-card {
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 1rem;
    align-items: start;
    padding: 1.4rem;
  }

  .reason-icon {
    grid-row: span 2;
    width: 44px;
    height: 44px;
    margin-bottom: 0;
  }

  .reason-card h3 {
    margin-bottom: 0.35rem;
  }

  .reasons-grid {
    gap: 1rem;
  }

  .overview-card {
    padding: 1.5rem;
  }

  .overview-card p {
    margin-bottom: 1rem;
  }
}

/* ---------- Tablet vertical (601px – 900px) ---------- */
@media (min-width: 601px) and (max-width: 900px) {
  /* Carrusel horizontal a todo lo ancho en lugar de una columna alta */
  .hero-art {
    max-width: none;
  }

  .media-carousel {
    max-width: none;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .media-carousel .aspect-portrait {
    height: 100%;
  }

  .overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }

  .overview-card {
    padding: 1.25rem;
  }

  .overview-card h3 {
    font-size: 1.1rem;
  }

  .overview-card p {
    font-size: 0.9rem;
  }

  .history-section-compact .history-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

/* ---------- Celular (≤600px) ---------- */
@media (max-width: 600px) {
  /* Espacios verticales más cortos entre secciones */
  .overview-section,
  .catalog-section,
  .history-section,
  .history-section-compact,
  .why-section,
  .contact-section,
  .social-section {
    padding: 2.75rem 0;
  }

  .destinations-section {
    padding: 2.5rem 0 3rem;
  }

  .section-head {
    margin-bottom: 1.5rem;
  }

  .section-head p {
    font-size: 0.95rem;
  }

  /* Inicio: carrusel más bajo y cifras más compactas */
  .hero {
    padding: 2rem 0 2.75rem;
  }

  .hero-grid {
    gap: 2rem;
  }

  .media-carousel {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .media-carousel .aspect-portrait {
    height: 100%;
  }

  .stat-row {
    flex-wrap: nowrap;
    gap: 1rem;
  }

  .stat {
    flex: 1 1 0;
    min-width: 0;
  }

  .stat span {
    font-size: 0.78rem;
    line-height: 1.35;
  }

  /* Tarjetas de información */
  .overview-grid {
    gap: 0.85rem;
  }

  .overview-card {
    padding: 1.15rem 1.25rem;
  }

  .overview-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
  }

  .overview-card p {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
  }

  .reason-card {
    grid-template-columns: 38px 1fr;
    column-gap: 0.85rem;
    padding: 1.1rem 1.15rem;
  }

  .reason-icon {
    width: 38px;
    height: 38px;
  }

  .reason-icon svg {
    width: 20px;
    height: 20px;
  }

  .reason-card h3 {
    font-size: 1rem;
    line-height: 1.3;
  }

  .reason-card p {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .reasons-grid {
    gap: 0.75rem;
  }

  .why-hero-image {
    margin-bottom: 1.5rem;
  }

  .why-hero-image .sketch-placeholder {
    height: 150px;
  }

  .destinations-grid {
    gap: 0.85rem;
  }

  .destination-card {
    padding: 1.15rem;
  }

  .dest-chip {
    font-size: 0.8rem;
  }

  /* Historia: imagen a la izquierda, texto a la derecha */
  .history-section-compact .history-grid {
    gap: 0.85rem;
    margin-top: 1.5rem;
  }

  .history-section-compact .compact-card {
    flex-direction: row;
    border-radius: 16px;
  }

  .history-section-compact .compact-card-media {
    flex: 0 0 96px;
    display: flex;
  }

  .history-section-compact .compact-card-media .sketch-placeholder {
    min-height: 0;
    height: auto;
    width: 100%;
  }

  .history-section-compact .compact-card-media .sketch-placeholder svg {
    width: 32px;
    height: 32px;
    margin: 0;
  }

  .history-section-compact .compact-card-media .sketch-placeholder span {
    display: none;
  }

  .history-section-compact .compact-card-body {
    padding: 1rem 1.1rem 1.1rem;
    gap: 0.4rem;
  }

  .history-section-compact .compact-card-body h4 {
    font-size: 1rem;
  }

  .history-section-compact .compact-card-body p {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  /* Catálogo: filtros en una sola fila que se desliza con el dedo */
  .catalog-filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    margin: 0 -16px 1.5rem;
    padding: 0.25rem 16px 0.5rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .catalog-filters::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex-shrink: 0;
  }

  /* Catálogo: 2 columnas con tarjetas compactas y del mismo alto */
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .rose-card {
    padding: 0.6rem 0.6rem 0.8rem;
    border-radius: 14px;
  }

  .rose-thumb {
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    margin-bottom: 0.6rem;
  }

  .rose-badge {
    width: 56px;
    height: 56px;
  }

  .rose-badge svg {
    width: 24px;
    height: 24px;
  }

  .rose-card h3 {
    font-size: 0.98rem;
    margin-bottom: 0.15rem;
  }

  .color-tag {
    font-size: 0.75rem;
    min-height: 2rem;
  }

  .rose-card-cta {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.45rem 0.4rem;
    font-size: 0.75rem;
    border-width: 1.5px;
  }

  /* Redes sociales: las 3 en una fila */
  .social-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .social-card {
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    text-align: center;
  }

  .social-card-icon {
    width: 44px;
    height: 44px;
  }

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

  .social-card-text strong {
    font-size: 0.9rem;
  }

  .social-card-text small {
    display: none;
  }

  /* Footer: enlaces en dos columnas */
  .footer-links ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 1rem;
  }
}
