/* =========================
   VARIABLES GLOBALES
========================= */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #1e293b;
  --primary: #DC2626;
  --secondary: #8E3D2E;
  /* Se prioriza Great Vibes si carga, sino system-ui para velocidad */
  --font-main: "Great Vibes", system-ui, -apple-system, sans-serif; 
  --font-size-base: 22px;
}

input{
  border-color: #8E3D2E;
}

/* =========================
   RESET / BASE
========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-main); 
  font-size: var(--font-size-base);
  /* Mejora de renderizado de texto */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.smooth-scroll {
  scroll-behavior: smooth;
}

/* =========================
   NAV
========================= */
.nav-link {
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.nav-link:hover {
  transform: translateY(-2px);
  color: var(--primary); /* Pequeño feedback visual */
}

/* =========================
   HERO
========================= */
.hero-title {
  color: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hero-subtitle {
  color: white;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

/* =========================
   CARDS
========================= */
.card {
  background: var(--surface);
  transition: transform .3s ease, box-shadow .3s ease;
  will-change: transform; /* Optimización de animación */
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,.15);
}

/* =========================
   BUTTONS
========================= */
.btn {
  background-color: var(--primary);
  color: var(--surface);
  border: none;
  cursor: pointer;
  transition: all .3s ease;
}

.btn:hover {
  transform: scale(1.05);
  filter: brightness(110%);
}

.contact-service-btn {
  background-color: var(--secondary);
  color: var(--surface);
  transition: all .3s ease;
}

.contact-service-btn:hover {
  transform: scale(1.05);
  filter: brightness(110%);
}

/* =========================
   SECTIONS
========================= */
.section {
  min-height: auto; /* Optimizado para evitar espacios enormes en móviles */
  padding: 4rem 1.5rem;
}

/* =========================
   QUIZ
========================= */
.quiz-option {
  transition: all .2s ease;
  cursor: pointer;
  border-width: 2px;
}

.quiz-option:hover {
  transform: translateX(5px);
}

.quiz-option.selected {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--surface);
}

/* =========================
   TOAST
========================= */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  z-index: 1000;
  color: white;
  font-weight: bold;
  animation: slideIn .3s ease-out;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* =========================
   HEADINGS
========================= */
h1 { font-size: 1.7rem !important; }
h2 { font-size: 3rem !important; }
h3 { font-size: 1.5rem !important; }

/* =========================
   ANIMATIONS
========================= */
.fade-in {
  animation: fadeIn .8s ease-out forwards;
}

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

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
  h2 { font-size: 2rem; }
  .section { padding: 3rem 1rem; }
}