/* ==================== LUCY WEB — SHARED STYLES ==================== */
/* Sistema de diseño compartido para todas las páginas */

/* ==================== CSS VARIABLES ==================== */
:root {
  /* PRIMARY PALETTE */
  --midnight: #0B1D3A;
  --deep-navy: #132B50;
  --navy-mid: #1E3A6E;
  --lucy-blue: #2563EB;
  --lucy-blue-light: #3B82F6;
  --electric-cyan: #06D6F2;

  /* SECONDARY / ACCENT */
  --warm-coral: #F97066;
  --soft-peach: #FEE4E2;
  --mint-fresh: #D1FAE5;
  --mint-accent: #34D399;
  --warm-yellow: #FBBF24;

  /* NEUTRALS */
  --white: #FFFFFF;
  --off-white: #F8FAFC;
  --light-gray: #E2E8F0;
  --mid-gray: #94A3B8;
  --dark-gray: #475569;
  --charcoal: #1E293B;

  /* GRADIENTS */
  --gradient-hero: linear-gradient(135deg, #0B1D3A 0%, #132B50 40%, #1E3A6E 100%);
  --gradient-accent: linear-gradient(135deg, #2563EB 0%, #06D6F2 100%);
  --gradient-warm: linear-gradient(135deg, #F97066 0%, #FBBF24 100%);
  --gradient-card: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);

  /* TYPOGRAPHY */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* SPACING */
  --section-gap: 100px;
  --card-radius: 16px;
  --button-radius: 50px;
}

/* ==================== RESET & BASE ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  background: var(--midnight);
  color: var(--white);
  line-height: 1.7;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -1px;
}

h1 { font-size: clamp(40px, 6vw, 72px); }
h2 { font-size: clamp(32px, 5vw, 56px); }
h3 { font-size: clamp(24px, 3vw, 36px); }
h4 { font-size: clamp(18px, 2.5vw, 24px); }

p {
  font-size: 17px;
  line-height: 1.75;
  color: rgba(255,255,255,0.75);
}

strong {
  color: var(--white);
  font-weight: 600;
}

.text-center { text-align: center; }
.text-large { font-size: 20px; }
.text-small { font-size: 15px; }

/* ==================== NAVIGATION ==================== */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: rgba(11, 29, 58, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon span {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
}

.nav-wordmark {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
}

.nav-wordmark .web {
  font-weight: 400;
  opacity: 0.5;
}

.nav-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--mid-gray);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ==================== BUTTONS & CTAs ==================== */
.btn {
  display: inline-block;
  padding: 16px 40px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--button-radius);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient-accent);
  color: var(--white);
  box-shadow: 0 16px 48px rgba(6,214,242,0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 60px rgba(6,214,242,0.35);
}

.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(6,214,242,0.3);
}

/* ==================== CARDS ==================== */
.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--card-radius);
  padding: 32px;
  transition: all 0.3s ease;
}

.card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(6,214,242,0.2);
  transform: translateY(-2px);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--electric-cyan);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.card p {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
}

/* ==================== STATS ==================== */
.stats-row {
  display: flex;
  gap: 48px;
  margin-top: 48px;
  flex-wrap: wrap;
  justify-content: center;
}

.stat {
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--mid-gray);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ==================== SECTIONS ==================== */
.section {
  min-height: 100vh;
  padding: 80px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.section-content {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--electric-cyan);
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 32px;
}

.section-title .accent {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title .coral {
  color: var(--warm-coral);
}

/* ==================== BACKGROUNDS ==================== */
.bg-hero { background: var(--gradient-hero); }
.bg-dark { background: var(--midnight); }
.bg-deep { background: var(--deep-navy); }
.bg-navy { background: #0F2440; }
.bg-light { background: var(--off-white); color: var(--charcoal); }

/* Glow effects */
.glow-tr::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  pointer-events: none;
  top: -180px;
  right: -150px;
  background: radial-gradient(circle, rgba(6,214,242,0.08) 0%, transparent 70%);
}

.glow-bl::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  pointer-events: none;
  bottom: -200px;
  left: -100px;
  background: radial-gradient(circle, rgba(37,99,235,0.1) 0%, transparent 70%);
}

.glow-center::before {
  content: '';
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  pointer-events: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(6,214,242,0.06) 0%, transparent 60%);
}

/* ==================== TABLES ==================== */
.data-table {
  width: 100%;
  margin-top: 40px;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}

.data-table thead th {
  background: rgba(255,255,255,0.06);
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--electric-cyan);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: right;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.data-table thead th:first-child {
  text-align: left;
}

.data-table tbody td {
  padding: 14px 20px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  text-align: right;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.data-table tbody td:first-child {
  text-align: left;
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 500;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover td {
  background: rgba(255,255,255,0.03);
}

/* ==================== UTILITY CLASSES ==================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }

.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

.hidden { display: none; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
  .section {
    padding: 60px 32px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .stats-row {
    gap: 32px;
  }

  .nav-label {
    display: none;
  }

  .container {
    padding: 0 24px;
  }
}

@media (max-width: 600px) {
  .section {
    padding: 40px 20px;
  }

  .nav-bar {
    padding: 16px 20px;
  }

  h1 { font-size: 36px; }
  h2 { font-size: 28px; }

  p { font-size: 16px; }
}

/* ==================== LANGUAGE SELECTOR ==================== */
.lang-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.lang-selector {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 12px 8px 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  padding-right: 32px;
  min-width: 90px;
}

.lang-selector:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(6, 214, 242, 0.3);
}

.lang-selector:focus {
  outline: none;
  border-color: var(--electric-cyan);
  box-shadow: 0 0 0 3px rgba(6, 214, 242, 0.15);
}

.lang-selector option {
  background: var(--midnight);
  color: var(--white);
  padding: 8px;
}

/* Language selector for pages without navbar (fixed position) */
.lang-selector-fixed {
  position: fixed;
  top: 20px;
  right: 40px;
  z-index: 1000;
}

@media (max-width: 600px) {
  .lang-selector {
    font-size: 12px;
    padding: 6px 10px 6px 8px;
    padding-right: 28px;
    min-width: 80px;
  }

  .lang-selector-fixed {
    top: 16px;
    right: 20px;
  }
}

/* ==================== I18N - FOUC PREVENTION ==================== */
/* Elements are visible by default (Spanish content in HTML) */
/* Only hide during language switch transitions */
html.i18n-switching [data-i18n] {
  opacity: 0.5;
  transition: opacity 0.15s ease-out;
}

html.i18n-ready [data-i18n] {
  opacity: 1;
  transition: opacity 0.15s ease-in;
}
