/* ============================================================
   PALETA DE COLOR - Tema: debian
   (Las variables se resuelven en tiempo de generacion)
   ============================================================ */
:root {
  --color-primary: #D70A53;
  --color-secondary: #7A0E33;
  --color-accent: #F2B8C4;
  --color-primary-light: #f4a0b8;
  --color-primary-dark: #a0083e;
  --color-primary-rgb: 215,10,83;
  --color-text-secondary: #FFFFFF;

  --color-bg: #fdf6f8;
  --color-surface: #ffffff;
  --color-surface-alt: rgba(255,255,255,0.55);
  --color-navbar: rgba(255,255,255,0.8);
  --color-text: #2b0d18;
  --color-text-muted: #6b4b57;
  --color-border: #f1dfe6;
  --color-stat-a: #D70A53;
  --color-stat-b: #F2B8C4;
  --color-success: #16a34a;
  --color-warning: #d97706;
  --color-danger: #dc2626;

  --glass-bg: rgba(215,10,83,0.12);
  --glass-border: rgba(215,10,83,0.18);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --color-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --color-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.dark {
  --color-bg: #12070c;
  --color-surface: #22101a;
  --color-surface-alt: rgba(34,16,26,0.35);
  --color-navbar: rgba(18,7,12,0.8);
  --color-text: #f3d9e2;
  --color-text-muted: #b8909e;
  --color-border: rgba(120,60,80,0.5);
  --color-stat-a: #f4a0b8;
  --color-stat-b: #e06d94;

  --glass-bg: rgba(30,12,20,0.4);
  --glass-border: rgba(255,255,255,0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --color-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  --color-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* ============================================================
   CLASES SEMANTICAS (reemplazan colores Tailwind hardcodeados)
   ============================================================ */
.surface { background: var(--color-surface); }
.surface-alt { background: var(--color-surface-alt); }
.text-body { color: var(--color-text); }
.text-muted { color: var(--color-text-muted); }
.border-soft { border-color: var(--color-border); }

.gradient-fade-r {
  background: linear-gradient(to right, transparent, var(--color-text-muted));
}
.gradient-fade-l {
  background: linear-gradient(to left, transparent, var(--color-text-muted));
}

/* Iconos de informacion uniformes */
.icon-box {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  background: rgba(var(--color-primary-rgb), 0.12);
  color: var(--color-primary);
  transition: background 0.3s ease, transform 0.3s ease;
}

.icon-box:hover {
  background: rgba(var(--color-primary-rgb), 0.2);
  transform: scale(1.06);
}

/* Icono Lucide renderizado: mismo tamano/grosor/estilo en todas partes.
   Cubre el SVG generado por lucide independientemente de como copie las
   clases del elemento <i> original. */
.icon-box svg,
.icon-box .lucide {
  width: 1.75rem;
  height: 1.75rem;
  color: inherit;
  stroke-width: 2;
}

.icon {
  width: 1.75rem;
  height: 1.75rem;
  color: inherit;
  stroke-width: 2;
}

/* ============================================================
   BASE
   ============================================================ */
.debian-watermark {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: url(assets/img/background/debian-watermark.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.03;
}

.dark .debian-watermark {
  opacity: calc(0.03 * 1.5);
}

.debian-logo-nav {
  display: inline-flex;
  align-items: center;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  background: var(--color-bg);
  color: var(--color-text);
  transition: background 0.3s ease, color 0.3s ease;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* Hero */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.hero-bg-shapes svg {
  position: absolute;
  width: 100%;
  height: 100%;
}

.shape-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  animation: blobFloat 20s ease-in-out infinite;
}

.shape-blob:nth-child(1) {
  width: 400px;
  height: 400px;
  background: var(--color-primary-light);
  top: -10%;
  right: -5%;
  animation-delay: 0s;
}

.shape-blob:nth-child(2) {
  width: 350px;
  height: 350px;
  background: var(--color-accent);
  bottom: -5%;
  left: -8%;
  animation-delay: -5s;
}

.shape-blob:nth-child(3) {
  width: 250px;
  height: 250px;
  background: var(--color-secondary);
  top: 40%;
  left: 50%;
  animation-delay: -10s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 30px) scale(1.02); }
}

.hero-shape-dots {
  position: absolute;
  bottom: 10%;
  right: 5%;
  width: 120px;
  height: 120px;
  background-image: radial-gradient(circle, var(--color-primary-light) 1px, transparent 1px);
  background-size: 15px 15px;
  opacity: 0.2;
  z-index: 0;
}

.dark .hero-shape-dots { opacity: 0.1; }

/* Cards */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.dark .card-hover:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Speaker */
.speaker-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.speaker-card:hover { transform: translateY(-6px); }

.speaker-card .speaker-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-primary-light);
  transition: all 0.3s ease;
}

.speaker-card:hover .speaker-img {
  border-color: var(--color-primary);
  transform: scale(1.05);
}

/* Schedule - Card list */
.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.schedule-card {
  padding: 0.875rem 1.25rem;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.schedule-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
}

.schedule-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.375rem;
  flex-wrap: wrap;
}

.schedule-time {
  font-family: ui-monospace, monospace;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--color-primary);
  line-height: 1.3;
  white-space: nowrap;
}

.schedule-type {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Stats */
.stat-item {
  text-align: center;
  padding: 2rem 1rem;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, var(--color-stat-a), var(--color-stat-b));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Sponsor grid */
.sponsor-grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.sponsor-grid.gold { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.sponsor-grid.silver { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.sponsor-grid.bronze { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.sponsor-grid.community { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

.sponsor-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border-radius: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
  height: 120px;
}

.sponsor-item:hover {
  transform: scale(1.05);
  border-color: var(--color-primary-light);
}

.sponsor-item img {
  max-width: 80%;
  max-height: 60px;
  filter: grayscale(0.2);
  transition: all 0.3s ease;
}

.sponsor-item:hover img { filter: grayscale(0); }

/* Section titles */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

@media (max-width: 640px) { .section-title { font-size: 2rem; } }

.section-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Navbar */
.navbar-blur {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--color-navbar);
  border-bottom: 1px solid var(--color-border);
}

/* Poster image */
.poster-img {
  display: block;
  max-width: 100%;
  height: auto;
  width: auto;
  border-radius: 1rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.poster-img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}

/* Codename (Toy Story style) - bandera de Santa Cruz: franjas horizontales
   verde-blanco-verde. El degradado usa background-size en "em" para adaptarse
   al tamano de la fuente (independiente de la longitud del texto, responsive
   y zoom). La bandera de Santa Cruz tiene las franjas HORIZONTALES: el
   degradado debe ir de arriba hacia abajo (to bottom).

   Las franjas no son 0/33.3/66.7 porque el area visible de los glifos no
   ocupa todo el em (queda espacio debajo de la linea base): con esa division
   la franja verde inferior quedaba casi fuera del texto y se veia solo
   verde-blanco. Con cortes en 25% y 47.5% (verificado en Chrome a varios
   tamanos de fuente y line-height) las tres franjas caen dentro del area
   visible del texto y quedan visualmente equilibradas. */
.codename {
  font-family: 'Luckiest Guy', 'Comic Sans MS', 'Chalkboard SE', cursive;
  font-weight: 400;
  letter-spacing: 0.02em;
  display: inline;
  color: #007A33;
  background-image: linear-gradient(
    to bottom,
    #007A33 0%,
    #007A33 25%,
    #ffffff 25%,
    #ffffff 47.5%,
    #007A33 47.5%,
    #007A33 100%
  );
  background-size: 100% 1em;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .codename {
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

.codename-block {
  display: block;
  margin-top: 0.08em;
}

/* Section dividers */
.section-divider {
  position: relative;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-primary-light), transparent);
  margin: 0 auto;
  max-width: 80%;
  opacity: 0.3;
}

/* Map */
.map-container {
  width: 100%;
  height: 400px;
  border-radius: 1rem;
  overflow: hidden;
  border: none;
  position: relative;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.map-container .leaflet-container {
  width: 100%;
  height: 100%;
  border-radius: 1rem;
  z-index: 1;
}

.dark .leaflet-layer {
  filter: brightness(0.7) invert(1) hue-rotate(200deg);
}

.dark .leaflet-control-zoom a {
  background: var(--color-surface);
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

.dark .leaflet-control-attribution {
  background: var(--color-surface-alt) !important;
  color: var(--color-text-muted);
}

.dark .leaflet-control-attribution a {
  color: var(--color-text-muted);
}

/* Social buttons */
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: all 0.3s ease;
  color: var(--color-text-muted);
}

.social-btn:hover {
  background: var(--color-primary-light);
  color: white;
  transform: translateY(-2px);
}

/* Section padding */
.section-padding {
  padding: 5rem 1rem;
}

@media (min-width: 768px) { .section-padding { padding: 6rem 2rem; } }
@media (min-width: 1024px) { .section-padding { padding: 7rem 2rem; } }

/* Dark mode image adjustments */
.dark .sponsor-item img,
.dark .speaker-img { filter: brightness(0.9); }

/* Focus */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: white;
  border-radius: 0 0 0.5rem 0.5rem;
  transition: top 0.2s ease;
}

.skip-link:focus { top: 0; }

section { position: relative; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--color-primary-light);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

/* Card grid */
.card-grid {
  display: grid;
  gap: 1.5rem;
}

.card-grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card-grid-4 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

@media (max-width: 640px) {
  .card-grid-2,
  .card-grid-3,
  .card-grid-4 { grid-template-columns: 1fr; }
}

/* Floating animation */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.float-animation {
  animation: float 4s ease-in-out infinite;
}

/* Badge categories */
.badge-gold { background: #fbbf24; color: #1a1a2e; }
.badge-silver { background: #d1d5db; color: #1a1a2e; }
.badge-bronze { background: #d97706; color: white; }
.badge-community { background: var(--color-secondary); color: white; }

/* Button pulse */
.btn-pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--color-primary-rgb), 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(var(--color-primary-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--color-primary-rgb), 0); }
}

/* AOS refinements */
[data-aos] {
  pointer-events: none;
}

[data-aos].aos-animate {
  pointer-events: auto;
}
