/**
 * PNAO IT Asset Register — theme overrides for Olivero base theme.
 * Shares brand tokens with the PNAO Training site (pnao_training theme).
 * Primary brand: #003366 = hsl(210, 100%, 20%)
 */

/* ── 1. Remap Olivero's primary color cascade to PNA blue ──
   Override both the base variables AND the computed shades directly.
   Olivero's :root block defines computed shades (primary-30 through primary-80)
   using var() references. We override those shades explicitly here to guarantee
   PNA blue renders regardless of cascade order. */
:root {
  --color--primary-hue: 210;
  --color--primary-saturation: 100%;
  --color--primary-lightness: 20;
  --color--primary-30: #001d3d;  /* darkest */
  --color--primary-40: #002244;  /* dark */
  --color--primary-50: #003366;  /* PNA blue — base */
  --color--primary-60: #0055aa;  /* medium */
  --color--primary-80: #99c2e8;  /* light */
}

/* ── 1b. Site branding gradient — Olivero hardcodes this in header-site-branding.css ── */
.site-branding,
[dir="rtl"] .site-branding {
  background-image: none;
  background-color: #003366;
}

/* ── 2. Site header ── */

/* Left accent strip */
.site-header__initial {
  background-color: #003366;
}

/* Main nav bar — Olivero defaults this to white.
   !important required: Olivero's var(--color--white) wins specificity battles
   due to how Drupal aggregates and orders CSS from base + sub-theme. */
.site-header__inner {
  background: #003366 !important;
  border-bottom: 3px solid #c8a84b;
}

/* Site name / logo link */
.site-branding__name a,
.site-branding__name {
  color: #ffffff !important;
}

.site-branding__name a:hover {
  color: #c8a84b !important;
  text-decoration: none;
}

/* ── 3. Header nav container (header-navigation.css sets this to white) ── */
.header-nav {
  background-color: #003366 !important;
  border-block-start-color: #003366 !important;
}

/* ── 4. Primary navigation ── */

/* Scope white to links inside the header bar only */
.site-header__inner .primary-nav__menu-link,
.site-header__inner .primary-nav__menu-link--has-children,
.site-header__inner .secondary-nav__menu-link {
  color: #ffffff;
}

.site-header__inner .primary-nav__menu-link:hover,
.site-header__inner .primary-nav__menu-link:focus,
.site-header__inner .primary-nav__menu-link--active-trail,
.site-header__inner .secondary-nav__menu-link:hover,
.site-header__inner .secondary-nav__menu-link:focus {
  color: #c8a84b;
}

/* Dropdown backgrounds */
.primary-nav__menu--level-2 {
  background-color: #002244;
}

.primary-nav__menu--level-2 .primary-nav__menu-link {
  color: #e0eaf5;
}

.primary-nav__menu--level-2 .primary-nav__menu-link:hover {
  background-color: #003366;
  color: #c8a84b;
}

/* ── 4. Mobile navigation toggle ── */
.mobile-nav-button,
.mobile-nav-button__label {
  color: #ffffff;
}

/* ── 5. Links ── */
a {
  color: #003f80;
}

a:hover,
a:focus {
  color: #002244;
}

a:visited {
  color: #5c2d82;
}

/* ── 6. Buttons ── */
.button,
.button--primary {
  background-color: #003366;
  border-color: #003366;
  color: #ffffff;
}

.button:hover,
.button--primary:hover {
  background-color: #002244;
  border-color: #002244;
  color: #ffffff;
}

/* ── 7. Page title ── */
.page-title {
  color: #003366;
}

/* ── 8. Hero / highlighted region ── */
.region-highlighted {
  background-color: #e8f0f9;
  border-left: 4px solid #003366;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

/* ── 9. Footer ── */
.site-footer {
  background-color: #001a33;
  color: #c8d8e8;
}

.site-footer a {
  color: #7ab3e0;
}

.site-footer a:hover {
  color: #c8a84b;
}

/* ── 9b. PNA footer cards ── */
.pnao-footer .site-footer__inner {
  padding-block: 2.5rem 1.25rem;
}

.pnao-footer__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .pnao-footer__cards {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.pnao-footer__card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.pnao-footer__card-icon {
  color: #c8a84b;
  margin-bottom: .25rem;
}

.pnao-footer__address {
  font-style: normal;
  line-height: 1.7;
  color: #c8d8e8;
  font-size: .9rem;
}

.pnao-footer__address strong {
  display: block;
  color: #ffffff;
  margin-bottom: .35rem;
  font-size: .95rem;
}

.pnao-footer__card-heading {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #c8a84b;
  margin: 0 0 .5rem;
}

.pnao-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.pnao-footer__links li::before {
  content: '→ ';
  color: #c8a84b;
  font-size: .8em;
}

.pnao-footer__links a {
  font-size: .9rem;
}

.pnao-footer__contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.pnao-footer__contact li {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .9rem;
}

.pnao-footer__contact-icon {
  color: #c8a84b;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.pnao-footer__copyright {
  text-align: center;
  font-size: .8rem;
  color: #7a9ab8;
  border-top: 1px solid #0d2d4a;
  padding-top: 1.25rem;
}

/* ── 10. Site name — prevent wrapping on mobile ── */
.site-branding__name {
  white-space: nowrap;
  font-size: 1rem;
}

@media (min-width: 43.75rem) {
  .site-branding__name {
    font-size: 1.75rem;
  }
}

/* ── 11. Logo — responsive sizing matches Olivero's breakpoints ── */
.site-branding__logo img {
  width: auto;
  max-height: 36px; /* mobile */
}

@media (min-width: 43.75rem) {
  .site-branding__logo img {
    max-height: 48px; /* tablet */
  }
}

@media (min-width: 75rem) {
  .site-branding__logo img {
    max-height: 60px; /* desktop */
  }
}

/* ── 12. Quiz link cards on home page ── */
.quiz-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.25rem 0 1.75rem;
}

@media (max-width: 600px) {
  .quiz-links { grid-template-columns: 1fr; }
}

.quiz-link {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 1.1rem 1.25rem;
  border-radius: 8px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: border-color .15s, box-shadow .15s;
}

.quiz-link:hover {
  border-color: #c8a84b;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  text-decoration: none;
}

.quiz-link--industry { background: #e8f0ff; }
.quiz-link--observer { background: #eaf0e8; }

.quiz-link__label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #003366;
}

.quiz-link__title {
  font-size: 1rem;
  font-weight: 700;
  color: #003366;
  line-height: 1.3;
}

.quiz-link__meta {
  font-size: .78rem;
  color: #555;
  margin-top: .1rem;
}
