/* =====================================================
   CABALLEROS DE AL-ANON — Estilos principales
   Paleta: Azul marino + Dorado
   ===================================================== */

/* ---- Variables ---- */
:root {
  --navy:        #1B3252;
  --navy-dark:   #0F1E33;
  --navy-mid:    #2A4A73;
  --navy-light:  #3D6194;
  --gold:        #C9973A;
  --gold-light:  #E8B857;
  --gold-pale:   #F5E6C8;
  --cream:       #F8F5EF;
  --cream-dark:  #EDE8DF;
  --white:       #FFFFFF;
  --charcoal:    #2C2C2C;
  --gray:        #6B7280;
  --gray-light:  #D1D5DB;
  --shadow-sm:   0 2px 8px rgba(27,50,82,0.10);
  --shadow-md:   0 4px 20px rgba(27,50,82,0.15);
  --shadow-lg:   0 8px 40px rgba(27,50,82,0.20);
  --radius:      12px;
  --transition:  0.25s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.2;
}

p { color: var(--charcoal); }

a { text-decoration: none; color: inherit; }

img { max-width: 100%; display: block; }

ul { list-style: none; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Buttons ---- */
.btn-primary {
  display: inline-block;
  padding: 14px 36px;
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--gold);
  color: var(--navy-dark);
}

/* =====================================================
   NAVBAR
   ===================================================== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--navy);
  border-bottom: 1px solid rgba(201,151,58,0.20);
  transition: box-shadow var(--transition);
}

#navbar.scrolled {
  box-shadow: 0 2px 24px rgba(0,0,0,0.35);
}

.nav-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  flex-shrink: 0;
}

.logo-shield {
  width: 28px;
  height: 28px;
  color: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  color: rgba(255,255,255,0.80);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold-light);
  background: rgba(201,151,58,0.10);
}

/* Hamburger button */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =====================================================
   HERO
   ===================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 64px;
}

/* Decorative rings */
.hero-bg-deco { position: absolute; inset: 0; pointer-events: none; }

.deco-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(201,151,58,0.15);
}

.deco-ring.r1 {
  width: 600px; height: 600px;
  top: -200px; right: -180px;
}

.deco-ring.r2 {
  width: 420px; height: 420px;
  top: -100px; right: -70px;
  border-color: rgba(201,151,58,0.10);
}

.deco-ring.r3 {
  width: 220px; height: 220px;
  bottom: -80px; left: -60px;
  border-color: rgba(201,151,58,0.08);
}

.hero-container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  padding-top: 40px;
  padding-bottom: 80px;
  width: 100%;
}

.hero-content { flex: 1; max-width: 580px; }

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201,151,58,0.40);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  color: var(--white);
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 24px;
}

.hero-divider {
  width: 60px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin-bottom: 24px;
}

.hero-text {
  color: rgba(255,255,255,0.75);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 40px;
  max-width: 480px;
}

/* Emblem */
.hero-emblem {
  flex-shrink: 0;
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emblem-ring {
  position: absolute;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.er-outer {
  width: 300px; height: 300px;
  border: 1px solid rgba(201,151,58,0.20);
  animation: spin-slow 40s linear infinite;
}

.er-mid {
  width: 230px; height: 230px;
  border: 1px solid rgba(201,151,58,0.35);
  animation: spin-slow 30s linear infinite reverse;
}

.er-inner {
  width: 160px; height: 160px;
  border: 2px solid rgba(201,151,58,0.55);
  background: rgba(201,151,58,0.05);
}

.emblem-svg { width: 110px; height: 110px; }

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Scroll arrow */
.hero-scroll-btn {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(201,151,58,0.60);
  animation: bounce 2s ease-in-out infinite;
  z-index: 2;
}

.hero-scroll-btn svg { width: 32px; height: 32px; }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* =====================================================
   SECTIONS — shared
   ===================================================== */
.section { padding: 96px 0; }

.bg-cream  { background: var(--cream); }
.bg-white  { background: var(--white); }
.bg-navy   { background: var(--navy); }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.section-label-light {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  color: var(--navy);
  margin-bottom: 20px;
}

.section-title.light { color: var(--white); }

.section-desc {
  font-size: 1rem;
  color: var(--gray);
  max-width: 560px;
}

.section-desc.light { color: rgba(255,255,255,0.70); }

.section-header { margin-bottom: 56px; }

.section-header.light .section-title { color: var(--white); }
.section-header.light .section-desc  { color: rgba(255,255,255,0.70); }

/* Centered header variant */
.section-header.centered,
.section-header {
  text-align: left;
}

/* =====================================================
   QUIÉNES SOMOS
   ===================================================== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 72px;
  align-items: start;
}

.col-text p {
  margin-bottom: 16px;
  line-height: 1.8;
}

/* Valores grid */
.valores-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 36px;
}

.valor-card {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.valor-icon {
  width: 40px; height: 40px;
  background: rgba(201,151,58,0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--gold);
}

.valor-icon svg { width: 20px; height: 20px; }

.valor-card h4 {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
  font-family: 'Inter', sans-serif;
}

.valor-card p {
  color: rgba(255,255,255,0.60);
  font-size: 0.82rem;
  margin: 0;
}

/* Quote card */
.col-visual { display: flex; flex-direction: column; gap: 24px; }

.quote-card {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.quote-bar {
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: var(--gold);
  border-radius: 4px 0 0 4px;
}

.quote-text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--white);
  line-height: 1.7;
  margin-bottom: 20px;
}

.quote-source {
  font-size: 0.8rem;
  color: var(--gold-light);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.quote-star {
  position: absolute;
  bottom: 16px; right: 20px;
  font-size: 24px;
  color: rgba(201,151,58,0.20);
}

/* Stats */
.stat-badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-badge {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-num {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--gray);
  margin-top: 6px;
  font-weight: 500;
  line-height: 1.3;
}

/* =====================================================
   PROGRAMA — tabla
   ===================================================== */
.table-wrapper {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}

.prog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.90rem;
}

.prog-table thead {
  background: var(--gold);
}

.prog-table thead th {
  padding: 16px 20px;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy-dark);
}

.prog-table tbody tr:nth-child(even) {
  background: var(--cream);
}

.prog-table tbody tr {
  border-bottom: 1px solid var(--gray-light);
  transition: background var(--transition);
}

.prog-table tbody tr:hover {
  background: var(--gold-pale);
}

.prog-table tbody td {
  padding: 14px 20px;
  color: var(--charcoal);
  vertical-align: top;
}

.prog-table tbody td:first-child {
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}

.prog-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray);
  background: var(--white);
  border-radius: var(--radius);
}

/* =====================================================
   SERVIDORES
   ===================================================== */
.servidores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.servidor-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.servidor-card-top {
  background: var(--navy);
  padding: 28px 24px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 4px solid var(--gold);
}

.servidor-icon {
  width: 48px; height: 48px;
  background: rgba(201,151,58,0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
}

.servidor-icon svg { width: 26px; height: 26px; }

.servidor-rol {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
}

.servidor-mes {
  font-size: 0.78rem;
  color: var(--gold-light);
  margin-top: 2px;
}

.servidor-card-body { padding: 20px 24px; }

.servidor-nombre {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
  font-family: 'Inter', sans-serif;
}

.servidor-desc {
  font-size: 0.875rem;
  color: var(--gray);
  line-height: 1.6;
}

/* =====================================================
   EVENTOS
   ===================================================== */
.eventos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.evento-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--cream-dark);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

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

.evento-card-top {
  background: var(--navy);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.evento-fecha-bloque {
  background: var(--gold);
  border-radius: 8px;
  padding: 8px 14px;
  text-align: center;
  flex-shrink: 0;
  min-width: 58px;
}

.evento-dia {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy-dark);
  line-height: 1;
}

.evento-mes {
  display: block;
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--navy-dark);
  margin-top: 2px;
}

.evento-tipo-badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
  background: rgba(201,151,58,0.15);
  padding: 4px 10px;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 4px;
}

.evento-titulo-top {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--white);
  font-weight: 600;
  line-height: 1.3;
}

.evento-card-body {
  padding: 20px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.evento-desc {
  font-size: 0.875rem;
  color: var(--gray);
  line-height: 1.65;
  flex: 1;
}

.evento-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.evento-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.80rem;
  color: var(--navy-mid);
  font-weight: 500;
}

.evento-meta-item svg {
  width: 14px; height: 14px;
  color: var(--gold);
  flex-shrink: 0;
}

/* =====================================================
   LOADING STATE
   ===================================================== */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 20px;
  color: rgba(255,255,255,0.60);
}

.bg-cream  .loading-state p,
.bg-white  .loading-state p { color: var(--gray); }
.bg-navy   .loading-state p { color: rgba(255,255,255,0.60); }

.spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(201,151,58,0.20);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer { background: var(--navy-dark); }

.footer-inner {
  border-top: 3px solid var(--gold);
  padding: 56px 0 40px;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand h3 {
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.footer-brand p {
  color: rgba(255,255,255,0.50);
  font-size: 0.82rem;
}

.footer-address {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-address-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-address address {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-style: normal;
  color: rgba(255,255,255,0.60);
  font-size: 0.875rem;
  line-height: 1.65;
}

.footer-address address svg {
  width: 16px;
  height: 16px;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  max-width: 400px;
}

.footer-nav a {
  color: rgba(255,255,255,0.60);
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer-nav a:hover { color: var(--gold-light); }

.footer-bottom {
  background: rgba(0,0,0,0.25);
  padding: 20px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.80rem;
  color: rgba(255,255,255,0.40);
  line-height: 1.6;
}

.footer-disclaimer {
  margin-top: 6px;
  font-style: italic;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-emblem { display: none; }

  .hero-container { justify-content: center; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--navy-dark);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 24px;
    gap: 4px;
    border-bottom: 1px solid rgba(201,151,58,0.20);
    box-shadow: 0 8px 24px rgba(0,0,0,0.30);
  }

  .nav-links.open { display: flex; }

  .nav-link {
    width: 100%;
    padding: 10px 12px;
  }

  .section { padding: 72px 0; }

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

  .stat-badges { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

  .stat-num { font-size: 1.4rem; }

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

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

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

  .footer-container { flex-direction: column; }

  .prog-table { font-size: 0.82rem; }
  .prog-table thead th,
  .prog-table tbody td { padding: 12px 14px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.4rem; }
  .stat-badges { grid-template-columns: 1fr; }
}
