/* VARIABLES */
:root {
  --primary: #22c55e;
  --secondary: #0ea5e9;
  --accent: #1dd3b0;
  --dark-blue: #1e3c72;
  --darker-blue: #06134b;
  --slate-900: #0f172a;
  --slate-500: #6b7280;
  --slate-200: #e5e7eb;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --gradient-main: linear-gradient(135deg, var(--primary), var(--secondary));
  --shadow-sm: 0 10px 20px rgba(34, 197, 94, 0.25);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.04);
  --font-main: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* RESET SIMPLE */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--dark-blue);
  background-color: var(--slate-50);
  line-height: 1.5;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* CONTENEDOR GENÉRICO */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--dark-blue);
  backdrop-filter: blur(10px);
  color: var(--slate-200);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo-img {
  height: 50px;          /* Ajusta este valor para hacer el icono más grande o más chico */
  width: auto;           /* Mantiene la proporción */
  object-fit: contain;   /* Se asegura de que no se deforme */
  margin-right: 8px;     /* Espacio entre el icono y el texto */
}


.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #0ea5e9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #0f172a;
}

.logo-text {
  font-size: 1rem;
}

.main-nav a {
  text-decoration: none;
  color: #cbd5f5;
  margin-left: 20px;
  font-size: 0.95rem;
  position: relative;
  padding-bottom: 4px;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--gradient-main);
  transition: width 0.2s ease-out;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.main-nav a.active {
  color: var(--slate-50);
}
/* Botón destacado en el menú (Plan Contable) */
.main-nav a.nav-cta {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  margin-left: 24px;             /* separarlo un poquito del resto */
}

/* Evitar el subrayado animado bajo este enlace */
.main-nav a.nav-cta::after {
  width: 0 !important;
}

/* Hover del botón */
.main-nav a.nav-cta:hover {
  background-color: var(--accent);
  color: var(--slate-900);
}

/* Botón de navegación móvil */
.mobile-nav-toggle {
  display: none; /* Oculto en escritorio */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 100;
}

.mobile-nav-toggle .icon-hamburger,
.mobile-nav-toggle .icon-close {
  width: 28px;
  height: 28px;
  stroke: var(--slate-200);
}

.mobile-nav-toggle .icon-close {
  display: none;
}


/* HERO SLIDER */
.hero-slider {
  width: 100%;
  background: radial-gradient(circle at top, var(--dark-blue), var(--darker-blue));
  color: var(--slate-50);
}

.slider {
  position: relative;
  width: 100%;
  height: 420px; /* IMPORTANTE: alto del slider */
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(10%);
  transition: opacity 0.6s ease, transform 0.6s ease;
  display: flex;
  align-items: center;
}

.slide.active {
  opacity: 1;
  transform: translateX(0);
}

.slide-content {
  max-width: 640px;
}

.slide h1 {
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.slide p {
  font-size: 1.05rem;
  margin-bottom: 20px;
  color: var(--slate-200);
}

/* Slider controls */
.slider-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(15, 23, 42, 0.6); /* Transparencia manual necesaria */
  color: var(--slate-200);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.slider-control:hover {
  background: rgba(15, 23, 42, 0.85);
}

.slider-control.prev {
  left: 16px;
}

.slider-control.next {
  right: 16px;
}

/* Slider dots */
.slider-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.slider-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.slider-dot.active {
  background: var(--primary);
  transform: scale(1.1);
}

/* SECCIONES GENERALES */
.section {
  padding: 56px 0;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.section-subtitle {
  margin-top: 0;
  margin-bottom: 24px;
  color: var(--slate-500);
}

/* BUSCADOR BOLETINES */
.search-container {
  margin-bottom: 32px;
  max-width: 100%;
}

.search-input {
  width: 100%;
  max-width: 480px;
  padding: 12px 20px;
  padding-left: 48px; /* Espacio para el icono */
  border-radius: 999px;
  border: 1px solid var(--slate-200);
  font-family: var(--font-main);
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  background-color: var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z' /%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 16px center;
  background-size: 20px;
}

.search-input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.no-results {
  text-align: center;
  color: var(--slate-500);
  font-size: 1.1rem;
  margin: 32px 0;
}

/* CARDS (Boletines) */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card {
  background: var(--white);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--slate-200);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card h3 {
  font-size: 1.05rem;
  margin: 0;
}

.card p {
  margin: 0;
  color: #4b5563; /* Slate 600 */
  font-size: 0.95rem;
}

.card-link {
  margin-top: 8px;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--secondary);
}

.card-link:hover {
  text-decoration: underline;
}

/* BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-info {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-success {
  background: #dcfce7;
  color: #15803d;
}

.badge-warning {
  background: #fef9c3;
  color: #854d0e;
}

/* BOTONES */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--gradient-main);
  color: var(--slate-900);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(34, 197, 94, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--slate-200);
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.btn-outline:hover {
  background: rgba(15, 23, 42, 0.2);
}

.btn-ghost {
  background: transparent;
  color: #111827; /* Gray 900 */
  border: 1px solid var(--slate-200);
}

.btn-ghost:hover {
  background: #f3f4f6;
}

.btn-lg {
  padding: 12px 22px;
}

/* BOTÓN WHATSAPP */
.btn-whatsapp {
  background: var(--primary);
  color: var(--slate-50);
  margin-top: 16px;
}

.btn-whatsapp:hover {
  background: #16a34a;
}

/* SECCIÓN DESTACADA (CTA) */
.section-highlight {
  background: linear-gradient(135deg, var(--slate-900), #020617);
  color: var(--slate-200);
}

.highlight-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* FOOTER */
.site-footer {
  background: #020617; /* Slate 950 */
  color: #9ca3af;
  padding: 48px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-bottom: 32px;
}

.footer-column .logo-link {
  color: var(--white);
  text-decoration: none;
  margin-bottom: 16px;
  display: inline-flex;
}

.footer-column p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 0;
}

.footer-column h3 {
  font-size: 1rem;
  color: var(--slate-200);
  margin-top: 0;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a,
.footer-contact a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--white);
}

/* Redes Sociales (Iconos) */
.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--slate-200);
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.social-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.footer-bottom {
  text-align: center;
  font-size: 0.8rem;
  padding: 16px 0;
  border-top: 1px solid #1e293b; /* Slate 800 */
}

/* CUESTIONARIO */
.questionnaire-container {
  max-width: 720px;
}

.question-card {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--slate-200);
  margin-top: 16px;
}

.question-card h2 {
  margin-top: 0;
  margin-bottom: 12px;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.option-btn {
  border-radius: 999px;
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  padding: 8px 12px;
  cursor: pointer;
  text-align: left;
  font-size: 0.9rem;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.option-btn:hover {
  background: #eff6ff;
}

.option-btn.selected {
  border-color: var(--secondary);
  background: #e0f2fe;
  transform: translateY(-1px);
}

.question-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
}

/* Progreso */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--slate-200);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-bar-fill {
  height: 100%;
  width: 0;
  background: var(--gradient-main);
  transition: width 0.25s ease-out;
}

.progress-text {
  font-size: 0.8rem;
  color: #6b7280;
}

/* Resultado */
.result-card {
  margin-top: 24px;
  background: var(--slate-50);
  border-radius: 16px;
  padding: 20px;
  border: 1px dashed #cbd5e1;
}

.result-plan-name {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.result-plan-price {
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 8px;
  color: #15803d;
}

/* Utils */
.hidden {
  display: none;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .highlight-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .header-inner {
    /* Restaurado para alinear logo y botón */
    flex-direction: row;
    height: 64px;
    padding: 0;
  }

  .main-nav {
    /* Ocultar y posicionar para el menú desplegable */
    position: fixed;
    top: 64px; /* Debajo del header */
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--dark-blue);
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
    gap: 24px;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
  }

  .main-nav.is-open {
    transform: translateX(0);
  }

  .main-nav a {
    margin-left: 0;
    font-size: 1.2rem;
  }

  .mobile-nav-toggle {
    display: block; /* Mostrar el botón en móvil */
  }

  body.nav-open .mobile-nav-toggle .icon-hamburger { display: none; }
  body.nav-open .mobile-nav-toggle .icon-close { display: block; }
  body.nav-open { overflow: hidden; }

  .slider {
    height: 300px; /* un poco menos alto en móvil */
  }

  .slide h1 {
    font-size: 1.7rem;
  }

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

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

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

@media (max-width: 480px) {
  .slider {
    height: 260px;
  }

  .section {
    padding: 40px 0;
  }

}

/* FORMULARIO CONTACTO */
.contact-container {
  max-width: 600px;
}

.contact-form {
  background: var(--white);
  padding: 32px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--slate-200);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--slate-900);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--slate-200);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.error-message {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 6px;
  display: none;
}

.form-group.error input,
.form-group.error textarea {
  border-color: #ef4444;
}

.form-group.error .error-message {
  display: block;
}

/* BOTÓN FLOTANTE WHATSAPP */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #25d366;
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.whatsapp-float .whatsapp-icon {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

/* Ajuste móvil para botón WhatsApp */
@media (max-width: 768px) {
  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 16px;
    right: 16px;
  }
  .whatsapp-float .whatsapp-icon {
    width: 28px;
    height: 28px;
  }
}

/* PÁGINA DE ARTÍCULO INDIVIDUAL */
.article-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 800px; /* Ancho de lectura cómodo */
}

@media (min-width: 1024px) {
  .article-container {
    grid-template-columns: 1fr 240px; /* Contenido + Sidebar en desktop */
    grid-template-areas: "content sidebar";
  }
  .article-content { grid-area: content; }
  .article-sidebar { grid-area: sidebar; }
}

.article-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--slate-200);
}

.article-title {
  font-size: 2.2rem;
  margin-top: 8px;
  margin-bottom: 8px;
  line-height: 1.2;
}

.article-meta {
  font-size: 0.9rem;
  color: var(--slate-500);
}

.article-body .lead {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--slate-500);
  margin-bottom: 24px;
}

.article-body h2 {
  font-size: 1.5rem;
  margin-top: 32px;
  margin-bottom: 12px;
}

.article-body p, .article-body ul, .article-body ol {
  margin-bottom: 16px;
  line-height: 1.7;
}

.article-sidebar {
  position: sticky;
  top: 88px; /* header height + un poco de espacio */
  align-self: start;
}

/* ARTÍCULOS RELACIONADOS */
.related-articles {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--slate-200);
}

.related-articles h3 {
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 16px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.related-card {
  display: block;
  text-decoration: none;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
}

.related-card:hover {
  background: #eff6ff; /* light blue */
  border-color: var(--secondary);
  transform: translateY(-2px);
}

.related-card h4 {
  font-size: 1rem;
  margin: 0 0 4px 0;
  color: var(--dark-blue);
}

.related-card span {
  font-size: 0.85rem;
  color: var(--secondary);
  font-weight: 500;
}

/* NOTIFICACIONES DE FORMULARIO */
.form-notification {
  padding: 14px;
  border-radius: 8px;
  margin-top: 20px;
  font-size: 0.95rem;
  text-align: center;
  animation: fadeIn 0.3s ease-in-out;
}

.form-notification.success {
  background-color: #dcfce7; /* green-100 */
  color: #166534; /* green-800 */
  border: 1px solid #bbf7d0;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
