@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ==========================================
   VARIABLES DE SISTEMA DE DISEÑO (PREMIUM)
   ========================================== */
:root {
  --font-primary: 'Outfit', sans-serif;

  /* Colores principales */
  --color-brand-primary: #0a2540;   /* Azul profundo */
  --color-brand-secondary: #00d4b2; /* Teal brillante */
  --color-brand-accent: #635bff;    /* Violeta moderno */
  --color-bg-dark: #030712;         /* Fondo ultra oscuro */
  --color-bg-card-dark: #1f2937;    /* Fondo tarjeta oscuro */
  --color-text-light: #f9fafb;      /* Texto claro */
  --color-text-muted-light: #9ca3af;/* Texto secundario claro */

  /* Alternativa clara */
  --color-bg-light: #f8fafc;
  --color-bg-card-light: #ffffff;
  --color-text-dark: #0f172a;
  --color-text-muted-dark: #64748b;

  /* Tokens de UI */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-neon: 0 0 20px rgba(0, 212, 178, 0.15);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   RESET & ESTILOS BASE
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-primary);
  font-size: 16px;
}

body {
  background-color: var(--color-bg-light);
  color: var(--color-text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-light);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==========================================
   TIPOGRAFÍA Y ENCABEZADOS
   ========================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-brand-primary);
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, var(--color-brand-primary) 30%, var(--color-brand-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: 1.85rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 45px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-brand-secondary), var(--color-brand-accent));
  border-radius: 2px;
}

h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.25rem;
  color: var(--color-text-muted-dark);
  font-size: 1.05rem;
}

a {
  color: var(--color-brand-accent);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--color-brand-secondary);
}

/* ==========================================
   COMPONENTES DE DISEÑO
   ========================================== */

/* Contenedor */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header de Navegación */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  padding: 1rem 0;
  box-shadow: var(--shadow-sm);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--color-brand-primary);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--color-brand-secondary), var(--color-brand-accent));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

.logo-img {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-weight: 500;
  color: var(--color-text-dark);
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
  color: var(--color-brand-accent);
  background: rgba(99, 91, 255, 0.05);
}

/* Menú hamburguesa móvil */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-brand-primary);
}

/* Hero Section */
.hero {
  padding: 5rem 0 4rem;
  background: radial-gradient(circle at 80% 20%, rgba(0, 212, 172, 0.08) 0%, rgba(99, 91, 255, 0.05) 50%, transparent 100%), var(--color-bg-light);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 100%;
  background: radial-gradient(circle, rgba(99, 91, 255, 0.06) 0%, transparent 70%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(99, 91, 255, 0.08);
  color: var(--color-brand-accent);
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(99, 91, 255, 0.15);
}

.hero h1 {
  font-size: 3.2rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--color-text-muted-dark);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  cursor: pointer;
  font-size: 0.95rem;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-brand-accent) 0%, #4f46e5 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(99, 91, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 91, 255, 0.4);
  color: white;
}

.btn-secondary {
  background: white;
  color: var(--color-brand-primary);
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.btn-accent {
  background: linear-gradient(135deg, var(--color-brand-secondary) 0%, #00bfa5 100%);
  color: var(--color-brand-primary);
  box-shadow: 0 4px 14px rgba(0, 212, 178, 0.3);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 212, 178, 0.4);
  color: var(--color-brand-primary);
}

/* Cuadrículas y Layouts */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Tarjetas */
.card {
  background: var(--color-bg-card-light);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99, 91, 255, 0.2);
}

.card-icon {
  width: 54px;
  height: 54px;
  background: rgba(99, 91, 255, 0.08);
  color: var(--color-brand-accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.card-accent {
  border-top: 4px solid var(--color-brand-secondary);
}

.card-accent-violet {
  border-top: 4px solid var(--color-brand-accent);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* Secciones de Contenido */
.section {
  padding: 5rem 0;
}

.section-alt {
  background-color: #f1f5f9;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

/* ==========================================
   ACORDEÓN FAQ (ESTILO DINÁMICO)
   ========================================== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: white;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  transition: var(--transition-normal);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-brand-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: var(--transition-fast);
}

.faq-question:hover {
  background: rgba(99, 91, 255, 0.02);
}

.faq-icon {
  width: 24px;
  height: 24px;
  background: rgba(99, 91, 255, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-normal);
  color: var(--color-brand-accent);
  flex-shrink: 0;
}

.faq-icon::before {
  content: '+';
  font-weight: bold;
  font-size: 1rem;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal) ease-out;
  padding: 0 1.5rem;
  background: white;
}

.faq-answer p {
  padding-bottom: 1.25rem;
  margin-bottom: 0;
  color: var(--color-text-muted-dark);
}

/* Estado Activo Acordeón */
.faq-item.active {
  border-color: var(--color-brand-accent);
  box-shadow: var(--shadow-sm);
}

.faq-item.active .faq-question {
  background: rgba(99, 91, 255, 0.02);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  background: var(--color-brand-accent);
  color: white;
}

.faq-item.active .faq-answer {
  max-height: 500px; /* Suficiente espacio para la respuesta */
}

/* ==========================================
   SIMULADOR DE CRÉDITO INTERACTIVO
   ========================================== */
.simulator-box {
  background: white;
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.simulator-form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-label {
  font-weight: 600;
  color: var(--color-brand-primary);
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
}

.input-value-badge {
  color: var(--color-brand-accent);
  font-weight: 700;
}

.slider-input {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #cbd5e1;
  outline: none;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-brand-accent);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition-fast);
}

.slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.simulator-select {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid #cbd5e1;
  font-family: var(--font-primary);
  font-size: 1rem;
  outline: none;
  transition: var(--transition-fast);
}

.simulator-select:focus {
  border-color: var(--color-brand-accent);
  box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.15);
}

.results-panel {
  background: linear-gradient(135deg, var(--color-brand-primary) 0%, #1e293b 100%);
  border-radius: var(--radius-md);
  padding: 2rem;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  height: 100%;
}

.result-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
}

.result-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.result-label {
  font-size: 0.85rem;
  color: var(--color-brand-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.result-value {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.result-value-sm {
  font-size: 1.4rem;
  font-weight: 700;
}

/* ==========================================
   DIRECTORIO Y BUSCADOR DE SUCURSALES
   ========================================== */
.search-wrapper {
  max-width: 600px;
  margin: 0 auto 3rem;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 1.1rem 1.5rem 1.1rem 3.2rem;
  border-radius: 50px;
  border: 1px solid #cbd5e1;
  font-family: var(--font-primary);
  font-size: 1.05rem;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.search-input:focus {
  border-color: var(--color-brand-accent);
  box-shadow: 0 10px 20px rgba(99, 91, 255, 0.1);
}

.search-icon-svg {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted-dark);
  pointer-events: none;
  width: 20px;
  height: 20px;
}

.branch-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.branch-meta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.25rem 0 1.75rem;
  flex-grow: 1;
}

.branch-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--color-text-muted-dark);
}

.branch-meta-item svg {
  flex-shrink: 0;
  color: var(--color-brand-accent);
  margin-top: 3px;
}

.branch-actions {
  display: flex;
  gap: 0.75rem;
}

.branch-actions .btn {
  flex: 1;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
}

/* ==========================================
   FOOTER Y AVISO LEGAL (DISCLAIMER)
   ========================================== */
.footer {
  background: var(--color-brand-primary);
  color: white;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-info-col h4 {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-info-col p {
  color: var(--color-text-muted-light);
  max-width: 400px;
  font-size: 0.95rem;
}

.footer-links-col h5 {
  color: var(--color-brand-secondary);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.footer-links a {
  color: var(--color-text-muted-light);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: white;
  padding-left: 5px;
}

.disclaimer-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.disclaimer-title {
  color: var(--color-brand-secondary);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.disclaimer-text {
  font-size: 0.85rem;
  color: var(--color-text-muted-light);
  margin-bottom: 0;
  line-height: 1.5;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--color-text-muted-light);
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: var(--transition-fast);
}

.social-link:hover {
  background: var(--color-brand-secondary);
  color: var(--color-brand-primary);
  transform: translateY(-3px);
}

/* ==========================================
   ALERTA DE SEGURIDAD (INFO BOX)
   ========================================== */
.alert-box {
  background: rgba(99, 91, 255, 0.04);
  border-left: 4px solid var(--color-brand-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.5rem;
  margin: 2rem 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.alert-box-teal {
  background: rgba(0, 212, 178, 0.04);
  border-left: 4px solid var(--color-brand-secondary);
}

.alert-icon {
  color: var(--color-brand-accent);
  flex-shrink: 0;
}

.alert-box-teal .alert-icon {
  color: #00bfa5;
}

.alert-content h4 {
  margin-bottom: 0.5rem;
}

.alert-content p:last-child {
  margin-bottom: 0;
}

/* ==========================================
   ESTILOS ADAPTATIVOS (MEDIA QUERIES)
   ========================================== */

@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }

  .nav-menu {
    display: none; /* Simplificado para móviles o para control de toggle */
  }
  
  .nav-toggle {
    display: block;
  }

  /* Menú desplegable móvil simple */
  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid #e2e8f0;
    gap: 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .simulator-box {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.85rem;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    width: 100%;
  }
  .branch-actions {
    flex-direction: column;
  }
}
