/* ==========================================================================
   CSS DESIGN SYSTEM: DUCATI MULTISTRADA V2 S Red 2026 BLOG
   Aesthetic Pastel Theme & High-End UX/UI Interactions (a11y Compliant)
   ========================================================================== */

/* Importar tipografías modernas de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  /* Paleta de Colores Pasteles Prémium */
  --bg-primary: #FAF8F5;       /* Crema Suave / Soft Sand */
  --bg-secondary: #F3EFE9;     /* Arena Cálida / Dust Warm */
  --bg-glass: rgba(250, 248, 245, 0.75);
  --panel-muted: rgba(243, 239, 233, 0.3);
  --canvas-bg: radial-gradient(circle at center, #FAF8F5 0%, #F5F1EB 100%);
  --overlay-bg: rgba(30, 34, 41, 0.5);
  
  --accent-red: #DE6B62;       /* Terracota Ducati / Coral Muted */
  --accent-red-hover: #D05C53;
  --accent-red-light: rgba(222, 107, 98, 0.15);
  
  --accent-green: #8C9F80;     /* Verde Salvia / Adventure Sage */
  --accent-green-light: rgba(140, 159, 128, 0.12);
  
  --accent-gold: #E1AD6E;      /* Oro Viejo / Sunset Ochre */
  --accent-gold-light: rgba(225, 173, 110, 0.12);

  --accent-blue: #8FA89B;      /* Azul Desaturado / Sky Muted */

  /* Colores de Texto y UI (WCAG AA Contrast > 4.5:1) */
  --text-primary: #1E2229;     /* Carbón Oscuro (Legibilidad óptima) */
  --text-secondary: #4F5561;   /* Pizarra / Muted Slate */
  --text-light: #89909E;       /* Gris Suave */
  --text-main: var(--text-primary);
  --text-muted: var(--text-light);
  --bg-main: var(--bg-primary);
  --bg-card: var(--bg-secondary);
  
  --border-color: rgba(30, 34, 41, 0.08);
  --border-focus: var(--accent-gold);

  /* Sombras y Profundidad */
  --shadow-sm: 0 2px 8px rgba(30, 34, 41, 0.04);
  --shadow-md: 0 10px 30px rgba(30, 34, 41, 0.06);
  --shadow-lg: 0 20px 50px rgba(30, 34, 41, 0.1);
  --shadow-xl: var(--shadow-lg);
  --shadow-inset: inset 0 2px 4px rgba(30, 34, 41, 0.02);

  /* Fuentes */
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Transiciones Globales */
  --transition-fast: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-medium: 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-elastic: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;

  --bg-primary: #12151C;
  --bg-secondary: #1B2029;
  --bg-glass: rgba(18, 21, 28, 0.78);
  --panel-muted: rgba(27, 32, 41, 0.58);
  --canvas-bg: radial-gradient(circle at center, #1B2029 0%, #12151C 100%);
  --overlay-bg: rgba(5, 8, 13, 0.72);

  --accent-red: #F08478;
  --accent-red-hover: #FF9A8E;
  --accent-red-light: rgba(240, 132, 120, 0.2);
  --accent-green: #AFC4A1;
  --accent-green-light: rgba(175, 196, 161, 0.16);
  --accent-gold: #F0C277;
  --accent-gold-light: rgba(240, 194, 119, 0.16);
  --accent-blue: #9BB7C8;

  --text-primary: #F6F1EA;
  --text-secondary: #C7CED8;
  --text-light: #929BA8;
  --border-color: rgba(246, 241, 234, 0.1);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.34);
  --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.16);
}

/* ==========================================================================
   RESET & ESTILOS BÁSICOS
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-medium), color var(--transition-medium);
}

/* Cursor Personalizado (Solo habilitado en pantallas con puntero de precisión) */
@media (pointer: fine) {
  body {
    cursor: none;
  }
  
  a, button, [role="button"], input, select, textarea, .interactive-tag {
    cursor: none !important;
  }
  
  .custom-cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-red);
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
  }

  .custom-cursor-trail {
    width: 32px;
    height: 32px;
    border: 1px solid var(--accent-red);
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    /* Suavizado dinámico por JS */
    will-change: transform;
  }

  /* Estados de interacción del cursor */
  body.cursor-hover .custom-cursor-dot {
    width: 10px;
    height: 10px;
    background-color: var(--accent-green);
  }

  body.cursor-hover .custom-cursor-trail {
    width: 52px;
    height: 52px;
    border-color: var(--accent-green);
    background-color: rgba(140, 159, 128, 0.05);
  }

  body.cursor-drag .custom-cursor-trail {
    border-style: dashed;
    border-color: var(--accent-gold);
    width: 40px;
    height: 40px;
  }
}

/* Lienzo de partículas de fondo */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ==========================================================================
   ACCESIBILIDAD (a11y)
   ========================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Enfoque accesible por teclado */
*:focus-visible {
  outline: 3px solid var(--accent-gold);
  outline-offset: 4px;
}

/* Skip link para lectores de pantalla */
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  background-color: var(--accent-red);
  color: white;
  padding: 10px 20px;
  z-index: 99999;
  border-radius: 4px;
  text-decoration: none;
  font-family: var(--font-title);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: top var(--transition-medium);
}

.skip-link:focus {
  top: 20px;
}

/* Botón de pausar animación para a11y */
.motion-toggle-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 100;
  background-color: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 30px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-medium);
}

.motion-toggle-btn:hover {
  background-color: var(--bg-primary);
  border-color: var(--accent-red);
  color: var(--text-primary);
}

.motion-toggle-btn .pulse-indicator {
  width: 8px;
  height: 8px;
  background-color: var(--accent-green);
  border-radius: 50%;
  display: inline-block;
  animation: pulseGreen 2s infinite;
}

.motion-toggle-btn.paused .pulse-indicator {
  background-color: var(--text-light);
  animation: none;
}

/* Respetar preferencia del sistema de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-delay: 0s !important;
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
  
  .custom-cursor-trail {
    display: none !important;
  }
  
  body {
    cursor: default !important;
  }
}

/* ==========================================================================
   TIPOGRAFÍA Y CONTENEDORES
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
}

p {
  color: var(--text-secondary);
  font-weight: 400;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Sección Base */
.section {
  padding: 80px 0;
  position: relative;
}

.section-title-wrapper {
  text-align: center;
  margin-bottom: 50px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-red);
  background-color: var(--accent-red-light);
  padding: 6px 16px;
  border-radius: 30px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 0;
}

@media (min-width: 768px) {
  .section {
    padding: 110px 0;
  }
  .section-title {
    font-size: 2.8rem;
  }
}

/* ==========================================================================
   HEADER & NAVEGACIÓN (Glassmorphism)
   ========================================================================== */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: padding var(--transition-medium), background-color var(--transition-medium);
}

.main-header.scrolled {
  padding: 6px 0;
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  gap: 18px;
  min-width: 0;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
  flex: 1 1 auto;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-red) 0%, var(--accent-gold) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.1rem;
}

.logo-text {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logo-text span {
  color: var(--accent-red);
}

.nav-menu {
  display: none;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-link {
  text-decoration: none;
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  position: relative;
  padding: 8px 0;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-red);
  transition: width var(--transition-medium);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--accent-red);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.theme-toggle-btn {
  width: 48px;
  height: 30px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background-color: var(--bg-secondary);
  box-shadow: var(--shadow-sm);
  padding: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  transition: background-color var(--transition-medium), border-color var(--transition-medium), box-shadow var(--transition-medium);
}

.theme-toggle-btn:hover {
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-md);
}

.theme-toggle-track {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-red));
  position: relative;
  display: block;
  overflow: hidden;
  transform: translateX(0);
  transition: transform var(--transition-elastic), background var(--transition-medium);
}

.theme-icon {
  position: absolute;
  inset: 0;
  transition: transform var(--transition-elastic), opacity var(--transition-medium);
}

.theme-icon-sun::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  top: 7px;
  left: 7px;
  border-radius: 50%;
  background-color: #fff7d1;
  box-shadow: 0 0 0 3px rgba(255, 247, 209, 0.32);
}

.theme-icon-moon {
  opacity: 0;
  transform: translateY(18px) rotate(-45deg);
}

.theme-icon-moon::before {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  top: 5px;
  left: 7px;
  border-radius: 50%;
  background-color: #F6F1EA;
  box-shadow: -4px 0 0 0 #283142;
}

html[data-theme="dark"] .theme-toggle-track {
  transform: translateX(18px);
  background: linear-gradient(135deg, #283142, #3D4A61);
}

html[data-theme="dark"] .theme-icon-sun {
  opacity: 0;
  transform: translateY(-18px) rotate(45deg);
}

html[data-theme="dark"] .theme-icon-moon {
  opacity: 1;
  transform: translateY(0) rotate(0deg);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background-color: var(--bg-secondary);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  z-index: 1100;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.mobile-nav-toggle:hover,
.mobile-nav-toggle:focus-visible {
  border-color: var(--accent-red);
  box-shadow: var(--shadow-md);
}

.mobile-nav-toggle:active {
  transform: scale(0.96);
}

.mobile-nav-toggle span {
  display: block;
  width: 20px;
  height: 2.6px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition-medium), opacity var(--transition-medium);
}

.mobile-nav-toggle.open span:nth-child(1) {
  transform: translateY(7.6px) rotate(45deg);
}

.mobile-nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.mobile-nav-toggle.open span:nth-child(3) {
  transform: translateY(-7.6px) rotate(-45deg);
}

@media (min-width: 1120px) {
  .nav-menu {
    display: block;
  }
  .mobile-nav-toggle {
    display: none;
  }
}

/* Mobile Nav Modal Drawer */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(30, 34, 41, 0.5);
  backdrop-filter: blur(2px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-medium);
}

.mobile-nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(86vw, 340px);
  height: 100vh;
  height: 100dvh;
  background-color: var(--bg-primary);
  box-shadow: var(--shadow-lg);
  z-index: 999;
  padding: max(100px, calc(72px + env(safe-area-inset-top))) 30px max(40px, calc(28px + env(safe-area-inset-bottom))) 30px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  overflow-y: auto;
  transform: translate3d(110%, 0, 0);
  transition: transform var(--transition-elastic);
}

.mobile-nav-drawer.open {
  transform: translate3d(0, 0, 0) !important;
}

body.mobile-nav-open #mobile-drawer {
  transform: translate3d(0, 0, 0) !important;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-nav-link {
  text-decoration: none;
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  min-height: 44px;
  transition: color var(--transition-fast);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--accent-red);
}

body.mobile-nav-open {
  overflow: hidden;
}

.social-links,
.mobile-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.mobile-social-links {
  margin-top: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--border-color);
}

.social-link {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--bg-glass);
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-title);
  font-size: 0.86rem;
  font-weight: 800;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
}

.social-link:hover,
.social-link:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent-red);
  background: var(--accent-red-light);
  color: var(--accent-red);
}

.social-icon {
  min-width: 18px;
  text-align: center;
  line-height: 1;
}

/* ==========================================================================
   SECCIÓN HERO (Parallax & Partículas)
   ========================================================================== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.hero-content {
  z-index: 5;
}

.hero-title-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-green);
  background-color: var(--accent-green-light);
  padding: 6px 14px;
  border-radius: 30px;
  margin-bottom: 20px;
  border: 1px solid rgba(140, 159, 128, 0.2);
}

.hero-title-badge span {
  width: 6px;
  height: 6px;
  background-color: var(--accent-green);
  border-radius: 50%;
  display: inline-block;
  animation: pulseGreen 2s infinite;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-title span {
  display: block;
  background: linear-gradient(135deg, var(--accent-red) 0%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 500px;
}

/* Botones Magnéticos */
.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
  will-change: transform;
}

.btn-primary {
  background-color: var(--accent-red);
  color: white;
}

.btn-primary:hover {
  background-color: var(--accent-red-hover);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-secondary);
  box-shadow: var(--shadow-md);
}

/* Ilustración / Escena Visual Hero */
.hero-visual {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.visual-backdrop-glow {
  position: absolute;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, var(--accent-green-light) 0%, transparent 70%);
  z-index: 1;
}

.hero-photo-carousel {
  position: relative;
  z-index: 2;
  width: min(100%, 560px);
  isolation: isolate;
}

.hero-photo-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background-color: var(--bg-secondary);
  box-shadow: 0 24px 60px rgba(30, 34, 41, 0.16);
}

.hero-photo-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.04);
  transition: opacity 700ms ease, transform 900ms ease, visibility 700ms ease;
}

.hero-photo-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-photo-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hero-photo-slide figcaption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 32px);
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(16, 18, 24, 0.62);
  color: white;
  font-family: var(--font-title);
  font-size: 0.82rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero-photo-slide figcaption span {
  color: #F0C277;
  font-variant-numeric: tabular-nums;
}

.hero-photo-slide.enter-zoom img {
  animation: heroZoom 900ms ease both;
}

.hero-photo-slide.enter-slide-left img {
  animation: heroSlideLeft 900ms ease both;
}

.hero-photo-slide.enter-reveal img {
  animation: heroReveal 900ms ease both;
}

.hero-photo-slide.enter-tilt img {
  animation: heroTilt 900ms ease both;
}

.hero-photo-slide.enter-slide-up img {
  animation: heroSlideUp 900ms ease both;
}

.hero-photo-slide.enter-focus img {
  animation: heroFocus 900ms ease both;
}

.hero-photo-slide.enter-pan img {
  animation: heroPan 900ms ease both;
}

.hero-photo-slide.enter-wipe img {
  animation: heroWipe 900ms ease both;
}

.hero-photo-slide.enter-soft img {
  animation: heroSoft 900ms ease both;
}

.hero-carousel-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.hero-carousel-dot {
  width: 10px;
  height: 10px;
  border: 1px solid var(--accent-red);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: width var(--transition-fast), background-color var(--transition-fast), transform var(--transition-fast);
}

.hero-carousel-dot:hover,
.hero-carousel-dot:focus-visible,
.hero-carousel-dot.active {
  width: 28px;
  background: var(--accent-red);
  transform: translateY(-1px);
}

.hero-carousel-dot:focus-visible {
  outline: 3px solid rgba(222, 107, 98, 0.28);
  outline-offset: 3px;
}

html[data-theme="dark"] .hero-photo-stage {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

@media (max-width: 640px) {
  .hero-photo-stage {
    aspect-ratio: 3 / 4;
  }

  .hero-photo-slide figcaption {
    left: 12px;
    bottom: 12px;
    font-size: 0.76rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-photo-slide,
  .hero-photo-slide img,
  .hero-carousel-dot {
    animation: none !important;
    transition: none !important;
  }
}

/* Moto silueta estilizada vectorial SVG animada */
.styled-moto-svg {
  width: 100%;
  max-width: 550px;
  height: auto;
  z-index: 2;
  filter: drop-shadow(0 20px 30px rgba(30, 34, 41, 0.08));
  animation: float 6s ease-in-out infinite;
}

html[data-theme="dark"] .styled-moto-svg {
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.35));
}

html[data-theme="dark"] .styled-moto-svg [stroke="#1E2229"] {
  stroke: #E9DED1;
}

html[data-theme="dark"] .styled-moto-svg [fill="#1E2229"] {
  fill: #E9DED1;
}

html[data-theme="dark"] .styled-moto-svg [stroke="#8C9F80"] {
  stroke: #B7CCA8;
}

html[data-theme="dark"] .styled-moto-svg [fill="#8C9F80"] {
  fill: #AFC4A1;
  opacity: 0.95;
}

html[data-theme="dark"] .styled-moto-svg [stroke="#DE6B62"] {
  stroke: #FF8F84;
}

html[data-theme="dark"] .styled-moto-svg [fill="#E1AD6E"] {
  fill: #F0C277;
  opacity: 0.95;
}

html[data-theme="dark"] .styled-moto-svg [fill="#F3EFE9"] {
  fill: #FFF6E8;
}

html[data-theme="dark"] .styled-moto-svg [stroke="#8FA89B"] {
  stroke: #C3D6CF;
  opacity: 0.9;
}

/* ==========================================================================
   SECCIÓN 3D VIEWER
   ========================================================================== */
.viewer-3d-wrapper {
  background-color: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-top: 20px;
}

.viewer-grid {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 992px) {
  .viewer-grid {
    grid-template-columns: 1.6fr 1fr;
  }
}

.canvas-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--canvas-bg);
  border-bottom: 1px solid var(--border-color);
}

@media (min-width: 992px) {
  .canvas-container {
    border-bottom: none;
    border-right: 1px solid var(--border-color);
  }
}

#canvas-3d {
  width: 100%;
  display: block;
  touch-action: none;
}

.moto-360-viewer {
  position: relative;
  min-height: 320px;
  height: clamp(320px, 42vw, 520px);
  cursor: grab;
  user-select: none;
  outline: none;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(152, 149, 141, 0.72) 0%, rgba(184, 181, 173, 0.62) 39%, rgba(250, 250, 248, 1) 39%, rgba(250, 250, 248, 1) 100%);
}

.moto-360-viewer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(30, 34, 41, 0.08), transparent 18%, transparent 82%, rgba(30, 34, 41, 0.08)),
    radial-gradient(ellipse at 50% 83%, rgba(30, 34, 41, 0.28) 0%, rgba(30, 34, 41, 0.13) 18%, transparent 43%);
  z-index: 1;
}

.moto-360-viewer::after {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 44px;
  height: 104px;
  border: 1.5px solid rgba(30, 34, 41, 0.27);
  border-top-color: transparent;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
}

.moto-360-viewer.is-dragging {
  cursor: grabbing;
}

.moto-360-viewer:focus-visible {
  box-shadow: inset 0 0 0 3px var(--accent-red-light);
}

.moto-360-stage {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.moto-360-image {
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(108%, 980px);
  max-width: none;
  height: auto;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 32px 34px rgba(30, 34, 41, 0.34));
  pointer-events: none;
  transition: opacity 180ms ease, transform 220ms ease, filter 220ms ease;
  will-change: opacity, transform;
}

.moto-360-image.is-changing-frame {
  opacity: 0.92;
  transform: translate(-50%, -50%) scale(0.998);
}

.moto-360-hotspots {
  position: absolute;
  inset: 0;
  z-index: 5;
}

.moto-360-hotspot {
  position: absolute;
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  background: rgba(225, 173, 110, 0.96);
  color: #1E2229;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 0 0 0 8px rgba(225, 173, 110, 0.23), 0 12px 24px rgba(30, 34, 41, 0.22);
  transition: opacity 180ms ease, transform 220ms ease, background-color var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
}

.moto-360-hotspot::before {
  content: "";
  position: absolute;
  inset: -12px;
  border: 1px dashed rgba(222, 107, 98, 0.55);
  border-radius: 50%;
  animation: motoHotspotPulse 2.2s ease-in-out infinite;
}

.moto-360-hotspot span {
  position: relative;
  z-index: 1;
}

.moto-360-hotspot:is(:hover, :focus-visible, .is-active) {
  background: var(--accent-red-light);
  box-shadow: 0 0 0 10px rgba(222, 107, 98, 0.22), 0 14px 30px rgba(30, 34, 41, 0.26);
}

.moto-360-hotspot.is-rear-wheel {
  background: #9BBE91;
  box-shadow: 0 0 0 9px rgba(155, 190, 145, 0.26), 0 12px 24px rgba(30, 34, 41, 0.22);
}

.moto-360-loader {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(30, 34, 41, 0.72);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.moto-360-loader[hidden] {
  display: none;
}

.moto-360-orbit {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 4;
  transform: translateX(-50%);
  color: rgba(30, 34, 41, 0.32);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 2.2rem);
  font-weight: 900;
  line-height: 1;
}

.moto-360-orbit::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 260px;
  max-width: 48vw;
  height: 3px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--accent-red-light) var(--spin-progress, 0%), rgba(30, 34, 41, 0.18) var(--spin-progress, 0%), transparent);
  border-radius: 999px;
}

html[data-theme="dark"] .moto-360-viewer {
  background:
    linear-gradient(180deg, rgba(145, 141, 132, 0.82) 0%, rgba(176, 172, 164, 0.74) 39%, rgba(247, 247, 245, 1) 39%, rgba(247, 247, 245, 1) 100%);
}

html[data-theme="dark"] .moto-360-image {
  filter: drop-shadow(0 34px 36px rgba(0, 0, 0, 0.44));
}

@keyframes motoHotspotPulse {
  0%, 100% {
    transform: scale(0.88);
    opacity: 0.34;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.82;
  }
}

.drag-hint {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background-color: rgba(30, 34, 41, 0.6);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  backdrop-filter: blur(4px);
  z-index: 7;
}

.drag-hint-icon {
  animation: shake 2.5s ease-in-out infinite;
}

.info-side-panel {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--panel-muted);
}

.viewer-title-area {
  margin-bottom: 24px;
}

.viewer-title-area h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.viewer-title-area p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.hotspot-placeholder-card, .hotspot-detail-card {
  padding: 24px;
  border-radius: 16px;
  border: 1px dashed rgba(30, 34, 41, 0.12);
  background-color: var(--bg-primary);
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow-inset);
  transition: opacity var(--transition-medium);
}

.hotspot-detail-card {
  border-style: solid;
  border-color: var(--accent-red-light);
  background-color: rgba(250, 248, 245, 0.9);
  box-shadow: var(--shadow-sm);
}

.hotspot-detail-card h3 {
  font-size: 1.15rem;
  color: var(--accent-red);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hotspot-detail-card h3 .dot-accent {
  width: 8px;
  height: 8px;
  background-color: var(--accent-red);
  border-radius: 50%;
  display: inline-block;
}

.hotspot-detail-card p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-primary);
}

/* ==========================================================================
   SECCIÓN ESPECIFICACIONES (3D Tilt Cards)
   ========================================================================== */
.specs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

@media (min-width: 768px) {
  .specs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .specs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tarjetas 3D Tilt */
.specs-card-wrapper {
  perspective: 1000px; /* Profundidad tridimensional */
}

.specs-card {
  background-color: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s ease, box-shadow var(--transition-medium);
  transform-style: preserve-3d; /* Activar planos 3D internos */
  will-change: transform;
}

.specs-card:hover {
  box-shadow: var(--shadow-lg);
}

.specs-card-icon {
  font-size: 2.2rem;
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background-color: var(--bg-secondary);
  transform: translateZ(30px); /* Empujar icono hacia afuera en 3D */
}

.specs-card h3 {
  font-size: 1.4rem;
  margin-bottom: 6px;
  transform: translateZ(25px);
}

.specs-card .specs-subtitle {
  font-size: 0.9rem;
  color: var(--accent-red);
  font-weight: 600;
  margin-bottom: 24px;
  font-family: var(--font-title);
  transform: translateZ(20px);
}

.specs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateZ(15px);
}

.specs-item {
  border-bottom: 1px solid rgba(30, 34, 41, 0.05);
  padding-bottom: 12px;
}

.specs-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.specs-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  display: block;
  margin-bottom: 4px;
}

.specs-value {
  font-size: 0.92rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* ==========================================================================
   SECCIÓN BLOG (Crónicas de Carretera)
   ========================================================================== */
#blog {
  scroll-margin-top: 96px;
}

.blog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -10px 0 34px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-glass);
}

.blog-toolbar-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: max-content;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.blog-toolbar-summary strong {
  font-family: var(--font-title);
  color: var(--accent-red);
  font-size: 1.35rem;
}

.blog-toolbar-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.blog-control {
  display: grid;
  gap: 6px;
  min-width: 172px;
}

.blog-control span {
  color: var(--text-muted);
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.blog-select {
  min-height: 44px;
  padding: 0 42px 0 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.blog-select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent-red) 34%, transparent);
  outline-offset: 2px;
}

.blog-empty-state {
  grid-column: 1 / -1;
  color: var(--text-muted);
  padding: 60px 20px;
  text-align: center;
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-card {
  background-color: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.blog-card.is-hidden {
  display: none;
}

.blog-card-visual {
  height: 200px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.blog-card-img-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  background-color: var(--bg-secondary);
}

.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
  transition: transform var(--transition-slow), filter var(--transition-medium);
}

.blog-card:hover .blog-card-img {
  transform: scale(1.08);
  filter: saturate(1.08) contrast(1.04);
}

.blog-card-gradient {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.blog-card-category {
  position: absolute;
  top: 16px;
  left: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

.blog-card-illustration {
  width: 50%;
  height: 50%;
  opacity: 0.35;
  transition: transform var(--transition-slow);
}

.blog-card:hover .blog-card-illustration {
  transform: scale(1.15) rotate(5deg);
}

.blog-card-content {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 12px;
  font-weight: 500;
}

.blog-card-title {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.blog-card-summary {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(30, 34, 41, 0.05);
  padding-top: 20px;
  margin-top: auto;
}

.blog-card-author {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.blog-read-btn {
  background: none;
  border: none;
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-red);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.blog-read-btn:hover {
  color: var(--accent-red-hover);
}

.blog-read-btn span {
  transition: transform var(--transition-fast);
}

.blog-card:hover .blog-read-btn span {
  transform: translateX(4px);
}

/* ==========================================================================
   BLOG READER MODAL (SPA/Modal)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--overlay-bg);
  backdrop-filter: blur(10px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 850px;
  max-height: 85vh;
  background-color: var(--bg-primary);
  border-radius: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  position: relative;
  transform: scale(0.92);
  transition: transform var(--transition-elastic);
}

.modal-overlay.open .modal-card {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-primary);
  cursor: pointer;
  z-index: 10;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background-color: var(--accent-red);
  color: white;
}

.modal-header-banner {
  height: 250px;
  position: relative;
}

.modal-category-badge {
  position: absolute;
  bottom: 24px;
  left: 32px;
  background-color: var(--bg-primary);
  color: var(--accent-red);
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.modal-body {
  padding: 40px 32px;
}

@media (min-width: 768px) {
  .modal-body {
    padding: 50px 48px;
  }
}

.modal-article-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.modal-article-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 24px;
}

.modal-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--text-light);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
  margin-bottom: 32px;
}

.modal-article-meta span {
  font-weight: 500;
}

.modal-article-meta span strong {
  color: var(--text-primary);
}

/* Estilos de contenido enriquecido del artículo */
.rich-text {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-primary);
}

.rich-text p {
  margin-bottom: 24px;
  color: var(--text-primary);
}

.rich-text h2,
.rich-text h3 {
  margin: 36px 0 16px 0;
}

.rich-text h2 {
  font-size: 1.8rem;
  font-weight: 800;
}

.rich-text h3 {
  font-size: 1.45rem;
  font-weight: 750;
}

.rich-text h4 {
  font-size: 1.18rem;
  font-weight: 700;
  margin: 28px 0 12px 0;
}

.rich-text strong {
  font-weight: 800;
}

.rich-text em {
  font-style: italic;
}

.rich-text ul,
.rich-text ol {
  margin: 0 0 24px 22px;
  color: var(--text-primary);
}

.rich-text li {
  margin-bottom: 8px;
}

.rich-text blockquote {
  margin: 28px 0;
  padding: 18px 22px;
  border-left: 4px solid var(--accent-red);
  background-color: var(--accent-red-light);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-title);
  font-size: 1.08rem;
}

.rich-text a {
  color: var(--accent-red);
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.rich-text mark {
  background-color: var(--accent-gold-light);
  color: var(--text-primary);
  border-radius: 4px;
  padding: 0 4px;
}

.rich-align-center {
  text-align: center;
}

.rich-align-right {
  text-align: right;
}

.rich-align-left {
  text-align: left;
}

.rich-font-sans {
  font-family: var(--font-body);
}

.rich-font-serif {
  font-family: Georgia, "Times New Roman", serif;
}

.rich-font-mono {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.95em;
}

.rich-lead {
  display: block;
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--text-primary);
  font-weight: 600;
}

/* ==========================================================================
   SECCIÓN GALERÍA
   ========================================================================== */
.gallery-filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-btn {
  background-color: var(--bg-glass);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 30px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.filter-btn.active {
  background-color: var(--accent-green);
  color: white;
  border-color: var(--accent-green);
  box-shadow: var(--shadow-sm);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 576px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery-card {
  height: 280px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

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

.gallery-card-bg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-card-icon {
  font-size: 3rem;
  opacity: 0.15;
  transition: transform var(--transition-slow);
}

.gallery-card:hover .gallery-card-icon {
  transform: scale(1.2) rotate(15deg);
}

.gallery-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(30, 34, 41, 0.85) 0%, rgba(30, 34, 41, 0) 100%);
  padding: 30px 24px 24px 24px;
  color: white;
  transform: translateY(10px);
  opacity: 0;
  transition: transform var(--transition-medium), opacity var(--transition-medium);
}

.gallery-card:hover .gallery-card-overlay {
  transform: translateY(0);
  opacity: 1;
}

.gallery-card-overlay h4 {
  color: white;
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.gallery-card-overlay p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* ==========================================================================
   SECCIÓN CONTACTO / BIKER CLUB (Formulario a11y)
   ========================================================================== */
.contact-wrapper {
  background-color: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 40px 24px;
  max-width: 650px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}

@media (min-width: 768px) {
  .contact-wrapper {
    padding: 50px;
  }
}

.contact-intro {
  text-align: center;
  margin-bottom: 36px;
}

.contact-intro h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.contact-intro p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Label flotante a11y */
.form-label {
  font-family: var(--font-title);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  transition: color var(--transition-fast);
}

.form-input, .form-textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-medium), background-color var(--transition-medium), box-shadow var(--transition-medium);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  background-color: var(--bg-primary);
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px var(--accent-red-light);
}

.form-help {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.form-group:focus-within .form-label {
  color: var(--accent-red);
}

/* Notificaciones de Validación del Formulario */
.form-feedback {
  font-size: 0.8rem;
  margin-top: 6px;
  display: none;
  font-weight: 500;
}

.form-feedback.error {
  display: block;
  color: var(--accent-red);
}

.form-feedback.success {
  display: block;
  color: var(--accent-green);
}

.submit-btn-wrapper {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

/* ==========================================================================
   FOOTER (Pie de página)
   ========================================================================== */
.main-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

.footer-brand h4 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.footer-brand h4 span {
  color: var(--accent-red);
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 320px;
}

.footer-social-links {
  margin: 14px 0 16px;
}

.footer-social-links .social-link {
  padding: 8px 12px;
}

.footer-social-links .social-label {
  display: inline;
}

.footer-links-title {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--accent-red);
}

.footer-bottom {
  border-top: 1px solid rgba(30, 34, 41, 0.05);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (min-width: 576px) {
  .footer-bottom {
    flex-direction: row;
  }
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--text-light);
}

.footer-a11y-badge {
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==========================================================================
   ANIMACIONES CLAVE
   ========================================================================== */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
  100% { transform: translateY(0px); }
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(140, 159, 128, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(140, 159, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(140, 159, 128, 0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
  20%, 40%, 60%, 80% { transform: translateX(2px); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Transiciones entre páginas virtuales SPA */
.view-element {
  transition: opacity var(--transition-medium), transform var(--transition-medium);
  will-change: opacity, transform;
}

.view-hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  position: absolute;
}

/* ==========================================================================
   COMUNIDAD: REACCIONES, COMENTARIOS Y RESPUESTAS
   ========================================================================== */
.community-panel {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--border-color);
}

.community-shell {
  display: grid;
  gap: 30px;
}

.community-title {
  margin: 0 0 14px;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.2;
}

.reaction-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.reaction-btn {
  min-height: 50px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 12px 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-glass);
  color: var(--text-primary);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.reaction-btn:hover,
.reaction-btn:focus-visible,
.reaction-btn.selected {
  transform: translateY(-1px);
  border-color: var(--accent-red-light);
  background: rgba(222, 107, 98, 0.12);
  box-shadow: 0 10px 24px rgba(222, 107, 98, 0.12);
}

.reaction-btn:focus-visible,
.comment-action:focus-visible,
.comment-form button:focus-visible {
  outline: 3px solid rgba(222, 107, 98, 0.35);
  outline-offset: 3px;
}

.reaction-icon {
  font-size: 1.1rem;
}

.reaction-label {
  min-width: 0;
  text-align: left;
  font-size: 0.86rem;
  line-height: 1.15;
}

.reaction-count {
  color: var(--accent-red);
  font-variant-numeric: tabular-nums;
}

.comment-form {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-glass);
}

.reply-form {
  margin-top: 14px;
  margin-bottom: 0;
}

.comment-form-title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.3;
}

.comment-input,
.comment-textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font: inherit;
  padding: 12px 13px;
}

.comment-textarea {
  min-height: 112px;
  resize: vertical;
}

.comment-input:focus,
.comment-textarea:focus {
  border-color: var(--accent-red-light);
  outline: 3px solid rgba(222, 107, 98, 0.18);
}

.comment-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.comments-list {
  display: grid;
  gap: 14px;
}

.comments-empty,
.community-feedback {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.community-feedback {
  min-height: 1.4em;
  margin: 10px 0 0;
}

.comment-item {
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-glass);
}

.comment-item.depth-1,
.comment-item.depth-2 {
  margin-left: clamp(12px, 4vw, 34px);
  border-left: 3px solid rgba(222, 107, 98, 0.45);
}

.comment-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.comment-author {
  color: var(--text-primary);
}

.guest-badge {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(222, 107, 98, 0.13);
  color: var(--accent-red);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.comment-date {
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.comment-body {
  margin: 0 0 10px;
  color: var(--text-primary);
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.comment-action {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent-red);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.comment-replies {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

@media (min-width: 720px) {
  .reaction-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .reaction-actions {
    grid-template-columns: 1fr;
  }

  .comment-form {
    padding: 14px;
  }

  .comment-item.depth-1,
  .comment-item.depth-2 {
    margin-left: 8px;
  }
}

.footer-privacy-link {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.footer-privacy-link:focus-visible,
.cookie-consent-banner button:focus-visible,
.privacy-modal button:focus-visible,
.privacy-option input:focus-visible {
  outline: 3px solid var(--accent-red);
  outline-offset: 3px;
}

.cookie-consent-banner {
  position: fixed;
  right: clamp(16px, 4vw, 32px);
  bottom: clamp(16px, 4vw, 32px);
  left: auto;
  z-index: 2147483000;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  width: min(580px, calc(100vw - 32px));
  max-width: none;
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-primary);
  box-shadow: 0 24px 70px rgba(30, 34, 41, 0.22);
  backdrop-filter: blur(14px);
}

html[data-theme="dark"] .cookie-consent-banner {
  background: var(--bg-secondary);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

body.privacy-modal-open .cookie-consent-banner {
  display: none;
}

.cookie-consent-banner[hidden],
.privacy-modal[hidden] {
  display: none;
}

.cookie-consent-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.cookie-consent-copy strong {
  color: var(--text-primary);
}

.cookie-consent-copy p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cookie-consent-actions,
.privacy-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.cookie-consent-actions {
  justify-content: flex-end;
  min-width: 220px;
}

.privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 24px);
  background: rgba(8, 10, 14, 0.78);
  backdrop-filter: blur(8px);
  isolation: isolate;
}

.privacy-modal-card {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(92vh, 760px);
  overflow: auto;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-primary);
  color: var(--text-primary);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
  scrollbar-gutter: stable;
}

html[data-theme="dark"] .privacy-modal-card {
  background: var(--bg-secondary);
}

.privacy-modal-card-wide {
  width: min(880px, 100%);
}

.privacy-modal-card h2 {
  margin: 0 0 10px;
  font-size: clamp(1.65rem, 3.4vw, 2.35rem);
}

.privacy-modal-card p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.65;
}

.privacy-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

.privacy-options {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.privacy-option {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
}

.privacy-option span {
  display: grid;
  gap: 5px;
}

.privacy-option small {
  color: var(--text-secondary);
  line-height: 1.35;
}

.privacy-option input {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  accent-color: var(--accent-red);
}

.privacy-option.locked {
  opacity: 0.82;
}

.privacy-copy {
  display: grid;
  gap: 12px;
}

.privacy-copy p {
  margin: 0;
}

@media (max-width: 720px) {
  .cookie-consent-banner {
    align-items: stretch;
    flex-direction: column;
    right: 14px;
    bottom: 14px;
    width: calc(100vw - 28px);
    padding: 16px;
  }

  .cookie-consent-actions {
    min-width: 0;
  }

  .cookie-consent-actions,
  .privacy-modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cookie-consent-actions .btn,
  .privacy-modal-actions .btn {
    width: 100%;
  }

  .privacy-option {
    align-items: flex-start;
  }
}

@media (hover: none) {
  .gallery-card-overlay {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .header-container {
    height: 64px;
    gap: 10px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .logo-wrapper {
    gap: 8px;
    max-width: calc(100vw - 128px);
  }

  .logo-text {
    font-size: clamp(0.86rem, 3.3vw, 1rem);
    letter-spacing: 0;
  }

  .logo-icon {
    width: 30px;
    height: 30px;
  }

  .theme-toggle-btn {
    width: 42px;
    height: 28px;
  }

  .header-actions {
    gap: 8px;
  }

  .mobile-nav-drawer {
    width: min(88vw, 360px);
    padding: max(86px, calc(68px + env(safe-area-inset-top))) 24px max(32px, calc(24px + env(safe-area-inset-bottom)));
  }

  .hero-section {
    min-height: auto;
    padding-top: 92px;
    padding-bottom: 54px;
  }

  .hero-grid {
    gap: 28px;
  }

  .hero-title {
    font-size: 2.35rem;
    letter-spacing: 0;
  }

  .hero-description {
    font-size: 1rem;
    margin-bottom: 26px;
  }

  .button-group {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button-group .btn {
    width: 100%;
  }

  .viewer-3d-wrapper,
  .contact-wrapper,
  .modal-card,
  .blog-card,
  .gallery-card,
  .specs-card {
    border-radius: 14px;
  }

  .moto-360-viewer {
    min-height: 300px;
    height: 330px;
  }

  .moto-360-image {
    width: min(108%, 560px);
  }

  .drag-hint {
    right: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
    font-size: 0.68rem;
  }

  .info-side-panel {
    padding: 22px;
  }

  .section {
    padding: 64px 0;
  }

  .section-title-wrapper {
    margin-bottom: 32px;
  }

  .section-title {
    font-size: 2rem;
    letter-spacing: 0;
  }

  .blog-grid,
  .specs-grid {
    gap: 22px;
  }

  .blog-toolbar {
    align-items: stretch;
    flex-direction: column;
    margin-bottom: 26px;
    padding: 14px;
  }

  .blog-toolbar-summary {
    justify-content: space-between;
    min-width: 0;
  }

  .blog-toolbar-controls {
    flex-direction: column;
  }

  .blog-control {
    min-width: 0;
    width: 100%;
  }

  .blog-select {
    width: 100%;
  }

  .blog-card-content {
    padding: 22px;
  }

  .blog-card-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .modal-overlay {
    padding: 10px;
  }

  .modal-card {
    max-height: 92vh;
  }

  .modal-header-banner {
    height: 180px;
  }

  .modal-body {
    padding: 26px 20px;
  }

  .modal-article-title {
    font-size: 1.75rem;
    letter-spacing: 0;
  }

  .rich-text {
    font-size: 1rem;
  }

  .contact-wrapper {
    padding: 28px 18px;
  }

  .footer-grid {
    gap: 28px;
  }

  .footer-brand p {
    max-width: none;
  }

  .footer-bottom {
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .logo-text {
    font-size: 0.92rem;
  }

  .header-actions {
    gap: 10px;
  }

  .hero-title {
    font-size: 2.05rem;
  }

  .hero-photo-slide figcaption {
    max-width: calc(100% - 24px);
    font-size: 0.7rem;
  }

  .footer-social-links .social-label {
    display: none;
  }
}

@media (max-width: 1119px) {
  body.mobile-nav-open #mobile-drawer,
  body.mobile-nav-open .mobile-nav-drawer,
  .mobile-nav-drawer.open {
    transform: translate3d(0, 0, 0) !important;
  }
}

@keyframes heroZoom {
  from { transform: scale(1.12); }
  to { transform: scale(1); }
}

@keyframes heroSlideLeft {
  from { transform: translateX(7%) scale(1.04); }
  to { transform: translateX(0) scale(1); }
}

@keyframes heroReveal {
  from { clip-path: inset(0 0 0 100%); transform: scale(1.04); }
  to { clip-path: inset(0 0 0 0); transform: scale(1); }
}

@keyframes heroTilt {
  from { transform: rotate(1.5deg) scale(1.08); }
  to { transform: rotate(0deg) scale(1); }
}

@keyframes heroSlideUp {
  from { transform: translateY(7%) scale(1.04); }
  to { transform: translateY(0) scale(1); }
}

@keyframes heroFocus {
  from { filter: blur(8px) saturate(0.85); transform: scale(1.05); }
  to { filter: blur(0) saturate(1); transform: scale(1); }
}

@keyframes heroPan {
  from { object-position: 68% center; transform: scale(1.08); }
  to { object-position: 50% center; transform: scale(1); }
}

@keyframes heroWipe {
  from { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); transform: scale(1.04); }
  to { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); transform: scale(1); }
}

@keyframes heroSoft {
  from { opacity: 0.25; transform: scale(1.03); }
  to { opacity: 1; transform: scale(1); }
}
