/* ==========================================================================
   SEMIÓTICA | Learning Experience Design
   3. Retícula Responsive, Secciones, Cabecera y Pie de Página Global
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section {
  padding-block: clamp(3rem, 6vw, 4.75rem);
  border-bottom: 1px solid var(--border-subtle);
}

.section--subtle {
  background-color: var(--bg-subtle);
}

.section--surface {
  background-color: var(--bg-surface);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: var(--space-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--space-md);
}

/* --------------------------------------------------------------------------
   Encabezados de Sección Homogeneizados (Opción 3: Línea continua + Nodo)
   -------------------------------------------------------------------------- */
.section-header-split {
  width: 100%;
  margin-bottom: 2.25rem;
}

.section-header-split .eyebrow,
.servicios-hero__header .eyebrow,
.muestras-hero__header .eyebrow,
.contacto-hero__header .eyebrow {
  display: none;
}

.section-header-split h2,
.servicios-hero__header h1,
.muestras-hero__header h1,
.contacto-hero__header h1,
.section-heading-node {
  position: relative;
  width: 100%;
  max-width: none;
  padding-bottom: 0.95rem;
  margin-bottom: 1.15rem;
}

.section-header-split h2::before,
.servicios-hero__header h1::before,
.muestras-hero__header h1::before,
.contacto-hero__header h1::before,
.section-heading-node::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  border: 2px solid var(--accent-secondary);
  z-index: 2;
}

.section--subtle .section-header-split h2::before,
.section--subtle .section-heading-node::before {
  background-color: var(--bg-subtle);
}

.section-header-split h2::after,
.servicios-hero__header h1::after,
.muestras-hero__header h1::after,
.contacto-hero__header h1::after,
.section-heading-node::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background:
    linear-gradient(to right, var(--accent-secondary) 0 56px, transparent 56px),
    linear-gradient(to bottom, transparent 1px, var(--border-subtle) 1px 2px, transparent 2px);
}

.section-header-split p {
  font-size: var(--text-lead);
  line-height: 1.6;
  color: var(--ink-secondary);
  max-width: none;
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Cabecera Global y Logotipo Centrado
   -------------------------------------------------------------------------- */
.site-header {
  position: relative;
  z-index: 20;
  background-color: var(--bg-surface);
  border-bottom: 1.5px solid rgba(19, 66, 58, 0.22);
  border-radius: 0 0 18px 18px;
  box-shadow:
    0 12px 24px -10px rgba(19, 66, 58, 0.22),
    0 4px 10px -4px rgba(19, 66, 58, 0.10);
  padding-block: 1.15rem;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}

.brand-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
}

.brand-link__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.45rem, 2vw, 1.65rem);
  line-height: 1.1;
  letter-spacing: 0.08em;
  color: var(--ink-primary);
}

.brand-accent {
  color: var(--accent-secondary);
}

.brand-link__descriptor {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
  letter-spacing: 0.03em;
  color: var(--accent-primary);
  margin-top: 0.2rem;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.5rem 0.95rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink-primary);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover {
  color: var(--accent-primary);
  border-bottom-color: var(--border-interactive);
}

.nav-link[aria-current="page"] {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-secondary);
}

/* --------------------------------------------------------------------------
   Pie de Página Global (base compatible con footer.css)
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--bg-surface);
  padding-block: var(--space-xl) var(--space-lg);
  color: var(--ink-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
}

.footer-heading {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-primary);
  margin-bottom: var(--space-sm);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.65rem;
}

.footer-links a {
  display: inline-block;
  min-height: 36px;
  color: var(--ink-secondary);
  text-decoration: none;
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  margin-top: var(--space-md);
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

/* --------------------------------------------------------------------------
   Botón flotante "Volver arriba"
   -------------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 50;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  color: var(--accent-primary);
  border: 2px solid var(--accent-primary);
  box-shadow: 0 6px 18px rgba(20, 22, 25, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease,
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background-color: var(--accent-secondary);
  border-color: var(--accent-secondary);
  color: var(--bg-surface);
  transform: translateY(-2px);
}