/* ============================================================
   styles_static.css — shared stylesheet for all static pages.
   ============================================================ */

:root {
  --pa-black:   #000000;
  --pa-white:   #ffffff;
  --pa-surface: #111111;
  --pa-surface-2: #161616;
  --pa-border:  #2a2a2a;
  --pa-text:    #e8e8e8;
  --pa-muted:   #9a9a9a;
  --pa-url:     #687FAD;
  --pa-head-h:  52px;
}

* { box-sizing: border-box; }

html {
  height: 100%;
}
body {
  margin: 0; padding: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  color: #111111;
  font-family: 'Roboto Mono', 'Courier New', monospace !important;
  font-size: 16px; line-height: 1.6;
}

/* Global Roboto Mono override — matches Ionic app's RobotoMono-Regular global font */
main, main *, h1, h1 *, h2, h2 *, h3, h3 *, h4, h4 *, span, p, a, strong, li, iframe, .info-box, .info-box *,
.site-head, .site-head *, .nav-link, .drawer-link, .pa-footer, .pa-footer * {
  font-family: 'Roboto Mono', 'Courier New', monospace !important;
}

a { color: var(--pa-url); text-decoration: none; }
a:hover { color: #8aa0c8; }
hr { border: none; border-top: 1px solid var(--pa-border); margin: 18px 0; }

/* ── desktop / mobile visibility switch ── */
.desktop-only { display: block; }
.mobile-only  { display: none; }
@media (max-width: 820px) {
  .desktop-only { display: none; }
  .mobile-only  { display: block; }
}

/* ============================================================
   HEADER  (ported from site-header.component)
   ============================================================ */
#site-header { min-height: var(--pa-head-h); background: var(--pa-black); }

.site-head {
  background: var(--pa-black);
  box-shadow: none;
  position: sticky; top: 0; z-index: 1000;
}
.site-head__row {
  display: flex; align-items: center; flex-wrap: nowrap;
  height: var(--pa-head-h);
  margin: 0 28px;
}
.site-head__logo { display: flex; align-items: center; }
.site-head__logo img { height: 30px; width: auto; display: block; }
.site-head__spacer { flex: 1; }
.site-head__nav { display: flex; gap: 22px; align-items: center; }

.nav-link {
  color: var(--pa-white);
  text-decoration: none;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.5px;
}
.nav-link:hover { color: var(--pa-url); }

/* hamburger */
.hamburger {
  background: none; border: none; color: var(--pa-white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 8px; margin: -8px;
}
.hamburger:active { color: var(--pa-url); }
@media (max-width: 820px) { .site-head__row { margin: 0 16px; height: 48px; } #site-header { min-height: 48px; } }

/* slide-out drawer */
.mobile-drawer { position: fixed; inset: 0; z-index: 10000; visibility: hidden; }
.mobile-drawer.open { visibility: visible; }
.mobile-drawer-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.6);
  opacity: 0; transition: opacity .25s ease;
}
.mobile-drawer.open .mobile-drawer-backdrop { opacity: 1; }
.mobile-drawer-panel {
  position: absolute; top: 0; right: 0; height: 100%;
  width: 80%; max-width: 320px;
  background: var(--pa-black);
  border-left: .5px solid var(--pa-border);
  transform: translateX(100%); transition: transform .28s ease;
  display: flex; flex-direction: column; padding: 14px 0 24px;
}
.mobile-drawer.open .mobile-drawer-panel { transform: translateX(0); }
.mobile-drawer-close {
  align-self: flex-end; margin: 0 16px 8px;
  background: none; border: none; color: #888;
  font-size: 20px; cursor: pointer; padding: 8px;
}
.mobile-drawer-close:active { color: var(--pa-url); }
.drawer-link {
  display: flex; align-items: center; min-height: 50px; padding: 0 24px;
  color: var(--pa-white); text-decoration: none;
  font-size: 15px; font-weight: 300; letter-spacing: .5px;
  border-bottom: .5px solid #161616;
}
.drawer-link:active { color: var(--pa-url); background: var(--pa-surface); }

/* ============================================================
   PAGE CONTENT CONTAINER & DESIGN LAYOUT
   ============================================================ */
main {
  display: block;
  width: 100%;
  max-width: 1350px;
  margin: 0 auto;
  padding: 28px 32px 60px;
  background: #ffffff;
  color: #111111;
  flex: 1;
}

/* UNIFIED CONTAINER GRID LAYOUT SYSTEM */
.page-grid-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: start; /* Pin columns to absolute top */
  width: 100%;
}

.page-left-sidebar {
  grid-column: 1;
}

.page-right-content {
  grid-column: 2;
  min-width: 0;
}

/*
   ABSOLUTE HEIGHT ALIGNMENT RESET
   Forces the first right-hand element—whether it is an intro block,
   a section header h2, or a sub-div—to drop its browser margin entirely,
   perfectly anchoring its top border with the left-hand info-box.
*/
.page-left-sidebar > *:first-child,
.page-right-content > *:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Clear margins on heading text or paragraph text inside the first right element block */
.page-right-content > h2:first-child,
.page-right-content > .intro:first-child p:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* LAYER DEPTH CONTROL OVERRIDES */
.toggle-icon-btn {
  position: fixed;
  top: calc(var(--pa-head-h) + 10px);
  left: 12px;
  z-index: 1001;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: var(--pa-white);
  border: none;
  outline: none;
  border-radius: 0;
  cursor: pointer;
}
.toggle-icon-btn img {
  width: 100%;
  height: 100%;
  filter: none;
}
.icon-btn-right {
  position: fixed; top: calc(var(--pa-head-h) + 10px); right: 12px; z-index: 1001;
  width: 39px; height: 39px; overflow: hidden;
  background: transparent; border: none; border-radius: 0;
}
.toggle-box {
  position: fixed; top: calc(var(--pa-head-h) + 58px); left: 12px; z-index: 89;
  max-width: 280px; max-height: 70vh; overflow-y: auto;
  background: var(--pa-black); border: 1px solid var(--pa-border);
  border-radius: 0; padding: 10px 6px;
  display: none;
}
.toggle-box.open, .toggle-box[style*="block"] { display: block; }
.toggle-box ul { list-style: none; margin: 0; padding: 0; }
.toggle-box a { display: block; padding: 7px 12px; font-size: 13px; color: #fff; border-radius: 0; }
.toggle-box a:hover { background: rgba(104,127,173,.18); color: var(--pa-url); }

/* ── LAYOUT SUB-COMPONENTS ── */
.page-head { margin: 4px 0 22px; width: 100%; }
.page-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 30px; font-weight: 700; color: #111; margin: 0;
}
.page-title__icon { max-height: 50px; width: auto; }

.info-box {
  width: 100%;
  background: #ffffff;
  border: 1px solid #e2e2e2;
  border-radius: 0;
  padding: 16px;
}
/* Ensure the first element inside the infobox is never glued to the top edge */
.info-box > *:first-child {
  margin-top: 8px !important;
}
.intro { min-width: 0; }
.intro p { margin: 0 0 12px; }
.intro__note { color: #666; font-size: 13px; }
main a { color: var(--pa-url); }
main a:hover { color: #283C70; }

.info-box h3 {
  margin: 16px 0 6px; font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: #111;
}
.info-box h3:first-child { margin-top: 0; }
.info-box p { margin: 5px 0; font-size: 14px; color: #222; }
.info-box strong { color: #111; }

.info-box p a {
  display: inline;
  background: transparent;
  color: var(--pa-url);
  text-decoration: none;
  padding: 0; border-radius: 0; font-size: 14px;
  transition: color .15s; font-weight: 500;
}
.info-box p a:hover { color: #283C70; text-decoration: underline; }

.image-box-container, .video-box-container { margin: 0 0 14px; }
.image-box-container figure { margin: 0; }
.image-box-container img, .video-box-container img { width: 100%; height: auto; border-radius: 0; background: #fff; display: block; }
figcaption { margin-top: 6px; font-size: 12px; color: #777; text-align: center; }

main h2 {
  font-size: 22px; font-weight: 600; margin: 30px 0 14px; color: #111;
  padding-bottom: 10px; border-bottom: 1px solid #e2e2e2;
  scroll-margin-top: calc(var(--pa-head-h) + 20px);
}

/* ============================================================
   METRIC BLOCKS GRID SETUP
   ============================================================ */
.featured-articles { margin: 4px 0 30px; }
.pa-block-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--pa-block-w, 320px));
  justify-content: center;
  gap: 30px 22px;
}
@media (max-width: 1380px) { .pa-block-grid { grid-template-columns: repeat(auto-fill, var(--pa-block-w, 320px)); } }
@media (max-width: 740px)  { .pa-block-grid { --pa-block-w: 100%; grid-template-columns: 1fr; } }

.pa-block {
  display: flex; flex-direction: column;
  background: #ffffff; border: .5px solid var(--pa-border);
  overflow: hidden; transition: transform .28s ease, box-shadow .28s ease; border-radius: 0;
}
.pa-block:hover { transform: translateY(-6px); box-shadow: 0 14px 34px rgba(0,0,0,.18); }
.pa-block__thumb {
  position: relative; display: block; width: 100%;
  height: var(--pa-block-h, 135px); overflow: hidden; background: #000; text-decoration: none;
}
.pa-block__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease; }
.pa-block:hover .pa-block__thumb img { transform: scale(1.07); }
.pa-block__body { display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1; padding: 11px 12px 13px; }
.pa-block__title { color: #000; font-size: 12.5px; font-weight: 500; line-height: 1.35; margin-bottom: 11px; }
.pa-block__cta { margin-top: auto; }
.pa-block__btn {
  display: inline-block; background: transparent; color: var(--pa-url);
  border: 1px solid var(--pa-url); padding: 7px 18px; font-size: 10px; font-weight: 500;
  letter-spacing: 1px; text-transform: uppercase; text-decoration: none; border-radius: 0;
}
.pa-block__btn:hover { background: var(--pa-url); color: #fff; }

.metric-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px; margin: 6px 0 26px;
}
.metric-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid #e2e2e2; border-radius: 0; background: #fff; color: #111;
  transition: border-color .15s, background .15s; text-decoration: none;
}
.metric-card:hover { border-color: var(--pa-url); background: #f7f9fc; }
.metric-card__icon { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }
.metric-card__title { font-size: 14px; line-height: 1.35; color: #111; }

/* ── TIMELINE OF CITIES ── */
.city-map { width: 100%; height: 220px; border-radius: 0; border: 1px solid #e2e2e2; margin-top: 6px; }
.after-sections { clear: both; grid-column: 1 / -1; padding-top: 24px; width: 100%; }
.timeline { position: relative; max-width: 900px; margin: 8px auto 0; padding: 20px 0; }
.timeline-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: #cfd6e4; transform: translateX(-50%); }
.timeline-entry { position: relative; display: flex; align-items: center; margin-bottom: 24px; min-height: 60px; }
.timeline-entry.side-left  { justify-content: flex-start; }
.timeline-entry.side-right { justify-content: flex-end; }
.timeline-card { background: #fff; color: #111; border: 1px solid #e2e2e2; border-radius: 0; padding: 12px 16px; width: 42%; }
.timeline-icon { width: 32px; height: 32px; object-fit: contain !important; flex-shrink: 0; }
.timeline-year { font-weight: 700; font-size: 14px; }
.timeline-dot { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--pa-url); transform: translate(-50%, -50%); }

/* ============================================================
   SHARED DARK NAVIGATION COMPONENTS
   ============================================================ */
.pa-region-bar {
  width: 100%; background: var(--pa-black); border-top: 1px solid var(--pa-border); padding: 40px 28px 20px;
}
.pa-region-bar__inner { max-width: 1100px; margin: 0 auto; }
.pa-region-bar__title {
  font-family: 'Roboto Mono', 'Courier New', monospace !important; font-size: 16px !important; font-weight: 700;
  color: var(--pa-white) !important; text-transform: uppercase; letter-spacing: 0.08em;
  margin: 0 0 20px 0 !important; padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}
.pa-region-bar__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px 24px; }
.pa-region-bar__grid a { font-family: 'Roboto Mono', 'Courier New', monospace !important; font-size: 13px; color: var(--pa-url); transition: color 0.15s, padding-left 0.15s; }
.pa-region-bar__grid a:hover { color: #8aa0c8; padding-left: 4px; }

.pa-footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 28px;
  padding: 22px 28px; background: var(--pa-black); border-top: .5px solid var(--pa-border); width: 100%;
}
.pa-footer__copy {
  font-size: 11px; color: var(--pa-white); font-weight: 400; letter-spacing: .5px; opacity: .55;
  font-family: 'Roboto Mono', 'Courier New', monospace !important;
}
.pa-footer__policy { display: flex; gap: 18px; }
.pa-footer__policy a { font-size: 11px; color: var(--pa-url); text-decoration: none; letter-spacing: .3px; font-weight: 400; }
.pa-footer__policy a:hover { text-decoration: underline; }
.pa-footer__social { display: flex; gap: 14px; }
.pa-footer__social a { color: var(--pa-white); opacity: .6; display: flex; }
.pa-footer__social a:hover { opacity: 1; color: var(--pa-url); }
.pa-footer__social svg { width: 18px; height: 18px; }

/* ============================================================
   RESPONSIVE DESIGN SYSTEM OVERRIDES
   ============================================================ */
@media (max-width: 820px) {
  /* 1. Frame the main page container and clear the sticky header */
  main {
    padding: 18px 16px 48px !important;
    margin-top: 16px !important;
  }

  /* 2. PROTECTED ZONE FOR TITLES: Prevents overlap with top-left and top-right buttons */
  /* Update your global .page-head definition to protect desktop/tablet layout sweeps */
.page-head {
  margin: 4px 0 22px;
  width: 100%;
  padding-left: 60px;   /* Safe margin clearing the left button */
  padding-right: 60px;  /* Safe margin clearing the right button */
}

/* ============================================================
   RESPONSIVE DESIGN SYSTEM OVERRIDES (FIXED NESTING SYNTAX)
   ============================================================ */
@media (max-width: 820px) {
  /* 1. Frame the main page container and clear the sticky header */
  main {
    padding: 18px 16px 48px !important;
    margin-top: 16px !important;
  }

  /* 2. PROTECTED ZONE FOR TITLES ON MOBILE: Absolute clearing of floating side buttons */
  .page-head {
    margin: 0 0 22px 0 !important;
    padding-left: 54px !important;  /* Clears the toggle-icon-btn layer */
    padding-right: 54px !important; /* Clears the icon-btn-right layer */
    width: 100% !important;
  }

  .main-text h1,
  .page-title {
    font-size: 22px !important;
    line-height: 1.3 !important;
    margin-top: 0 !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
    text-align: center !important;
    visibility: visible !important;
    word-break: break-word !important;
  }

  /* 3. Standard mobile single-column stacking rules */
  .page-grid-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .page-left-sidebar {
    order: 1;
    width: 100%;
    margin-top: -12px;
  }
  .page-right-content {
    order: 2;
    width: 100%;
  }

  /* 4. Menu drawer and footer utility blocks */
  .toggle-box { max-width: calc(100vw - 24px); }
  .pa-region-bar { padding: 28px 16px 16px; }
  .pa-region-bar__grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px 16px; }
}

@media (max-width: 768px) {
  .timeline-line { left: 30px; }
  .timeline-dot  { left: 30px; }
  .timeline-entry.side-left, .timeline-entry.side-right { justify-content: flex-start; }
  .timeline-entry.side-left .timeline-card, .timeline-entry.side-right .timeline-card { margin-left: 60px; width: calc(100% - 80px); }
}

/* ============================================================
   GLOBAL UTILITIES, FLAGS, AND VIDEO FIXES
   ============================================================ */
.flag-image,
img[src*="flag"] {
    display: block;
    margin: 0 auto;
    max-width: 150px;
    height: auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.video-box-container.pa-block--video .pa-block__thumb {
    position: relative;
    width: 100%;
    height: auto;
    max-height: 180px;
    overflow: hidden;
    display: block;
}

.video-box-container.pa-block--video .pa-block__thumb:hover .pa-block__play {
    background: var(--pa-url);
    transform: translate(-50%, -50%) scale(1.08);
}

.video-box-container {
  position: relative;
  width: 100%;
  margin-bottom: 14px;
}

.video-box-container .pa-block__thumb {
  position: relative;
  width: 100%;
  height: auto;
  display: block;
  overflow: hidden;
  background: #000;
}

.video-box-container .pa-block__thumb img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.video-box-container .pa-block__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s ease, transform 0.2s ease;
}

.video-box-container .pa-block__thumb:hover .pa-block__play {
  background: var(--pa-url) !important;
  transform: translate(-50%, -50%) scale(1.08);
}
@media (max-width: 768px) {
  .timeline-line { left: 30px; }
  .timeline-dot  { left: 30px; }
  .timeline-entry.side-left, .timeline-entry.side-right { justify-content: flex-start; }
  .timeline-entry.side-left .timeline-card, .timeline-entry.side-right .timeline-card { margin-left: 60px; width: calc(100% - 80px); }
}

/* Flag Image Styles */
.flag-image,
img[src*="flag"] {
    display: block;       /* Horizontal centralization adjustment marker */
    margin: 0 auto;       /* Align perfectly center within container boundaries */
    max-width: 150px;     /* Protect flag sizes against container scaling blowout */
    height: auto;
    /* Dynamic canvas overlay shadow layer resolving white fields on white text blocks */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Ensure the infobox video container supports absolute overlay positioning metrics */
.video-box-container.pa-block--video .pa-block__thumb {
    position: relative;
    width: 100%;
    height: auto; /* Allow image aspect ratio to dictate bounds or set fixed if required */
    max-height: 180px;
    overflow: hidden;
    display: block;
}

/* Ensure the absolute link transitions smoothly during hover events */
.video-box-container.pa-block--video .pa-block__thumb:hover .pa-block__play {
    background: var(--pa-url);
    transform: translate(-50%, -50%) scale(1.08);
}

/* ============================================================
   INFOBOX VIDEO OVERLAY FIXES
   ============================================================ */
.video-box-container {
  position: relative; /* CRITICAL: Establishes coordinate space for the absolute play button */
  width: 100%;
  margin-bottom: 14px;
}

.video-box-container .pa-block__thumb {
  position: relative;
  width: 100%;
  height: auto;
  display: block;
  overflow: hidden;
  background: #000;
}

.video-box-container .pa-block__thumb img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Force the play arrow anchor into the exact center line */
.video-box-container .pa-block__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Centers the element perfectly on its axis */
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #000000; /* Solid black base matching tokens */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s ease, transform 0.2s ease;
}

/* Hover effect mapping */
.video-box-container .pa-block__thumb:hover .pa-block__play {
  background: var(--pa-url) !important;
  transform: translate(-50%, -50%) scale(1.08);
}

/* Ensure iframes in the icon buttons have no scrollbars or borders */
.icon-btn-right iframe {
    border: none !important;
    overflow: hidden !important;
}
.icon-btn-right iframe::-webkit-scrollbar { display: none; }
