/* ===================================
   *PAGA SERVICIOS
   =================================== */

.back-header {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  padding: 0.5rem 0;
}

.back-button:hover {
  color: var(--primary-dark);
  transform: translateX(-2px);
}

.back-button svg {
  transition: transform 0.2s ease;
}

.back-button:hover svg {
  transform: translateX(-2px);
}

/* ===================================
   *HERO SECTION
   =================================== */
.hero-services {
  background-color: var(--bg-secondary);
  padding: 3rem 0;
}

.hero-services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2rem);
}

.hero-services-content h1 {
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.hero-services-content p {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 250px;
}

.btn-primary-services {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius-lg);
  padding: 0.875rem 1.25rem;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary-services:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow-lg);
}

.btn-outline-services {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid #E5E7EB;
  border-radius: var(--border-radius-lg);
  padding: 0.875rem 1.25rem;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-outline-services:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}


.hero-image-container {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.hero-services-image {
  width: 60%;
  height: auto;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-lg);
  transition: all 0.3s ease;
}

.hero-services-image:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hero-feature-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-lg);
  transition: all 0.3s ease;
  object-fit: cover;
}

.hero-feature-image:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

/* ===================================
   *STEPS SECTION
   =================================== */
.steps-services {
  padding: 2rem 0 5rem 0;
  background: var(--bg-secondary);
}

.step-phase {
  margin-bottom: 3rem;
  max-width: 600px;
}

.step-phase:last-child {
  margin-bottom: 0;
}

.step-phase-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.step-phase-line {
  width: 60px;
  height: 2px;
  background: var(--primary-color);
  margin-bottom: 2rem;
}

.step-item-vertical {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
  position: relative;
}

.step-item-vertical:last-child {
  margin-bottom: 0;
}

.step-number-vertical {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.1rem;
  min-width: 20px;
  order: -1;
}

.step-icon-circle {
  width: 40px;
  height: 40px;
  background: #e8f4f8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-icon-circle svg {
  color: var(--primary-color);
}




.step-content-vertical {
  flex: 1;
}

.step-content-vertical h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.step-content-vertical p {
  color: #666;
  line-height: 1.5;
  margin: 0 0 0.5rem 0;
}

/* ===================================
   *MODALIDADES SECTION
   =================================== */
.modalidades-section {
  background-color: var(--bg-secondary);
  padding: 5rem 0;
}

.modalidades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2rem);
}

.modalidad-card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--box-shadow);
  transition: all var(--transition-fast);
}

.modalidad-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--box-shadow-lg);
}

.modalidad-icon {
  width: 4rem;
  height: 4rem;
  background-color: rgba(67, 124, 148, 0.1);
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.modalidad-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.modalidad-card p {
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===================================
   *BENEFICIOS SECTION  
   =================================== */
.beneficios-section {
  padding: 5rem 0;
}

.beneficios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2rem);
}

.beneficio-card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--box-shadow);
  transition: all var(--transition-fast);
}

.beneficio-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--box-shadow-lg);
}

.beneficio-icon {
  width: 3.5rem;
  height: 3.5rem;
  background-color: rgba(67, 124, 148, 0.1);
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.beneficio-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.beneficio-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.43;
}

/* ===================================
   *FAQ SECTION 
   =================================== */
.faq-section {
  background-color: var(--bg-secondary);
  padding: 5rem 0;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2rem);
}

.faq-item {
  background: white;
  border-radius: var(--border-radius-lg);
  margin-bottom: 1rem;
  box-shadow: var(--box-shadow);
  overflow: hidden;
}


.faq-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}


.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 1.5rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color var(--transition-fast);
}

.faq-question:hover {
  background-color: #F9FAFB;
}

.faq-question h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.faq-chevron {
  color: var(--primary-color);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}


.faq-toggle:checked ~ .faq-question .faq-chevron {
  transform: rotate(180deg);
}


.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 1.5rem;
  transition: max-height 0.3s ease, padding 0.3s ease;
}


.faq-toggle:checked ~ .faq-answer {
  max-height: 500px;
  padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.43;
  margin: 0;
  padding-top: 0.5rem;
}

/* ===================================
   *CTA FINAL SECTION
   =================================== */
.cta-final-services {
  padding: 5rem 0;
}

.cta-final-card {
  background-color: var(--primary-color);
  border-radius: var(--border-radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

.cta-final-icon {
  width: 3rem;
  height: 3rem;
  color: white;
  margin: 0 auto 1rem;
}

.cta-final-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
  line-height: 1.33;
}

.cta-final-card p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.btn-cta-final {
  background-color: white;
  color: var(--primary-color);
  border: none;
  border-radius: var(--border-radius-lg);
  padding: 0.875rem 1.25rem;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  display: inline-block;
}

.btn-cta-final:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}


.section-title-services {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 4rem;
  line-height: 1.33;
}

/* ===================================
   PURCHASE TYPE SWITCH  
   =================================== */


.purchase-steps-wrapper {
  position: relative;
}


.tab-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}


.purchase-type-section {
  padding: 2rem 0 1rem 0;
  background: var(--bg-secondary);
  text-align: center;
}

.section-subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.purchase-type-switch {
  display: inline-flex;
  background: white;
  border-radius: 12px;
  padding: 0.375rem;
  gap: 0.25rem;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}


.switch-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.switch-tab:hover {
  color: var(--text-primary);
}


#tab-ahorros:checked ~ .purchase-type-section .purchase-type-switch label[for="tab-ahorros"],
#tab-credito:checked ~ .purchase-type-section .purchase-type-switch label[for="tab-credito"] {
  background: white;
  color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.switch-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ===================================
   STEPS DINAMICOS
   =================================== */

.steps-header {
  display: none;
  text-align: center;
  margin-bottom: 3rem;
}


#tab-ahorros:checked ~ .steps-services .ahorros-header {
  display: block;
  animation: fadeIn 0.3s ease forwards;
}


#tab-credito:checked ~ .steps-services .credito-header {
  display: block;
  animation: fadeIn 0.3s ease forwards;
}


.steps-content {
  display: none;
}


#tab-ahorros:checked ~ .steps-services .steps-container #ahorros-content {
  display: block;
  animation: fadeIn 0.3s ease forwards;
}


#tab-credito:checked ~ .steps-services .steps-container #credito-content {
  display: block;
  animation: fadeIn 0.3s ease forwards;
}


@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.steps-subtitle {
  color: var(--text-secondary);
  font-size: var(--font-size-base);
}


.text-center {
  text-align: center;
}

.mb-8 {
  margin-bottom: 2rem;
}


.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}


.step-critical-badge {
  display: inline-block;
  background: rgba(67, 124, 148, 0.1);
  color: var(--primary-color);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.5rem;
}

.step-critical-vertical .step-icon-circle {
  background: #e8f4f8;
}

.step-critical-icon svg {
  color: var(--primary-color);
}

/* ===================================
   *RESPONSIVE DESIGN
   =================================== */
@media (max-width: 968px) {
  .hero-services {
    padding: 2rem 0;
  }
  
  .hero-services-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  /* Contenido primero (título y texto) */
  .hero-services-content {
    order: 1;
  }
  
  /* Imagen después */
  .hero-image-container {
    order: 2;
    max-width: 400px;
    margin: 0 auto;
  }
  
  .hero-services-content h1 {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    margin-bottom: 1rem;
  }
  
  .hero-services-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    max-width: 100%;
  }
  
  .btn-primary-services {
    width: 100%;
    max-width: 280px;
    padding: 1rem 1.5rem;
  }
  
  .steps-grid {
    grid-template-columns: 1fr;
  }
  
  .modalidades-grid,
  .beneficios-grid {
    grid-template-columns: 1fr;
  }

  .beneficio-card {
    text-align: center;
  }

  .beneficio-icon {
    margin: 0 auto 1rem;
  }

  .beneficio-card h3 {
    text-align: center;
  }

  .beneficio-card p {
    text-align: center;
  }
  
  .cta-final-card {
    padding: 2rem 1rem;
  }
  
  .section-title-services {
    font-size: 1.25rem;
    margin-bottom: 3rem;
  }
}

@media (max-width: 768px) {
  .purchase-type-switch {
    display: flex;
    width: 100%;
    flex-direction: column;
    padding: 0.5rem;
  }
  
  .switch-tab {
    width: 100%;
    justify-content: center;
    padding: 0.875rem;
  }
  
  .purchase-type-section {
    padding: 2rem 0;
  }
}

@media (min-width: 769px) {
  .hero-buttons {
    flex-direction: row;
    gap: 1rem;
  }
}


/* Cuentas Grid (for elegibles section) */
.cuentas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.cuenta-card {
  background-color: var(--bg-primary);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid #EEF1F3;
  transition: all 0.3s ease;
}

.cuenta-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-lg);
  border-color: var(--primary-color);
}

.cuenta-icon {
  width: 3rem;
  height: 3rem;
  background-color: rgba(68, 125, 149, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  margin-bottom: 1.25rem;
}

.cuenta-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.cuenta-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Modalidades Grid - Four columns */
.modalidades-grid-four {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

@media (max-width: 768px) {
  .modalidades-grid-four {
    grid-template-columns: 1fr;
  }
}