/* ============================================
   🎨 C.I.A.M. ADORA-SIÓN — Estilo Profesional
   ============================================ */

/* --------- Paleta de Colores --------- */
:root {
  --ciam-bg: #f8f9fc;
  --ciam-black: #0d1b2a;
  --ciam-black-2: #1b2838;
  --ciam-gold: #F5C518;
  --ciam-gold-light: #FFE066;
  --ciam-gold-gradient: linear-gradient(135deg, #F5C518 0%, #D4A800 100%);
  --ciam-white: #FFFFFF;
  --ciam-text-light: #f0f2f5;
  --ciam-text-dark: #1a1a2e;
  --ciam-text-muted: #6c757d;
  --ciam-accent: #e8a87c;
  --ciam-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --ciam-shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.12);
  --ciam-radius: 12px;
  --ciam-radius-lg: 20px;
  --navbar-height: 76px;
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --------- TIPOGRAFÍA --------- */
h1, h2, h3, h5, .navbar-brand {
  font-family: 'Alfa Slab One', serif;
  letter-spacing: 1px;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--ciam-gold-gradient);
  border-radius: 2px;
}

h2.text-start::after {
  left: 0;
  transform: none;
}

h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

/* --------- TIPOGRAFÍA BASE --------- */
body {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  color: var(--ciam-text-dark);
  background-color: var(--ciam-white);
  position: relative;
  padding-top: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* --------- Selección personalizada --------- */
::selection {
  background: var(--ciam-gold);
  color: var(--ciam-black);
}

/* --------- Scrollbar personalizada --------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--ciam-black);
}

::-webkit-scrollbar-thumb {
  background: var(--ciam-gold);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ciam-gold-light);
}

/* --------- Componentes (Botones) --------- */
.btn-gold {
  background: var(--ciam-gold-gradient);
  border: none;
  color: var(--ciam-black);
  font-weight: 700;
  padding: 12px 32px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  z-index: 1;
}

.btn-gold::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #FFE066 0%, #F5C518 100%);
  transition: left 0.4s ease;
  z-index: -1;
}

.btn-gold:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 32px rgba(245, 197, 24, 0.35);
  color: var(--ciam-black);
}

.btn-gold:hover::before {
  left: 0;
}

.btn-gold:active {
  transform: translateY(-1px) scale(0.98);
}

.btn-gold.btn-lg {
  padding: 16px 40px;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.text-gold { 
  color: var(--ciam-gold); 
}

.text-gold-gradient {
  background: var(--ciam-gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-dark-subtle { 
  background: #ffffff !important; 
}

.bg-ciam-black {
  background: linear-gradient(135deg, var(--ciam-black) 0%, var(--ciam-black-2) 100%);
  color: var(--ciam-text-light);
}

/* ============================================
   🎬 HERO SECTION — Two Columns
   ============================================ */
.hero-section {
  position: relative;
  min-height: 100dvh;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ciam-black);
  overflow: hidden;
  padding: 0;
  padding-top: var(--navbar-height);
}

/* Overlay degradado profesional */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(245, 197, 24, 0.08) 0%, transparent 50%);
  z-index: 1;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 27, 42, 0.15);
  z-index: 1;
  pointer-events: none;
}

.hero-section h1,
.hero-section p {
  color: var(--ciam-black) !important;
  position: relative;
  z-index: 2;
}

.hero-section h1 .text-gold {
  background: var(--ciam-gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-section .lead {
  opacity: 0.9;
  font-size: 1.2rem;
  line-height: 1.7;
}

/* Video container */
.hero-video-container {
  position: relative;
  min-height: 55dvh;
  height: 100%;
  overflow: hidden;
  border-radius: var(--ciam-radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  background: url('fondo.png') center/cover no-repeat;
}

.hero-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* Botón mute */
#mute-btn {
  position: absolute;
  bottom: 15px;
  right: 15px;
  z-index: 10;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 50%;
  transition: var(--transition-smooth);
  cursor: pointer;
}

#mute-btn:hover {
  background: var(--ciam-gold);
  color: var(--ciam-black);
  border-color: var(--ciam-gold);
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(245, 197, 24, 0.3);
}

#mute-btn i {
  line-height: 0;
  font-size: 1.2rem;
}

/* ============================================
   📖 SOBRE NOSOTROS — Full Screen Section
   ============================================ */
#sobre {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: var(--navbar-height);
  background: #ffffff;
}

#sobre .container {
  width: 100%;
}

#sobre .carousel,
#sobre .carousel-inner,
#sobre .carousel-item {
  height: 100%;
  min-height: 400px;
  border-radius: var(--ciam-radius-lg);
  overflow: hidden;
}

#sobre .carousel-item img {
  object-fit: cover;
  height: 100%;
  width: 100%;
}

#sobre .row {
  min-height: auto;
}

#sobre .tab-content {
  min-height: 200px;
}

#sobre .tab-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--ciam-text-dark);
}

/* Pestañas (tabs) estilo profesional */
#sobre .nav-tabs {
  border-bottom: 2px solid #e9ecef;
  gap: 4px;
}

#sobre .nav-tabs .nav-link {
  border: none;
  color: var(--ciam-text-muted);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px 8px 0 0;
  transition: var(--transition-smooth);
  position: relative;
}

#sobre .nav-tabs .nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 70%;
  height: 3px;
  background: var(--ciam-gold-gradient);
  border-radius: 2px;
  transition: transform 0.3s ease;
}

#sobre .nav-tabs .nav-link:hover {
  color: var(--ciam-gold);
  background: rgba(245, 197, 24, 0.05);
}

#sobre .nav-tabs .nav-link.active {
  color: var(--ciam-black);
  background: transparent;
  font-weight: 700;
}

#sobre .nav-tabs .nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* --------- Responsive: Tablets y Móviles --------- */
@media (max-width: 991.98px) {
  .hero-video-container {
    min-height: 40dvh;
    border-radius: var(--ciam-radius);
  }
  .hero-section {
    min-height: auto;
    padding: var(--navbar-height) 0 40px;
  }
  #sobre {
    min-height: auto;
    padding: calc(var(--navbar-height) + 2rem) 20px 60px;
  }
  #sobre .row {
    min-height: auto;
  }
  #sobre .carousel,
  #sobre .carousel-inner,
  #sobre .carousel-item {
    min-height: 250px;
  }
  .hero-section .display-3 {
    font-size: 2rem;
  }
}

/* ============================================
   🧭 NAVBAR — Glassmorphism
   ============================================ */
.navbar {
  background: rgba(13, 27, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1030;
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  padding: 0.3rem 0;
  background: rgba(13, 27, 42, 0.98);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar .nav-link {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  padding: 8px 16px !important;
  border-radius: 6px;
  transition: var(--transition-smooth);
  position: relative;
}

.navbar .nav-link::before {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--ciam-gold-gradient);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  border-radius: 1px;
}

.navbar .nav-link:hover {
  color: var(--ciam-white);
  background: rgba(255, 255, 255, 0.05);
}

.navbar .nav-link:hover::before {
  transform: scaleX(1);
}

.navbar .nav-link.active {
  color: var(--ciam-gold);
}

.navbar .nav-link.active::before {
  transform: scaleX(1);
}

.navbar .navbar-brand img {
  height: 50px;
  transition: var(--transition-smooth);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.navbar.scrolled .navbar-brand img {
  height: 40px;
}

/* Botón WhatsApp en navbar */
.navbar .btn-gold {
  padding: 8px 20px;
  font-size: 0.9rem;
}

/* Toggler personalizado */
.navbar-toggler {
  border: 1px solid rgba(255,255,255,0.15);
  padding: 8px;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 2px rgba(245, 197, 24, 0.3);
}

/* ============================================
   📦 CARDS — Programas y Sedes
   ============================================ */
.card-program,
.card-sede,
.form-box {
  background: var(--ciam-white);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--ciam-radius);
  transition: var(--transition-smooth);
  box-shadow: var(--ciam-shadow);
  overflow: hidden;
}

.card-program {
  padding: 12px;
  position: relative;
}

.card-sede {
  position: relative;
}

.card-program:hover,
.card-sede:hover {
  transform: translateY(-8px);
  box-shadow: var(--ciam-shadow-hover);
  border-color: rgba(245, 197, 24, 0.3);
}

.card-program .card-body {
  padding: 1.5rem;
  position: relative;
}

/* Efecto de brillo dorado sutil en hover */
.card-program::after,
.card-sede::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--ciam-gold-gradient);
  transform: scaleX(0);
  transition: transform 0.4s ease;
  border-radius: 0 0 2px 2px;
}

.card-program:hover::after,
.card-sede:hover::after {
  transform: scaleX(1);
}

.program-icon {
  font-size: 2.8rem;
  display: inline-block;
  background: rgba(245, 197, 24, 0.1);
  width: 70px;
  height: 70px;
  line-height: 70px;
  text-align: center;
  border-radius: 16px;
  margin-bottom: 1rem;
  transition: var(--transition-smooth);
}

.card-program:hover .program-icon {
  background: var(--ciam-gold-gradient);
  color: var(--ciam-black);
  transform: scale(1.1) rotate(-5deg);
}

.card-program .program-icon img {
  transition: var(--transition-smooth);
}

.card-program:hover .program-icon img {
  transform: scale(1.15);
}

/* Cards de sedes */
.card-sede {
  border-radius: var(--ciam-radius-lg);
  position: relative;
}

.card-sede .card-img-top {
  height: 200px;
  object-fit: cover;
  border-radius: var(--ciam-radius-lg) var(--ciam-radius-lg) 0 0;
}

/* Mapas embebidos en cards de sedes */
.card-sede .map-container {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: var(--ciam-radius-lg) var(--ciam-radius-lg) 0 0;
}

.card-sede .map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.card-sede .card-body {
  padding: 1.5rem;
}

.card-sede .card-title {
  font-family: 'Alfa Slab One', serif;
  font-size: 1.2rem;
}

.card-sede p.fs-5 {
  font-size: 0.95rem !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-sede p.fs-5 i {
  color: var(--ciam-gold);
  width: 20px;
  text-align: center;
}

/* ============================================
   📝 FORMULARIOS — Estilo Moderno
   ============================================ */
.form-label {
  font-family: 'Roboto', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ciam-text-dark);
  margin-bottom: 6px;
}

.form-control,
.form-select {
  background-color: #f8f9fa;
  font-family: 'Roboto', sans-serif;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 12px 16px;
  transition: var(--transition-smooth);
  font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
  background-color: #fff;
  border-color: var(--ciam-gold);
  box-shadow: 0 0 0 4px rgba(245, 197, 24, 0.1);
  outline: none;
}

.form-control::placeholder {
  color: #adb5bd;
  font-size: 0.9rem;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.form-box {
  padding: 2.5rem;
  border-radius: var(--ciam-radius-lg);
}

/* ============================================
   🔢 PASOS / STEP NUMBERS
   ============================================ */
.step {
  display: flex;
  align-items: flex-start;
  margin-bottom: 25px;
  padding: 16px;
  border-radius: var(--ciam-radius);
  transition: var(--transition-smooth);
}

.step:hover {
  background: rgba(245, 197, 24, 0.05);
  transform: translateX(5px);
}

.step-number {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ciam-black);
  background: var(--ciam-gold-gradient);
  width: 42px;
  height: 42px;
  line-height: 42px;
  border-radius: 50%;
  text-align: center;
  margin-right: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(245, 197, 24, 0.3);
}

.step-text h5 {
  margin-bottom: 4px;
  color: var(--ciam-black);
  font-family: 'Alfa Slab One', serif;
  font-size: 1.1rem;
}

.step-text p {
  font-size: 0.9rem;
  color: var(--ciam-text-muted);
  margin: 0;
}

/* ============================================
   ✨ ANIMACIONES
   ============================================ */
.hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Retraso escalonado para cards */
.hidden:nth-child(1) { transition-delay: 0s; }
.hidden:nth-child(2) { transition-delay: 0.1s; }
.hidden:nth-child(3) { transition-delay: 0.2s; }
.hidden:nth-child(4) { transition-delay: 0.3s; }
.hidden:nth-child(5) { transition-delay: 0.4s; }
.hidden:nth-child(6) { transition-delay: 0.5s; }

/* Animación de entrada para el hero */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-section .animate-up {
  animation: fadeInUp 1s ease-out forwards;
}

/* ============================================
   🦶 FOOTER — 4 Columnas Premium
   ============================================ */
footer.bg-ciam-black {
  position: relative;
  overflow: hidden;
  padding: 3rem 0 1.5rem !important;
}

/* Línea decorativa superior */
footer.bg-ciam-black::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--ciam-gold-gradient);
}

footer h5 {
  font-size: 1.1rem;
  letter-spacing: 1px;
  margin-bottom: 1.2rem;
  position: relative;
  display: inline-block;
}

footer h5::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--ciam-gold-gradient);
  border-radius: 1px;
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

footer ul li {
  margin-bottom: 8px;
}

footer ul li a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: var(--transition-smooth);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

footer ul li a:hover {
  color: var(--ciam-gold);
  transform: translateX(4px);
}

footer .footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.88rem;
  line-height: 1.7;
}

footer .social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  transition: var(--transition-smooth);
  margin-right: 8px;
}

footer .social-links a:hover {
  background: var(--ciam-gold-gradient);
  color: var(--ciam-black);
  transform: translateY(-3px);
}

footer .footer-info li {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

footer .footer-info li i {
  color: var(--ciam-gold);
  margin-top: 3px;
  flex-shrink: 0;
}

footer hr {
  opacity: 0.1;
  margin: 2rem 0 1rem;
  border-color: rgba(255, 255, 255, 0.08);
}

footer .copyright {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
}

/* ============================================
   💬 WHATSAPP FLOTANTE
   ============================================ */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.6rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: var(--transition-smooth);
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
  color: white;
}

.whatsapp-float::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.3);
  animation: whatsapp-pulse 2s infinite;
}

@keyframes whatsapp-pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ============================================
   � ESTILO GENERAL DE SECCIONES
   ============================================ */
/* Compensación por navbar fija en páginas internas */
#programas.py-5,
#sedes.py-5,
#inscripciones.py-5 {
  padding-top: calc(3rem + var(--navbar-height)) !important;
  padding-bottom: 5rem !important;
}

section .container.my-5 {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Sección con fondo alterno */
.bg-dark-subtle {
  position: relative;
}

.bg-dark-subtle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 197, 24, 0.3), transparent);
}

/* Sección de cursos/programas */
#programas .card-program .card-title {
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

#programas .card-program p {
  font-size: 0.9rem;
  color: var(--ciam-text-muted);
  line-height: 1.6;
}

/* Formulario de inscripción */
#inscripciones .form-box {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

#inscripciones .btn-gold {
  padding: 14px 32px;
  font-size: 1rem;
}

/* ============================================
   �📋 ESTADOS DEL FORMULARIO
   ============================================ */
#form-status .alert-success {
  color: #0f5132;
  background-color: #d1e7dd;
  border: 1px solid #badbcc;
  border-radius: 8px;
  padding: 12px 16px;
}

#form-status .alert-danger {
  color: #842029;
  background-color: #f8d7da;
  border: 1px solid #f5c2c7;
  border-radius: 8px;
  padding: 12px 16px;
}

#form-status .alert-warning {
  color: #664d03;
  background-color: #fff3cd;
  border: 1px solid #ffecb5;
  border-radius: 8px;
  padding: 12px 16px;
}