/* ═══════════════════════════════════════════════════════════
   Copernicus Academia — Shared Stylesheet
   ═══════════════════════════════════════════════════════════ */

:root {
  --navy: #232733;
  --cream: #f4ebe5;
  --cream-dark: #ede0d8;
  --gold: #b8975a;
  --gold-light: #d4b483;
  --text: #2a2520;
  --text-muted: #6b6158;
  --border: rgba(35,39,51,0.15);
  --nav-h: 108px;
  --nav-h-mobile: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'EB Garamond', Georgia, serif;
  background: var(--cream);
  color: var(--text);
  font-size: 22px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}


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

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--navy);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  border-bottom: 1px solid rgba(184,151,90,0.3);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  height: 76px;
  width: auto;
  display: block;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  margin-right: 48px;
}

.nav-logo-name {
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: #fff;
}

.nav-logo-sub {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  color: #bcb38a;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: 15px;
  letter-spacing: 0.12em;
  transition: color .2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active { color: #bcb38a; }

.nav-login {
  display: flex;
  align-items: center;
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.62);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 7px 18px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 20px;
}

.nav-login:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 40px;
  height: 40px;
}

.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: rgba(255,255,255,0.82);
  transition: all .25s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ── HERO (frontpage) ──────────────────────────────────── */

.hero {
  margin-top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  min-height: 540px;
  max-height: 820px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('/images/cover.jpg') center center / cover no-repeat;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(35,39,51,0.55) 0%,
    rgba(35,39,51,0.45) 60%,
    rgba(35,39,51,0.65) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 0 24px;
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.1;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--cream);
  text-shadow:
    0 0 18px rgba(0,0,0,0.85),
    0 0 40px rgba(0,0,0,0.6),
    0 2px 6px rgba(0,0,0,0.9);
}

.hero-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.28rem, 2.56vw, 1.66rem);
  font-weight: 500;
  letter-spacing: 0.2em;
  color: #fff;
  margin-bottom: 40px;
  text-transform: uppercase;
  text-shadow:
    0 0 8px rgba(0,0,0,1),
    0 0 20px rgba(0,0,0,1),
    0 0 40px rgba(0,0,0,0.9),
    0 2px 4px rgba(0,0,0,1);
}

.hero-cta {
  display: inline-block;
  padding: 13px 36px;
  border: 1px solid var(--navy);
  color: #fff;
  background: var(--navy);
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-decoration: none;
  transition: background .25s, color .25s;
}

.hero-cta:hover {
  background: #1a1e28;
  border-color: #1a1e28;
  color: #fff;
}


/* ── PAGE HERO (undersider) ────────────────────────────── */

.page-hero {
  margin-top: var(--nav-h);
  background: var(--navy);
  padding: 72px 48px 68px;
  text-align: center;
  border-bottom: 1px solid rgba(184,151,90,0.2);
}

.page-hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--cream);
  margin-bottom: 16px;
}

.page-hero-sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.5rem;
  color: #bcb38a;
  letter-spacing: 0.08em;
}


/* ── INTRO ──────────────────────────────────────────────── */

.intro {
  max-width: 1100px;
  margin: 0 auto;
  padding: 88px 48px 80px;
  display: flex;
  gap: 64px;
  align-items: center;
}

.intro-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--text);
  flex: 1;
}

.intro-divider {
  width: 1px;
  height: 140px;
  background: var(--border);
  flex-shrink: 0;
}

.intro-quote {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.35rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.intro-quote cite {
  display: block;
  font-style: normal;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-top: 12px;
  font-family: 'Cinzel', serif;
}


/* ── PROGRAMMES ─────────────────────────────────────────── */

.programmes {
  background: var(--navy);
  padding: 80px 48px;
}

.programmes-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 0;
  align-items: flex-start;
}

.prog-col {
  flex: 1;
  padding: 0 48px;
}

.prog-divider {
  width: 1px;
  background: rgba(184,151,90,0.25);
  align-self: stretch;
  flex-shrink: 0;
}

.prog-title {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  color: #bcb38a;
  margin-bottom: 6px;
}

.prog-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: rgba(212,180,131,0.6);
  margin-bottom: 28px;
  letter-spacing: 0.1em;
}

.prog-grid {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
}

.prog-list {
  list-style: none;
  flex: 1;
}

.prog-list li {
  margin-bottom: 9px;
}

.prog-list a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1rem;
  transition: color .2s;
}

.prog-list a:hover { color: #bcb38a; }

.prog-col-divider {
  width: 1px;
  background: rgba(184,151,90,0.15);
  margin: 0 24px;
}

.prog-desc {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.45);
  font-style: italic;
  line-height: 1.6;
}


/* ── SECTION HEADING ────────────────────────────────────── */

.section-heading {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  letter-spacing: 0.22em;
  font-weight: 400;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 40px;
  text-transform: uppercase;
}


/* ── PUBLICATIONS GRID ──────────────────────────────────── */

.publications {
  padding: 88px 48px;
  max-width: 1100px;
  margin: 0 auto;
}

.pub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.pub-card {
  border-top: 1px solid var(--border);
  padding-top: 28px;
}

.pub-date {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 12px;
}

.pub-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 12px;
  color: var(--text);
}

.pub-excerpt {
  font-size: 1.19rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 18px;
}

.pub-link {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-decoration: none;
  transition: color .2s;
}

.pub-link:hover { color: var(--text); }


/* ── CONTENT SECTION (undersider) ──────────────────────── */

.content-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 48px;
}

.content-section + .content-section {
  padding-top: 0;
}

.content-section.bg-navy {
  max-width: 100%;
  background: var(--navy);
  padding: 80px 48px;
}

.content-section.bg-navy .inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-intro {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.19rem;
  line-height: 1.85;
  color: var(--text);
  max-width: 780px;
  margin: 0 auto 40px;
  text-align: left;
}

.section-intro.centered {
  text-align: center;
  padding-left: 0;
}

.section-intro p + p {
  margin-top: 1.6em;
}


/* ── COURSE ENTRIES ─────────────────────────────────────── */

.course-entry {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.course-entry:last-child {
  border-bottom: 1px solid var(--border);
}

.course-anchor {
  display: block;
  position: relative;
  top: -120px;
  visibility: hidden;
}

.course-code {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  letter-spacing: 0.14em;
  color: var(--gold);
  font-weight: 500;
  min-width: 80px;
  padding-top: 5px;
  flex-shrink: 0;
  white-space: nowrap;
}

.course-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.56rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 10px;
}

.course-desc {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.19rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 1em;
}

.course-desc:last-child { margin-bottom: 0; }

.course-meta {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  margin-top: 0;
  margin-bottom: 16px;
}

.read-more-btn {
  display: inline-block;
  font-family: 'EB Garamond', Georgia, serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--gold);
  text-decoration: none;
  margin-top: 10px;
  cursor: pointer;
  transition: color .2s;
}

.read-more-btn:hover { color: var(--text); }

.course-expanded {
  display: none;
  margin-top: 4px;
}

.course-expanded.open {
  display: block;
}

.course-section-title {
  font-family: 'Cinzel', serif;
  font-size: 0.90rem;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin: 24px 0 10px;
}

.course-objectives {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.19rem;
  line-height: 1.8;
  color: var(--text-muted);
  padding-left: 1.4em;
  margin-bottom: 1em;
}

.course-objectives li { margin-bottom: 4px; }

.course-objectives li + li { margin-top: 4px; }


/* ── FACULTY GRID ───────────────────────────────────────── */

.faculty-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 32px;
  max-width: 860px;
  margin: 0 auto;
}

.faculty-card {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.faculty-name {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: var(--text);
  margin-bottom: 6px;
}

.faculty-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 10px;
}

.faculty-area {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.faculty-bio {
  font-size: 1.19rem;
  color: var(--text-muted);
  line-height: 1.6;
}


/* ── CONTACT ────────────────────────────────────────────── */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-block {
  margin-bottom: 32px;
}

.contact-label {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.contact-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.38rem;
  color: var(--text);
  line-height: 1.7;
}

.contact-value a {
  color: var(--gold);
  text-decoration: none;
  transition: color .2s;
}

.contact-value a:hover { color: var(--text); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.form-input,
.form-textarea {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1rem;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  outline: none;
  transition: border-color .2s;
  border-radius: 0;
  -webkit-appearance: none;
}

.form-input:focus,
.form-textarea:focus { border-color: var(--gold); }

.form-textarea {
  resize: vertical;
  min-height: 130px;
}

.form-submit {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.18em;
  padding: 13px 36px;
  border: 1px solid var(--navy);
  color: #fff;
  background: var(--navy);
  cursor: pointer;
  transition: background .25s, border-color .25s;
  align-self: flex-start;
  border-radius: 0;
}

.form-submit:hover {
  background: #1a1e28;
  border-color: #1a1e28;
}


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

footer {
  background: var(--navy);
  border-top: 1px solid rgba(184,151,90,0.2);
  padding: 20px 48px 24px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(184,151,90,0.1);
  flex-wrap: wrap;
}

.footer-links a {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.28);
  text-decoration: none;
  transition: color .2s;
}

.footer-links a:hover { color: #bcb38a; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-right a {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color .2s;
}
.footer-right a:hover { color: var(--gold-light); }

.footer-left, .footer-right {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4);
}


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

.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--navy);
  border-top: 1px solid rgba(184,151,90,0.3);
  padding: 18px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  transform: translateY(100%);
  transition: transform .4s ease;
}

.cookie-banner.visible { transform: translateY(0); }

.cookie-text {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
}

.cookie-text a {
  color: #bcb38a;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-btn {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 9px 22px;
  border: 1px solid;
  cursor: pointer;
  transition: all .2s;
  border-radius: 0;
}

.cookie-btn-accept {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}

.cookie-btn-accept:hover {
  background: var(--gold-light);
  border-color: #bcb38a;
}

.cookie-btn-decline {
  background: transparent;
  border-color: rgba(255,255,255,0.28);
  color: rgba(255,255,255,0.55);
}

.cookie-btn-decline:hover {
  border-color: rgba(255,255,255,0.55);
  color: rgba(255,255,255,0.8);
}


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

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(35,39,51,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s, visibility .28s;
  backdrop-filter: blur(2px);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--cream);
  width: 100%;
  max-width: 400px;
  padding: 44px 44px 36px;
  border-top: 2px solid var(--gold);
  transform: translateY(14px);
  transition: transform .28s;
}

.modal-overlay.open .modal { transform: translateY(0); }

.modal-screen { display: none; }
.modal-screen.active { display: block; }

.modal-heading {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  letter-spacing: 0.22em;
  font-weight: 400;
  color: var(--navy);
  text-transform: uppercase;
  margin-bottom: 28px;
}

.modal-message {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 28px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 28px;
}

.modal-btn {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 10px 24px;
  border: 1px solid;
  cursor: pointer;
  transition: all .2s;
  border-radius: 0;
}

.modal-btn-primary {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.modal-btn-primary:hover {
  background: #1a1e28;
  border-color: #1a1e28;
}

.modal-btn-cancel {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}

.modal-btn-cancel:hover {
  border-color: var(--text-muted);
  color: var(--text);
}


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

@media (max-width: 1024px) {
  .nav-links { gap: 24px; }
  .nav-links a { font-size: 13px; }
}

@media (max-width: 860px) {
  nav { padding: 0 24px; height: var(--nav-h-mobile); }

  .logo-img { height: 52px; }
  .nav-logo-name { font-size: 1.1rem; }
  .nav-logo-sub { font-size: 0.65rem; }

  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h-mobile);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--navy);
    border-top: 1px solid rgba(184,151,90,0.2);
    padding: 12px 0;
  }

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

  .nav-links li a {
    display: block;
    padding: 12px 24px;
    font-size: 14px;
  }

  .hero { margin-top: var(--nav-h-mobile); height: calc(100vh - var(--nav-h-mobile)); }
  .page-hero { margin-top: var(--nav-h-mobile); padding: 56px 24px 48px; }

  .intro { flex-direction: column; padding: 56px 24px; gap: 40px; }
  .intro-divider { width: 100%; height: 1px; }

  .programmes { padding: 60px 24px; }
  .programmes-inner { flex-direction: column; gap: 40px; }
  .prog-divider { width: 100%; height: 1px; }
  .prog-col { padding: 0; }

  .publications { padding: 60px 24px; }
  .pub-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }

  .content-section { padding: 56px 24px; }

  .faculty-grid { grid-template-columns: repeat(2, 1fr); gap: 36px 28px; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }

  .nav-login { margin-left: 12px; padding: 6px 12px; font-size: 11px; }

  footer { padding: 16px 24px 20px; }
  .footer-links { gap: 16px; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }

  .cookie-banner { padding: 16px 24px; flex-direction: column; align-items: flex-start; gap: 14px; }

  .modal { padding: 32px 28px 28px; }
}

@media (max-width: 560px) {
  .pub-grid { grid-template-columns: 1fr; }
  .faculty-grid { grid-template-columns: 1fr; }
  .course-entry { flex-direction: column; gap: 6px; }
  .course-code { min-width: unset; }
}


/* ── TOGGLE BTN (read more/less) ────────────────────────── */

.toggle-btn {
  display: inline-block;
  margin-top: 12px;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-decoration: underline;
  text-decoration-color: rgba(42,37,32,0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color .2s;
}

.toggle-btn:hover {
  text-decoration-color: var(--text);
}

.course-body {
  flex: 1;
}

.courses-list {
  max-width: 780px;
  margin: 0 auto;
  padding: 0;
}

.section-intro p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.19rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 1.4em;
  text-align: left;
}

.section-intro p:last-child {
  margin-bottom: 0;
}

/* section-intro-inset: tekst flugter med course-body */

/* ── HAMBURGER MENU ─────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  z-index: 200;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: rgba(255,255,255,0.82);
  transition: transform .25s, opacity .25s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1100px) {
  .nav-hamburger { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: 108px;
    left: 0; right: 0;
    background: var(--navy);
    flex-direction: column;
    gap: 0;
    padding: 16px 0 24px;
    border-bottom: 1px solid rgba(184,151,90,0.3);
    z-index: 99;
  }

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

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 12px 48px;
    font-size: 13px;
  }
}

/* ── COOKIE BANNER ──────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 500;
  background: var(--navy);
  border-top: 1px solid rgba(184,151,90,0.3);
  padding: 20px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  transform: translateY(100%);
  transition: transform .35s ease;
}

.cookie-banner.visible { transform: translateY(0); }

.cookie-banner-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.5;
  max-width: 680px;
}

.cookie-banner-text a {
  color: #bcb38a;
  text-decoration: underline;
  text-decoration-color: rgba(212,180,131,0.4);
  text-underline-offset: 3px;
}

.cookie-banner-text a:hover { text-decoration-color: #bcb38a; }

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 9px 20px;
  border: 1px solid;
  cursor: pointer;
  transition: all .2s;
  border-radius: 0;
  white-space: nowrap;
}

.cookie-btn-accept {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}

.cookie-btn-accept:hover {
  background: var(--gold-light);
  border-color: #bcb38a;
}

.cookie-btn-decline {
  background: transparent;
  border-color: rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.6);
}

.cookie-btn-decline:hover {
  border-color: rgba(255,255,255,0.6);
  color: rgba(255,255,255,0.9);
}

@media (max-width: 700px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
  }
}

/* ── LOGIN BUTTON & MODAL ───────────────────────────────── */
.nav-login-btn {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 8px 20px;
  border: 1px solid rgba(184,151,90,0.6);
  background: transparent;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  transition: all .2s;
  border-radius: 0;
  white-space: nowrap;
  margin-left: 32px;
  flex-shrink: 0;
}

.nav-login-btn:hover {
  border-color: #bcb38a;
  color: #bcb38a;
}

@media (max-width: 1100px) {
  .nav-login-btn { display: none; }
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(35,39,51,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s, visibility .28s;
  backdrop-filter: blur(2px);
}

.login-overlay.open {
  opacity: 1;
  visibility: visible;
}

.login-modal {
  background: var(--cream);
  width: 100%;
  max-width: 400px;
  padding: 44px 44px 36px;
  border-top: 2px solid var(--gold);
  transform: translateY(14px);
  transition: transform .28s;
}

.login-overlay.open .login-modal {
  transform: translateY(0);
}

.login-modal-heading {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  font-weight: 400;
  color: var(--navy);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.login-modal-sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.5;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.login-label {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.login-input {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1rem;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  outline: none;
  transition: border-color .2s;
  border-radius: 0;
}

.login-input:focus { border-color: var(--gold); }
.login-input.invalid { border-color: #9b3a3a; }

.login-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

.login-btn {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 10px 24px;
  border: 1px solid;
  cursor: pointer;
  transition: all .2s;
  border-radius: 0;
}

.login-btn-ok {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.login-btn-ok:hover { background: #1a1e28; border-color: #1a1e28; }

.login-btn-cancel {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}

.login-btn-cancel:hover { border-color: var(--text-muted); color: var(--text); }

.login-error {
  display: none;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 24px;
}

.login-error.visible { display: block; }

.login-error a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(184,151,90,0.4);
  text-underline-offset: 3px;
}

/* ── SCROLL TO TOP ──────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 80px;
  right: 36px;
  z-index: 300;
  width: 44px;
  height: 44px;
  background: var(--navy);
  border: 1px solid rgba(184,151,90,0.4);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .28s, visibility .28s, transform .28s, background .2s;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  background: #1a1e28;
  border-color: var(--gold);
}

.scroll-top svg {
  width: 16px;
  height: 16px;
  stroke: var(--gold-light);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* ════════════════════════════════════════════════════════════
   MOBILE  —  max-width: 768px
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── GENERAL ────────────────────────────────────────────── */
  body { font-size: 18px; }

  .content-section { padding: 48px 24px; }
  .content-section.bg-navy { padding: 48px 24px; }

  /* ── NAVIGATION ─────────────────────────────────────────── */
  nav { padding: 0 20px; height: 80px; }
  .logo-img { height: 56px; }
  .nav-logo-name { font-size: 1.05rem; }
  .nav-logo-sub { font-size: 0.62rem; }
  .nav-logo-text { margin-right: 0; }
  .nav-links { top: 80px; }
  .nav-login-btn { display: none; }

  /* ── HERO ───────────────────────────────────────────────── */
  .hero { margin-top: 80px; }
  .hero-title { font-size: clamp(2.2rem, 10vw, 3.5rem); }
  .hero-sub { font-size: 0.95rem; letter-spacing: 0.12em; }

  /* ── INTRO (forsiden) ───────────────────────────────────── */
  .intro {
    flex-direction: column;
    padding: 48px 24px;
    gap: 32px;
  }
  .intro-divider {
    width: 48px;
    height: 1px;
    margin: 0 auto;
  }
  .intro-quote { text-align: center; }

  /* ── PROGRAMMES (forsiden) ──────────────────────────────── */
  .programmes { padding: 48px 24px; }
  .programmes-inner { flex-direction: column; gap: 40px; }
  .prog-divider { display: none; }
  .prog-col { padding: 0; }
  .prog-grid { gap: 16px; }
  .prog-col-divider { display: none; }

  /* ── PUBLICATIONS GRID ──────────────────────────────────── */
  .publications { padding: 48px 24px; }
  .pub-grid { grid-template-columns: 1fr; gap: 32px; }

  /* ── PAGE HERO ──────────────────────────────────────────── */
  .page-hero { padding: 48px 24px 40px; }
  .page-hero-title { font-size: clamp(1.8rem, 8vw, 2.8rem); }
  .page-hero-sub { font-size: 1rem; }

  /* ── SECTION INTRO ──────────────────────────────────────── */
  .section-intro { padding: 0; margin-bottom: 32px; }

  /* ── COURSE ENTRIES ─────────────────────────────────────── */
  .courses-list { padding: 0; }
  .course-entry { flex-direction: column; gap: 8px; padding: 24px 0; }
  .course-code { min-width: unset; padding-top: 0; }
  .course-title { font-size: 1.3rem; }

  /* ── FACULTY ────────────────────────────────────────────── */
  .faculty-section { padding: 40px 24px; }
  .faculty-grid,
  .faculty-grid-admin {
    grid-template-columns: 1fr;
    gap: 48px;
    max-width: 400px;
  }
  .faculty-photo { width: 60%; }

  /* ── CONTACT ────────────────────────────────────────────── */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-left: 0;
  }

  /* ── NAVY SECTIONS ──────────────────────────────────────── */
  .programmes-inner.column { flex-direction: column; }
  .prog-divider { width: 100%; height: 1px; margin: 24px 0; }

  /* ── FOOTER ─────────────────────────────────────────────── */
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 20px 24px;
  }
  .footer-right { justify-content: center; flex-wrap: wrap; }

  /* ── SCROLL TOP ─────────────────────────────────────────── */
  .scroll-top { bottom: 24px; right: 20px; }

  /* ── COOKIE BANNER ──────────────────────────────────────── */
  .cookie-banner { padding: 16px 20px; gap: 16px; }

  /* ── PUBLICATIONS PAGE ──────────────────────────────────── */
  .pub-year-section { padding: 40px 24px; }
  .pub-entry { flex-direction: column; gap: 8px; }
  .pub-date-col { min-width: unset; }

  /* ── LOGIN MODAL ────────────────────────────────────────── */
  .login-modal { padding: 32px 24px 28px; }

  /* ── ACCESS MODAL ───────────────────────────────────────── */
  .access-modal { padding: 32px 24px 28px; }

}
