/* ======================================
   PORTFOLIO ALBARO - CSS OPTIMIZADO
   ====================================== */

/* ======================================
   1. VARIABLES GLOBALES Y TEMPORADAS
   ====================================== */
:root {
  /* Colores base del portfolio */
  --accent: #1976D2;
  --dawn: #FF9A76;
  --light: #FFF9F0;
  --dark: #1A1A1A;
  --bg-dark: #0D1B2A;
  --text-dark: #E0E6ED;

  /* Modo claro/oscuro (dinámico) */
  --bg-light: var(--light);
  --text-light: var(--dark);

  /* === COLORES DE TEMPORADA (se cambian dinámicamente por JS) === */
  /* Por defecto: Verano (Rayos) - Azul → Verde */
  --season-gradient-top: #1976D2;
  /* Azul cielo */
  --season-gradient-bottom: #43A047;
  /* Verde */
  --season-element-color-1: #B3E5FC;
  /* Azul claro */
  --season-element-color-2: #64B5F6;
  /* Azul medio */

  /* PRIMAVERA (Flores): Rojo claro abajo → Amarillo anaranjado arriba */
  --spring-gradient-top: #FFB347;
  /* Naranja amarillento */
  --spring-gradient-bottom: #FF6B6B;
  /* Rojo claro */
  --spring-element-color-1: #FF6B6B;
  /* Rojo */
  --spring-element-color-2: #FFD93D;
  /* Amarillo */
  --spring-element-color-3: #6BCB77;
  /* Verde */
  --spring-element-color-4: #4D96FF;
  /* Azul */

  /* VERANO (Rayos/Soles): Azul → Verde (actual) */
  --summer-gradient-top: #1976D2;
  --summer-gradient-bottom: #43A047;
  --summer-element-color-1: #B3E5FC;
  --summer-element-color-2: #64B5F6;

  /* OTOÑO (Hojas): Naranja oscuro → Marrón */
  --autumn-gradient-top: #D2691E;
  /* Chocolate claro */
  --autumn-gradient-bottom: #8B4513;
  /* Silla marrón */
  --autumn-element-color-1: #FF8C42;
  /* Naranja */
  --autumn-element-color-2: #D2691E;
  /* Marrón claro */
  --autumn-element-color-3: #8B4513;
  /* Marrón oscuro */

  /* INVIERNO (Copos/Bolas de nieve): Azul helado → Gris claro */
  --winter-gradient-top: #E3F2FD;
  /* Azul muy claro */
  --winter-gradient-bottom: #90CAF9;
  /* Azul helado */
  --winter-element-color-1: #FFFFFF;
  /* Blanco */
  --winter-element-color-2: #B3E5FC;
  /* Azul hielo */

  /* NAVIDAD: Rojo → Verde navideño */
  --christmas-gradient-top: #2E7D32;
  /* Verde pino */
  --christmas-gradient-bottom: #C62828;
  /* Rojo navidad */
  --christmas-element-color-1: #FFD700;
  /* Dorado */
  --christmas-element-color-2: #C62828;
  /* Rojo */

  /* HALLOWEEN: Naranja → Morado oscuro */
  --halloween-gradient-top: #4A148C;
  /* Morado oscuro */
  --halloween-gradient-bottom: #FF6F00;
  /* Naranja Halloween */
  --halloween-element-color-1: #FF6F00;
  /* Naranja */
  --halloween-element-color-2: #4A148C;
  /* Morado */

  /* SEMANA SANTA: Morado → Blanco/Dorado */
  --easter-gradient-top: #FFF9C4;
  /* Amarillo claro */
  --easter-gradient-bottom: #7E57C2;
  /* Morado litúrgico */
  --easter-element-color-1: #7E57C2;
  /* Morado */
  --easter-element-color-2: #FFD700;
  /* Dorado */

  /* Transiciones globales */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.4s ease;
}

/* ======================================
   2. RESET Y BASE
   ====================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: 'Raleway', sans-serif;
  background: var(--bg-light);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
  transition: background var(--transition-normal), color var(--transition-normal);
}

body.dark-mode {
  background: var(--bg-dark);
  color: var(--text-dark);
}

/* Transiciones para elementos en modo oscuro */
.dark-mode .section-title,
.dark-mode .tagline,
.dark-mode .tab-button,
.dark-mode footer p {
  color: var(--text-dark);
  transition: color var(--transition-normal);
}

/* ======================================
   3. UTILIDADES REUTILIZABLES
   ====================================== */

/* Clase para frames/bordes de secciones */
.section-frame {
  border: none;
  /* Sin bordes para transiciones suaves */
  transition: border-color var(--transition-normal);
}

/* Si quieres bordes solo en modo oscuro, descomenta esto:
body.dark-mode .section-frame {
  border: 3px solid #053e7b;
}
*/

/* Clase para títulos de sección */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--dark);
  transition: color var(--transition-normal);
}

body.dark-mode .section-title {
  color: var(--text-dark);
}

/* Botones de modo oscuro (clase única reutilizable) */
/* Selector de tema fijo (junto al selector de idioma) */
.theme-selector {
  position: fixed;
  top: 20px;
  right: 80px;
  /* Cambiado de 180px a 80px - más cerca del borde */
  font-family: 'Raleway', sans-serif;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  will-change: top;
}

/* Visible solo en info y galería */
.theme-selector.visible {
  opacity: 1;
  pointer-events: auto;
}

.theme-selector button#theme-toggle {
  background: rgba(9, 0, 0, 0.475);
  border: none;
  color: white;
  padding: 0;
  /* Sin padding para centrar mejor */
  font-size: 20px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  backdrop-filter: blur(5px);
  transition: background var(--transition-normal), transform var(--transition-normal);
  line-height: 1;
  /* Para centrar verticalmente el emoji */
}

.theme-selector button#theme-toggle:hover {
  background: rgba(5, 1, 1, 0.838);
  transform: scale(1.1);
}

/* Tooltip desplegable */
.theme-tooltip {
  position: absolute;
  top: 48px;
  /* Justo debajo del botón */
  right: 0;
  background: rgba(0, 0, 0, 0.9);
  border-radius: 8px;
  overflow: hidden;
  min-width: 130px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  z-index: 1001;
  /* Por encima del botón */
}

.theme-tooltip.hidden {
  display: none;
}

.theme-option {
  width: 100%;
  padding: 10px 15px;
  background: transparent;
  border: none;
  color: white;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Espacio entre contenido y checkmark */
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
}

.theme-option-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-icon {
  font-size: 16px;
  display: inline-block;
  min-width: 20px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Hover effect */
.theme-option:hover {
  background: rgba(255, 255, 255, 0.15);
  padding-left: 18px;
}

.theme-option:hover .theme-icon {
  transform: scale(1.2) rotate(5deg);
}

/* Active state - mucho más visible */
.theme-option.active {
  background: linear-gradient(90deg, rgba(25, 118, 210, 0.4), rgba(25, 118, 210, 0.2));
  border-left: 3px solid #1976D2;
  padding-left: 12px;
}

.theme-option.active .theme-icon {
  transform: scale(1.1);
}

/* Checkmark para el activo */
.theme-option::after {
  content: '';
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 16px;
  transform: scale(0);
}

.theme-option.active::after {
  content: '✓';
  opacity: 1;
  transform: scale(1);
  color: #4CAF50;
  font-weight: bold;
}

/* Click effect */
.theme-option:active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.25);
}

body.dark-mode .dark-mode-toggle {
  color: var(--light);
  border-color: var(--light);
  background: var(--dark);
}

/* Posicionamiento específico por sección */
#tabs-section .dark-mode-toggle {
  top: 0;
  right: 20px;
}

#gallery .dark-mode-toggle {
  top: 20px;
  right: 20px;
}

/* Flechas de scroll */
.arrow-wrapper,
.arrow-wrapper2 {
  display: flex;
  justify-content: center;
  align-items: center;
}

.arrow-wrapper2 {
  transform: scaleY(-1);
}

.scroll-arrow {
  display: block;
  color: var(--scroll-hint-color);
  /* Color por temporada */
  transition: color var(--transition-normal);
  animation: pulse 1.5s infinite;
}

/* En modo oscuro el scroll arrow mantiene el color de la temporada */
body.dark-mode .scroll-arrow {
  color: var(--scroll-hint-color);
}

/* ======================================
   4. HERO (PORTADA)
   ====================================== */
#hero.section-frame {
  height: 100vh;
  width: 100vw;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  border: none;
}

#flower-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
}

/* Animación sutil del degradado (TODOS los canvas) */
#flower-canvas.animated-gradient {
  animation: gradientShift 25s ease-in-out infinite;
}

@keyframes gradientShift {

  0%,
  100% {
    filter: hue-rotate(0deg) brightness(1);
  }

  50% {
    filter: hue-rotate(10deg) brightness(1.05);
  }
}

.hero-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 8vw, 5rem);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeIn 1.5s forwards 0.5s;
  color: var(--hero-title-color);
  text-align: center;
  white-space: nowrap;
  /* Evita saltos de línea */
}

.fixed-text {
  color: var(--hero-title-color);
}

.typewriter-text {
  color: var(--hero-title-color);
  display: inline-block;
  border-right: 3px solid var(--hero-title-color);
  animation: blink-cursor 0.8s step-end infinite;
  min-width: 3px;
  /* Ancho mínimo para que el cursor siempre sea visible */
}

/* Animación del cursor parpadeante */
@keyframes blink-cursor {

  0%,
  50% {
    border-color: var(--hero-title-color);
  }

  51%,
  100% {
    border-color: transparent;
  }
}

.hero-content .tagline {
  font-size: clamp(1rem, 3vw, 1.5rem);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeIn 1.5s forwards 1s;
  color: var(--hero-title-color);
  /* Color fijo por temporada */
}

/* ======================================
   5. SISTEMA DE SCROLL HINTS
   ====================================== */

/* Scroll hint base (común para todos) */
/* Scroll hint base (común para todos) */
.scroll-hint {
  position: fixed;
  /* Cambiado de absolute a fixed */
  bottom: 50%;
  left: 2%;
  /* Movido a la izquierda */
  transform: translateY(50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--accent);
  cursor: pointer;
  transition: opacity var(--transition-slow);
  z-index: 100;
  background: rgba(0, 0, 0, 0.3);
  /* Fondo semi-transparente */
  padding: 15px 10px;
  border-radius: 30px;
  backdrop-filter: blur(5px);
}

/* Ocultar en Hero (mantener centrado abajo) */
#hero .scroll-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: transparent;
  padding: 0;
  backdrop-filter: none;
}

.scroll-hint span {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* Hero: siempre visible */
#hero .scroll-hint {
  opacity: 1;
  pointer-events: auto;
}

/* Tabs y Gallery: ocultos por defecto */
#tabs-section .scroll-hint,
#gallery .scroll-hint {
  opacity: 0;
  pointer-events: none;
}

#tabs-section .scroll-hint.visible,
#gallery .scroll-hint.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Yarn ball (ovillo) */
.yarn-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0.25rem;
  cursor: pointer;
  transition: transform var(--transition-normal);
}

.yarn-ball {
  width: 80px;
  height: 80px;
  object-fit: contain;
  transition: transform var(--transition-normal);
}

.yarn-wrapper:hover .yarn-ball,
#gallery .yarn-wrapper:hover .yarn-ball {
  transform: scale(1.1) rotate(-5deg);
}

/* ======================================
   6. SECCIÓN TABS (INFORMACIÓN)
   ====================================== */
#tabs-section.section-frame.full-screen-section {
  min-height: 50vh;
  width: 100vw;
  background: var(--bg-light);
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-bottom: 60px;
  padding-top: 0;
  /* Sin padding arriba para que llegue al tope */
  /* Banners laterales con patrón sutil - MISMO TAMAÑO QUE GALERÍA */
  background-image:
    /* Banner izquierdo 8% */
    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 0%, transparent 8%),
    /* Banner derecho 8% */
    linear-gradient(90deg, transparent 92%, rgba(0, 0, 0, 0.02) 100%),
    /* Patrón de puntos */
    radial-gradient(circle, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 20px 20px;

  background-position: 0 0, 0 0, 0 0;
  background-attachment: local;
  /* Para que el fondo se pegue desde arriba */
}

body.dark-mode #tabs-section.section-frame.full-screen-section {
  background: var(--bg-dark);
  border-color: var(--dark);
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0%, transparent 8%),
    linear-gradient(90deg, transparent 92%, rgba(255, 255, 255, 0.03) 100%),
    radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 20px 20px;
}



/* Animaciones */
@keyframes floatVertical {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-30px);
  }
}

@keyframes slideHorizontalLeft {
  0% {
    right: 100%;
    opacity: 0;
  }

  5% {
    opacity: 0.15;
  }

  95% {
    opacity: 0.15;
  }

  100% {
    right: 0%;
    opacity: 0;
  }
}

@keyframes slideHorizontalRight {
  0% {
    left: 0%;
    opacity: 0;
  }

  5% {
    opacity: 0.15;
  }

  95% {
    opacity: 0.15;
  }

  100% {
    left: 100%;
    opacity: 0;
  }
}

.tabs-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-top: 20px;
  /* Padding interno en vez de margin */
}

/* Botón de modo oscuro en tabs */
#dark-mode-toggle-2 {
  top: 0;
  right: 20px;
}

/* Contenedor de pestañas */
.tabs-container {
  width: 90%;
  max-width: 1100px;
  margin: 1rem auto 0 auto;
  /* Centrado con margin auto */
  text-align: left;
  display: flex;
  flex-direction: column;
  padding-bottom: 40px;
}

/* Navegación de pestañas */
.nav-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.tab-button {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 0.6rem 1.2rem;
  margin: 0.25rem;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'EB Garamond', serif;
  /* Añadir EB Garamond */
  cursor: pointer;
  border-radius: 30px;
  transition: background var(--transition-normal), color var(--transition-normal);
}

.tab-button:hover,
.tab-button.active {
  background: var(--accent);
  color: var(--light);
}

body.dark-mode .tab-button:hover,
body.dark-mode .tab-button.active {
  background: var(--accent);
  color: var(--bg-dark);
}

/* Navidad en modo oscuro: botones rojos */
body.dark-mode.season-christmas .tab-button {
  border-color: var(--accent);
  /* Rojo */
  color: var(--accent);
}

body.dark-mode.season-christmas .tab-button:hover,
body.dark-mode.season-christmas .tab-button.active {
  background: var(--accent);
  /* Rojo */
  color: var(--light);
}

/* Semana Santa en modo oscuro: botones amarillos */
body.dark-mode.season-easter .tab-button {
  border-color: var(--dawn);
  /* Amarillo dorado */
  color: var(--dawn);
}

body.dark-mode.season-easter .tab-button:hover,
body.dark-mode.season-easter .tab-button.active {
  background: var(--dawn);
  /* Amarillo dorado */
  color: var(--bg-dark);
}

/* Contenedor con altura automática */
.tab-content {
  width: 100%;
  margin: 0 auto 20px auto;
  /* Centrado */
  padding: 0 20px;
  /* Padding lateral para no pegar al borde */
}

/* Eliminar scrollbar personalizado ya que no hay scroll interno */

/* Scrollbar personalizado para tab-content */
.tab-content::-webkit-scrollbar {
  width: 6px;
}

.tab-content::-webkit-scrollbar-track {
  background: transparent;
}

.tab-content::-webkit-scrollbar-thumb {
  background-color: var(--accent);
  border-radius: 3px;
}

.tab-content::-webkit-scrollbar-thumb:hover {
  background-color: var(--dawn);
}

.tab-content {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

/* Paneles de contenido */
.tab-content .tab-panel {
  display: none;
  font-size: 1rem;
  line-height: 1.5;
  padding-bottom: 20px;
  text-align: justify;
}

.tab-content .tab-panel.active {
  display: block;
  animation: fadeInContent 0.6s ease-in-out;
}

/* Animación de aparición de contenido */
@keyframes fadeInContent {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade-in progresivo para párrafos */
.tab-panel p,
.tab-panel ul,
.tab-panel .contact-form,
.tab-panel .social-list {
  opacity: 0;
  animation: fadeInElement 0.8s ease-in-out forwards;
}

.tab-panel p:nth-child(1) {
  animation-delay: 0.1s;
}

.tab-panel p:nth-child(2) {
  animation-delay: 0.2s;
}

.tab-panel p:nth-child(3) {
  animation-delay: 0.3s;
}

.tab-panel p:nth-child(4) {
  animation-delay: 0.4s;
}

.tab-panel p:nth-child(5) {
  animation-delay: 0.5s;
}

.tab-panel p:nth-child(6) {
  animation-delay: 0.6s;
}

.tab-panel p:nth-child(7) {
  animation-delay: 0.7s;
}

.tab-panel p:nth-child(8) {
  animation-delay: 0.8s;
}

.tab-panel ul,
.tab-panel .contact-form,
.tab-panel .social-list {
  animation-delay: 0.3s;
}

@keyframes fadeInElement {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-content .tab-panel.active {
  display: block;
}

.tab-content .tab-panel p,
.tab-content .tab-panel ul {
  color: var(--dark);
  transition: color var(--transition-normal);
}

body.dark-mode .tab-content .tab-panel p,
body.dark-mode .tab-content .tab-panel ul {
  color: var(--text-dark);
}

/* ======================================
   7. FORMULARIO DE CONTACTO
   ====================================== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.contact-form label {
  font-weight: 600;
  color: var(--dark);
  transition: color var(--transition-normal);
}

body.dark-mode .contact-form label {
  color: var(--text-dark);
}

.contact-form input,
.contact-form textarea {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  color: var(--dark);
  background: #fff;
  transition: background var(--transition-normal),
    color var(--transition-normal),
    border-color var(--transition-normal);
}

body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
  color: var(--text-dark);
  background: #333;
  border: 1px solid #555;
}

.contact-form button {
  background: var(--accent);
  color: var(--light);
  padding: 0.75rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition-normal);
}

.contact-form button:hover {
  background: var(--dawn);
  color: var(--light);
}

/* ======================================
   8. LISTA SOCIAL
   ====================================== */
.social-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Centrado */
  gap: 0.75rem;
  padding: 0;
  width: 100%;
}

.social-list li {
  text-align: center;
  width: 100%;
}

.social-list li a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-normal);
  display: inline-block;
}

.social-list li a:hover {
  color: var(--dark);
}

body.dark-mode .social-list li a {
  color: var(--accent);
}

body.dark-mode .social-list li a:hover {
  color: var(--dawn);
  /* Usa el color secundario por temporada */
}

/* ======================================
   9. GALERÍA
   ====================================== */
#gallery.section-frame {
  position: relative;
  min-height: 100vh;
  width: 100vw;
  background: var(--bg-light);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  /* Banners laterales con patrón sutil - 5% cada lado igual que tabs */
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 0%, transparent 8%),
    linear-gradient(90deg, transparent 92%, rgba(0, 0, 0, 0.02) 100%),
    radial-gradient(circle, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 20px 20px;
  background-position: 0 0, 0 0, 0 0;
}

body.dark-mode #gallery.section-frame {
  background: var(--bg-dark);
  border-color: var(--dark);
  background-image: 
    linear-gradient(90deg, rgba(255,255,255,0.03) 0%, transparent 8%),
    linear-gradient(90deg, transparent 92%, rgba(255,255,255,0.03) 100%),
    radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 20px 20px;
}



/* Botón de modo oscuro en galería */
#dark-mode-toggle-3 {
  top: 20px;
  right: 20px;
}

.gallery-content {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0 60px 0;
  /* Sin altura fija */
}

.gallery-container {
  width: 100%;
  padding: 0.5rem 0;
  box-sizing: border-box;
}

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.gallery-item {
  width: 300px;
  height: 300px;
  background: var(--bg-light);
  border: 1px solid var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: background var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-normal);
}

body.dark-mode .gallery-item {
  background: var(--bg-dark);
  border-color: var(--bg-dark);
}

.gallery-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.gallery-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ======================================
   10. LIGHTBOX
   ====================================== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  transition: opacity var(--transition-normal);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.lightbox-close:hover {
  color: var(--accent);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  font-size: 3rem;
  color: #fff;
  padding: 0 12px;
  cursor: pointer;
  user-select: none;
  transform: translateY(-50%);
  transition: color var(--transition-fast);
  font-weight: bold;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--accent);
}

.lightbox-prev {
  left: 30px;
}

.lightbox-next {
  right: 30px;
}

/* ======================================
   11. SELECTOR DE IDIOMAS
   ====================================== */
.language-selector {
  position: absolute;
  top: 20px;
  right: 20px;
  font-family: 'Raleway', sans-serif;
  z-index: 1000;
}

.language-selector button {
  background: rgba(9, 0, 0, 0.475);
  border: none;
  color: white;
  padding: 10px 16px; /* Aumentado de 6px 12px */
  font-size: 16px; /* Aumentado de 14px */
  border-radius: 10px; /* Aumentado de 8px */
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px; /* Aumentado de 6px */
  backdrop-filter: blur(5px);
  transition: background var(--transition-normal);
}

.language-selector button:hover {
  background: rgba(5, 1, 1, 0.838);
}

.language-selector .arrow {
  width: 12px; /* Aumentado de 10px */
  height: 8px; /* Aumentado de 6px */
  fill: white;
  transition: transform var(--transition-normal);
}

.language-selector.open .arrow {
  transform: rotate(180deg);
}

/* Bandera en el botón principal */
.flag-icon-small {
  width: 22px; /* Aumentado de 18px */
  height: 15px; /* Aumentado de 12px */
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.lang-options {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 8px;
  overflow: hidden;
  position: absolute;
  right: 0;
  min-width: 150px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.lang-options li {
  padding: 8px 12px;
  cursor: pointer;
  color: white;
  font-size: 14px;
  transition: background var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-options li:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Banderas en el dropdown */
.lang-options .flag-icon {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.lang-options.hidden {
  display: none;
}

/* ======================================
   12. SCROLLBARS PERSONALIZADOS
   ====================================== */

/* Body */
body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body::-webkit-scrollbar-track {
  background: transparent;
}

body::-webkit-scrollbar-thumb {
  background-color: var(--accent);
}

body {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

/* Gallery container */
.gallery-container::-webkit-scrollbar {
  width: 6px;
}

.gallery-container::-webkit-scrollbar-track {
  background: transparent;
}

.gallery-container::-webkit-scrollbar-thumb {
  background-color: var(--dawn);
  border-radius: 3px;
  border: 1px solid transparent;
  background-clip: content-box;
}

.gallery-container::-webkit-scrollbar-thumb:hover {
  background-color: #e77a57;
}

.gallery-container {
  scrollbar-width: thin;
  scrollbar-color: var(--dawn) transparent;
}

/* ======================================
   13. OVERSCROLL BEHAVIOR
   ====================================== */
html,
body {
  overscroll-behavior-y: auto;
}

.gallery-container {
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

/* ======================================
   14. ANIMACIONES
   ====================================== */
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scaleY(1);
  }

  50% {
    transform: scaleY(1.2);
  }
}

/* ======================================
   15. FOOTER
   ====================================== */
footer {
  background: var(--dark);
  color: var(--light);
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.9rem;
}

/* ======================================
   16. RESPONSIVE (MÓVIL)
   ====================================== */
@media (max-width: 600px) {

  /* Ajustar altura máxima del contenido en móvil */
  .scroll-hint {
    left: 1%;
    padding: 10px 8px;
  }

  #hero .scroll-hint {
    left: 50%;
  }

  /* Panel de contacto con padding extra */
  #contact.tab-panel {
    padding-bottom: 80px;
  }

  /* Padding general para todos los paneles */
  .tab-panel {
    padding-bottom: 40px;
  }

  /* Debug panel más pequeño en móvil */
  .debug-panel {
    bottom: 10px !important;
    left: 10px !important;
    max-width: calc(100vw - 20px) !important;
  }

  .debug-panel button {
    font-size: 11px !important;
    padding: 6px 10px !important;
  }

  /* Ocultar decoración lateral en móvil (muy pequeño) */
  #tabs-section.section-frame.full-screen-section::before,
  #tabs-section.section-frame.full-screen-section::after,
  #gallery.section-frame::before,
  #gallery.section-frame::after {
    display: none;
  }
}

/* ======================================
   17. PANEL DE DEBUG
   ====================================== */
.debug-panel {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 500px;
  align-items: center;
}

.debug-panel h3 {
  width: 100%;
  margin: 0 0 10px 0;
  color: white;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 8px;
}

.debug-panel button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  padding: 8px 14px;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.debug-panel button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.debug-panel button:active {
  transform: translateY(0);
}

Colores específicos por botón .debug-panel button[data-season="spring"] {
  background: linear-gradient(135deg, #FF6B6B 0%, #FFD93D 100%);
}

.debug-panel button[data-season="summer_sun"] {
  background: linear-gradient(135deg, #FFB300 0%, #FF8C42 100%);
  color: #4E342E;
}

.debug-panel button[data-season="summer"] {
  background: linear-gradient(135deg, #00ACC1 0%, #43A047 100%);
}

.debug-panel button[data-season="autumn"] {
  background: linear-gradient(135deg, #FFA726 0%, #D84315 100%);
}

.debug-panel button[data-season="winter"] {
  background: linear-gradient(135deg, #90CAF9 0%, #0288D1 100%);
  color: #263238;
}

.debug-panel button[data-season="halloween"] {
  background: linear-gradient(135deg, #4A148C 0%, #E65100 100%);
}

.debug-panel button[data-season="christmas"] {
  background: linear-gradient(135deg, #E3F2FD 0%, #C62828 100%);
}

.debug-panel button[data-season="easter"] {
  background: linear-gradient(135deg, #7E57C2 0%, #FFD700 100%);
}

.debug-panel button[data-season="auto"] {
  background: linear-gradient(135deg, #00BCD4 0%, #009688 100%);
}


/* ======================================
   18. CURSOR PERSONALIZADO CON ESTELA
   ====================================== */

/* Ocultar cursor por defecto */
body,
body * {
  cursor: none !important;
}

/* Cursor principal (bolita brillante) */
.custom-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--cursor-color, #ffffff);
  pointer-events: none;
  z-index: 10001;
  transform: translate(-50%, -50%);
  transition:
    width 0.3s ease,
    height 0.3s ease,
    border-radius 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.2s ease;
  box-shadow:
    0 0 10px var(--cursor-color, #ffffff),
    0 0 20px var(--cursor-color, #ffffff),
    0 0 30px var(--cursor-color, #ffffff);
  opacity: 0;
}

.custom-cursor.active {
  opacity: 1;
}

/* Efecto hover sobre clickables */
.custom-cursor.hovering {
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%) scale(1.2);
}

/* Efecto sobre inputs (línea vertical) */
.custom-cursor.typing {
  width: 2px;
  height: 24px;
  border-radius: 2px;
  box-shadow:
    0 0 8px var(--cursor-color, #ffffff),
    0 0 15px var(--cursor-color, #ffffff);
}

/* Efecto de escala al hacer click */
.custom-cursor.clicking {
  transform: translate(-50%, -50%) scale(0.7);
}

/* Trail con círculos etéreos */
.cursor-trail-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10000;
}

.cursor-trail {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cursor-color, #ffffff);
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px var(--cursor-color, #ffffff);
  animation: fadeOutTrail 0.5s ease-out forwards;
  /* Más corto: 0.8s → 0.5s */
}

@keyframes fadeOutTrail {
  0% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }

  
}

/* ======================================
   19. SISTEMA DE PROYECTOS
   ====================================== */

/* Controles superiores */
.projects-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--accent);
}

/* Toggle de vista */
.projects-view-toggle {
  display: flex;
  gap: 10px;
}

.view-btn {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-btn:hover {
  background: var(--accent);
  color: var(--light);
  transform: translateY(-2px);
}

.view-btn.active {
  background: var(--accent);
  color: var(--light);
}

body.dark-mode .view-btn:hover,
body.dark-mode .view-btn.active {
  color: var(--bg-dark);
}

/* Filtros de tags */
.projects-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn:hover {
  background: rgba(25, 118, 210, 0.1);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--accent);
  color: var(--light);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

body.dark-mode .filter-btn.active {
  color: var(--bg-dark);
}

/* Grid de proyectos */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 30px;
  width: 100%;
}

/* Vista lista */
.projects-grid.list-view {
  grid-template-columns: 1fr;
}

/* Card de proyecto */
.project-card {
  background: var(--bg-light);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  opacity: 1;
}

/* Mensaje de sin resultados */
.no-results-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  font-size: 1.2rem;
  color: var(--text-light);
  opacity: 0.7;
}

body.dark-mode .no-results-message {
  color: var(--text-dark);
}

body.dark-mode .project-card {
  background: var(--bg-dark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

/* Imagen del proyecto con borde brillante */
.project-image-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  border: 3px solid var(--cursor-color);
  border-radius: 10px; /* AÑADIR AQUÍ */
  box-shadow: 
    0 0 15px var(--cursor-color),
    inset 0 0 15px rgba(255, 255, 255, 0.1);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  will-change: transform;
  image-rendering: -webkit-optimize-contrast;
  border-radius: 10px; /* Mismo radio que el wrapper */
}

.project-card:hover .project-image-wrapper img {
  transform: scale(1.05);
}

/* Contenido del proyecto */
.project-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 10px;
  font-family: 'Playfair Display', serif;
}

body.dark-mode .project-title {
  color: var(--text-dark);
}

.project-desc {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 15px;
  line-height: 1.6;
  flex: 1;
}

body.dark-mode .project-desc {
  color: var(--text-dark);
  opacity: 0.9;
}

/* Tags del proyecto */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 15px;
}

.project-tag {
  background: var(--accent);
  color: var(--light);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.dark-mode .project-tag {
  color: var(--bg-dark);
}

/* Links del proyecto */
.project-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.project-link {
  background: var(--accent);
  color: var(--light);
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-link:hover {
  background: var(--dawn);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body.dark-mode .project-link {
  color: var(--bg-dark);
}

body.dark-mode .project-link:hover {
  background: var(--dawn);
}

/* Vista lista - layout horizontal */
.projects-grid.list-view .project-card {
  flex-direction: row;
}

.projects-grid.list-view .project-image-wrapper {
  width: 40%;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
}

.projects-grid.list-view .project-content {
  width: 60%;
}

/* Responsive */
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .projects-controls {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .projects-grid.list-view .project-card {
    flex-direction: column;
  }
  
  .projects-grid.list-view .project-image-wrapper {
    width: 100%;
  }
  
  .projects-grid.list-view .project-content {
    width: 100%;
  }
}

/* Semana Santa: Botones dorados en modo oscuro */
body.dark-mode.season-easter .filter-btn {
  border-color: #FFD700; /* Dorado */
  color: #FFD700;
}

body.dark-mode.season-easter .filter-btn:hover {
  background: rgba(255, 215, 0, 0.1);
}

body.dark-mode.season-easter .filter-btn.active {
  background: #FFD700; /* Dorado */
  color: var(--bg-dark);
  border-color: #FFD700;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

body.dark-mode.season-easter .view-btn {
  border-color: #FFD700; /* Dorado */
  color: #FFD700;
}

body.dark-mode.season-easter .view-btn:hover,
body.dark-mode.season-easter .view-btn.active {
  background: #FFD700; /* Dorado */
  color: var(--bg-dark);
  border-color: #FFD700;
}

/* Semana Santa: Etiquetas (tags) de proyectos en modo oscuro */
body.dark-mode.season-easter .project-tag {
  background: #FFD700; /* Dorado */
  color: var(--bg-dark);
}

/* Semana Santa: Botones de enlaces (Jugar/GitHub) en modo oscuro */
body.dark-mode.season-easter .project-link {
  background: #FFD700; /* Dorado */
  color: var(--bg-dark);
  border-color: #FFD700;
}

body.dark-mode.season-easter .project-link:hover {
  background: #7E57C2; /* Morado al hover */
  color: #FFD700; /* Letras doradas */
  border-color: #7E57C2;
  box-shadow: 0 4px 12px rgba(126, 87, 194, 0.4);
}

/* ======================================
   20. SCROLLBAR MODERNO CUADRADO
   ====================================== */

/* IMPORTANTE: Forzar estilos en Brave/Chromium */
* {
  scrollbar-width: auto;
  scrollbar-color: var(--accent) rgba(0, 0, 0, 0.05);
}

body.dark-mode * {
  scrollbar-color: var(--dawn) rgba(255, 255, 255, 0.05);
}

/* Scrollbar para Chromium/Brave */
::-webkit-scrollbar {
  width: 18px !important; /* Más ancho y forzado */
  height: 18px !important;
}

/* Track (fondo) */
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 0 !important; /* Completamente cuadrado */
}

body.dark-mode ::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

/* Thumb (barra deslizante) - CUADRADO FORZADO */
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border: 5px solid transparent;
  background-clip: padding-box;
  min-height: 40px;
  /* Forzar esquinas cuadradas con clip-path */
  clip-path: inset(0 0 0 0 round 0px);
  -webkit-clip-path: inset(0 0 0 0 round 0px);
}

body.dark-mode ::-webkit-scrollbar-thumb {
  background: var(--dawn);
}

/* Hover */
::-webkit-scrollbar-thumb:hover {
  background: var(--dawn);
  border: 3px solid transparent;
  background-clip: padding-box;
  clip-path: inset(0 0 0 0 round 0px);
  -webkit-clip-path: inset(0 0 0 0 round 0px);
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Active (arrastrando) */
::-webkit-scrollbar-thumb:active {
  background: var(--season-gradient-top);
  border: 2px solid transparent;
  background-clip: padding-box;
  clip-path: inset(0 0 0 0 round 0px);
  -webkit-clip-path: inset(0 0 0 0 round 0px);
}

/* Botones arriba/abajo (opcional, ocultos en moderno) */
::-webkit-scrollbar-button {
  display: none;
}

/* Corner (donde se juntan scrollbars horizontal/vertical) */
::-webkit-scrollbar-corner {
  background: transparent;
}