/* ===== ESTILOS COMPLETOS ===== */
:root {
  --sve-blue: #1a4a8a;
  --sve-blue-light: #2563eb;
  --sve-blue-dark: #0f2d5a;
  --cave-black: #0a0c10;
  --cave-deep: #111318;
  --cave-mid: #1a1d24;
  --cave-light: #2a2e38;
  --silver: #c8cdd4;
  --silver-light: #e2e5e9;
  --white: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--cave-black);
  color: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0.75rem 2rem;
  background: rgba(10, 12, 16, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(26, 74, 138, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-brand img {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(26, 74, 138, 0.4);
  object-fit: cover;
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
}

.nav-brand-text strong {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--white);
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.nav-brand-text span {
  font-size: 0.65rem;
  color: var(--sve-blue-light);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--silver);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.3s;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a:hover { color: var(--sve-blue-light); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--sve-blue-light);
  transition: width 0.3s;
}
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--silver);
  transition: all 0.3s;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 7rem 2rem 4rem;
  position: relative;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(26, 74, 138, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(37, 99, 235, 0.06) 0%, transparent 50%),
    var(--cave-black);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('https://kimi-web-img.moonshot.cn/img/www.boegan.it/85bf63d4dbd4975703f1f40dd3b0407ab9a4b212.jpg') center/cover no-repeat;
  opacity: 0.12;
  filter: brightness(0.3) contrast(1.3) saturate(0.5);
}

.hero-content { position: relative; z-index: 2; max-width: 850px; }

.hero-logo {
  width: 100px; height: 100px;
  border-radius: 50%;
  border: 3px solid rgba(26, 74, 138, 0.5);
  margin: 0 auto 1.5rem;
  object-fit: cover;
  box-shadow: 0 0 40px rgba(26, 74, 138, 0.2);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: rgba(26, 74, 138, 0.15);
  border: 1px solid rgba(26, 74, 138, 0.3);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--sve-blue-light);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--white) 0%, var(--silver) 50%, var(--sve-blue-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 0.85rem 2rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--sve-blue), var(--sve-blue-light));
  color: var(--white);
  box-shadow: 0 4px 20px rgba(26, 74, 138, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(26, 74, 138, 0.5); }

.btn-secondary {
  background: transparent;
  color: var(--silver);
  border: 1px solid var(--cave-light);
}
.btn-secondary:hover { border-color: var(--sve-blue-light); color: var(--sve-blue-light); }

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: bounce 2.5s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== STATS ===== */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--sve-blue-dark);
  border-top: 1px solid rgba(26, 74, 138, 0.3);
  border-bottom: 1px solid rgba(26, 74, 138, 0.3);
}

.stat-item {
  text-align: center;
  padding: 2.5rem 1rem;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.stat-item:last-child { border-right: none; }

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--sve-blue-light);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* ===== SECTIONS ===== */
section { padding: 5rem 2rem; max-width: 1100px; margin: 0 auto; }

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-tag {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: rgba(26, 74, 138, 0.12);
  border: 1px solid rgba(26, 74, 138, 0.2);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--sve-blue-light);
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--white);
}

.section-desc {
  color: var(--text-secondary);
  max-width: 550px;
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
}

.about-image {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(26, 74, 138, 0.15);
}

.about-image img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 14px;
  filter: brightness(0.8) saturate(0.9);
  transition: transform 0.5s ease;
}
.about-image:hover img { transform: scale(1.03); }

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 1.75rem;
  margin-top: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--sve-blue-light), var(--sve-blue));
}

.timeline-item {
  position: relative;
  padding-bottom: 1.75rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.75rem;
  top: 0.35rem;
  width: 10px; height: 10px;
  background: var(--cave-black);
  border: 2px solid var(--sve-blue-light);
  border-radius: 50%;
  transform: translateX(-4px);
}

.timeline-year {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sve-blue-light);
  margin-bottom: 0.25rem;
}

.timeline-text {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ===== CARDS ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--cave-mid);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 14px;
  padding: 1.75rem;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sve-blue), var(--sve-blue-light));
  opacity: 0;
  transition: opacity 0.35s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(26, 74, 138, 0.25);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}
.card:hover::before { opacity: 1; }

.card-icon {
  width: 44px; height: 44px;
  background: rgba(26, 74, 138, 0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.65;
}

/* ==========================================================
   GALERÍA CON CSS COLUMNS (EFECTO MASONRY SIN JAVASCRIPT)
   ========================================================== */
#galeria-container {
  column-count: 3;
  column-gap: 15px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 15px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255,255,255,0.04);
  background: var(--cave-black);
  cursor: pointer;
  display: block;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,12,16,0.85) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  border-radius: 10px;
}

.gallery-item:hover::after {
  opacity: 1;
}

.gallery-caption {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--white);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
}

@media (max-width: 768px) {
  #galeria-container {
    column-count: 2;
  }
}

@media (max-width: 480px) {
  #galeria-container {
    column-count: 1;
  }
}

/* ===== LISTAS (boletines y miembros) ===== */
.list-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--cave-mid);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 1rem 1.5rem;
  transition: all 0.3s ease;
}

.list-item:hover {
  border-color: rgba(26, 74, 138, 0.25);
  background: var(--cave-deep);
  transform: translateX(4px);
}

.list-item .badge {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--sve-blue-light);
  min-width: 3.5rem;
}

.list-item .portada {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  background: var(--cave-light);
}

.list-item .foto {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(26, 74, 138, 0.3);
  flex-shrink: 0;
  background: var(--cave-light);
}

.list-item .content {
  flex: 1;
}

.list-item .content .title {
  font-weight: 600;
  color: var(--white);
  font-size: 0.95rem;
}

.list-item .content .desc {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-top: 0.1rem;
}

.list-item .link {
  color: var(--sve-blue-light);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: color 0.3s;
}
.list-item .link:hover { color: var(--white); }

.list-item .role {
  color: var(--sve-blue-light);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  min-width: 6rem;
  text-align: right;
}

/* ===== CONTROLES (búsqueda, paginación) ===== */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  background: var(--cave-mid);
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.04);
}

.controls .search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 200px;
  position: relative;
}

.controls .search-box input {
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  background: var(--cave-deep);
  border: 1px solid var(--cave-light);
  border-radius: 6px;
  color: var(--white);
  font-size: 0.85rem;
  transition: all 0.3s;
}

.controls .search-box input:focus {
  outline: none;
  border-color: var(--sve-blue-light);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.controls .search-box .clear-btn {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.3s;
}
.controls .search-box .clear-btn:hover {
  color: var(--white);
}
.controls .search-box .clear-btn.visible {
  display: block;
}

.controls .per-page {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.controls .per-page select {
  padding: 0.4rem 0.6rem;
  background: var(--cave-deep);
  border: 1px solid var(--cave-light);
  border-radius: 6px;
  color: var(--white);
  font-size: 0.8rem;
  cursor: pointer;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
}

.pagination button {
  padding: 0.4rem 0.8rem;
  background: var(--cave-mid);
  border: 1px solid var(--cave-light);
  border-radius: 6px;
  color: var(--silver);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
  border-color: var(--sve-blue-light);
  color: var(--white);
}

.pagination button.active {
  background: var(--sve-blue);
  border-color: var(--sve-blue);
  color: var(--white);
}

.pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination .info {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 0 0.5rem;
}

.reload-btn {
  margin-top: 1rem;
  text-align: center;
}
.reload-btn button {
  background: transparent;
  border: 1px solid var(--cave-light);
  color: var(--text-secondary);
  padding: 0.4rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.3s;
}
.reload-btn button:hover {
  border-color: var(--sve-blue-light);
  color: var(--white);
}

.error-message {
  background: rgba(255, 50, 50, 0.1);
  border: 1px solid rgba(255, 50, 50, 0.3);
  color: #ff6b6b;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  color: var(--white);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
}

.contact-icon {
  width: 36px; height: 36px;
  background: rgba(26, 74, 138, 0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.contact-item div strong {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.15rem;
  color: var(--silver);
}
.contact-item div span {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.5;
}

.contact-form {
  background: var(--cave-mid);
  border-radius: 14px;
  padding: 1.75rem;
  border: 1px solid rgba(255,255,255,0.04);
}

.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.875rem;
  background: var(--cave-deep);
  border: 1px solid var(--cave-light);
  border-radius: 8px;
  color: var(--white);
  font-size: 0.85rem;
  transition: all 0.3s;
  font-family: 'Inter', sans-serif;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--sve-blue-light);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-group textarea { min-height: 100px; resize: vertical; }

/* ===== FOOTER ===== */
footer {
  background: var(--cave-deep);
  border-top: 1px solid rgba(26, 74, 138, 0.15);
  padding: 3rem 2rem 1.5rem;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand { display: flex; gap: 0.875rem; }
.footer-brand img {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(26, 74, 138, 0.3);
  object-fit: cover;
  flex-shrink: 0;
}
.footer-brand div strong {
  font-family: 'Playfair Display', serif;
  color: var(--white);
  font-size: 1rem;
  display: block;
  margin-bottom: 0.5rem;
}
.footer-brand div p {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.footer-col a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  margin-bottom: 0.6rem;
  transition: color 0.3s;
}
.footer-col a:hover { color: var(--sve-blue-light); }

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.7rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 60px; left: 0; right: 0;
    flex-direction: column;
    background: rgba(10, 12, 16, 0.98);
    padding: 1.5rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid rgba(26, 74, 138, 0.2);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
  }
  .nav-links.active { transform: translateY(0); }
  .nav-toggle { display: flex; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr; gap: 1.5rem; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.06); padding: 1.5rem 1rem; }
  .stat-item:nth-child(3), .stat-item:nth-child(4) { border-bottom: none; }

  .list-item {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .list-item .role {
    text-align: left;
    min-width: auto;
    width: 100%;
  }
  .controls {
    flex-direction: column;
    align-items: stretch;
  }
  .controls .search-box { min-width: auto; }
}

/* ===== ANIMATIONS ===== */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.7s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}