/*===============================================================
  GTR — Service pages (servicios/*.html)
  Hereda tokens de main.css
===============================================================*/

/*=============== SERVICE HERO ===============*/
.service-hero {
  position: relative;
  padding: 9rem 0 var(--s-6);
  background: var(--paper-soft);
  overflow: hidden;
}

.service-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--paper-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--paper-line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.4;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 85%);
          mask-image: linear-gradient(to bottom, black, transparent 85%);
  pointer-events: none;
}

.service-hero::after {
  content: '';
  position: absolute;
  right: -6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(29, 61, 122, 0.1) 0%, transparent 62%);
  pointer-events: none;
}

.service-hero .container { position: relative; z-index: 1; }

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--s-5);
  font-size: var(--fs-sm);
  color: var(--muted);
  font-family: var(--font-body);
}

.breadcrumb a {
  color: var(--ink);
  font-weight: 500;
  transition: color var(--dur) var(--ease);
}

.breadcrumb a:hover { color: var(--accent-600); }

.breadcrumb span:not(:last-child) {
  color: var(--muted-soft);
  font-weight: 400;
}

.breadcrumb span:last-child {
  color: var(--primary);
  font-weight: 600;
}

.service-hero__content {
  max-width: 860px;
  position: relative;
  z-index: 1;
}

.service-hero__icon {
  width: 72px;
  height: 72px;
  background: var(--ink);
  color: var(--accent);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s-3);
  box-shadow: var(--shadow-md);
  position: relative;
}

.service-hero__icon::after {
  content: '';
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 4px;
}

.service-hero__title {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin-bottom: var(--s-3);
  color: var(--ink);
  max-width: 14ch;
}

.service-hero__description {
  font-size: 1.175rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 620px;
}

/*=============== SERVICE CONTENT ===============*/
.service-content {
  padding: var(--s-7) 0;
}

.service-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: var(--s-6);
  align-items: start;
}

.service-main {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.service-section {
  position: relative;
  background: var(--paper-soft);
  padding: var(--s-5);
  border: 1px solid var(--paper-line);
  border-radius: var(--r-lg);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.service-section:hover {
  border-color: var(--primary-400);
  transform: translateY(-2px);
}

.service-section h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: var(--s-3);
  color: var(--ink);
  letter-spacing: -0.025em;
}

.service-section h3 {
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  margin-bottom: var(--s-2);
  color: var(--ink);
  font-weight: 600;
  position: relative;
  padding-left: 1.25rem;
}

.service-section h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35em;
  bottom: 0.35em;
  width: 4px;
  background: var(--accent);
  border-radius: 2px;
}

.service-section h4 {
  margin-bottom: var(--s-2);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.service-section p {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: var(--s-2);
}

.service-section p:last-child { margin-bottom: 0; }

/*=============== SERVICE ILLUSTRATION ===============*/
.service-illustration {
  position: relative;
  margin: var(--s-3) 0 0;
  padding: var(--s-4) var(--s-3);
  background: var(--celeste-100);
  border: 1px solid var(--celeste-200);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  overflow: hidden;
}

.service-illustration::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0 22px,
    rgba(56, 163, 214, 0.07) 22px 23px
  );
  pointer-events: none;
}

.service-illustration > svg {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
}

.service-illustration--ink {
  background: var(--ink);
  border-color: var(--ink-800);
}

.service-illustration--ink::before {
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0 22px,
    rgba(56, 163, 214, 0.1) 22px 23px
  );
}

/*=============== SERVICE LIST ===============*/
.service-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: var(--s-3);
}

.service-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  color: var(--ink-800);
  line-height: 1.55;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--paper-line);
  font-size: 0.9375rem;
}

.service-list li:last-child { border-bottom: none; }

.service-list li::before {
  content: '';
  display: block;
  width: 20px;
  height: 10px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg) translateY(-2px);
  flex-shrink: 0;
  margin-top: 5px;
}

/*=============== SUBSECTIONS (2-col) ===============*/
.service-subsections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-3);
  margin-top: var(--s-3);
}

.subsection-card {
  position: relative;
  padding: var(--s-3);
  background: var(--paper);
  border-radius: var(--r-md);
  border: 1px solid var(--paper-line);
  border-top: 3px solid var(--primary);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.subsection-card:hover {
  border-top-color: var(--accent);
  transform: translateY(-3px);
}

.subsection-card h4 {
  margin-bottom: var(--s-2);
  color: var(--primary);
  font-size: 1.125rem;
  font-weight: 600;
}

.subsection-card ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.subsection-card li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.subsection-card li::before {
  content: '→';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1.5;
}

/*=============== ISO GRID (in service page) ===============*/
.iso-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-2);
  margin-top: var(--s-3);
}

.iso-card {
  position: relative;
  padding: var(--s-3);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-md);
  text-align: left;
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.iso-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--accent);
}

.iso-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(400px 200px at 100% 100%, rgba(200, 22, 43, 0.14), transparent 60%);
  z-index: -1;
}

.iso-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.iso-card h4 {
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: -0.015em;
}

.iso-card p {
  color: rgba(245, 248, 252, 0.72);
  font-size: var(--fs-sm);
  margin: 0;
  line-height: 1.4;
}

/*=============== SIDEBAR ===============*/
.service-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  position: sticky;
  top: 110px;
  align-self: flex-start;
}

.sidebar-card {
  background: var(--paper-soft);
  padding: var(--s-3);
  border-radius: var(--r-md);
  border: 1px solid var(--paper-line);
}

.sidebar-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--s-2);
  color: var(--ink);
  letter-spacing: -0.015em;
  padding-left: 0;
  position: static;
}

.sidebar-card h3::before { display: none; }

.sidebar-card p {
  color: var(--muted);
  margin-bottom: var(--s-2);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

.sidebar-card--highlight {
  background: var(--ink);
  color: var(--paper);
  border-color: transparent;
  position: relative;
  overflow: hidden;
}

.sidebar-card--highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
}

.sidebar-card--highlight::after {
  content: '';
  position: absolute;
  right: -20%;
  bottom: -30%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.25;
  pointer-events: none;
}

.sidebar-card--highlight h3,
.sidebar-card--highlight p { color: var(--paper); }

.sidebar-card--highlight p { color: rgba(245, 248, 252, 0.78); }

.sidebar-card--highlight .btn--primary {
  background: var(--accent);
  color: var(--ink);
}

.sidebar-card--highlight .btn--primary::before { background: var(--paper); }
.sidebar-card--highlight .btn--primary:hover { color: var(--ink); }

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-links a {
  padding: 0.75rem 0.875rem;
  background: transparent;
  border-radius: var(--r-sm);
  color: var(--ink-800);
  font-size: 0.9375rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), padding var(--dur) var(--ease);
}

.sidebar-links a::after {
  content: '→';
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  color: var(--accent);
}

.sidebar-links a:hover {
  background: var(--ink);
  color: var(--paper);
  padding-left: 1.25rem;
}

.sidebar-links a:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.sidebar-contact {
  display: flex;
  gap: 0.875rem;
  align-items: center;
}

.sidebar-contact svg {
  width: 44px;
  height: 44px;
  padding: 0.6rem;
  background: var(--ink);
  color: var(--accent);
  border-radius: var(--r-sm);
  flex-shrink: 0;
}

.sidebar-contact__label {
  font-size: var(--fs-micro);
  color: var(--muted);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
}

.sidebar-contact__value {
  font-weight: 600;
  color: var(--ink);
  font-size: 1rem;
  display: block;
  transition: color var(--dur) var(--ease);
}

.sidebar-contact__value:hover { color: var(--accent-600); }

/*=============== REQUIREMENTS LIST (shared) ===============*/
.requirements-list {
  display: grid;
  gap: var(--s-2);
  margin-top: var(--s-3);
}

.requirement-item {
  padding: var(--s-3);
  background: var(--paper);
  border-radius: var(--r-md);
  border: 1px solid var(--paper-line);
  border-left: 4px solid var(--primary);
}

.requirement-item h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--s-1);
  color: var(--primary);
  font-size: 1.05rem;
}

.requirement-item p {
  color: var(--muted);
  font-size: var(--fs-sm);
  margin: 0;
  line-height: 1.6;
}

/*=============== PROCESS STEPS (shared) ===============*/
.process-steps {
  display: grid;
  gap: var(--s-3);
  margin-top: var(--s-3);
  counter-reset: step-counter;
}

.process-step {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-3);
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: var(--r-md);
  position: relative;
  align-items: flex-start;
}

.process-step::before {
  counter-increment: step-counter;
  content: counter(step-counter, decimal-leading-zero);
  width: 52px;
  height: 52px;
  background: var(--ink);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}

.process-step__content h4 {
  margin-bottom: 0.35rem;
  color: var(--ink);
  font-size: 1.125rem;
}

.process-step__content p {
  color: var(--muted);
  font-size: var(--fs-sm);
  margin: 0;
  line-height: 1.6;
}

/*=============== RESPONSIVE ===============*/
@media screen and (max-width: 992px) {
  .service-grid { grid-template-columns: 1fr; }
  .service-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

@media screen and (max-width: 768px) {
  .service-hero {
    padding: 7rem 0 var(--s-5);
  }

  .service-hero::after { display: none; }

  .service-section { padding: var(--s-4); }

  .service-section h3 {
    padding-left: 1rem;
    font-size: 1.35rem;
  }

  .service-section h3::before { width: 3px; }

  .subsection-card h4 { font-size: 1rem; }

  .service-subsections,
  .iso-grid { grid-template-columns: 1fr; }

  .service-sidebar { grid-template-columns: 1fr; }

  .process-step { flex-direction: column; gap: var(--s-2); }
  .process-step::before { width: 44px; height: 44px; font-size: 1rem; }
}

@media screen and (max-width: 480px) {
  .service-section { padding: var(--s-3); }
  .sidebar-card { padding: var(--s-3); }
}
