/* --- Document Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 17px;
  line-height: 1.6;
  font-family: var(--ao-font-body);
  background-color: var(--ao-paper);
  color: var(--ao-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  hyphens: auto;
}

/* Tabular figures for numbers, ratings, times */
.ao-num, .ao-rating-val, .ao-hours-time, .ao-stat-number {
  font-variant-numeric: tabular-nums;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ao-font-heading);
  color: var(--ao-ink);
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: var(--ao-space-4);
  hyphens: manual;
}

h1 { font-size: 2.25rem; font-weight: 700; }
h2 { font-size: 1.65rem; font-weight: 600; margin-top: var(--ao-space-6); }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }

p {
  margin-top: 0;
  margin-bottom: var(--ao-space-4);
  color: var(--ao-ink-2);
}

a {
  color: var(--ao-brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover, a:focus-visible {
  color: var(--ao-brand-ink);
}

/* Focus indicator */
:focus-visible {
  outline: 3px solid var(--ao-focus);
  outline-offset: 2px;
}

/* Skip link */
.ao-skip-link {
  position: absolute;
  top: -999px;
  left: 16px;
  background: var(--ao-brand);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--ao-radius-card);
  z-index: 99999;
  text-decoration: none;
  font-weight: 600;
}
.ao-skip-link:focus {
  top: 16px;
}

/* Layout container */
.ao-container {
  width: 100%;
  max-width: var(--ao-width-content);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--ao-space-4);
  padding-right: var(--ao-space-4);
}

.ao-main {
  flex: 1 0 auto;
}

/* Header */
.ao-header {
  height: 64px;
  background: var(--ao-surface);
  border-bottom: 1px solid var(--ao-line);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.ao-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.ao-logo {
  display: flex;
  align-items: center;
  gap: var(--ao-space-3);
  text-decoration: none;
  color: var(--ao-ink);
}

.ao-logo svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.ao-logo-text {
  font-family: var(--ao-font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.ao-nav {
  display: flex;
  align-items: center;
  gap: var(--ao-space-5);
}

.ao-nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--ao-space-5);
}

.ao-nav-link {
  color: var(--ao-ink-2);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: var(--ao-space-2) var(--ao-space-1);
}

.ao-nav-link:hover, .ao-nav-link:focus-visible {
  color: var(--ao-brand);
}

.ao-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ao-space-2);
  min-height: 44px;
  padding: 0 var(--ao-space-5);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--ao-radius-chip);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ao-btn-primary {
  background: var(--ao-brand);
  color: #ffffff;
}
.ao-btn-primary:hover, .ao-btn-primary:focus-visible {
  background: var(--ao-brand-ink);
  color: #ffffff;
}

.ao-btn-secondary {
  background: var(--ao-surface);
  color: var(--ao-ink);
  border-color: var(--ao-line);
}
.ao-btn-secondary:hover, .ao-btn-secondary:focus-visible {
  background: var(--ao-paper);
  border-color: var(--ao-muted);
}

/* Footer */
.ao-footer {
  background: var(--ao-surface);
  border-top: 1px solid var(--ao-line);
  margin-top: var(--ao-space-8);
  padding-top: var(--ao-space-7);
  padding-bottom: var(--ao-space-6);
  color: var(--ao-muted);
  font-size: 0.9rem;
}

.ao-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--ao-space-6);
  margin-bottom: var(--ao-space-7);
}

@media (max-width: 860px) {
  .ao-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .ao-footer-grid {
    grid-template-columns: 1fr;
  }
}

.ao-footer-col h4 {
  color: var(--ao-ink);
  font-family: var(--ao-font-body);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: var(--ao-space-3);
  text-transform: none;
}

.ao-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ao-footer-links li {
  margin-bottom: var(--ao-space-2);
}

.ao-footer-links a {
  color: var(--ao-muted);
  text-decoration: none;
}

.ao-footer-links a:hover, .ao-footer-links a:focus-visible {
  color: var(--ao-brand);
  text-decoration: underline;
}

.ao-footer-bottom {
  border-top: 1px solid var(--ao-line);
  padding-top: var(--ao-space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ao-muted);
  font-size: 0.85rem;
}

/* Standard Editorial Page Template */
.ao-article {
  max-width: var(--ao-width-reading);
  margin: var(--ao-space-6) auto;
  padding: 0 var(--ao-space-4);
}

.ao-article-header {
  margin-bottom: var(--ao-space-6);
}

.ao-article-content {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ao-ink);
}

.ao-article-content h2 {
  border-bottom: 1px solid var(--ao-line);
  padding-bottom: var(--ao-space-2);
  margin-top: var(--ao-space-7);
}

.ao-article-content ul, .ao-article-content ol {
  padding-left: var(--ao-space-5);
  margin-bottom: var(--ao-space-5);
}

.ao-article-content li {
  margin-bottom: var(--ao-space-2);
}

/* Breadcrumbs */
.ao-breadcrumbs {
  font-size: 0.85rem;
  color: var(--ao-muted);
  margin: var(--ao-space-4) 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ao-space-2);
}

.ao-breadcrumbs a {
  color: var(--ao-muted);
  text-decoration: none;
}
.ao-breadcrumbs a:hover {
  color: var(--ao-brand);
  text-decoration: underline;
}

.ao-breadcrumbs-sep {
  color: var(--ao-line);
  user-select: none;
}

/* Mobile Nav Toggle */
.ao-menu-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ao-ink);
  padding: var(--ao-space-2);
}

@media (max-width: 768px) {
  .ao-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .ao-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--ao-surface);
    border-bottom: 1px solid var(--ao-line);
    flex-direction: column;
    padding: var(--ao-space-4);
    box-shadow: var(--ao-shadow-md);
  }
  .ao-nav.is-open {
    display: flex;
  }
  .ao-nav-list {
    flex-direction: column;
    width: 100%;
    gap: var(--ao-space-2);
  }
}

.ao-footer-h{color:var(--ao-ink);font-family:var(--ao-font-body);font-size:.95rem;font-weight:600;margin:0 0 12px}
/* Atlas de Opiniones r1 layout refinements. */
.ao-header-search{display:flex;align-items:center;gap:.35rem;max-width:230px}
.ao-header-search input{min-width:0;width:145px;padding:.55rem;border:1px solid var(--ao-line);border-radius:8px;font:inherit}
.ao-header-search button{border:0;background:transparent;color:var(--ao-brand-ink);font:inherit;font-weight:700;cursor:pointer}
@media(max-width:1050px){.ao-menu-toggle{display:inline-flex;align-items:center;justify-content:center}.ao-nav{display:none;position:absolute;top:64px;left:0;right:0;background:var(--ao-surface);border-bottom:1px solid var(--ao-line);flex-direction:column;align-items:stretch;padding:var(--ao-space-4);box-shadow:var(--ao-shadow-md)}.ao-nav.is-open{display:flex}.ao-nav-list{flex-direction:column;width:100%;gap:var(--ao-space-2)}.ao-header-search{max-width:none;width:100%}.ao-header-search input{width:100%}}
