/* Páginas públicas para servicios, profesional y contacto. */
.seo-page {
  background: #eef1e9;
  color: #22302a;
}

.seo-page::before {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(47, 76, 60, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  content: '';
  pointer-events: none;
}

.seo-shell {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.seo-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #d9e0ce;
  background: rgba(238, 241, 233, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.seo-brand {
  display: inline-flex;
  align-items: center;
  /* inline-flex descarta el espacio entre "Activa" y <span>CPA</span> */
  gap: 0.28em;
  min-height: 44px;
  color: #2f4c3c;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.seo-brand span {
  color: #6b806d;
  font-weight: 600;
}

.seo-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.seo-nav-hint {
  display: none;
}

.seo-nav a,
.seo-footer a,
.seo-breadcrumb a {
  color: #2f4c3c;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.seo-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 0.7rem;
  border-radius: 0.65rem;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 700;
}

.seo-nav a:hover,
.seo-nav a:focus-visible {
  background: #e6ebdd;
}

.seo-main {
  padding: clamp(1.25rem, 4vw, 3.25rem) 0 4rem;
}

.seo-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  color: #55635a;
  font-size: 0.9rem;
}

/* Las migas de pan son una fila de navegación: objetivo táctil de 44px. */
.seo-breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.seo-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(1.25rem, 4vw, 3rem);
  border-radius: 1.4rem;
  background: linear-gradient(135deg, #2f4c3c, #436b54);
  color: #fff;
  box-shadow: 0 12px 28px rgba(47, 76, 60, 0.18);
}

.seo-hero::after {
  position: absolute;
  right: -5rem;
  bottom: -8rem;
  width: 18rem;
  height: 18rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  content: '';
  pointer-events: none;
}

.seo-eyebrow {
  display: inline-block;
  margin-bottom: 0.7rem;
  color: #dcebdd;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.seo-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0;
  color: #fff;
  font-size: clamp(1.8rem, 5vw, 3.7rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.seo-hero p {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 1rem 0 0;
  color: #edf5ec;
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.seo-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.35rem;
}

.seo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.seo-button:hover,
.seo-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(18, 35, 26, 0.18);
}

.seo-button-primary {
  background: #fff;
  color: #2f4c3c;
}

.seo-button-secondary {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.seo-section {
  padding-top: clamp(2rem, 5vw, 4rem);
}

.seo-section h2 {
  margin: 0 0 0.55rem;
  color: #22302a;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1.15;
}

.seo-section > p {
  max-width: 760px;
  margin: 0 0 1.25rem;
  color: #55635a;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.seo-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid #d9e0ce;
  border-radius: 1rem;
  background: #fbfcf8;
  box-shadow: 0 5px 16px rgba(34, 48, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.seo-card-wide {
  grid-column: 1 / -1;
}

.seo-card:hover,
.seo-card:focus-within {
  border-color: rgba(47, 76, 60, 0.42);
  box-shadow: 0 16px 28px rgba(34, 48, 42, 0.12);
  transform: translateY(-3px);
}

.seo-card i {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  border-radius: 0.75rem;
  background: #e6ebdd;
  color: #2f4c3c;
}

.seo-card h3 {
  margin: 0;
  color: #22302a;
  font-size: 1.2rem;
}

.seo-card p {
  margin: 0.55rem 0 1rem;
  color: #55635a;
}

/* Enlace de acción dentro de cada tarjeta: control real, 44px de alto. */
.seo-card a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: auto;
  color: #2f4c3c;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.seo-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.seo-info {
  padding: 1rem;
  border-left: 4px solid #2f4c3c;
  border-radius: 0.75rem;
  background: #fbfcf8;
  box-shadow: 0 5px 16px rgba(34, 48, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.seo-info:hover {
  box-shadow: 0 12px 22px rgba(34, 48, 42, 0.1);
  transform: translateY(-2px);
}

.seo-info h3 {
  margin: 0 0 0.35rem;
  color: #22302a;
  font-size: 1rem;
}

.seo-info p,
.seo-info address {
  margin: 0;
  color: #55635a;
  font-style: normal;
}

.seo-copy {
  max-width: 780px;
}

.seo-copy p {
  margin: 0 0 1rem;
  color: #55635a;
}

.seo-list {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  color: #55635a;
}

.seo-cta {
  margin-top: clamp(2rem, 5vw, 4rem);
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: 1rem;
  background: #e6ebdd;
}

.seo-cta h2 {
  margin-bottom: 0.45rem;
}

.seo-cta p {
  margin: 0 0 1rem;
  color: #55635a;
}

.seo-cta .seo-button-primary {
  background: #2f4c3c;
  color: #fff;
}

.seo-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0 2rem;
  border-top: 1px solid #d9e0ce;
  color: #55635a;
  font-size: 0.9rem;
}

.seo-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* Enlaces del pie: fila de navegación real, 44px de alto. */
.seo-footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.seo-page a:focus-visible,
.seo-page button:focus-visible {
  outline: 3px solid rgba(198, 127, 62, 0.65);
  outline-offset: 3px;
}

@media (max-width: 700px) {
  .seo-header {
    align-items: flex-start;
    flex-direction: column;
  }

  /* Barra densa: fila deslizante horizontal (AGENTS.md §5.6). */
  .seo-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .seo-nav::-webkit-scrollbar {
    display: none;
  }

  .seo-nav-hint {
    display: block;
    color: #55635a;
    font-size: 0.78rem;
  }

  .seo-header {
    padding: 0.7rem 0;
  }

  .seo-nav a {
    flex: 0 0 auto;
    flex-shrink: 0;
    min-height: 44px;
  }

  .seo-grid,
  .seo-info-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .seo-actions,
  .seo-button {
    width: 100%;
  }

  .seo-footer {
    padding-bottom: 2.5rem;
  }
}

/* Pantallas chicas (iPhone SE 375px y menores: 320/300/280px). */
@media (max-width: 480px) {
  .seo-shell {
    width: min(1120px, calc(100% - 1.75rem));
  }

  .seo-header {
    gap: 0.5rem;
    padding: 0.6rem 0;
  }

  .seo-nav {
    gap: 0.25rem;
  }

  .seo-nav a {
    padding: 0.5rem 0.6rem;
    font-size: 0.9rem;
  }

  .seo-main {
    padding-top: 1rem;
  }

  .seo-breadcrumb {
    margin-bottom: 0.9rem;
    font-size: 0.85rem;
  }

  .seo-hero {
    border-radius: 1.1rem;
  }

  .seo-hero h1 {
    font-size: clamp(1.45rem, 7.5vw, 2rem);
  }

  .seo-card,
  .seo-info {
    padding: 0.9rem;
  }

  .seo-card h3 {
    font-size: 1.1rem;
  }

  .seo-cta {
    padding: 1rem;
    border-radius: 0.9rem;
  }

  .seo-footer {
    gap: 0.5rem;
    font-size: 0.85rem;
  }

  .seo-footer-links {
    width: 100%;
    gap: 0.25rem 0.9rem;
  }
}

/* Textos largos (correos, URLs, tokens) nunca empujan el ancho de la página. */
.seo-page,
.seo-hero h1,
.seo-section h2,
.seo-card h3,
.seo-info h3,
.seo-info address,
.seo-copy p,
.seo-list li {
  overflow-wrap: break-word;
}

@media (prefers-reduced-motion: reduce) {
  .seo-button,
  .seo-card,
  .seo-info {
    transition: none;
  }
}

/* Botón "Ver ubicación en Maps" y similares fuera del bloque verde: fondo verde, texto blanco
   (antes eran blanco sobre el papel claro: casi invisibles). */
.seo-copy .seo-button-primary,
.seo-section .seo-button-primary {
  background: #2f4c3c;
  color: #fff;
}

/* ───────────── Modo oscuro (mismos colores que el inicio) ───────────── */
html.dark { color-scheme: dark; }

html.dark .seo-page {
  background: #121b16;
  color: #e9efe6;
}

html.dark .seo-page::before {
  background-image: radial-gradient(rgba(136, 192, 157, 0.07) 1px, transparent 1px);
}

html.dark .seo-header {
  border-bottom-color: #293529;
  background: rgba(18, 27, 22, 0.9);
}

html.dark .seo-brand,
html.dark .seo-nav a,
html.dark .seo-footer a,
html.dark .seo-breadcrumb a,
html.dark .seo-card a,
html.dark .seo-card i {
  color: #88c09d;
}

html.dark .seo-brand span { color: #a1b2a5; }

html.dark .seo-nav a:hover,
html.dark .seo-nav a:focus-visible,
html.dark .seo-card i { background: #223028; }

html.dark .seo-breadcrumb,
html.dark .seo-section > p,
html.dark .seo-card p,
html.dark .seo-info address,
html.dark .seo-copy p,
html.dark .seo-list,
html.dark .seo-cta p,
html.dark .seo-footer,
html.dark .seo-nav-hint { color: #a1b2a5; }

html.dark .seo-section h2,
html.dark .seo-card h3,
html.dark .seo-info h3 { color: #e9efe6; }

html.dark .seo-card,
html.dark .seo-info {
  border-color: #293529;
  background: #1a251e;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.35);
}

html.dark .seo-info { border-left-color: #88c09d; }

html.dark .seo-cta { background: #1f2d25; }

html.dark .seo-footer { border-top-color: #293529; }

html.dark .seo-cta .seo-button-primary,
html.dark .seo-copy .seo-button-primary,
html.dark .seo-section .seo-button-primary {
  background: #88c09d;
  color: #10231a;
}

html.dark .seo-page button:focus-visible,
html.dark .seo-page a:focus-visible { outline-color: rgba(224, 160, 92, 0.85); }

html.dark .seo-info p { color: #a1b2a5; }
html.dark .seo-info a { color: #88c09d; }

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 1rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  border-radius: 0.75rem;
  background: #2f4c3c;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}

.skip-link:focus { transform: translateY(0); }
html.dark .skip-link { background: #88c09d; color: #10231a; }
