

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: #e5b03e;
  color: #0a1628;
}


/* ================================================
   NAVBAR
   ================================================ */
#navbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}

[data-theme="dark"] #navbar {
  background: rgba(10, 22, 40, 0.88);
}

#navbar.scrolled {
  border-bottom-color: rgba(27, 58, 107, 0.12);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] #navbar.scrolled {
  border-bottom-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}


/* ---- Nav Links (Desktop) ---- */
.nav-link {
  position: relative;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #3d5f96;
  border-radius: 0.625rem;
  transition: color 0.3s, background-color 0.3s;
}

.nav-link:hover {
  color: #1b3a6b;
  background-color: rgba(27, 58, 107, 0.06);
}

[data-theme="dark"] .nav-link {
  color: #b8c7df;
}

[data-theme="dark"] .nav-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.06);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0.125rem;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 1.25rem;
  height: 2px;
  background-color: #d4991f;
  border-radius: 1px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::after {
  transform: translateX(-50%) scaleX(1);
}


/* ---- Mobile Menu ---- */
.mobile-menu-closed {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease;
}

.mobile-menu-open {
  max-height: 600px;
  opacity: 1;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(27, 58, 107, 0.08);
}

[data-theme="dark"] .mobile-menu-open {
  background: rgba(10, 22, 40, 0.98);
  border-top-color: rgba(255, 255, 255, 0.06);
}

.mobile-nav-link {
  display: block;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: #1b3a6b;
  border-radius: 0.75rem;
  transition: background-color 0.2s, color 0.2s;
  opacity: 0;
  transform: translateY(-8px);
}

.mobile-menu-open .mobile-nav-link {
  animation: slideDown 0.35s ease forwards;
}

.mobile-nav-link:hover {
  background-color: rgba(27, 58, 107, 0.06);
}

[data-theme="dark"] .mobile-nav-link {
  color: #dce3ef;
}

[data-theme="dark"] .mobile-nav-link:hover {
  background-color: rgba(255, 255, 255, 0.06);
}

@keyframes slideDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ================================================
   BUTTONS
   ================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  background-color: #1b3a6b;
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 0.75rem;
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 1px 3px rgba(27, 58, 107, 0.2);
}

.btn-primary:hover {
  background-color: #142d54;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27, 58, 107, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
}

[data-theme="dark"] .btn-primary {
  background-color: #e5b03e;
  color: #0a1628;
  box-shadow: 0 1px 3px rgba(229, 176, 62, 0.2);
}

[data-theme="dark"] .btn-primary:hover {
  background-color: #edc972;
  box-shadow: 0 4px 12px rgba(229, 176, 62, 0.25);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  background-color: transparent;
  color: #1b3a6b;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 0.75rem;
  border: 1.5px solid #b8c7df;
  transition: border-color 0.3s, color 0.3s, background-color 0.3s, transform 0.2s;
}

.btn-secondary:hover {
  border-color: #1b3a6b;
  background-color: rgba(27, 58, 107, 0.04);
  transform: translateY(-1px);
}

[data-theme="dark"] .btn-secondary {
  color: #dce3ef;
  border-color: #3d5f96;
}

[data-theme="dark"] .btn-secondary:hover {
  border-color: #e5b03e;
  color: #e5b03e;
  background-color: rgba(229, 176, 62, 0.06);
}


/* ================================================
   HERO SECTION
   ================================================ */
.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(27, 58, 107, 0.04) 1px, transparent 0);
  background-size: 40px 40px;
  pointer-events: none;
}

[data-theme="dark"] .hero-bg-pattern {
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.03) 1px, transparent 0);
}

.hero-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 8 / 5;
  background-color: #f0f3f8;
  border: 2px dashed #b8c7df;
  border-radius: 1rem;
  transition: background-color 0.3s, border-color 0.3s;
}

[data-theme="dark"] .hero-image-placeholder {
  background-color: #142d54;
  border-color: #3d5f96;
}

.scroll-indicator {
  animation: bounce-soft 2.5s ease-in-out infinite;
}

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


/* ================================================
   SECTION COMMON
   ================================================ */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d4991f;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: #0e2040;
  line-height: 1.2;
  margin-bottom: 1rem;
}

[data-theme="dark"] .section-title {
  color: #ffffff;
}

.section-subtitle {
  font-size: 1.0625rem;
  color: #6383b4;
  max-width: 36rem;
  margin: 0 auto;
  line-height: 1.6;
}

[data-theme="dark"] .section-subtitle {
  color: #8da5ca;
}


/* ================================================
   CARDS (Avisos)
   ================================================ */
.card {
  background: #ffffff;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(27, 58, 107, 0.08);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(27, 58, 107, 0.1);
  border-color: rgba(27, 58, 107, 0.15);
}

[data-theme="dark"] .card {
  background: #142d54;
  border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  border-color: rgba(229, 176, 62, 0.2);
}

.card-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 13rem;
  background-color: #f0f3f8;
  border-bottom: 1px solid rgba(27, 58, 107, 0.06);
  transition: background-color 0.3s;
}

[data-theme="dark"] .card-media {
  background-color: #0e2040;
  border-bottom-color: rgba(255, 255, 255, 0.04);
}


/* ================================================
   STAT CARDS (Identidad)
   ================================================ */
.stat-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: #f0f3f8;
  border-radius: 0.875rem;
  transition: background-color 0.3s, transform 0.25s;
}

.stat-card:hover {
  transform: translateY(-2px);
}

[data-theme="dark"] .stat-card {
  background: #142d54;
}

.image-placeholder-lg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 3 / 2;
  background-color: #f0f3f8;
  border: 2px dashed #b8c7df;
  border-radius: 1rem;
  transition: background-color 0.3s, border-color 0.3s;
}

[data-theme="dark"] .image-placeholder-lg {
  background-color: #142d54;
  border-color: #3d5f96;
}


/* ================================================
   DELEGATION CARDS
   ================================================ */
.delegation-card {
  padding: 1.5rem;
  background: #ffffff;
  border-radius: 0.875rem;
  border: 1px solid rgba(27, 58, 107, 0.08);
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.delegation-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(27, 58, 107, 0.08);
  border-color: #d4991f;
}

[data-theme="dark"] .delegation-card {
  background: #142d54;
  border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .delegation-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  border-color: rgba(229, 176, 62, 0.4);
}


/* ================================================
   MEMBER CARDS (Estructura)
   ================================================ */
.member-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: #ffffff;
  border-radius: 1rem;
  border: 1px solid rgba(27, 58, 107, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.member-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(27, 58, 107, 0.08);
}

[data-theme="dark"] .member-card {
  background: #142d54;
  border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .member-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.member-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background-color: #f0f3f8;
  transition: background-color 0.3s;
}

[data-theme="dark"] .member-avatar {
  background-color: #0e2040;
}


/* ================================================
   DOCUMENT CARDS
   ================================================ */
.doc-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: #ffffff;
  border-radius: 0.875rem;
  border: 1px solid rgba(27, 58, 107, 0.08);
  transition: transform 0.25s, box-shadow 0.3s, border-color 0.3s;
}

.doc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(27, 58, 107, 0.08);
  border-color: #d4991f;
}

[data-theme="dark"] .doc-card {
  background: #142d54;
  border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .doc-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  border-color: rgba(229, 176, 62, 0.4);
}

.doc-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.625rem;
  background-color: #f0f3f8;
  color: #3d5f96;
  flex-shrink: 0;
  transition: background-color 0.3s, color 0.3s;
}

[data-theme="dark"] .doc-icon {
  background-color: #0e2040;
  color: #e5b03e;
}


/* ================================================
   GALLERY
   ================================================ */
.gallery-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6383b4;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 0.625rem;
  cursor: pointer;
  transition: all 0.25s;
}

.gallery-tab:hover {
  color: #1b3a6b;
  background: rgba(27, 58, 107, 0.04);
}

.gallery-tab.active {
  color: #1b3a6b;
  background: #ffffff;
  border-color: rgba(27, 58, 107, 0.12);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .gallery-tab {
  color: #8da5ca;
}

[data-theme="dark"] .gallery-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .gallery-tab.active {
  color: #ffffff;
  background: #142d54;
  border-color: rgba(255, 255, 255, 0.1);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1rem;
}

.gallery-item {
  border-radius: 0.875rem;
  overflow: hidden;
  transition: transform 0.3s;
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  background-color: #f0f3f8;
  border: 2px dashed #b8c7df;
  border-radius: 0.875rem;
  transition: background-color 0.3s, border-color 0.3s;
}

[data-theme="dark"] .gallery-placeholder {
  background-color: #142d54;
  border-color: #3d5f96;
}

.video-placeholder {
  position: relative;
}


/* ================================================
   GESTION ITEMS
   ================================================ */
.gestion-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #ffffff;
  border-radius: 0.75rem;
  border: 1px solid rgba(27, 58, 107, 0.08);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
}

.gestion-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(27, 58, 107, 0.06);
}

[data-theme="dark"] .gestion-item {
  background: #142d54;
  border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .gestion-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gestion-status {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.gestion-status.active {
  background-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.gestion-status.pending {
  background-color: #e5b03e;
  box-shadow: 0 0 0 3px rgba(229, 176, 62, 0.2);
}


/* ================================================
   CONTACT FORM
   ================================================ */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #3d5f96;
}

[data-theme="dark"] .form-label {
  color: #b8c7df;
}

.form-input {
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #0e2040;
  background-color: #f0f3f8;
  border: 1.5px solid transparent;
  border-radius: 0.625rem;
  outline: none;
  transition: border-color 0.25s, background-color 0.25s, box-shadow 0.25s;
  -webkit-appearance: none;
}

.form-input:focus {
  border-color: #1b3a6b;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(27, 58, 107, 0.1);
}

.form-input::placeholder {
  color: #8da5ca;
}

[data-theme="dark"] .form-input {
  color: #dce3ef;
  background-color: #142d54;
}

[data-theme="dark"] .form-input:focus {
  border-color: #e5b03e;
  background-color: #0e2040;
  box-shadow: 0 0 0 3px rgba(229, 176, 62, 0.15);
}

[data-theme="dark"] .form-input::placeholder {
  color: #6383b4;
}

textarea.form-input {
  resize: vertical;
  min-height: 7rem;
}

select.form-input {
  cursor: pointer;
}


/* ================================================
   FOOTER
   ================================================ */
.footer-link {
  display: block;
  font-size: 0.875rem;
  color: #6383b4;
  transition: color 0.25s, transform 0.2s;
}

.footer-link:hover {
  color: #e5b03e;
  transform: translateX(3px);
}


/* ================================================
   BACK TO TOP
   ================================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1b3a6b;
  color: #ffffff;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem);
  transition: opacity 0.35s, visibility 0.35s, transform 0.35s, background-color 0.25s;
  box-shadow: 0 4px 12px rgba(27, 58, 107, 0.2);
  z-index: 40;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: #142d54;
  transform: translateY(-2px);
}

[data-theme="dark"] .back-to-top {
  background-color: #e5b03e;
  color: #0a1628;
  box-shadow: 0 4px 12px rgba(229, 176, 62, 0.2);
}

[data-theme="dark"] .back-to-top:hover {
  background-color: #edc972;
}


/* ================================================
   SCROLL ANIMATIONS
   ================================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.delay-100 { transition-delay: 0.1s; }
.animate-on-scroll.delay-200 { transition-delay: 0.2s; }
.animate-on-scroll.delay-300 { transition-delay: 0.3s; }


/* ================================================
   RESPONSIVE FINE-TUNING
   ================================================ */
@media (max-width: 640px) {
  .section-title {
    font-size: 1.625rem;
  }

  .hero-image-placeholder {
    aspect-ratio: 16 / 10;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  }

  .back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 2.75rem;
    height: 2.75rem;
  }
}

@media (max-width: 380px) {
  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}
