/* ============================================
   Maple Collège Saltillo — Estilos Custom
   Complementa Tailwind CSS via CDN
   ============================================ */

/* --- Variables de Paleta --- */
:root {
  --rojo-arce: #C41E3A;
  --rojo-arce-dark: #a01830;
  --marron-calido: #8B5E3C;
  --marron-calido-dark: #6f4b30;
  --verde-bosque: #2D5016;
  --verde-bosque-light: #3a6a1e;
  --crema: #FDF8F0;
  --gris-oscuro: #2C2C2C;
  --blanco: #FFFFFF;
}

/* --- Reset y Base --- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* --- Tipografía --- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
}

/* --- Placeholder de Imágenes --- */
.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--blanco);
  padding: 1.5rem;
  line-height: 1.4;
  border-radius: 0.75rem;
  min-height: 200px;
}

/* --- Navegación --- */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--rojo-arce);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* --- Hero --- */
.hero-gradient {
  background: linear-gradient(135deg, var(--rojo-arce) 0%, var(--marron-calido) 100%);
}

.hero-pattern {
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(255,255,255,0.03) 0%, transparent 50%);
}

/* --- Animaciones Scroll Reveal --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* --- Botones --- */
.btn-primary {
  background-color: var(--rojo-arce);
  color: var(--blanco);
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: var(--rojo-arce-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(196, 30, 58, 0.35);
}

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

.btn-secondary {
  background-color: transparent;
  color: var(--blanco);
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid var(--blanco);
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: var(--blanco);
  color: var(--rojo-arce);
  transform: translateY(-2px);
}

.btn-whatsapp {
  background-color: #25D366;
  color: var(--blanco);
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-whatsapp:hover {
  background-color: #1fb855;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.35);
}

.btn-verde {
  background-color: var(--verde-bosque);
  color: var(--blanco);
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-verde:hover {
  background-color: var(--verde-bosque-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(45, 80, 22, 0.35);
}

/* --- Tarjetas de Niveles Educativos --- */
.nivel-card {
  background: var(--blanco);
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.nivel-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.12);
}

.nivel-card .card-accent {
  height: 4px;
  width: 100%;
}

/* --- BEAR Pilares --- */
.bear-card {
  background: var(--blanco);
  border-radius: 1rem;
  padding: 2rem 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  border-left: 4px solid;
}

.bear-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* --- FAQ Accordion --- */
.faq-item {
  border: 1px solid #e5e1dc;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
  background: var(--blanco);
}

.faq-item:hover {
  border-color: var(--rojo-arce);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--gris-oscuro);
  transition: color 0.3s ease;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
}

.faq-question:hover {
  color: var(--rojo-arce);
}

.faq-question .faq-icon {
  transition: transform 0.3s ease;
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.open .faq-question .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 1.5rem;
  color: #555;
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 1.5rem 1.25rem;
}

/* --- Timeline --- */
.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--rojo-arce), var(--marron-calido));
  transform: translateX(-50%);
}

@media (max-width: 767px) {
  .timeline-line {
    left: 1.25rem;
  }
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--rojo-arce);
  border: 3px solid var(--blanco);
  box-shadow: 0 0 0 3px var(--rojo-arce);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

@media (max-width: 767px) {
  .timeline-dot {
    left: 1.25rem;
  }
}

/* --- WhatsApp Flotante --- */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 9999;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

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

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: white;
}

/* Pulse animation */
.whatsapp-float::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: #25D366;
  animation: pulse-wa 2s infinite;
  z-index: -1;
}

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

/* --- Formulario --- */
.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e5e1dc;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  color: var(--gris-oscuro);
  background: var(--blanco);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--rojo-arce);
  box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.form-input:invalid:not(:placeholder-shown):not(:focus) {
  border-color: #dc2626;
}

.form-input:valid:not(:placeholder-shown) {
  border-color: var(--verde-bosque);
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: var(--gris-oscuro);
  font-size: 0.9375rem;
}

/* --- Stat Counter --- */
.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--rojo-arce);
  line-height: 1;
}

@media (min-width: 768px) {
  .stat-number {
    font-size: 3.25rem;
  }
}

/* --- Sección Heading Decorativo --- */
.section-heading {
  position: relative;
  display: inline-block;
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--rojo-arce);
  border-radius: 2px;
}

/* --- Mobile Menu Overlay --- */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.open {
  transform: translateX(0);
}

/* --- Testimonial Card --- */
.testimonial-card {
  background: var(--blanco);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  position: relative;
  transition: transform 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 0.5rem;
  left: 1.5rem;
  font-size: 4rem;
  font-family: 'Playfair Display', serif;
  color: rgba(196, 30, 58, 0.15);
  line-height: 1;
}

/* --- Navbar Scroll Effect --- */
.navbar-scrolled {
  background-color: rgba(255, 255, 255, 0.97) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
}

.navbar-scrolled .nav-link {
  color: var(--gris-oscuro) !important;
}

.navbar-scrolled .nav-logo {
  color: var(--rojo-arce) !important;
}

/* --- Badge urgencia --- */
.urgency-badge {
  background: linear-gradient(135deg, var(--rojo-arce), #e02348);
  color: var(--blanco);
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  font-weight: 600;
  font-size: 0.875rem;
  animation: pulse-badge 2.5s infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* --- Propuesta de Valor Cards --- */
.pilar-card {
  background: var(--blanco);
  border-radius: 1rem;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.pilar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* --- Decorative Maple Leaf --- */
.maple-leaf-deco {
  color: var(--rojo-arce);
  opacity: 0.1;
  font-size: 8rem;
  position: absolute;
  pointer-events: none;
}

/* --- Beneficio Check Item --- */
.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
}

.benefit-check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background-color: var(--verde-bosque);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  margin-top: 0.125rem;
}

/* --- Care & Groove Cards --- */
.program-card {
  background: var(--blanco);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.program-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* --- Footer Links --- */
.footer-link {
  color: rgba(255,255,255,0.8);
  transition: color 0.3s ease;
  text-decoration: none;
}

.footer-link:hover {
  color: var(--blanco);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--marron-calido-dark);
}

/* --- Success Message (form) --- */
.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
}

.form-success.show {
  display: block;
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Back to top button --- */
.back-to-top {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  background: var(--marron-calido);
  color: var(--blanco);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  z-index: 9998;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

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

.back-to-top:hover {
  transform: translateY(-3px);
  background: var(--marron-calido-dark);
}