/* ===== Variables ===== */
:root {
  --primary: #0f2b46;
  --primary-light: #1e3a5f;
  --accent: #0ea5e9;
  --accent-light: #38bdf8;
  --gold: #f59e0b;
  --text: #1e293b;
  --text-light: #64748b;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --card-bg: #ffffff;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* ===== Reset ===== */
* { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
}

/* ===== Navbar ===== */
.navbar {
  padding: 1rem 0;
  transition: all 0.3s ease;
  background: transparent;
}

.navbar.scrolled {
  background: rgba(15, 43, 70, 0.95);
  backdrop-filter: blur(12px);
  padding: 0.5rem 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.navbar-brand {
  color: #fff !important;
  font-weight: 700;
  font-size: 1.25rem;
  font-family: 'Playfair Display', serif;
}

.navbar-brand i {
  color: var(--gold);
  margin-right: 0.5rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1rem !important;
  transition: color 0.3s;
}

.nav-link:hover {
  color: var(--accent-light) !important;
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler-icon {
  filter: invert(1);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0a1628 0%, #0f2b46 30%, #1e3a5f 60%, #2d5a8e 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 80px;
}

.hero-badge {
  display: inline-block;
  background: rgba(14, 165, 233, 0.15);
  color: var(--accent-light);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(14, 165, 233, 0.25);
}

.hero-title {
  color: #fff;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.15rem;
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 2.5rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary-custom {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.85rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary-custom:hover {
  background: var(--accent-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
}

.btn-outline-custom {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 0.85rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-outline-custom:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  transform: translateY(-2px);
}

/* ===== Sections ===== */
.section-padding {
  padding: 6rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-badge {
  display: inline-block;
  background: rgba(14, 165, 233, 0.1);
  color: var(--accent);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-size: 2.5rem;
  color: var(--primary);
}

/* ===== Cards ===== */
.card-custom {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  height: 100%;
}

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

.card-custom h3 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.card-custom p {
  color: var(--text-light);
  line-height: 1.75;
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: #fff;
}

.bg-mission { background: linear-gradient(135deg, var(--accent), #0284c7); }
.bg-vision { background: linear-gradient(135deg, var(--gold), #d97706); }

/* ===== Historia ===== */
.historia-card {
  position: relative;
  padding-left: 3.5rem;
}

.historia-icon {
  position: absolute;
  top: 2.5rem;
  left: -20px;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(15, 43, 70, 0.3);
}

.historia-card p {
  margin-bottom: 1rem;
}

/* ===== Himno ===== */
.himno-card {
  padding: 3rem;
}

.himno-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--gold), #d97706);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 2rem;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.himno-estrofa {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.himno-estrofa:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.himno-estrofa h5 {
  color: var(--accent);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
}

.himno-texto {
  font-style: italic;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 2;
}

/* ===== Autoridades ===== */
.autoridad-card {
  padding: 2.5rem 2rem;
}

.autoridad-avatar {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem;
}

.autoridad-card h4 {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.autoridad-cargo {
  display: inline-block;
  background: rgba(14, 165, 233, 0.1);
  color: var(--accent);
  padding: 0.25rem 0.85rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.autoridad-desc {
  font-size: 0.9rem;
}

/* ===== Contacto ===== */
.contacto-card {
  padding: 2.5rem 2rem;
}

.contacto-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--accent), #0284c7);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1.25rem;
}

.contacto-card h5 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.contacto-card p {
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

/* ===== Map ===== */
.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* ===== Footer ===== */
.footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.7);
  padding: 1.5rem 0;
  font-size: 0.9rem;
}

.footer i {
  color: var(--gold);
  margin-right: 0.5rem;
}

/* ===== Back to top ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--accent-light);
  color: #fff;
  transform: translateY(-3px);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .section-padding {
    padding: 4rem 0;
  }

  .section-header h2 {
    font-size: 1.85rem;
  }

  .card-custom {
    padding: 1.75rem;
  }

  .historia-card {
    padding-left: 1.75rem;
  }

  .historia-icon {
    position: relative;
    top: 0;
    left: 0;
    margin-bottom: 1.5rem;
  }
}
