/* ======================
   Servicios — Layout (single column, centered)
   ====================== */
#services > .supercontainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 800px;
}

#services > .supercontainer > .services-process,
#services > .supercontainer > .services-price-close,
#services > .supercontainer > .services-price-per-hour,
#services > .supercontainer > .services-cta {
  width: 100%;
}

.services-price-close,
.services-price-per-hour {
  display: flex;
  flex-flow: column nowrap;
  gap: 1rem;
}

#services-close-price-buttons-container > div,
.services-close-marketing-container > div,
.services-close-support-container > div {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ======================
   Servicios — Proceso "Cómo trabajo"
   ====================== */
.services-process {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.5rem 2rem;
  text-align: center;
}

.services-process h2 {
  color: var(--text-heading);
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
}

.process-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.process-step {
  flex: 0 1 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.4rem;
}

.process-step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: var(--text-heading);
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-primary-sm);
}

.process-step h3 {
  color: var(--text-heading);
  font-size: 0.85rem;
  margin: 0;
}

.process-step p {
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.4;
  margin: 0;
}

.process-step-arrow {
  display: flex;
  align-items: center;
  padding-top: 0.25rem;
  color: var(--border-light);
  flex-shrink: 0;
}

.process-step-arrow svg {
  width: 20px;
  height: 20px;
}

/* ======================
   Servicios — Categoría label
   ====================== */
.service-category-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dimmer);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.service-category-label svg {
  color: var(--color-accent);
  flex-shrink: 0;
}

/* ======================
   Servicios — Tabla de precios
   ====================== */
.services-price-per-hour table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.services-price-per-hour th,
.services-price-per-hour td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--table-separator);
  color: var(--text-primary);
}

.services-price-per-hour th {
  background-color: var(--color-primary);
  color: var(--text-heading);
  cursor: pointer;
  position: relative;
  font-size: 0.9rem;
  font-weight: 600;
}

.services-price-per-hour th:hover {
  background-color: var(--color-primary-hover);
}

.services-price-per-hour th:active {
  background-color: var(--color-primary-dark);
}

.services-price-per-hour th:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.services-price-per-hour tbody tr:nth-child(even) {
  background-color: var(--bg-table-even);
}

.services-price-per-hour tbody tr:hover {
  background-color: var(--bg-primary-faint);
}

.services-price-per-hour tbody tr:last-child td {
  border-bottom: none;
}

/* Sort arrows */
.services-price-per-hour .asc::after {
  content: " \25B2";
  position: absolute;
  right: 10px;
}

.services-price-per-hour .desc::after {
  content: " \25BC";
  position: absolute;
  right: 10px;
}

/* Price column: right-aligned, monospace feel */
.services-price-per-hour td:last-child {
  text-align: right;
  white-space: nowrap;
  color: var(--color-success);
  font-weight: 600;
}

.services-price-per-hour th:last-child {
  text-align: right;
}

.services-table-note {
  color: var(--text-dimmer);
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 0.5rem;
}

.services-urgency {
  color: var(--color-success);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

/* Table service icons */
.table-service-icon {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-right: 0.5rem;
  color: var(--color-accent);
}

/* ======================
   Servicios — Cards de precio cerrado
   ====================== */
.service-close-pack {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.2s ease, background 0.3s ease;
}

.service-close-pack:hover {
  box-shadow: var(--shadow-primary-md);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.service-close-pack:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Card activa (detalle abierto) */
.service-close-pack[aria-expanded="true"] {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-alt) 100%);
  box-shadow: var(--shadow-primary-md);
}

.service-close-pack[aria-expanded="true"]:hover {
  transform: none;
}

.service-close-pack ul {
  padding-left: 1.2rem;
}

.service-close-pack li {
  margin-bottom: 0.3rem;
}

.service-close-price {
  font-weight: bold;
  color: var(--color-success);
  white-space: nowrap;
}

/* Pack icon */
.pack-icon {
  color: var(--color-accent);
  flex-shrink: 0;
}

/* Badge (Popular, Todo incluido) */
.pack-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 1rem;
  background-color: var(--bg-primary-subtle);
  color: var(--color-accent);
  white-space: nowrap;
  line-height: 1;
}

.pack-badge-accent {
  background-color: var(--bg-success-subtle);
  color: var(--color-success);
}

/* Chevron indicador */
.pack-chevron {
  transition: transform 0.3s ease, color 0.3s ease;
  color: var(--text-subtle);
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.service-close-pack[aria-expanded="true"] .pack-chevron {
  transform: rotate(180deg);
  color: var(--color-accent);
}

/* ======================
   Servicios — Panel de detalle expandible
   ====================== */
.service-close-detail {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  color: var(--text-secondary);
  line-height: 1.6;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
  padding: 0 1rem;
}

.service-close-detail.open {
  max-height: 1000px;
  opacity: 1;
  padding: 1rem 1.25rem;
  background: var(--bg-detail-gradient);
  border: 1px solid var(--border-detail-accent);
  border-left: 3px solid var(--color-primary);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.service-close-detail h3,
.service-close-pack-header h3 {
  color: var(--text-heading);
}

.service-close-detail h3 {
  margin-bottom: 0.5rem;
}

.service-close-detail strong {
  display: block;
  color: var(--color-accent);
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.service-close-detail ul {
  padding-left: 1.2rem;
  margin-top: 0.25rem;
}

.service-close-detail li {
  margin-bottom: 0.25rem;
}

.service-detail-note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-dimmer);
  font-style: italic;
}

.service-detail-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.service-detail-link:hover {
  color: var(--text-heading);
}

.service-close-pack-header {
  font-size: 1rem;
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 0.4rem 0.75rem;
}

.service-close-pack-header-right {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 0.4rem;
}

.services-price-per-hour p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ======================
   Servicios — Bloque "Siempre incluido"
   ====================== */
.services-included {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--color-primary);
  border-radius: 8px;
  padding: 1.25rem;
  margin-top: 0.5rem;
}

.services-included h3 {
  color: var(--text-heading);
  font-size: 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.services-included h3 svg {
  color: var(--color-success);
  flex-shrink: 0;
}

.services-included ul {
  padding-left: 1.2rem;
  color: var(--text-muted);
}

.services-included li {
  margin-bottom: 0.3rem;
}

/* ======================
   Servicios — CTA final
   ====================== */
.services-cta {
  width: 100%;
  text-align: center;
  margin-top: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.services-cta p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* ======================
   Servicios — Tablet (721px – 1024px)
   ====================== */
@media screen and (min-width: 721px) and (max-width: 1024px) {
  .process-step {
    flex: 0 1 160px;
  }

  .process-step p {
    font-size: 0.7rem;
  }
}

/* ======================
   Servicios — Mobile (max 720px)
   ====================== */
@media screen and (max-width: 720px) {
  #services > .supercontainer {
    gap: 1.5rem;
  }

  /* Process card: compact */
  .services-process {
    padding: 1rem 1.25rem;
  }

  .services-process h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }

  .process-steps {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .process-step {
    flex: none;
    width: 100%;
    max-width: 300px;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 0.75rem;
    padding: 0.4rem 0;
  }

  .process-step-number {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .process-step h3 {
    font-size: 0.85rem;
  }

  .process-step p {
    font-size: 0.8rem;
  }

  .process-step-arrow {
    transform: rotate(90deg);
    padding: 0;
    justify-content: center;
    width: 100%;
    max-width: 300px;
  }

  .process-step-arrow svg {
    width: 16px;
    height: 16px;
  }

  /* Card header */
  .service-close-pack-header {
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    margin-bottom: 0.75rem;
  }

  .service-close-pack-header-right {
    flex-wrap: wrap;
  }

  .service-close-price {
    font-size: 0.9rem;
  }

  .service-close-pack {
    padding: 0.85rem;
    font-size: 0.9rem;
  }

  /* Category labels */
  .service-category-label {
    font-size: 0.8rem;
    margin-top: 0.25rem;
  }

  /* Detail panels */
  .service-close-detail.open {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
  }

  /* Table */
  .services-price-per-hour {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .services-price-per-hour table {
    min-width: 360px;
  }

  .services-price-per-hour th,
  .services-price-per-hour td {
    padding: 10px 8px;
    font-size: 0.85rem;
  }

  .table-service-icon {
    display: none;
  }

  /* Included block */
  .services-included {
    padding: 1rem;
  }

  .services-included h3 {
    font-size: 0.9rem;
  }

  .services-included li {
    font-size: 0.85rem;
  }

  /* CTA */
  .services-cta {
    padding-top: 0.75rem;
  }

  .services-cta p {
    font-size: 1rem;
  }

  .services-cta .cta-button {
    width: 100%;
    text-align: center;
  }
}

/* ======================
   Servicios — Small phones (max 380px)
   ====================== */
@media screen and (max-width: 380px) {
  .services-process {
    padding: 0.85rem 1rem;
  }

  .process-step {
    max-width: 100%;
  }

  .process-step-number {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  .process-step h3 {
    font-size: 0.8rem;
  }

  .process-step p {
    font-size: 0.68rem;
  }

  .service-close-pack {
    padding: 0.75rem;
  }

  .pack-icon {
    display: none;
  }

  .service-close-price {
    font-size: 0.8rem;
  }

  .pack-badge {
    font-size: 0.6rem;
    padding: 0.1rem 0.4rem;
  }
}
