:root {
  --primary-color: #1a4d7a;
  --secondary-color: #2c7cbd;
  --accent-color: #c8102e;
  --text-dark: #333;
  --text-light: #666;
  --background: #fff;
  --light-gray: #f8f9fa;
  --border-gray: #e0e0e0;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--background);
}

/* Header */
header {
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  /* Wide enough that the logo and all ten menu items share one line;
     below 1280px the hamburger menu takes over. */
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 70px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1rem;
}

.nav-menu li {
  position: relative;
}

.nav-menu a {
  white-space: nowrap;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.3s;
}

.nav-menu a:hover {
  color: var(--secondary-color);
}

/* Dropdown Menu */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 4px;
  margin-top: 0.5rem;
  padding: 0.5rem 0;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-content a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--text-dark);
  text-decoration: none;
  transition: background-color 0.3s;
}

.dropdown-content a:hover {
  background-color: var(--light-gray);
  color: var(--secondary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--text-dark);
  transition: 0.3s;
}

/* Hero Section */
.hero {
  position: relative;
  height: 500px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
}

/* Hero Background Images - Responsive */
.hero-home { background-image: url('../photos/home-768w.webp'); }
.hero-basic-course { background-image: url('../photos/basic-course-768w.webp'); }
.hero-advanced { background-image: url('../photos/advanced-768w.webp'); }
.hero-refresher { background-image: url('../photos/refresher-768w.webp'); }
.hero-register { background-image: url('../photos/register-768w.webp'); }
.hero-contact { background-image: url('../photos/contact-768w.webp'); }
.hero-team { background-image: url('../photos/team-768w.webp'); }
.hero-venue { background-image: url('../photos/venue-768w.webp'); }
.hero-terms { background-image: url('../photos/terms-and-conditions-768w.webp'); }
.hero-education { background-image: url('../photos/education-768w.webp'); }
.hero-faq { background-image: url('../photos/faq-768w.webp'); }

@media (min-width: 769px) {
  .hero-home { background-image: url('../photos/home-1440w.webp'); }
  .hero-basic-course { background-image: url('../photos/basic-course-1440w.webp'); }
  .hero-advanced { background-image: url('../photos/advanced-1440w.webp'); }
  .hero-refresher { background-image: url('../photos/refresher-1440w.webp'); }
  .hero-register { background-image: url('../photos/register-1440w.webp'); }
  .hero-contact { background-image: url('../photos/contact-1440w.webp'); }
  .hero-team { background-image: url('../photos/team-1440w.webp'); }
  .hero-venue { background-image: url('../photos/venue-1440w.webp'); }
  .hero-terms { background-image: url('../photos/terms-and-conditions-1440w.webp'); }
  .hero-education { background-image: url('../photos/education-1440w.webp'); }
  .hero-faq { background-image: url('../photos/faq-1440w.webp'); }
}

@media (min-width: 1441px) {
  .hero-home { background-image: url('../photos/home-1920w.webp'); }
  .hero-basic-course { background-image: url('../photos/basic-course-1920w.webp'); }
  .hero-advanced { background-image: url('../photos/advanced-1920w.webp'); }
  .hero-refresher { background-image: url('../photos/refresher-1920w.webp'); }
  .hero-register { background-image: url('../photos/register-1920w.webp'); }
  .hero-contact { background-image: url('../photos/contact-1920w.webp'); }
  .hero-team { background-image: url('../photos/team-1920w.webp'); }
  .hero-venue { background-image: url('../photos/venue-1920w.webp'); }
  .hero-terms { background-image: url('../photos/terms-and-conditions-1920w.webp'); }
  .hero-education { background-image: url('../photos/education-1920w.webp'); }
  .hero-faq { background-image: url('../photos/faq-1920w.webp'); }
}

@media (min-width: 1921px) {
  .hero-home { background-image: url('../photos/home.webp'); }
  .hero-basic-course { background-image: url('../photos/basic-course.webp'); }
  .hero-advanced { background-image: url('../photos/advanced.webp'); }
  .hero-refresher { background-image: url('../photos/refresher.webp'); }
  .hero-register { background-image: url('../photos/register.webp'); }
  .hero-contact { background-image: url('../photos/contact.webp'); }
  .hero-team { background-image: url('../photos/team.webp'); }
  .hero-venue { background-image: url('../photos/venue.webp'); }
  .hero-terms { background-image: url('../photos/terms-and-conditions.webp'); }
  .hero-education { background-image: url('../photos/education.webp'); }
  .hero-faq { background-image: url('../photos/faq.webp'); }
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 20px;
}

.content-section {
  margin-bottom: 3rem;
}

h2 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 1.5rem;
  border-bottom: 3px solid var(--accent-color);
  padding-bottom: 0.5rem;
}

h3 {
  color: var(--secondary-color);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

ul {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

ul li {
  margin-bottom: 0.5rem;
}

/* Team Cards */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.team-card {
  background: var(--light-gray);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.team-card img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.team-info {
  padding: 1.5rem;
}

.team-info h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.team-info p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-light);
}

/* Course List */
.course-list {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.course-item {
  background: var(--light-gray);
  padding: 2rem;
  border-radius: 8px;
  border-left: 4px solid var(--secondary-color);
  transition: all 0.3s;
}

.course-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateX(5px);
}

.course-item h3 {
  margin-bottom: 1rem;
}

.course-item a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 500;
}

.course-item a:hover {
  text-decoration: underline;
}

/* FAQ */
.faq-item {
  background: var(--light-gray);
  padding: 1.5rem 2rem;
  border-radius: 8px;
  border-left: 4px solid var(--secondary-color);
  margin-bottom: 1.5rem;
}

.faq-item h3 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.faq-item p {
  margin-bottom: 0.5rem;
}

.faq-item p:last-child {
  margin-bottom: 0;
}

/* Forms */
.form-container {
  max-width: 600px;
  margin: 2rem auto;
  background: var(--light-gray);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-weight: 500;
  color: var(--text-dark);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  padding: 0.75rem;
  border: 2px solid var(--border-gray);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
}

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

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background: #fff;
  border-radius: 4px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.checkbox-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.checkbox-item label {
  cursor: pointer;
  font-weight: normal;
}

.terms-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #fff;
  border-radius: 4px;
}

.terms-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.terms-checkbox label {
  font-weight: normal;
  cursor: pointer;
}

.terms-checkbox a {
  color: var(--secondary-color);
  text-decoration: none;
}

.terms-checkbox a:hover {
  text-decoration: underline;
}

button[type="submit"] {
  background-color: var(--secondary-color);
  color: #fff;
  padding: 1rem 2rem;
  border: none;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

button[type="submit"]:hover {
  background-color: var(--primary-color);
  transform: translateY(-2px);
}

button[type="submit"]:disabled {
  background-color: var(--border-gray);
  cursor: not-allowed;
  transform: none;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: #fff;
  padding: 2rem 20px;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-content p {
  margin-bottom: 0.2rem;
  line-height: 1.4;
}

.footer-address {
  margin-top: 0.9rem;
}

.footer-content a {
  color: #fff;
  text-decoration: none;
}

.footer-content a:hover {
  text-decoration: underline;
}

.footer-credit {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  opacity: 0.6;
}

.footer-credit a {
  text-decoration: underline;
}

/* Responsive Design */
/* The nav has too many items to fit alongside the logo below ~1280px,
   so the hamburger menu takes over well above the usual tablet width. */
@media (max-width: 1280px) {
  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background-color: #fff;
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu li {
    padding: 0 1rem;
  }

  .nav-menu a {
    display: block;
    padding: 0.75rem 0;
  }

  .dropdown-content {
    position: static;
    box-shadow: none;
    margin-top: 0;
    padding-left: 1rem;
    background-color: var(--light-gray);
  }

  .dropdown:hover .dropdown-content {
    display: none;
  }

  .dropdown.active .dropdown-content {
    display: block;
  }

}

@media (max-width: 768px) {
  .hero {
    height: 400px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .form-container {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero {
    height: 300px;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  nav {
    padding: 0 15px;
  }

  main {
    padding: 2rem 15px;
  }
}

/* ===== Syllabus page ===== */

/* Hero background — reuses the venue photos at the same breakpoints */
.hero-syllabus { background-image: url('../photos/venue-768w.webp'); }

@media (min-width: 769px) {
  .hero-syllabus { background-image: url('../photos/venue-1440w.webp'); }
}

@media (min-width: 1441px) {
  .hero-syllabus { background-image: url('../photos/venue-1920w.webp'); }
}

@media (min-width: 1921px) {
  .hero-syllabus { background-image: url('../photos/venue.webp'); }
}

/* Visually-hidden utility (used by the table caption) */
.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;
}

/* Small muted note ("Subject to change.") */
.syllabus-note {
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: italic;
  margin-top: -0.75rem;
  margin-bottom: 1.5rem;
}

/* Desktop timetable */
.syllabus-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin-top: 2rem;
}

.syllabus-table {
  width: 100%;
  /* Fixed layout => every day column is exactly the same width, so the
     flights row lines up cleanly underneath the timetable. */
  table-layout: fixed;
  min-width: 900px;
  border-collapse: collapse;
  background: var(--background);
  font-size: 0.9rem;
  line-height: 1.5;
}

.syllabus-table th,
.syllabus-table td {
  border: 1px solid var(--border-gray);
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
  /* Hyphenate long subject names at syllable boundaries instead of widening
     the column. overflow-wrap only kicks in for words with no valid hyphen
     point, so we avoid ugly mid-word breaks like "Psycholog / y". */
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}

/* Time column stays narrow; the day columns share the rest equally. */
.syllabus-table col.syllabus-col-time { width: 100px; }

/* Day header row */
.syllabus-table thead th {
  background: var(--primary-color);
  color: #fff;
  font-weight: 600;
  border-color: var(--secondary-color);
}

.syllabus-table thead th .day-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
}

.syllabus-table thead th .day-date {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 0.15rem;
}

/* Left time column (header + row headers) */
.syllabus-table thead th:first-child,
.syllabus-table .syllabus-time {
  background: var(--secondary-color);
  color: #fff;
  font-weight: 600;
  position: sticky;
  left: 0;
  z-index: 1;
  /* Time/label column wraps at spaces only — never split "Karup/Cph."
     (selector kept specific enough to beat the generic `.syllabus-table th`). */
  hyphens: none;
  -webkit-hyphens: none;
  overflow-wrap: normal;
}

.syllabus-table thead th:first-child {
  z-index: 2;
}

/* Zebra striping for body rows */
.syllabus-table tbody tr:nth-child(even) td {
  background: var(--light-gray);
}

/* Instructor initials as a small, muted secondary tag */
.syllabus-instructor {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-light);
  background: var(--light-gray);
  border: 1px solid var(--border-gray);
  border-radius: 4px;
  padding: 0.05rem 0.4rem;
  margin-left: 0.25rem;
  vertical-align: middle;
  white-space: nowrap;
}

/* Flights row — subtle accent tint to set it apart */
.syllabus-flights-row td {
  background: rgba(44, 124, 189, 0.08);
  font-weight: 500;
}

.syllabus-flights-row .syllabus-time {
  background: var(--accent-color);
}

/* Mobile day-cards — hidden on desktop */
.syllabus-cards {
  display: none;
}

.syllabus-day-card {
  background: var(--light-gray);
  border-radius: 8px;
  border-left: 4px solid var(--secondary-color);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.syllabus-day-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.syllabus-day-card h3 .day-name {
  font-weight: 700;
}

.syllabus-day-card h3 .day-date {
  display: block;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-light);
  margin-top: 0.15rem;
}

.syllabus-day-card dl {
  margin: 0;
}

.syllabus-day-card dt {
  font-weight: 700;
  color: var(--secondary-color);
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.syllabus-day-card dt:first-child {
  margin-top: 0;
}

.syllabus-day-card dd {
  margin: 0.15rem 0 0 0;
  color: var(--text-dark);
  line-height: 1.6;
}

/* Venue address block */
.venue-address {
  font-style: normal;
  line-height: 1.8;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.venue-address a {
  color: var(--secondary-color);
  text-decoration: none;
}

.venue-address a:hover {
  text-decoration: underline;
}

/* Print / Save-as-PDF button above the timetable */
.syllabus-actions {
  margin: 0 0 1.25rem;
}

.btn-pdf {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--secondary-color);
  color: #fff;
  padding: 0.6rem 1.1rem;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.btn-pdf:hover {
  background-color: var(--primary-color);
  transform: translateY(-2px);
}

/* Switch to day-cards early enough that no tablet/laptop has to scroll the
   wide 9-day table sideways (which could hide Sat/Sun). */
@media (max-width: 1024px) {
  .syllabus-table-wrap {
    display: none;
  }

  .syllabus-cards {
    display: block;
  }
}

/* Print / Save-as-PDF: show the full timetable on one landscape page so every
   day — including the weekends — is visible without scrolling. */
@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  #header-placeholder,
  #footer-placeholder,
  .hero,
  .syllabus-actions,
  .syllabus-note {
    display: none !important;
  }

  /* Trim the chrome around the table so everything fits one page. */
  main {
    padding: 0 !important;
  }

  .content-section {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
  }

  .content-section h2 {
    font-size: 12pt;
    margin: 0 0 6pt;
    padding-bottom: 4pt;
  }

  /* Always print the table version, never the cards. */
  .syllabus-cards {
    display: none !important;
  }

  .syllabus-table-wrap {
    display: block !important;
    overflow: visible !important;
    box-shadow: none;
    border-radius: 0;
    margin-top: 0 !important;
  }

  /* Keep the whole timetable — including the flights row — on one page. */
  .syllabus-table {
    min-width: 0 !important;
    width: 100% !important;
    font-size: 6pt;
    line-height: 1.15;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .syllabus-table tr,
  .syllabus-table td,
  .syllabus-table th {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .syllabus-table th,
  .syllabus-table td {
    padding: 1.5pt 2.5pt;
  }

  .syllabus-table thead th .day-date {
    font-size: 5.5pt;
  }

  .syllabus-instructor {
    font-size: 5pt;
    background: transparent;
    border: none;
    padding: 0;
    margin-left: 0.15rem;
  }

  /* Sticky positioning confuses print layout — pin nothing. */
  .syllabus-table thead th:first-child,
  .syllabus-time {
    position: static;
  }
}

/* ===== Privacy Notes page ===== */

/* Hero background — Viborg aerial (photo: Jakob Vingtoft), same breakpoints as other heroes */
.hero-privacy { background-image: url('../photos/privacy-notes-768w.webp'); }

@media (min-width: 769px) {
  .hero-privacy { background-image: url('../photos/privacy-notes-1440w.webp'); }
}

@media (min-width: 1441px) {
  .hero-privacy { background-image: url('../photos/privacy-notes-1920w.webp'); }
}

@media (min-width: 1921px) {
  .hero-privacy { background-image: url('../photos/privacy-notes.webp'); }
}
