/* -----------------------------------
   CertaBIM Global Stylesheet
   ----------------------------------- */

/* -----------------------------------
   Font Face: Montserrat (woff2 only)
   ----------------------------------- */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/montserrat-v29-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/montserrat-v29-latin-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/montserrat-v29-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/montserrat-v29-latin-700italic.woff2') format('woff2');
}

/* -----------------------------------
   CSS Variables & Themes
   ----------------------------------- */
:root {
  --marine-blue: #002855;
  --gr-blue: #0D5EAF;
  --royal-blue: #305CDE;
  --old-glory-blue: #0A3161;
  --old-glory-red: #B31942;
  --highlight-red: #ff6666;
  --accent-white: #ffffff;
  --text-color: var(--accent-white);
  --background-color: var(--marine-blue);
  --link-color: var(--highlight-red);
  --heading-color: var(--royal-blue);
}

@media (prefers-color-scheme: light) {
  :root {
    --marine-blue: #f6f8fa;
    --highlight-red: #bf0a30;
    --accent-white: #000000;
    --text-color: #000000;
    --background-color: #f6f8fa;
    --link-color: #bf0a30;
    --heading-color: var(--royal-blue);
  }
}

/* -----------------------------------
   Reset & Core Layout
   ----------------------------------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: 'Montserrat', 'Segoe UI', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  text-align: left;
  line-height: 1.5;  
}

/* -----------------------------------
   Page Structure
   ----------------------------------- */
/* Sticky Header */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--background-color);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Header content layout */
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0.5em 0;
}

/* Brand Logo */
.brand {
  display: flex;
  align-items: center;
}
.brand img {
  max-height: 48px;
}

/* Navigation */
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5em;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--link-color);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}
.site-nav a:hover {
  color: var(--highlight-red);
}

/* Responsive Nav (stack on small screens) */
@media (max-width: 600px) {
  .site-nav ul {
    flex-direction: column;
    align-items: center;
    margin-top: 1em;
  }
}
   
.site-header,
.site-footer {
  width: 100%;
  background-color: var(--background-color);
  padding: 1rem 0;
  text-align: center;
}

.site-main {
  flex: 1;
  width: 100%;
}

.container {
  width: 90%;
  max-width: 850px;
  margin: 0 auto;
  padding: 2em 1rem;
}

.header-content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* -----------------------------------
   Logo Handling (Light/Dark)
   ----------------------------------- */
.logo {
  max-width: 180px;
  margin-bottom: 0;
}
   
/* Scoped logo sizing for header */
.site-header .logo {
  max-height: 120px;
  max-width: none;
  margin-bottom: 0;
}

.logo-light {
  display: inline;
}

.logo-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .logo-light {
    display: none;
  }
  .logo-dark {
    display: inline;
  }
}

/* -----------------------------------
   Typography
   ----------------------------------- */
h1 {
  font-size: 2.8rem;
  margin-bottom: 0.3em;
  color: var(--heading-color);
  letter-spacing: 1px;
}

.tagline {
  font-size: 1.1rem;
  color: var(--highlight-red);
  font-weight: bold;
  margin-bottom: 1.5em;
}

p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1.3em;
}

.highlight {
  color: var(--highlight-red);
  font-weight: bold;
}

a {
  color: var(--link-color);
  text-decoration: none;
  font-weight: bold;
}

a:hover {
  text-decoration: underline;
}

/* Footer Text */
.site-footer {
  font-size: 0.85rem;
  color: #aaaaaa;
  margin-top: 3em;
}

/* -----------------------------------
   Responsive Adjustments
   ----------------------------------- */
@media (max-width: 600px) {
  h1 {
    font-size: 2rem;
  }
  p {
    font-size: 1rem;
  }
  .logo {
    max-width: 160px;
  }
}
