/**
 * Componentes Reutilizables del Sistema
 * TU MEJOR INVERSIÓN ERES TÚ
 * Header Sticky, Botones, Tarjetas, Cuestionario, Footer
 */

/* --------------------------------------------------------------------------
   HEADER STICKY
--------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(11, 12, 16, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.brand-logo-img {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--gold-border);
  object-fit: contain;
  object-position: center;
  box-shadow: 0 0 10px var(--gold-glow);
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
}

.brand-slogan-tiny {
  font-size: 0.68rem;
  color: var(--gold-primary);
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* Navegación Desktop */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  position: relative;
  padding: 0.35rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-gold);
  border-radius: var(--radius-full);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Menú móvil */
.btn-mobile-menu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px;
  color: var(--text-primary);
}

.btn-mobile-menu span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.mobile-drawer {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 12, 16, 0.98);
  backdrop-filter: blur(16px);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transform: translateY(-120%);
  transition: transform var(--transition-normal);
  z-index: 99;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-drawer.open {
  transform: translateY(0);
}

.mobile-drawer .nav-link {
  font-size: 1.2rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

@media (min-width: 860px) {
  .nav-desktop {
    display: flex;
  }
  .btn-mobile-menu {
    display: none;
  }
  .mobile-drawer {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   BOTONES
--------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-gold);
  color: #0c0e12;
  box-shadow: var(--shadow-gold);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.35);
}

.btn-blue {
  background: var(--gradient-blue);
  color: #ffffff;
  box-shadow: var(--shadow-blue);
}

.btn-blue:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(2, 132, 199, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.btn-outline-gold {
  background: transparent;
  color: var(--gold-light);
  border: 1px solid var(--gold-border);
}

.btn-outline-gold:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--gold-primary);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-large {
  padding: 0.95rem 2rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-full {
  width: 100%;
}

/* --------------------------------------------------------------------------
   TARJETAS
--------------------------------------------------------------------------- */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-lg);
}

/* Tarjeta de Producto */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  overflow: hidden;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-border);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(212, 175, 55, 0.08);
}

.product-card-thumb {
  position: relative;
  width: 100%;
  height: 200px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.04) 0%, rgba(11, 12, 16, 0.6) 100%), var(--bg-surface);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem;
}

.product-card-thumb img {
  width: 100%;
  height: 100%;
  max-height: 175px;
  object-fit: contain;
  object-position: center;
  transition: transform var(--transition-normal);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

.product-card:hover .product-card-thumb img {
  transform: scale(1.05);
}

.product-card-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 0.75rem;
}

.product-card-cat {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue-light);
}

.product-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
}

.product-card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex-grow: 1;
}

.product-card-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.product-price-box {
  display: flex;
  flex-direction: column;
}

.product-price-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.product-price-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   BARRA DE PROGRESO Y CUESTIONARIO
--------------------------------------------------------------------------- */
.progress-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 2rem;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-gold);
  border-radius: var(--radius-full);
  transition: width var(--transition-normal);
  box-shadow: 0 0 10px var(--gold-glow);
}

.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.question-header {
  margin-bottom: 1.75rem;
}

.question-counter {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: 0.5rem;
}

.question-title {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.question-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.option-btn {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
  padding: 1.15rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.96rem;
  line-height: 1.45;
}

.option-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-medium);
  transform: translateX(4px);
}

.option-btn.selected {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
}

.option-btn:focus-visible {
  outline: 2px solid var(--blue-light);
}

.option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.option-btn.selected .option-letter {
  background: var(--gold-primary);
  color: #000;
}

.question-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
}

/* --------------------------------------------------------------------------
   AVISOS Y DISCLAIMERS
--------------------------------------------------------------------------- */
.disclaimer-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.disclaimer-box strong {
  color: var(--text-secondary);
}

.risk-alert {
  background: rgba(239, 68, 68, 0.08);
  border-left: 3px solid #ef4444;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: #fca5a5;
  line-height: 1.5;
}

.foundation-banner {
  background: rgba(2, 132, 199, 0.08);
  border-left: 3px solid var(--blue-light);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
}

/* --------------------------------------------------------------------------
   FOOTER
--------------------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  background: var(--bg-darkest);
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a:hover {
  color: var(--gold-light);
}

.footer-disclaimers {
  border-top: 1px solid var(--border-subtle);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  font-size: 0.8rem;
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
}
