/**
 * @file: components.css
 * @description: Reusable UI Components using BEM Methodology
 * @requires: variables.css
 */

/* =========================================
   1. LAYOUT & CONTAINERS
   ========================================= */

/* Container - BEM */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding-left: var(--space-sm);
  padding-right: var(--space-sm);
  /* No establecer padding-top ni padding-bottom para permitir py-* */
}

/* Espacio vertical estándar (según variables de section) */
.section {
  padding-top: var(--spacing-section);
  padding-bottom: var(--spacing-section);
}

/* =========================================
   2. TYPOGRAPHY COMPONENTS
   ========================================= */

/* Título de sección centrado y estilizado */
.section-title {
  @apply text-3xl md:text-4xl lg:text-5xl font-bold text-center mb-4;
  font-family: var(--font-heading);
  color: var(--color-text-main);
}

/* Subtítulo descriptivo */
.section-subtitle {
  @apply text-lg md:text-xl text-center max-w-2xl mx-auto mb-12;
  color: var(--color-text-muted);
}

/* =========================================
   3. BUTTONS - BEM
   ========================================= */

/* Button Base */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 1px;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 2px solid transparent;
}

/* Button Modifier: Primary */
.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 0 15px rgba(0, 224, 255, 0.2);
}

.btn--primary:hover {
  background-color: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: 0 0 25px rgba(0, 224, 255, 0.4);
  transform: translateY(-2px);
}

/* Button Modifier: Secondary */
.btn--secondary {
  background-color: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: 0 0 25px rgba(0, 224, 255, 0.2);
}

.btn--secondary:hover {
  background-color: var(--color-accent);
  color: var(--color-primary);
  border-color: var(--color-accent);
  box-shadow: 0 0 25px rgba(0, 224, 255, 0.4);
}

/* Button Modifier: Large */
@media (min-width: 768px) {
  .btn--large {
    width: 25rem;
  }
}

/* BTN HIDDEN MOBILE */
.btn--hidden-mobile {
  display: none;
}

@media (min-width: 768px) {
  .btn--hidden-mobile {
    display: flex;
  }
}

/* Botón Circular (WhatsApp) */
.btn-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 2px solid var(--color-light-blue);
  /* background-color: rgba(2, 48, 71, 0.3); */
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-circle img {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
  /* display: block; */
}

.btn-circle:hover {
  /* background-color: var(--color-light-blue); */
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 0 1rem rgba(142, 202, 230, 0.4);
}

/* FAQ marker rotate on open */
.faq-item .faq-marker {
  transition: transform 200ms ease;
}

.faq-item[open] .faq-marker {
  transform: rotate(90deg);
}

/* Mobile menu: bordes redondeados + estado base oculto */
#mobile-menu {
  display: none;
  border-bottom-left-radius: 1rem;
  border-bottom-right-radius: 1rem;
  overflow: hidden;
  will-change: transform, opacity;
}

#mobile-menu.is-active {
  display: block;
  animation: slideDown 0.4s ease forwards;
}

#mobile-menu.is-closing {
  display: block;
  animation: slideUp 0.35s ease forwards;
}

/* =========================================
   4. CARDS - BEM
   ========================================= */

/* Card Base - Estilos comunes para cards con fondo semitransparente */
.card {
  background-color: rgba(17, 34, 64, 0.3); /* #112240 con opacity 30% */
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 224, 255, 0.2); /* border-[#00E0FF] con opacity 20% */
  transition: border-color 300ms ease;
}

.card:hover {
  border-color: rgba(0, 224, 255, 0.4); /* hover:border-[#00E0FF]/40 */
}

/* Modificadores de border radius */
.card--rounded-xl {
  border-radius: 0.75rem; /* rounded-xl */
}

.card--rounded-2xl {
  border-radius: 1rem; /* rounded-2xl */
}

/* Modificadores de padding */
.card--p-sm {
  padding: 1rem; /* p-4 */
}

.card--p-md {
  padding: 1.5rem; /* p-6 */
}

/* Card Element: Icon */
.card__icon {
  font-size: 2rem;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
  display: block;
}

/* Card Element: Title */
.card__title {
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
}

/* Badge/Etiqueta */
.badge {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid rgba(0, 224, 255, 0.2); /* border-[#00E0FF] con opacity 20% */
  border-radius: 20px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  background-color: rgba(17, 34, 64, 0.3); /* #112240 con opacity 30% */
  backdrop-filter: blur(10px);
  transition: border-color 300ms ease;
}

/* =========================================
   5. LOGO - BEM
   ========================================= */

.logo {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--color-white);
  user-select: none;
}

.logo__accent {
  color: var(--color-accent);
}

/* =========================================
   6. SECTION HEADER - BEM
   ========================================= */

.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.section-header__overline {
  color: var(--color-accent);
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: bold;
}

/* =========================================
   7. FORMS - BEM
   ========================================= */

/* Form Group */
.form-group {
  margin-bottom: var(--space-md);
}

/* Form Label */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: var(--space-xs);
  color: var(--color-text-main);
}

/* Input Base */
.input-base {
  display: block;
  width: 100%;
  padding: var(--space-sm);
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-body);
  color: var(--color-text-main);
  transition: var(--transition-fast);
}

.input-base:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0, 224, 255, 0.1);
}

/* Input Error */
.input-error {
  border-color: var(--color-error);
}

.input-error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-helper {
  margin-top: var(--space-xs);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.gradient-text {
  background: linear-gradient(135deg, #00e0ff 0%, #0084b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Text Glow Neon Resplandeciente */
.text-glow {
  text-shadow: 0 0 10px rgba(0, 224, 255, 0.5);
}
