/* ============================================================
   styles.css
   AFS.Institute — Shared Stylesheet
   Applies to all pages. Page-specific styles remain
   in each HTML file's own <style> block.
   ============================================================ */

/* ════════════════════════════
   DESIGN TOKENS
   All colours, shadows and
   transitions in one place.
   Edit here — updates everywhere.
════════════════════════════ */
:root {
  --navy:           #0b1f3a;
  --navy-light:     #12345d;
  --blue:           #1f6fb2;
  --blue-dark:      #15558b;
  --gold:           #d7a928;
  --gold-light:     #f3d77a;
  --accent:         #00c2ff;
  --accent-soft:    #7fdfff;
  --white:          #ffffff;
  --off-white:      #f5f7fa;
  --text:           #243447;
  --text-main:      #e4eaf4;
  --text-muted:     #8c9ab0;
  --text-caption:   #526070;
  --muted:          #667085;
  --border:         #d9e0e8;
  --border-page:    #101e30;
  --shadow:         0 8px 24px rgba(11, 31, 58, 0.12);
  --transition-in:  0.28s ease;
  --transition-out: 0.16s ease;
}

/* ════════════════════════════
   RESET & BASE
════════════════════════════ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

a {
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid rgba(215, 169, 40, 0.55);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ════════════════════════════
   SITE HEADER
   Navy gradient + 2px gold bar
   Consistent across all pages.
════════════════════════════ */
.site-header {
  background: linear-gradient(
    135deg,
    var(--navy),
    var(--navy-light)
  );
  border-bottom: 2px solid var(--gold);
  color: var(--white);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
}

/* ════════════════════════════
   BRAND BLOCK
   Logo slot is optional.
   Add or remove .brand-logo
   in any HTML file freely —
   layout adjusts automatically,
   no style sheet edits needed.
════════════════════════════ */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Logo slot — optional.
   Remove the .brand-logo div
   from any page to hide it.
   Nothing breaks. */
.brand-logo img {
  height: 56px;
  width: auto;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--white);
  line-height: 1;
}

/* Sub-line — set per page in HTML.
   Colour and size controlled here. */
.brand-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.70);
  letter-spacing: 0.04em;
}

/* ════════════════════════════
   NAVIGATION
════════════════════════════ */
.nav-links {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex-shrink: 0;
}

.nav-links a {
  display: inline-block;
  font-size: 11px;
  padding: 8px 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.55);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.16s ease,
              border-color 0.16s ease;
}

.nav-links a:hover {
  color: rgba(255, 255, 255, 0.90);
  border-bottom-color: rgba(255, 255, 255, 0.25);
}

/* Active page tab — white */
.nav-links a.active {
  color: var(--white);
  border-bottom-color: var(--white);
  font-weight: 600;
}

/* ════════════════════════════
   BUTTONS
   .btn-primary  — solid blue
   .btn-secondary — outlined
   .portal-btn   — solid blue,
                   smaller, used
                   inside panels
════════════════════════════ */
.btn-primary {
  display: inline-block;
  padding: 9px 20px;
  background: var(--blue);
  color: var(--white);
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: background  0.2s ease,
              transform   0.2s ease,
              box-shadow  0.2s ease;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(21, 85, 139, 0.4);
  color: var(--white);
}

.btn-secondary {
  display: inline-block;
  padding: 9px 20px;
  background: transparent;
  color: var(--accent-soft);
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.875rem;
  border: 1px solid rgba(0, 194, 255, 0.35);
  cursor: pointer;
  transition: background    0.2s ease,
              border-color  0.2s ease,
              transform     0.2s ease;
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(0, 194, 255, 0.08);
  border-color: var(--accent-soft);
  transform: translateY(-1px);
  color: var(--accent-soft);
}

/* Portal button — solid blue,
   compact, used inside white
   panels on portal page and
   member directory pages */
.portal-btn {
  display: inline-block;
  padding: 9px 18px;
  background: var(--blue);
  color: var(--white);
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.82rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease,
              transform  0.2s ease,
              box-shadow 0.2s ease;
  text-decoration: none;
}

.portal-btn:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(21, 85, 139, 0.35);
  color: var(--white);
}

/* ════════════════════════════
   SITE FOOTER
   Solid navy bar — all pages
════════════════════════════ */
.site-footer {
  background: var(--navy);
  color: #dbe5f0;
  font-size: 0.85rem;
  padding: 22px 20px;
  text-align: center;
  letter-spacing: 0.04em;
}

/* ════════════════════════════
   RESPONSIVE — SHARED
   Page-specific breakpoints
   stay in each HTML file.
════════════════════════════ */
@media (max-width: 650px) {

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
  }

  .nav-links {
    width: 100%;
  }

  .nav-links a {
    font-size: 10px;
    padding: 6px 10px;
    letter-spacing: 0.07em;
  }

  .brand-title {
    font-size: 14px;
  }

  .brand-sub {
    display: none;
  }

}