/* css/style.css */
:root {
    --bg-main: #FFFFFF;
    --text-main: #222222;
    --header-bg: #EAF2F8;
    --header-border: #99BBE8;
    --logo-color: #104E8B;
    --nav-link: #1A56A4;
    --nav-hover: #003366;
    --footer-bg: #F0F4F8;
    --footer-text: #556677;
}

html {
    /* Always reserve space for vertical scroll bar.
       Otherwise the content width will be increased
       when a short page (no vertical scroll bar needed),
       which causes the centered header to shift position.
    */
    overflow-y: scroll;
}

html, body {
    font-family: Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    padding: 0;

    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* Cuts off any rogue elements leaking to the right */
    min-height: 100vh; /* Takes full viewport height */
}

/* Force all layout boxes to calculate widths accurately */
* {
  box-sizing: border-box;
}

header {
    padding: 18px; /* vertical padding */
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
}

img {
  max-width: 100%;
  height: auto;
  display: block; /* Removes unwanted bottom whitespace */
}

.header-container, .footer-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Allows nav links to drop down on mobile */
    justify-content: space-between;
}

.brand-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap; /* Stops text from wrapping to line 2 */
}

.brand-logo-img {
    width: 40px;
    height: 40px;
    flex-shrink: 0;   /* Prevents logo image from shrinking */
}

.email-img {
    width: 186px;
    height: 16px;
}

.email-img-container {
  display: inline-flex;
  align-items: center; /* Centers the image and text vertically */
  gap: 6px;            /* Spacing between image and text */
}

.email-img {
  height: 1.1em;       /* Scales the image height relative to the text size */
  width: auto;         /* Maintains the aspect ratio */
}

.logo a,
.logo a:visited,
.logo a:hover {
    font-size: 32px;
    font-weight: bold;
    color: var(--logo-color);
    text-decoration: none;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;  /* Allows individual links (like "Download") to wrap too */ 
    gap: 0px 16px; /* vertical horizontal */
}

nav ul li a {
    color: var(--nav-link);
    text-decoration: none;
    font-size: 14px;
    padding: 5px 10px;
}

nav ul li a:hover, nav ul li a.active, .footer-links a.active {
    color: var(--nav-hover);
    text-decoration: underline;
    /*font-weight: bold;*/
}

main {
    max-width: 1000px;
    /*margin: 40px auto;*/
    margin: 10px auto;
    padding: 0 20px;
    /*min-height: 350px;*/
    flex: 1;  /* Forces main content to grow and push footer down */
}

footer {
    border-top: 1px solid var(--header-border);
    padding: 14px 20px;
    background-color: var(--footer-bg);
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.footer-container {
    font-size: 12px;
    color: var(--footer-text);
}

.footer-links {
    display: flex;
    gap: 15px;
}

.footer-links a {
    color: var(--footer-text);
    text-decoration: none;
    font-size: 12px; /* layout anchor size */
}

.footer-links a:hover, .footer-links a.active {
    text-decoration: underline;
    /* font-weight: bold; */
}

/* ==========================================
   THEME 1: Retro Classic Web
   ========================================== */
.theme-classic-web, :root {
    --bg-main: #FFFFFF;
    --text-main: #000000;
    --header-bg: #EAF2F8;
    --header-border: #99BBE8;
    --logo-color: #104E8B;
    --nav-link: #1A56A4;
    --nav-hover: #003366;
    --footer-bg: #F0F4F8;
    --footer-text: #556677;
    /* Box Variables */
    --box-bg: #F5F5F5;
    --box-border: #DDDDDD;
    --box-shadow: rgba(0, 0, 0, 0.05);
}

/* ==========================================
   THEME 2: Official Forum Palette (Nordic Indigo)
   ========================================== */
.theme-forum-indigo {
    --bg-main: #F5F7FA;
    --text-main: #223344;
    --header-bg: #102A45;
    --header-border: #0A1D33;
    --logo-color: #FFFFFF;
    --nav-link: #E2ECF5;
    --nav-hover: #3B82F6;
    --footer-bg: #0D1F38;
    --footer-text: #8FA3B5;
    /* Box Variables */
    --box-bg: #EAF0F6;
    --box-border: #D2DEEA;
    --box-shadow: rgba(16, 42, 69, 0.08);
}

/* ==========================================
   THEME 3: App UI Dark Mode
   ========================================== */
.theme-app-dark {
    --bg-main: #1E1E1E;
    --content-bg: #121212;
    --text-main: #DFDFDF;
    --header-bg: #2D2D2D;
    --header-border: #3F3F3F;
    --logo-color: #4DA3FF;
    --nav-link: #A0A0A0;
    --nav-hover: #FFFFFF;
    --footer-bg: #252526;
    --footer-text: #808080;
    /* Box Variables */
    --box-bg: #2A2A2A;       /* Darker grey container */
    --box-border: #444444;   /* Subtle low-contrast line */
    --box-shadow: rgba(0, 0, 0, 0.5); /* Deep shadow for dark background */
}

/* Adds 10px of space between each list item */
ul li, ol li {
  margin-bottom: 10px;
}

/* Base state: Removes the underline completely */
.plain-link {
  color: #0066cc;
  text-decoration: none;
}

/* Hover state: Brings back the underline only when hovered */
.plain-link:hover {
  color: #cc0000; 
  text-decoration: underline;
}

/* Visited state */
.plain-link:visited {
  color: #551A8B;
}

/* Dark Mode overrides */
@media (prefers-color-scheme: dark) {
  .plain-link {
    color: #99ccff; 
    text-decoration: none;
  }

  /* Hover state: Brings back the underline only when hovered */
  .plain-link:hover {
    color: #ff4d4d; 
    text-decoration: underline;
  }

  /* Visited state */
  .plain-link:visited {
    color: #A855F7;
  }
}
