@import url('./shared.css');

/* Reaprovechamos la base compartida y mantenemos los estilos del landing
   lo más fiel posible a style.css original. */

body {
  line-height: 1.6;
  background-color: #fff;
}

/* Navigation */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: white;
  border-bottom: 1px solid var(--border);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  /* antes: degradado */
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: initial;
  color: var(--primary);
  text-decoration: none;
}

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

nav a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--primary);
}

.nav-buttons {
  display: flex;
  gap: 1rem;
}

/* ===== Mobile nav fixes (botones no se cortan) ===== */
@media (max-width: 768px) {
  nav {
    padding: 0.75rem 1rem;
  }

  nav ul {
    gap: 1rem;
  }

  .nav-buttons {
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  /* Evita que los botones crezcan demasiado y se salgan */
  .nav-buttons .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    white-space: nowrap;
  }
}

@media (max-width: 520px) {

  /* Pasamos a layout en 2 filas: logo/links arriba, botones abajo */
  nav {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 0.5rem;
    align-items: start;
  }

  nav ul {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0;
    margin: 0;
  }

  .nav-buttons {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-buttons .btn {
    flex: 1 1 auto;
    min-width: 140px;
    text-align: center;
  }
}

@media (max-width: 360px) {
  .nav-buttons .btn {
    min-width: 0;
    flex: 1 1 100%;
  }
}

/* Hero */
.hero {
  margin-top: 70px;
  /* antes: linear-gradient(...) */
  background: #0b3aa4;
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  max-width: 700px;
  opacity: 0.95;
}

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

.btn-hero-outline {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
  color: white;
}

.btn-hero-outline:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Full-width button utility */
.btn-full {
  width: 100%;
}

/* Section intro paragraphs */
.section-intro {
  max-width: 900px;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

.section-intro-center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Sections */
.section {
  padding: 5rem 2rem;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--dark);
}

/* Demo Video */
.demo-video-section {
  background: linear-gradient(180deg, #0b3aa4 0%, #1e1b4b 40%, #0f172a 100%);
  text-align: center;
  padding-top: 3rem;
  padding-bottom: 5rem;
}

.demo-video-section .section-title {
  color: #fff;
  margin-bottom: 0.75rem;
}

.demo-subtitle {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.demo-video-wrapper {
  max-width: 960px;
  margin: 0 auto;
  border-radius: 16px;
  padding: 4px;
  background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.35), 0 0 80px rgba(168, 85, 247, 0.15);
  animation: video-glow 4s ease-in-out infinite alternate;
}

@keyframes video-glow {
  0% {
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.35), 0 0 80px rgba(168, 85, 247, 0.15);
  }

  100% {
    box-shadow: 0 20px 80px rgba(99, 102, 241, 0.5), 0 0 100px rgba(168, 85, 247, 0.25);
  }
}

.demo-video {
  display: block;
  width: 100%;
  border-radius: 13px;
  background: #000;
}

@media (max-width: 768px) {
  .demo-video-wrapper {
    max-width: calc(100% - 2rem);
    border-radius: 12px;
  }

  .demo-video {
    border-radius: 9px;
  }

  .demo-subtitle {
    font-size: 1rem;
    padding: 0 1rem;
  }
}

/* How it Works */
.how-it-works {
  background: white;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.step-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.step-card h3 {
  color: var(--dark);
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
}

.step-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* Features */
.features {
  background: white;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  padding: 2rem;
  border-radius: 12px;
  background: var(--light);
  border: 1px solid var(--border);
  transition: all 0.3s;
}

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

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Pricing */
.pricing {
  background: var(--light);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.pricing-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
}

.pricing-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.pricing-card.popular {
  border-color: var(--primary);
  transform: scale(1.05);
  position: relative;
  z-index: 10;
}

.pricing-card.enterprise {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: white;
  border: 2px solid #e94560;
}

.pricing-card.enterprise .plan-name {
  color: #e94560;
}

.pricing-card.enterprise .plan-price {
  color: white;
  font-size: clamp(1.2rem, 6vw + 0.5rem, 2.2rem);
  word-break: break-all;
}

.pricing-card.enterprise .plan-trial {
  color: rgba(255, 255, 255, 0.8);
}

.pricing-card.enterprise .plan-features li {
  color: rgba(255, 255, 255, 0.9);
}

.pricing-card.enterprise .plan-features li::before {
  color: #e94560;
}

.popular-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 0.25rem 1rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: bold;
}

.plan-name {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.plan-price {
  font-size: clamp(1.5rem, 8vw + 0.5rem, 3rem);
  word-break: break-word;
  font-weight: bold;
  margin-bottom: 1.5rem;
  text-align: left;
}

.plan-price span {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: normal;
}

.plan-features {
  list-style: none;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.plan-features li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.plan-features li:before {
  content: '✓';
  color: var(--success);
  margin-right: 0.5rem;
  font-weight: bold;
}

.plan-trial {
  display: inline-block;
  margin-top: -0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #065f46;
  font-weight: 800;
  font-size: 0.9rem;
  width: fit-content;
}

/* + IVA inline en el precio */
.plan-vat-inline {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(107, 114, 128, 1);
  margin-left: 0.25rem;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .plan-vat-inline {
    font-size: 0.8rem;
    display: inline-block;
    margin-left: 0.15rem;
  }
}

/* CTA */
.cta {
  /* antes: linear-gradient(135deg, var(--primary), var(--secondary)); */
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 4rem 2rem;
}

.cta h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta .btn {
  background: white;
  color: var(--primary);
  font-weight: 700;
}

.cta .btn:hover {
  background: var(--light);
}

/* Footer */
footer {
  background: var(--dark);
  color: white;
  padding: 3rem 2rem;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  text-align: left;
  margin-bottom: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: #d1d5db;
  text-decoration: none;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-section a:hover {
  color: white;
}

.footer-description {
  color: #9ca3af;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 0.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.social-links a {
  color: #9ca3af;
  transition: color 0.2s, transform 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-links a:hover {
  color: white;
  transform: scale(1.15);
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 2rem;
  text-align: center;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

/* ===== Modales: formato limpio para Login/Registro ===== */
/* Restauramos layout del modal-content y movemos el scroll al formulario */
.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 520px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.modal-content-scrollable {
  max-height: 80vh;
  overflow-y: auto;
}

.modal-title {
  margin: 0 0 2rem 0;
  padding-right: 2rem;
}

.modal-switch-text {
  text-align: center;
  margin-top: 1rem;
}

.modal-switch-link {
  color: var(--primary);
  font-weight: bold;
  background: none;
  border: none;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  padding: 0;
  text-decoration: underline;
}

.modal-switch-link:hover {
  color: var(--primary-dark);
}

/* Asegura que el título y el botón de cerrar se ven siempre y no "raros" */
#registerModal .modal-close,
#loginModal .modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: #9ca3af;
}

#registerModal .modal-close:hover,
#loginModal .modal-close:hover {
  color: var(--dark);
}

#registerModal .modal-content h2,
#loginModal .modal-content h2 {
  margin: 0 0 1.25rem 0 !important;
  padding-right: 2rem;
  /* deja espacio al botón cerrar */
}

/* Scroll interno SOLO en el formulario para que el modal mantenga buen look */
#registerModal .modal-content form,
#loginModal .modal-content form {
  max-height: calc(90vh - 160px);
  overflow-y: auto;
  padding-right: 6px;
  /* evita que el scrollbar pise el contenido */
}

/* Formularios: estética consistente */
#registerModal .form-group,
#loginModal .form-group {
  margin-bottom: 1rem;
}

#registerModal label,
#loginModal label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--dark);
}

#registerModal input,
#registerModal select,
#loginModal input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 0.9rem;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#registerModal input:focus,
#registerModal select:focus,
#loginModal input:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.7);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

/* En pantallas bajas: compactación suave */
@media (max-height: 750px) {
  .modal-content {
    padding: 1.5rem;
  }

  #registerModal .modal-content form,
  #loginModal .modal-content form {
    max-height: calc(95vh - 150px);
  }

  #registerModal .form-group,
  #loginModal .form-group {
    margin-bottom: 0.85rem;
  }

  #registerModal input,
  #registerModal select,
  #loginModal input {
    padding: 0.75rem 0.85rem;
  }
}

/* Móvil: que no ocupe todo el ancho */
@media (max-width: 480px) {
  .modal-content {
    width: calc(100% - 24px);
  }
}

.cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--dark);
  color: white;
  padding: 1rem;
  z-index: 3000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cookie-text {
  font-size: 0.9rem;
}

.cookie-text a {
  color: var(--primary);
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 1rem;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  nav ul {
    gap: 1rem;
    font-size: 0.9rem;
    display: none;
  }

  .pricing-card.popular {
    transform: scale(1);
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .cookie-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-actions {
    width: 100%;
  }

  .cookie-actions button {
    flex: 1;
  }
}

/* FAQ Section */
.faq {
  background: #f9fafb;
}

.faq-grid {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.faq-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.faq-item[open] {
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
  border-color: var(--primary);
}

.faq-question {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #1f2937;
  user-select: none;
}

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

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--primary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item[open] .faq-question::after {
  content: '−';
}

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  color: #4b5563;
  line-height: 1.7;
}

/* Accesibilidad: link de salto y texto solo para lectores */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.6rem 0.9rem;
  background: #111827;
  color: #fff;
  border-radius: 10px;
  z-index: 4000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}