/* Estilos compartidos por las páginas del sitio: inicio, cómo funciona,
   funcionalidades, profesionales, servicios y preguntas frecuentes.
   (Las páginas legales y fundadores.html tienen sus propios estilos.) */

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

:root {
  --primary: #0EA5E9;
  --primary-light: #38BDF8;
  --primary-dark: #0284C7;
  --dark: #1E293B;
  --surface: #334155;
  --bg: #F8FAFC;
  --border: #E2E8F0;
  --muted: #94A3B8;
  --success: #22C55E;
  --warning: #F59E0B;
  --error: #EF4444;
  --white: #FFFFFF;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.12);
  --max-w: 1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--dark);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .2s ease;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(14,165,233,.35);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--dark);
  color: var(--white);
}
.btn-dark:hover {
  background: var(--surface);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30,41,59,.3);
}

.btn-lg {
  padding: 16px 40px;
  font-size: 16px;
  border-radius: 14px;
}

/* ============ SECTION ============ */
section {
  padding: 100px 0;
}

.section-label {
  display: inline-block;
  background: rgba(14,165,233,.1);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--surface);
  max-width: 600px;
  line-height: 1.7;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header .section-subtitle {
  margin: 0 auto;
}

/* ============ NAV ============ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s;
}

nav.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
}

.logo-icon {
  width: 38px;
  height: 38px;
}

.logo-fix { color: var(--dark); }
.logo-master { color: var(--primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--surface);
  transition: color .2s;
}
.nav-links a:hover { color: var(--primary); }

.nav-cta {
  padding: 10px 24px !important;
  font-size: 14px !important;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  margin: 6px 0;
  transition: all .3s;
  border-radius: 2px;
}

/* ============ HERO ============ */
.hero {
  padding: 140px 0 100px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg) 0%, #EFF8FF 50%, var(--bg) 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(14,165,233,.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--surface);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

.hero h1 {
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero h1 .accent { color: var(--primary); }

.hero-desc {
  font-size: 18px;
  color: var(--surface);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.hero-stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}

.hero-stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

/* Hero phone mockup */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  z-index: 2;
}

.phone-mockup {
  width: 280px;
  height: 580px;
  background: var(--dark);
  border-radius: 40px;
  padding: 12px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,.05);
  position: relative;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--white);
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-header {
  background: var(--dark);
  color: var(--white);
  padding: 48px 20px 20px;
}

.phone-header-greeting {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}

.phone-header-title {
  font-size: 18px;
  font-weight: 700;
}

.phone-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phone-search {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.phone-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.phone-cat {
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
  font-size: 9px;
  font-weight: 500;
  color: var(--surface);
}

.phone-cat-icon {
  font-size: 22px;
  margin-bottom: 4px;
}

.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: var(--dark);
  border-radius: 0 0 16px 16px;
  z-index: 10;
}

.floating-card {
  position: absolute;
  background: var(--white);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  animation: float 6s ease-in-out infinite;
  z-index: 3;
}

.floating-card-1 {
  top: 80px;
  right: -30px;
  animation-delay: 0s;
}

.floating-card-2 {
  bottom: 100px;
  left: -40px;
  animation-delay: 3s;
}

.floating-card-icon {
  font-size: 20px;
  margin-bottom: 6px;
}

.floating-card-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--dark);
}

.floating-card-sub {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ============ HOW IT WORKS ============ */
.how-it-works {
  background: var(--white);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 50px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.step-card {
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 56px;
  height: 56px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  margin: 0 auto 24px;
  box-shadow: 0 4px 16px rgba(14,165,233,.3);
}

.step-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.step-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.step-desc {
  font-size: 14px;
  color: var(--surface);
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto;
}

/* ============ FEATURES ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all .3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.feature-icon {
  width: 52px;
  height: 52px;
  background: rgba(14,165,233,.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.feature-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 14px;
  color: var(--surface);
  line-height: 1.6;
}

/* ============ PROFESIONALES (CTA split) ============ */
.pro-section {
  background: var(--dark);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.pro-section::after {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(14,165,233,.15) 0%, transparent 70%);
  pointer-events: none;
}

.pro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.pro-content .section-label {
  background: rgba(14,165,233,.2);
}

.pro-content .section-title {
  color: var(--white);
}

.pro-content .section-subtitle {
  color: var(--muted);
}

.pro-benefits {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 36px;
}

.pro-benefit {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.pro-benefit-icon {
  width: 44px;
  height: 44px;
  background: rgba(14,165,233,.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.pro-benefit-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.pro-benefit-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.pro-visual {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pro-stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.pro-stat-icon {
  font-size: 32px;
}

.pro-stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-light);
}

.pro-stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

/* ============ FAQ ============ */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 24px;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 0;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 500;
  color: var(--primary);
  flex-shrink: 0;
}

.faq-item[open] summary::after { content: '\2212'; }

.faq-item p {
  font-size: 15px;
  color: var(--surface);
  line-height: 1.7;
  padding-bottom: 20px;
}

.faq-item a {
  color: var(--primary);
  font-weight: 600;
}

/* ============ CATEGORIES ============ */
/* 6 columnas: las 24 categorías quedan en 4 filas completas */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.cat-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 12px;
  text-align: center;
  transition: all .3s ease;
}

.cat-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.cat-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.cat-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--dark);
}

/* ============ TRUST ============ */
.trust-section {
  background: var(--white);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.trust-card {
  text-align: center;
  padding: 32px 16px;
}

.trust-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.trust-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.trust-desc {
  font-size: 13px;
  color: var(--surface);
  line-height: 1.6;
}

/* ============ CTA ============ */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h60v60H0z' fill='none'/%3E%3Cpath d='M30 5L35 20H25z' fill='rgba(255,255,255,.03)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.cta-section .section-title {
  color: var(--white);
  position: relative;
}

.cta-desc {
  font-size: 18px;
  color: rgba(255,255,255,.85);
  max-width: 500px;
  margin: 0 auto 40px;
  line-height: 1.7;
  position: relative;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
}

.btn-white {
  background: var(--white);
  color: var(--primary);
  font-weight: 700;
}
.btn-white:hover {
  background: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}

.btn-ghost {
  background: rgba(255,255,255,.15);
  color: var(--white);
  border: 2px solid rgba(255,255,255,.3);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.25);
  transform: translateY(-2px);
}

/* ============ FOOTER ============ */
footer {
  background: var(--dark);
  color: var(--muted);
  padding: 64px 0 32px;
}

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

.footer-brand .logo {
  margin-bottom: 16px;
}

.footer-brand .logo-fix { color: var(--white); }

.footer-desc {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: var(--surface);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background .2s;
}
.footer-social a:hover {
  background: var(--primary);
}

.footer-col h4 {
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--muted);
  padding: 6px 0;
  transition: color .2s;
}
.footer-col a:hover { color: var(--primary-light); }

.footer-bottom {
  border-top: 1px solid var(--surface);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom a {
  color: var(--muted);
  transition: color .2s;
}
.footer-bottom a:hover { color: var(--primary-light); }

/* ============ SCROLL ANIMATIONS ============ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ MOBILE MENU ============ */
.mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  z-index: 999;
}

.mobile-menu.open { display: block; }

.mobile-menu a {
  display: block;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--dark);
  border-bottom: 1px solid var(--border);
}

.mobile-menu a:last-child { border-bottom: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
  .categories-grid { grid-template-columns: repeat(4, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  section { padding: 72px 0; }

  .nav-links { display: none; }
  .hamburger { display: block; }

  .hero { padding: 110px 0 60px; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  .hero-desc { margin: 0 auto 36px; }
  .hero-buttons { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { order: -1; }

  .phone-mockup {
    width: 220px;
    height: 460px;
  }

  .floating-card { display: none; }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .steps-grid::before { display: none; }

  .step-number { width: 48px; height: 48px; font-size: 18px; }

  .features-grid { grid-template-columns: 1fr; }

  .pro-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

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

  .trust-grid { grid-template-columns: 1fr; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { flex-direction: column; gap: 20px; }
  .btn-lg { padding: 14px 28px; font-size: 15px; }
}

/* ============ PÁGINAS INTERNAS ============ */
.page-hero {
  padding: 136px 0 56px;
  text-align: center;
  background: linear-gradient(135deg, var(--bg) 0%, #EFF8FF 50%, var(--bg) 100%);
}

.page-hero .section-subtitle {
  margin: 0 auto;
}

/* La primera sección después del encabezado no necesita tanto aire arriba */
.page-hero + section {
  padding-top: 48px;
}

/* Página de profesionales: arranca con la sección oscura, debajo del menú fijo */
.pro-section.pagina {
  padding-top: 150px;
}

.nota-centro {
  text-align: center;
  margin-top: 40px;
  color: var(--surface);
}

.nota-centro a {
  color: var(--primary);
  font-weight: 600;
}

/* Menú: marca la página actual */
.nav-links a[aria-current="page"],
.mobile-menu a[aria-current="page"] {
  color: var(--primary);
  font-weight: 600;
}

/* ============ INICIO: EXPLORA ============ */
.explora-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.explora-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all .3s ease;
}

.explora-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.explora-titulo {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.explora-desc {
  font-size: 14px;
  color: var(--surface);
  line-height: 1.6;
  flex: 1;
}

.explora-mas {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

/* ============ CÓMO FUNCIONA: NEGOCIACIÓN ============ */
.negociacion-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ============ RESPONSIVE (páginas) ============ */
@media (max-width: 1024px) {
  .explora-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Con 5 enlaces el menú ya no cabe en tablets: ahí se usa el menú de celular */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
}

@media (max-width: 768px) {
  .page-hero { padding: 104px 0 40px; }
  .page-hero + section { padding-top: 32px; }
  .pro-section.pagina { padding-top: 110px; }
  .explora-grid,
  .negociacion-grid { grid-template-columns: 1fr; }
}
