/* =====================================================================
   STYLE.CSS — HCM Cluster Website
   University of Bath | History, Conservation & Management Cluster
   ===================================================================== */

/* ==============================
   1. CSS CUSTOM PROPERTIES
============================== */

:root {
  /* Core palette */
  --bg-color:        #f8f4ef;
  --bg-alt:          #f0ebe4;
  --text-color:      #2e2b29;
  --text-secondary:  #5a534d;
  --text-muted:      #8a7f77;
  --accent-color:    #b58b63;
  --accent-hover:    #8d6b4d;
  --accent-subtle:   rgba(181, 139, 99, 0.12);
  --card-bg:         #ffffff;
  --header-bg:       #fffaf5;
  --border-color:    #e0d8cf;
  --shadow-sm:       0 1px 4px rgba(0, 0, 0, 0.07);
  --shadow-md:       0 2px 8px rgba(0, 0, 0, 0.10);
  --shadow-lg:       0 6px 20px rgba(0, 0, 0, 0.12);

  /* Layout */
  --nav-height:      68px;
  --max-width:       1200px;
  --radius-sm:       0.4rem;
  --radius-md:       0.75rem;
  --radius-lg:       1rem;

  /* Typography */
  --font-display:    'Playfair Display', Georgia, serif;
  --font-body:       'Source Serif 4', Georgia, serif;
  --font-ui:         system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --bg-color:        #1e1a17;
  --bg-alt:          #252018;
  --text-color:      #f0ede8;
  --text-secondary:  #c5bdb4;
  --text-muted:      #8a7f77;
  --accent-color:    #d4a676;
  --accent-hover:    #e8bc8e;
  --accent-subtle:   rgba(212, 166, 118, 0.12);
  --card-bg:         #2a2420;
  --header-bg:       #252018;
  --border-color:    #3a332c;
  --shadow-sm:       0 1px 4px rgba(0, 0, 0, 0.25);
  --shadow-md:       0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-lg:       0 6px 20px rgba(0, 0, 0, 0.45);
}


/* ==============================
   2. BASE RESET & GLOBALS
============================== */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

ul { list-style: none; }

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.25s ease;
}

a:hover,
a:focus-visible {
  color: var(--accent-hover);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 3px;
}

/* Keyboard-only focus ring */
body:not(.user-is-tabbing) *:focus {
  outline: none;
}

::selection {
  background-color: var(--accent-color);
  color: #fff;
}


/* ==============================
   3. TYPOGRAPHY
============================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-color);
  margin-bottom: 0.6rem;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.6rem);  color: var(--accent-color); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem);    color: var(--accent-color); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }
h4 { font-size: 1rem;  font-family: var(--font-ui); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

p {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  max-width: 68ch;
}

strong { color: var(--accent-color); font-weight: 600; }
em     { font-style: italic; }

blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--accent-color);
  background-color: var(--accent-subtle);
  font-style: italic;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}


/* ==============================
   4. NAVIGATION
============================== */

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background-color: var(--header-bg);
  padding: 0 2rem;
  height: var(--nav-height);
  box-shadow: 0 1px 0 var(--border-color), var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background-color 0.3s ease;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-color);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}

.logo:hover { color: var(--accent-hover); text-decoration: none; }

/* Nav list */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-color);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  position: relative;
  transition: color 0.25s ease, background-color 0.25s ease;
  text-decoration: none;
}

.nav-links a::after {
  content: "";
  position: absolute;
  inset-inline: 0.6rem;
  bottom: 0;
  height: 2px;
  background-color: var(--accent-color);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent-color);
  background-color: var(--accent-subtle);
  text-decoration: none;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-links a.active {
  color: var(--accent-color);
  font-weight: 600;
}

/* Theme toggle */
#theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border-color);
  background: transparent;
  border-radius: 2rem;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-color);
  white-space: nowrap;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

#theme-toggle:hover {
  background-color: var(--accent-subtle);
  border-color: var(--accent-color);
}

.theme-icon { font-size: 1rem; }
.theme-label { display: none; }

@media (min-width: 900px) {
  .theme-label { display: inline; }
}

/* Hamburger button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 17px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.nav-toggle .bar {
  height: 2px;
  width: 100%;
  background-color: var(--text-color);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open .bar:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open .bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }


/* ==============================
   5. HERO SECTION (Homepage)
============================== */

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem;
  background:
    linear-gradient(rgba(248, 244, 239, 0.82), rgba(248, 244, 239, 0.82)),
    url("assets/images/hero-placeholder.jpg") center / cover no-repeat;
  position: relative;
  overflow: hidden;
}

/* Subtle decorative rule */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(181,139,99,0.08) 0%, transparent 70%);
  pointer-events: none;
}

[data-theme="dark"] .hero {
  background:
    linear-gradient(rgba(30, 26, 23, 0.85), rgba(30, 26, 23, 0.85)),
    url("assets/images/hero-placeholder.jpg") center / cover no-repeat;
}

.full-screen { min-height: calc(90vh - var(--nav-height)); }

.hero-content {
  position: relative;
  max-width: 760px;
  animation: heroFadeUp 0.9s ease both;
}

.hero-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-color);
  margin-bottom: 1rem;
  max-width: none;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-style: italic;
  margin-bottom: 1.25rem;
  line-height: 1.15;
  color: var(--text-color);
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  margin: 0 auto 2.5rem;
  max-width: 50ch;
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ==============================
   6. BUTTONS
============================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn-primary,
.btn {
  background-color: var(--accent-color);
  color: #fff;
  box-shadow: 0 2px 6px rgba(181,139,99, 0.35);
}

.btn-primary:hover,
.btn:hover {
  background-color: var(--accent-hover);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(181,139,99, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--accent-color);
  border: 1.5px solid var(--accent-color);
  box-shadow: none;
}

.btn-outline:hover {
  background-color: var(--accent-subtle);
  color: var(--accent-hover);
}


/* ==============================
   7. SECTION SCAFFOLDING
============================== */

/* Shared page wrapper used on inner pages */
.page-wrapper {
  display: grid;
  gap: 3rem;
  padding: 3rem 1.5rem 5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

/* Generic centred section inner */
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Section title treatment */
.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: "";
  display: block;
  width: 3rem;
  height: 2px;
  background-color: var(--accent-color);
  margin: 0.75rem auto 0;
  border-radius: 1px;
}

/* Intro / overview blocks */
.intro-block {
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 2rem 2rem;
  text-align: center;
}

.intro-block h2 { margin-bottom: 0.75rem; }
.intro-block p  { margin: 0 auto; }


/* ==============================
   8. HIGHLIGHTS / CARDS (Homepage)
============================== */

.highlights-section {
  padding: 5rem 0;
  background-color: var(--bg-alt);
}

/* 3-column responsive grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

/* Card */
.card {
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-img-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--bg-alt);
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform 0.5s ease;
}

.card:hover .card-img-wrap img {
  transform: scale(1.04);
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
}

.card-tag {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-color);
}

.card-body h3 {
  margin-bottom: 0.25rem;
  color: var(--text-color);
}

.card-body p {
  font-size: 0.95rem;
  margin-bottom: auto;
  padding-bottom: 1rem;
}

.card-link {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
  transition: gap 0.2s ease, color 0.2s ease;
}

.card-link:hover {
  gap: 0.5rem;
  color: var(--accent-hover);
  text-decoration: none;
}


/* ==============================
   9. HERO SECTION (Inner Pages)
============================== */

/* Reusable hero banner for about/research/news/etc. */
.hero-section {
  text-align: center;
  padding: 5rem 2rem 4rem;
  background:
    linear-gradient(rgba(248, 244, 239, 0.88), rgba(248, 244, 239, 0.88)),
    url("assets/images/hero-placeholder.jpg") center / cover no-repeat;
  border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .hero-section {
  background:
    linear-gradient(rgba(30, 26, 23, 0.88), rgba(30, 26, 23, 0.88)),
    url("assets/images/hero-placeholder.jpg") center / cover no-repeat;
}

.hero-section h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-style: italic;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.hero-section p {
  font-size: 1.1rem;
  margin: 0 auto;
  max-width: 62ch;
  color: var(--text-secondary);
}


/* ==============================
   10. GRID SECTIONS (content blocks)
============================== */

.grid-section {
  background-color: var(--card-bg);
  padding: 2.5rem 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.grid-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}

/* 3-col auto-fit grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* 2-col auto-fit grid */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}


/* ==============================
   11. ABOUT PAGE
============================== */

.stats-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.stat-card {
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 2rem 1rem;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease;
}

.stat-card:hover { transform: translateY(-4px); }

.stat-card h3 {
  font-size: 2.4rem;
  color: var(--accent-color);
  margin-bottom: 0.4rem;
}

.stat-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: none;
  margin: 0;
}

.mission-section,
.vision-section {
  background-color: var(--card-bg);
  padding: 2.5rem 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.mission-section p,
.vision-section p {
  margin: 0 auto;
  max-width: 72ch;
  font-size: 1.05rem;
}


/* ==============================
   12. MEMBERS PAGE
============================== */

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 2rem;
}

.member-card {
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.member-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.member-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

[data-theme="dark"] .member-card img { filter: brightness(0.88); }

.member-card h3 { color: var(--accent-color); font-size: 1.2rem; margin-bottom: 0.2rem; }

.member-card .member-bio {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0.5rem 0 1rem;
  max-width: none;
}

.member-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  padding: 0;
}

.member-links a {
  padding: 0.35rem 0.75rem;
  background-color: var(--accent-color);
  color: #fff;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  transition: background-color 0.25s ease;
}

.member-links a:hover {
  background-color: var(--accent-hover);
  text-decoration: none;
}


/* ==============================
   13. RESEARCH PAGE
============================== */

.research-overview {
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.research-overview p { margin: 0 auto; max-width: 80ch; font-size: 1.05rem; }

.research-themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.75rem; }

.research-themes .card { text-align: center; }

.research-projects {
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 2.5rem 2rem 3rem;
}

.research-publications {
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 2rem 2rem;
}

.publication-list {
  list-style: disc;
  padding-left: 1.5rem;
  line-height: 1.9;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.publication-list li { margin-bottom: 0.6rem; }
.publication-list em { color: var(--accent-color); font-style: italic; }


/* ==============================
   14. NEWS & OPPORTUNITIES PAGES
============================== */

.news-grid,
.opportunity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.news-grid .card,
.opportunity-grid .card {
  text-align: left;
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.card-content {
  padding: 1.25rem 1.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.card-content h3 { color: var(--accent-color); font-size: 1.1rem; }
.card-content p  { font-size: 0.95rem; }
.card-content .date { font-size: 0.82rem; font-style: italic; color: var(--text-muted); }

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.cta-section {
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 3rem 2rem;
  text-align: center;
}

.cta-section p { margin: 0 auto 1.5rem; max-width: 72ch; }


/* ==============================
   15. CONTACT PAGE
============================== */

.contact-page-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .contact-page-grid {
    grid-template-columns: 1fr 1fr;
  }
  .contact-page-grid .map-section {
    grid-column: 1 / -1;
  }
}

.contact-info,
.contact-form-section,
.map-section {
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 2rem;
}

.contact-details {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.contact-details li {
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.form-group { display: flex; flex-direction: column; }
.form-group.full-width { grid-column: 1 / -1; }

label {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
  color: var(--text-color);
}

input,
textarea,
select {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-color);
  background-color: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  width: 100%;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(181,139,99, 0.2);
  outline: none;
}

textarea { resize: vertical; min-height: 140px; }

.map-placeholder {
  background-color: var(--bg-alt);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 3rem 1rem;
  text-align: center;
  font-style: italic;
  color: var(--text-muted);
}


/* ==============================
   16. TABLES
============================== */

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  background-color: var(--card-bg);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

th, td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-color); }
th { background-color: var(--bg-alt); text-align: left; color: var(--accent-color); font-weight: 600; font-family: var(--font-ui); font-size: 0.85rem; letter-spacing: 0.05em; }


/* ==============================
   17. FOOTER
============================== */

.site-footer {
  background-color: var(--header-bg);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -1px 0 var(--border-color);
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
}

@media (min-width: 640px) {
  .footer-inner { grid-template-columns: 2fr 1fr 1fr; }
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-color);
  display: block;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 36ch;
  margin: 0;
}

.footer-nav h4,
.footer-social h4 {
  color: var(--text-color);
  margin-bottom: 1rem;
}

.footer-nav ul,
.footer-social ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav a,
.footer-social a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.25s ease;
}

.footer-nav a:hover,
.footer-social a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  text-align: center;
  padding: 1.25rem 2rem;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  max-width: none;
}


/* ==============================
   18. SCROLL-TO-TOP BUTTON
============================== */

.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--accent-color);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: background-color 0.25s ease, opacity 0.3s ease, transform 0.3s ease;
  z-index: 900;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.scroll-top-btn:not([hidden]) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top-btn:hover {
  background-color: var(--accent-hover);
}


/* ==============================
   19. SKIP LINK (accessibility)
============================== */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent-color);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.875rem;
  z-index: 9999;
  transition: top 0.2s;
}

.skip-link:focus { top: 0; }


/* ==============================
   20. ANIMATIONS (shared)
============================== */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ==============================
   21. RESPONSIVE — MOBILE (≤ 768px)
============================== */

@media (max-width: 768px) {
  :root { --nav-height: 60px; }

  .navbar { padding: 0 1.25rem; }

  /* Show hamburger, hide nav links by default */
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background-color: var(--header-bg);
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    padding: 0.75rem 0;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--border-color);
    animation: fadeIn 0.25s ease;
  }

  .nav-links.nav-open { display: flex; }

  .nav-links a {
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    font-size: 1rem;
  }

  .nav-links a::after { display: none; }

  /* Hero */
  .hero, .hero-section { padding: 4rem 1.25rem 3rem; }

  /* Section layout */
  .page-wrapper { padding: 2rem 1rem 3.5rem; gap: 2rem; }
  .section-inner { padding: 0 1rem; }

  .grid-3, .grid-2, .cards-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer-inner { padding: 2rem 1.25rem 1.5rem; }
  .footer-brand p { max-width: none; }

  /* Scroll top */
  .scroll-top-btn { bottom: 1.25rem; right: 1.25rem; }
}


/* ==============================
   22. RESPONSIVE — DESKTOP (≥ 1024px)
============================== */

@media (min-width: 1024px) {
  .page-wrapper  { padding: 4rem 2rem 6rem; gap: 4rem; }
  .section-inner { padding: 0 2rem; }
  .highlights-section { padding: 6rem 2rem; }

  .cards-grid         { gap: 2rem; }
  .members-grid       { gap: 2.5rem; }
  .news-grid,
  .opportunity-grid   { gap: 2.5rem; }
  .research-themes    { gap: 2rem; }
}


/* ==============================
   ABOUT PAGE — additional styles
============================== */

/* Screen-reader-only utility (used for visually hidden headings) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Mission + Vision side by side */
.about-mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .about-mv-grid { grid-template-columns: 1fr; }
}

/* Focus area cards with icon */
.focus-card {
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 2rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.focus-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.focus-icon {
  width: 56px;
  height: 56px;
  color: var(--accent-color);
  background-color: var(--accent-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  flex-shrink: 0;
}

.focus-icon svg {
  width: 100%;
  height: 100%;
}

.focus-card h3 { margin-bottom: 0; }
.focus-card p  { font-size: 0.95rem; max-width: none; margin: 0; }

/* MSc Programme two-column section */
.about-msc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 2.5rem 2.5rem;
}

@media (max-width: 900px) {
  .about-msc {
    grid-template-columns: 1fr;
  }
  .about-msc-img { order: -1; } /* image above text on mobile */
}

.about-msc-text .card-tag { display: block; margin-bottom: 0.5rem; }
.about-msc-text h2 { margin-bottom: 1rem; }
.about-msc-text p  { max-width: none; }

.msc-features {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.msc-features li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding-left: 1.4rem;
  position: relative;
  line-height: 1.6;
}

.msc-features li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: 700;
}

.about-msc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  display: block;
}

/* Research theme cards */
.theme-card {
  background-color: var(--bg-alt);
  border-left: 4px solid var(--accent-color);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.5rem 1.75rem;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.theme-card:hover {
  background-color: var(--accent-subtle);
  transform: translateX(4px);
}

.theme-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.theme-card p  { font-size: 0.95rem; margin: 0; max-width: none; }

/* CTA button group */
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}


/* ==============================
   MEMBERS PAGE — additional styles
============================== */

/* Section intro paragraph (used above PhD/Affiliates grids) */
.section-intro {
  text-align: center;
  max-width: 72ch;
  margin: -1rem auto 2rem;
  font-size: 1rem;
  color: var(--text-secondary);
}

/* ── Cluster Leaders ── */
.leaders-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .leaders-grid { grid-template-columns: 1fr; }
}

.leader-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: start;
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.leader-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 640px) {
  .leader-card {
    grid-template-columns: 1fr;
  }
}

.leader-img-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius-md);
  background-color: var(--bg-alt);
}

.leader-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  display: block;
}

[data-theme="dark"] .leader-img-wrap img { filter: brightness(0.88); }

.leader-body .card-tag  { display: block; margin-bottom: 0.5rem; }
.leader-body h3         { color: var(--accent-color); font-size: 1.3rem; margin-bottom: 0.2rem; }
.leader-body .member-role { font-family: var(--font-ui); font-size: 0.9rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.75rem; }
.leader-body .member-bio  { font-size: 0.95rem; color: var(--text-secondary); max-width: none; margin-bottom: 1rem; }

/* ── Core member cards — consistent image container ── */
.member-img-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background-color: var(--bg-alt);
  width: 100%;
}

.member-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  display: block;
  transition: transform 0.4s ease;
}

.member-card:hover .member-img-wrap img {
  transform: scale(1.04);
}

[data-theme="dark"] .member-img-wrap img { filter: brightness(0.88); }

/* Override old direct img rule inside member-card */
.member-card > img { display: none; } /* hide if any old direct img slips through */

.member-card { overflow: hidden; padding: 0; }

.member-card h3,
.member-card .member-role,
.member-card .member-bio,
.member-card .member-links {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.member-card h3 {
  padding-top: 1.25rem;
  color: var(--accent-color);
  font-size: 1.15rem;
  margin-bottom: 0.15rem;
}

.member-card .member-role {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  max-width: none;
  margin-bottom: 0.6rem;
}

.member-card .member-bio {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: none;
  margin-bottom: 0.75rem;
}

.member-card .member-links {
  padding-bottom: 1.5rem;
}

/* ── Placeholder card (PhD / Affiliates) ── */
.placeholder-card { opacity: 0.75; }

.member-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-alt);
  color: var(--text-muted);
}

.member-img-placeholder svg {
  width: 50%;
  height: 50%;
}

/* ── Affiliates grid — compact horizontal cards ── */
.affiliates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.affiliate-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background-color: var(--bg-alt);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.affiliate-card:hover {
  background-color: var(--accent-subtle);
  transform: translateX(4px);
}

.affiliate-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: var(--card-bg);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 10px;
}

.affiliate-avatar svg { width: 100%; height: 100%; }

.affiliate-body h3 {
  font-size: 1rem;
  color: var(--accent-color);
  margin-bottom: 0.1rem;
}

.affiliate-body .member-role {
  font-size: 0.82rem;
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--text-muted);
  max-width: none;
  margin-bottom: 0.3rem;
}

.affiliate-body .member-bio {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: none;
  margin: 0;
}

/* CTA button group (shared with about page) */
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

/* Affiliate card — photo avatar variant */
.affiliate-avatar--photo {
  padding: 0;
  overflow: hidden;
  background: none;
}

.affiliate-avatar--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

[data-theme="dark"] .affiliate-avatar--photo img {
  filter: brightness(0.88);
}

/* Small button variant for affiliate cards */
.btn-sm {
  font-size: 0.78rem;
  padding: 0.4rem 0.9rem;
  margin-top: 0.6rem;
  display: inline-flex;
}


/* ==============================
   NEWS PAGE — additional styles
============================== */

/* ── Filter bar ── */
.news-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.news-filter-btn {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  border: 1.5px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.news-filter-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background-color: var(--accent-subtle);
}

.news-filter-btn.active {
  background-color: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

/* ── News feed container ── */
.news-feed {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* ── Standard news card ── */
.news-card {
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: grid;
  /* text-only: single column; with image: image left, text right on wide screens */
  grid-template-columns: 1fr;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Cards with images — side-by-side on desktop */
.news-card:has(.news-card-img) {
  grid-template-columns: 320px 1fr;
}

@media (max-width: 768px) {
  .news-card:has(.news-card-img) {
    grid-template-columns: 1fr;
  }
}

/* ── Featured card — full-width stacked layout ── */
.news-card--featured {
  border-left: 4px solid var(--accent-color);
  grid-template-columns: 1fr !important; /* always stacked */
}

.news-card--featured .news-card-img {
  aspect-ratio: 16 / 7;
  max-height: 420px;
}

.news-card--featured .news-card-body {
  padding: 2rem 2.25rem 2rem;
}

.news-card--featured h3 {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
}

/* ── Card image ── */
.news-card-img {
  overflow: hidden;
  background-color: var(--bg-alt);
  aspect-ratio: 16 / 9;
}

.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  display: block;
  transition: transform 0.45s ease;
}

.news-card:hover .news-card-img img {
  transform: scale(1.04);
}

/* ── Card body ── */
.news-card-body {
  padding: 1.5rem 1.75rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.news-card-meta time {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.news-card-body h3 {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-color);
  margin: 0;
  line-height: 1.3;
}

.news-card-body p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: none;
  margin: 0;
}

.news-card-location {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Key dates list inside featured card */
.news-card-dates {
  list-style: none;
  padding: 0.9rem 1.1rem;
  margin: 0.25rem 0;
  background-color: var(--bg-alt);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.news-card-dates li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding-left: 1.25rem;
  position: relative;
}

.news-card-dates li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: 700;
  font-size: 0.8rem;
}

/* News card action buttons */
.news-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

/* ── Hidden card (filtered out) ── */
.news-card[hidden] {
  display: none;
}

/* ── No results message ── */
.news-no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-style: italic;
  background-color: var(--bg-alt);
  border-radius: var(--radius-md);
  border: 2px dashed var(--border-color);
}

.news-no-results p { margin: 0; max-width: none; }


/* ==============================
   OPPORTUNITIES PAGE — additional styles
============================== */

/* ── Jump navigation ── */
.opp-jump-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.opp-jump-label {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.opp-jump-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.opp-jump-nav a {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-color);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.opp-jump-nav a:hover {
  border-bottom-color: var(--accent-color);
  text-decoration: none;
}

/* ── Opportunity grid ── */
.opp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

/* Collaboration section uses a 2-col grid on wider screens */
.opp-grid--collab {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ── Opportunity card ── */
.opp-card {
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 2rem 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-left: 4px solid transparent;
}

.opp-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Featured card (MSc) — accent left border + background tint */
.opp-card--featured {
  border-left-color: var(--accent-color);
  background-color: var(--card-bg);
}

/* Collaboration cards — subtler style */
.opp-card--collab {
  border-left-color: var(--accent-color);
  background-color: var(--bg-alt);
}

/* Closed opportunity — greyed out */
.opp-card[data-status="closed"] {
  opacity: 0.55;
  pointer-events: none;
  filter: grayscale(0.4);
}

.opp-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.opp-card h3 {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--text-color);
  margin: 0;
}

.opp-org {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  max-width: none;
  margin: 0;
}

/* Status badge */
.opp-status {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 2rem;
  white-space: nowrap;
}

.opp-status--open {
  background-color: #e8f5ee;
  color: #1e7e44;
}

.opp-status--closed {
  background-color: var(--bg-alt);
  color: var(--text-muted);
}

[data-theme="dark"] .opp-status--open {
  background-color: rgba(30, 126, 68, 0.2);
  color: #6fcf97;
}

/* Highlights list inside opp-card */
.opp-highlights {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.opp-highlights li {
  font-size: 0.92rem;
  color: var(--text-secondary);
  padding-left: 1.4rem;
  position: relative;
  line-height: 1.55;
}

.opp-highlights li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: 700;
  font-size: 0.85rem;
}

/* Deadline badges */
.opp-deadlines {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 1rem 1.25rem;
  background-color: var(--bg-alt);
  border-radius: var(--radius-sm);
}

.deadline-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.deadline-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.deadline-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-color);
  background-color: var(--accent-subtle);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-color);
}

/* Urgent deadline (added by JS when within 28 days) */
.deadline-badge--urgent {
  color: #c0392b;
  background-color: #fdf0ef;
  border-color: #c0392b;
}

[data-theme="dark"] .deadline-badge--urgent {
  color: #e57373;
  background-color: rgba(192, 57, 43, 0.15);
  border-color: #e57373;
}

/* Card action buttons */
.opp-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

/* ── Empty state ── */
.opp-empty-state {
  background-color: var(--bg-alt);
  border-radius: var(--radius-md);
  border: 2px dashed var(--border-color);
  padding: 2.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.opp-empty-icon {
  width: 52px;
  height: 52px;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.opp-empty-icon svg { width: 100%; height: 100%; }

.opp-empty-state h3 {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin: 0;
}

.opp-empty-state p {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 56ch;
  margin: 0;
}


/* ==============================
   CONTACT PAGE — additional styles
============================== */

/* Contact detail list with icons */
.contact-details {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-details li {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.contact-detail-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background-color: var(--accent-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  padding: 8px;
  margin-top: 1px;
}

.contact-detail-icon svg {
  width: 100%;
  height: 100%;
}

.contact-details strong {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-color);
  margin-bottom: 0.1rem;
}

/* What can we help with */
.contact-topics {
  background-color: var(--bg-alt);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-top: 0.5rem;
}

.contact-topics h3 {
  font-size: 0.9rem;
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-color);
  margin-bottom: 0.75rem;
}

.topics-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.topics-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.5;
}

.topics-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: 700;
  font-size: 0.8rem;
}

/* Form field validation error text */
.field-error {
  display: block;
  font-size: 0.82rem;
  color: #c0392b;
  margin-top: 0.3rem;
  min-height: 1.2em;
  font-family: var(--font-ui);
}

[data-theme="dark"] .field-error { color: #e57373; }

/* Input invalid state */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown),
select:invalid:not(:placeholder-shown) {
  border-color: #c0392b;
}

[data-theme="dark"] input:invalid:not(:placeholder-shown),
[data-theme="dark"] textarea:invalid:not(:placeholder-shown) {
  border-color: #e57373;
}

/* Submit button spinner */
.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.form-actions { align-items: flex-start; }

/* Success / error banners */
.form-banner {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  line-height: 1.6;
}

.form-banner--success {
  background-color: #eaf7f0;
  border-left: 4px solid #27ae60;
  color: #1e6e3f;
}

.form-banner--error {
  background-color: #fdf0ef;
  border-left: 4px solid #c0392b;
  color: #7b1e17;
}

[data-theme="dark"] .form-banner--success {
  background-color: rgba(39, 174, 96, 0.12);
  color: #6fcf97;
}

[data-theme="dark"] .form-banner--error {
  background-color: rgba(192, 57, 43, 0.12);
  color: #e57373;
}

/* Google Maps embed — responsive wrapper */
.map-embed-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  /* 16:6 aspect ratio — a wide but not too-tall map */
  aspect-ratio: 16 / 6;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .map-embed-wrap { aspect-ratio: 4 / 3; }
}

.map-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--radius-md);
}