/* ============================================================
   BOMI — Bank of the Marshall Islands
   Shared stylesheet — bomi.css
   ============================================================ */

/* ── Variables ── */
:root {
  --navy:       #0e2a45;
  --deep:       #071a2d;
  --teal:       #1a7a8a;
  --gold:       #c8a84b;
  --sand:       #f0ead8;
  --white:      #fafaf7;
  --text:       #e8e4d8;
  --muted:      #8ba8bc;
  --radius:     4px;
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
a { color: inherit; text-decoration: none; }

/* ── Base ── */
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  background: var(--deep);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Ocean texture overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(26,122,138,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 80%, rgba(14,42,69,0.4) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── Header ── */
header {
  position: relative;
  z-index: 10;
  background: linear-gradient(180deg, var(--deep) 0%, rgba(14,42,69,0.97) 100%);
  border-bottom: 1px solid rgba(200,168,75,0.25);
  padding: 0 clamp(1rem, 4vw, 3rem);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.2rem 0;
  min-height: 88px;   /* locks header height — prevents jump when font swaps in */
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  cursor: pointer;
}

.brand:hover .brand-logo {
  box-shadow: 0 0 0 2px rgba(200,168,75,0.4);
  border-radius: var(--radius);
}

.brand-logo {
  width: 120px;
  height: 60px;         /* explicit height prevents layout shift while GIF loads */
  background: transparent;
  flex-shrink: 0;
  transition: box-shadow var(--transition);
}

.brand-logo img {
  width: 120px;
  height: 60px;
  display: block;
  object-fit: contain;  /* keeps aspect ratio within the fixed box */
}

.brand-text h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.1rem, 2.2vw, 1.55rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1.15;
  /* Reserve space matching the web font before it loads.
     Georgia is a close-metric serif — reduces CLS from font swap. */
  font-family: Georgia, 'Times New Roman', serif;
}

.brand-text span {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 300;
}

.header-swift {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  text-align: right;
  line-height: 1.8;
}

.header-swift strong {
  color: var(--gold);
  font-weight: 400;
}

/* ── Ticker ── */
.ticker {
  background: var(--teal);
  overflow: hidden;
  height: 36px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 9;
}

.ticker-label {
  background: var(--gold);
  color: var(--deep);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}

.ticker-track {
  display: flex;
  animation: ticker 28s linear infinite;
  white-space: nowrap;
}

.ticker-track:hover { animation-play-state: paused; }

.ticker-track span {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--white);
  padding: 0 2rem;
}

.ticker-track a {
  color: var(--gold);
  font-weight: 600;
}

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,22,36,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(200,168,75,0.15);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0;
}

.nav-links li a {
  display: block;
  padding: 0.95rem 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--muted);
  transition: color var(--transition);
  position: relative;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  right: 50%;
  height: 2px;
  background: var(--gold);
  transition: left var(--transition), right var(--transition);
}

.nav-links li a:hover,
.nav-links li a.active { color: var(--white); }

.nav-links li a:hover::after,
.nav-links li a.active::after { left: 0.8rem; right: 0.8rem; }

.nav-social {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.nav-social a {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(200,168,75,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.75rem;
  transition: all var(--transition);
}

.nav-social a:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(200,168,75,0.08);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.8rem 0;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--muted);
  transition: all var(--transition);
}

/* ── Main layout ── */
.main-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 2rem;
  position: relative;
  z-index: 1;
}

/* ── Sidebar ── */
aside {
  position: sticky;
  top: 60px;
  align-self: start;
}

.side-section {
  background: rgba(14,42,69,0.6);
  border: 1px solid rgba(200,168,75,0.15);
  border-radius: var(--radius);
  padding: 1.2rem 1rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(8px);
}

.side-section h3 {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
  font-weight: 600;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(200,168,75,0.15);
}

.side-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.side-links li a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.76rem;
  padding: 0.38rem 0.3rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  border-radius: 2px;
  transition: all var(--transition);
}

.side-links li a::before {
  content: '›';
  color: var(--teal);
  font-size: 1rem;
  line-height: 1;
  transition: color var(--transition), transform var(--transition);
}

.side-links li a:hover {
  color: var(--white);
  background: rgba(26,122,138,0.12);
  padding-left: 0.6rem;
}

.side-links li a:hover::before {
  color: var(--gold);
  transform: translateX(2px);
}

/* External link indicator */
.side-links li a[target]::after {
  content: '↗';
  font-size: 0.6rem;
  color: var(--muted);
  margin-left: auto;
  opacity: 0.5;
}

/* ── Page hero (inner pages) ── */
.page-hero {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, rgba(14,42,69,0.95) 0%, rgba(26,122,138,0.25) 100%),
              url('../images/Backgrounds/1/3.jpg') center / cover no-repeat;
  padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(200,168,75,0.15);
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.4;
}

.page-hero-inner { max-width: 1200px; margin: 0 auto; }

.breadcrumb {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb a { color: var(--gold); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb span { color: rgba(200,168,75,0.5); }

.page-hero h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 500;
  color: var(--white);
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

.page-hero p {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  max-width: 480px;
  line-height: 1.7;
}

/* ── Content section ── */
.content-section {
  background: rgba(14,42,69,0.45);
  border: 1px solid rgba(200,168,75,0.1);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.2rem;
  backdrop-filter: blur(6px);
}

.content-section h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 0.8rem;
  letter-spacing: 0.02em;
}

.content-section p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.8;
}

/* ── Back to top ── */
.back-top {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--transition);
  cursor: pointer;
  border: none;
  background: none;
}

.back-top:hover { color: var(--gold); }
.back-top svg { transition: transform var(--transition); }
.back-top:hover svg { transform: translateY(-2px); }

/* ── Footer ── */
footer {
  background: var(--deep);
  border-top: 1px solid rgba(200,168,75,0.15);
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem clamp(1rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-inner p {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

#clock {
  font-size: 0.7rem;
  color: var(--gold);
  font-family: system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  letter-spacing: 0.1em;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .main-wrap { grid-template-columns: 1fr; }

  aside {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(7,26,45,0.98);
    border-bottom: 1px solid rgba(200,168,75,0.2);
    padding: 0.5rem 0;
  }

  .nav-links.open { display: flex; }
  .nav-links li a { padding: 0.9rem 1.5rem; }
  .nav-toggle { display: flex; }
  .nav-inner { position: relative; }
  .header-swift { display: none; }
}

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

/* ── Jump nav (shared across inner pages) ── */
.jump-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.jump-nav a {
  display: inline-block;
  padding: 0.45rem 1rem;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid rgba(200,168,75,0.25);
  border-radius: 2px;
  color: var(--muted);
  transition: all var(--transition);
  backdrop-filter: blur(4px);
}

.jump-nav a:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(200,168,75,0.06);
}

/* ── Disclaimer (shared across inner pages) ── */
.disclaimer {
  margin-top: 0.8rem;
  font-size: 0.7rem;
  color: var(--muted);
  opacity: 0.65;
  letter-spacing: 0.03em;
  line-height: 1.6;
  font-style: italic;
}

/* ── Back to top (shared) ── */
.back-top {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--transition);
  cursor: pointer;
  border: none;
  background: none;
}

.back-top:hover { color: var(--gold); }
.back-top svg { transition: transform var(--transition); }
.back-top:hover svg { transform: translateY(-2px); }