@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Palatino Linotype is the title font used in the association's own documents.
   System font on Windows/macOS; EB Garamond loaded as web fallback. */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;600;700&display=swap');

:root {
  --font-title: 'Palatino Linotype', 'Palatino', 'Book Antiqua', 'EB Garamond', Georgia, serif;
  --font-body:  'Inter', system-ui, -apple-system, sans-serif;
}

/* ─── COLOUR PALETTE (derived from logo) ─────────────────────
   Deep blue:       #004090  (dominant logo blue)
   Mid blue:        #2a62b0  (mid accent)
   Silver-blue:     #b0c0d0  (light logo tone)
   Dark navy:       #002050  (header / footer bg)
   Page background: #f2f4f7  (pale off-white with blue tint)
   ──────────────────────────────────────────────────────────── */

:root {
  --blue:        #004090;
  --blue-mid:    #2a62b0;
  --blue-dark:   #002050;
  --blue-light:  #5888c8;
  --silver:      #b0c0d0;
  --silver-light:#d8e2ec;
  --off-white:   #f2f4f7;
  --warm-grey:   #dde3ea;
  --white:       #ffffff;
  --text-dark:   #0d1a2e;
  --text-mid:    #2c3e5a;
  --text-light:  #5a6e88;
  --border:      #c8d4e0;
  --radius:      6px;
  --shadow-sm:   0 2px 8px rgba(0,32,80,0.10);
  --shadow-md:   0 6px 24px rgba(0,32,80,0.16);
  --shadow-lg:   0 16px 48px rgba(0,32,80,0.22);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-dark);
  background: var(--off-white);
  min-height: 100vh;
}

/* ─── BANNER ───────────────────────────────────────────────── */

header {
  background: linear-gradient(135deg, var(--blue-dark) 0%, #003070 60%, #004090 100%);
  position: relative;
  overflow: visible;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 50%, rgba(176,192,208,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 80% at 90% 20%, rgba(88,136,200,0.10) 0%, transparent 55%);
  pointer-events: none;
  overflow: hidden;
}

header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--silver) 25%, var(--silver-light) 50%, var(--silver) 75%, transparent 100%);
}

.banner-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.6rem 2rem;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.banner-home {
  text-decoration: none;
  color: inherit;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.banner-home:hover {
  opacity: 0.8;
}

.banner-identity {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.banner-logo {
  height: 64px;
  width: auto;
  flex-shrink: 0;
  background: white;
  border-radius: 6px;
  padding: 4px 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.banner-title {
  font-family: var(--font-title);
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.03em;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.banner-subtitle {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--silver);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

/* ─── NAVIGATION ───────────────────────────────────────────── */

nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}

nav a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

nav a:hover { color: var(--white); background: rgba(255,255,255,0.12); }

nav a.nav-cta {
  background: var(--blue);
  border: 1.5px solid var(--silver);
  color: var(--white);
  font-weight: 600;
  margin-left: 0.4rem;
}

nav a.nav-cta:hover { background: var(--blue-mid); border-color: var(--silver-light); }

.nav-member {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(176,192,208,0.35);
  border-radius: var(--radius);
}

.nav-member:hover {
  background: rgba(255,255,255,0.20) !important;
}

/* ─── LAYOUT ───────────────────────────────────────────────── */

.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
main.container { padding-top: 3rem; padding-bottom: 4rem; }

/* ─── HERO ─────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 3rem 2rem 3.5rem;
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--blue);
  margin-bottom: 2.5rem;
}

.hero h2 {
  font-family: var(--font-title);
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1.3;
  margin-bottom: 0.8rem;
}

.hero .lead {
  font-size: 1.05rem;
  color: var(--text-mid);
  max-width: 560px;
  margin: 0 auto;
  font-weight: 400;
}

/* ─── CONTENT ──────────────────────────────────────────────── */

.content {
  background: var(--white);
  border-radius: 10px;
  padding: 2.5rem 3rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  border-left: 4px solid var(--blue-mid);
}

.content h3 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--warm-grey);
}

.content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--blue-mid);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
}

.content p { color: var(--text-mid); margin-bottom: 1rem; }

.content ul { list-style: none; padding: 0; margin-bottom: 1rem; }

.content ul li {
  color: var(--text-mid);
  padding: 0.3rem 0 0.3rem 1.4rem;
  position: relative;
}

.content ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--blue-light);
  font-weight: 600;
}

.content a { color: var(--blue-mid); text-decoration: underline; text-underline-offset: 3px; }
.content a:hover { color: var(--blue-dark); }

/* ─── CTA ──────────────────────────────────────────────────── */

.cta {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 100%);
  border-radius: 10px;
  padding: 2.5rem 3rem;
  text-align: center;
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.cta h3 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.cta p { color: rgba(255,255,255,0.75); margin-bottom: 1.5rem; font-size: 0.95rem; }

/* ─── BUTTONS ──────────────────────────────────────────────── */

.btn {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.7rem 1.8rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 3px 10px rgba(0,64,144,0.25);
}

.btn:hover {
  background: var(--blue-mid);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,64,144,0.35);
}

.btn-small {
  display: inline-block;
  background: transparent;
  color: var(--blue-mid);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.35rem 0.9rem;
  border: 1.5px solid var(--blue-mid);
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}

.btn-small:hover { background: var(--blue-mid); color: var(--white); }

/* ─── DOCUMENTS PAGE ───────────────────────────────────────── */

.page-header { margin-bottom: 2rem; }

.page-header h2 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 0.4rem;
}

.page-header .lead { color: var(--text-light); font-size: 1rem; }

.document-section {
  background: var(--white);
  border-radius: 10px;
  padding: 2rem 2.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.document-section h3 {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--silver-light);
}

.document-list { display: grid; gap: 1rem; }

.document-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 1.2rem;
  background: var(--off-white);
  border-radius: var(--radius);
  border-left: 3px solid var(--silver-light);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.document-item:hover { border-left-color: var(--blue); box-shadow: var(--shadow-sm); }
.document-item-body { flex: 1; }
.document-item h4 { font-size: 0.95rem; font-weight: 600; color: var(--text-dark); margin-bottom: 0.25rem; }
.document-item p { font-size: 0.87rem; color: var(--text-light); margin-bottom: 0.4rem; }
.date { font-size: 0.78rem; color: var(--text-light); display: block; font-style: italic; }
.document-item .btn-small { align-self: center; white-space: nowrap; }

.members-notice {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 100%);
  border-radius: 10px;
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
}

.members-notice h3 {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.4rem;
}

.members-notice p { color: rgba(255,255,255,0.75); font-size: 0.9rem; max-width: 500px; }
.members-notice a { color: var(--silver-light); }

/* ─── LOGIN ────────────────────────────────────────────────── */

.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 2rem;
}

.login-container {
  background: var(--white);
  border-radius: 12px;
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--blue);
}

.login-container h2 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 0.6rem;
}

.login-container p { color: var(--text-mid); font-size: 0.92rem; margin-bottom: 0.8rem; }

.notice {
  background: var(--off-white);
  border-left: 3px solid var(--blue-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.75rem 1rem;
  font-size: 0.85rem !important;
  color: var(--text-mid) !important;
  margin: 1.2rem 0 1.8rem !important;
  text-align: left;
}

.help-text { font-size: 0.8rem !important; color: var(--text-light) !important; margin-top: 1.4rem !important; }

/* ─── FOOTER ───────────────────────────────────────────────── */

footer {
  background: var(--blue-dark);
  color: rgba(255,255,255,0.55);
  padding: 2rem;
  text-align: center;
  font-size: 0.82rem;
  margin-top: 2rem;
  border-top: 3px solid var(--silver);
}

footer p + p { margin-top: 0.4rem; }
footer a { color: var(--silver-light); text-decoration: none; }
footer a:hover { text-decoration: underline; color: var(--white); }

/* ─── GOOGLE CALENDAR ──────────────────────────────────────── */

.calendar-wrapper {
  margin: 1.2rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.calendar-wrapper iframe { display: block; width: 100%; }

.calendar-note {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

@media (max-width: 600px) {
  .calendar-wrapper iframe { height: 400px; }
}

/* ─── BREADCRUMB ───────────────────────────────────────────── */

.breadcrumb { font-size: 0.85rem; margin-bottom: 0.3rem; }
.breadcrumb a { color: var(--text-light); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); text-decoration: underline; }

/* ─── RESPONSIVE ───────────────────────────────────────────── */

@media (max-width: 720px) {
  /* Banner */
  .banner-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1rem 0.8rem;
    gap: 0.8rem;
  }
  .banner-identity { gap: 0.8rem; }
  .banner-logo { height: 48px; }
  .banner-title { font-size: 1.1rem; }
  .banner-subtitle { font-size: 0.7rem; letter-spacing: 0.1em; }

  /* Nav */
  nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.2rem;
    padding-bottom: 0.5rem;
  }
  nav a { padding: 0.35rem 0.65rem; font-size: 0.75rem; }

  /* Layout */
  .container { padding: 0 1rem; }
  main.container { padding-top: 1.5rem; padding-bottom: 2.5rem; }

  /* Hero */
  .hero { padding: 2rem 1.2rem; }
  .hero h2 { font-size: 1.4rem; }
  .hero .lead { font-size: 0.95rem; }

  /* Content blocks */
  .content { padding: 1.4rem 1.2rem; }
  .content h3 { font-size: 1.15rem; }
  .cta { padding: 1.6rem 1.2rem; }
  .cta h3 { font-size: 1.2rem; }

  /* Documents */
  .page-header h2 { font-size: 1.5rem; }
  .document-section { padding: 1.4rem 1.2rem; }
  .document-item { flex-direction: column; gap: 0.6rem; }
  .document-item .btn-small { align-self: flex-start; }
  .members-notice { flex-direction: column; padding: 1.4rem 1.2rem; gap: 1rem; }
  .members-notice h3 { font-size: 1rem; }

  /* Login */
  .login-container { padding: 2rem 1.4rem; }
}

@media (max-width: 420px) {
  .banner-title { font-size: 1rem; }
  .banner-subtitle { display: none; }
  nav a { font-size: 0.72rem; padding: 0.3rem 0.5rem; }
}

/* ─── DROPDOWN NAV ─────────────────────────────────────────── */

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  font-family: var(--font-body);
}

.nav-dropdown-toggle::after {
  content: '▾';
  font-size: 0.7rem;
  opacity: 0.75;
}

.nav-dropdown-toggle:hover,
.nav-dropdown:focus-within .nav-dropdown-toggle {
  color: var(--white);
  background: rgba(255,255,255,0.12);
}

.nav-dropdown-menu {
  display: none;
}

.nav-dropdown-menu.is-open {
  display: block;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 170px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  z-index: 1000;
  border: 1px solid var(--border);
}

/* dropdown display handled by JS */

.nav-dropdown-menu a {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--text-dark) !important;
  background: none !important;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: none;
  border-radius: 0;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.nav-dropdown-menu a:hover {
  background: var(--off-white) !important;
  border-left-color: var(--blue);
  color: var(--blue-dark) !important;
}

.nav-dropdown-menu a + a {
  border-top: 1px solid var(--warm-grey);
}

@media (max-width: 720px) {
  .nav-dropdown {
    width: 100%;
  }
  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
  }
  .nav-dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    border-top: 1px solid rgba(255,255,255,0.15);
    border-radius: 0;
    background: rgba(0,0,0,0.20);
    width: 100%;
  }
  .nav-dropdown-menu a {
    color: rgba(255,255,255,0.85) !important;
    padding: 0.4rem 1.4rem;
    font-size: 0.75rem;
    border-left: none;
  }
  .nav-dropdown-menu a:hover {
    background: rgba(255,255,255,0.10) !important;
    color: var(--white) !important;
  }
  .nav-dropdown-menu a + a {
    border-top: 1px solid rgba(255,255,255,0.08);
  }
}

.document-section p a {
  color: var(--blue-mid);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}
.document-section p a:hover { color: var(--blue-dark); }
