:root {
  --bg: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --primary: #0b62d1;
  --primary-ink: #ffffff;
  --border: #e5e7eb;
  --maxw: 1100px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

/* prevent horizontal scroll caused by 100vw on mobile */
body { overflow-x: hidden; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1rem; }

.org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0 2.5rem;
}
.org-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,.05);
  text-align: center;
  transition: transform .15s ease, box-shadow .15s ease;
}
.org-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,.1);
}
.org-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
  border-radius: 14px 14px 0 0;
}
.org-body {
  padding: 1rem;
}
.org-name {
  margin: 0 0 .3rem;
  font-size: 1.1rem;
  font-weight: 600;
}
.org-role {
  margin: 0;
  font-weight: 500;
  color: var(--primary);
}
.org-affiliation {
  margin-top: .5rem;
  font-size: .9rem;
  color: var(--muted);
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: #f9fafb;
  position: sticky;
  top: 0;
  z-index: 3000;
  width: 100%;     /* span full window width */
  margin: 0;       /* no negative margins */
  left: 0;
  right: 0;
}
.header-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem 0;
  flex-wrap: nowrap;            /* stay on one row */
  min-width: 0;                 /* allow children to shrink */
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.logo { height: clamp(64px, 9vw, 80px); width: auto; display: block; }
.brand-text { display: none;}

.hero {
  position: relative;
  width: 100vw;               /* span full rendered screen width */
  height: 500px; /* restore big main hero */
  overflow: hidden;
  margin: 0;
  left: 50%;                  
  right: 50%;
  margin-left: -50vw;         /* pull left edge to viewport edge */
  margin-right: -50vw;        /* (symmetric) ensures no right overflow */
  padding: 0;                 
}


.site-header + .hero {
  margin-top: 0;
}
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.9);
  max-width: 600px;
}
.hero-overlay h1 {
  font-size: 1.8rem;
  margin: 0;
}
.hero-overlay p {
  font-size: .95rem;
  margin: 0.5rem 0 0;
}

/* Secondary hero for venue */
.hero-small {
  position: relative;
  width: 100vw;               /* span full rendered screen width */
  height: clamp(300px, 18vh, 400px); /* shorter than main hero */
  overflow: hidden;
  margin: 0;
  left: 50%;
  right: 50%;
  margin-left: -50vw;         /* pull left edge to viewport edge */
  margin-right: -50vw;        /* ensure no right overflow */
  padding: 0;
}
.hero-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-small .hero-overlay {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  transform: none;
  text-align: left;
  color: white;
  text-shadow: 0 2px 6px rgba(0,0,0,0.7);
}
.hero-small .hero-overlay h1 {
  font-size: 1.6rem;
  margin: 0;
}
.hero-small .hero-overlay p {
  font-size: 1.1rem;
  margin: 0.3rem 0 0;
}


/* Explore Munich & Bavaria sections */
.explore-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0 2rem;
  justify-content: center;
}
.explore-card {
  flex: 0 1 auto; /* fixed width for each card */
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.explore-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}

.explore-card span {
  padding: 0.3rem 0.6rem;
  font-size: 0.95rem;
  white-space: nowrap;
}

.content {
  max-width: var(--maxw);
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Nav */
.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: nowrap;
  overflow: visible;         /* ← important */
  position: relative;
  white-space: nowrap;
  z-index: 2;
}
.nav::-webkit-scrollbar { display: none; }
.nav-link {
  display: inline-block;
  flex: 0 0 auto;                  /* don't shrink text */
  padding: .4rem .6rem;
  text-decoration: none;
  color: var(--ink);
  border-radius: 8px;
  font-size: clamp(.85rem, 1.6vw, 1rem);
}
.nav-link:hover { background: #eef2ff; color: var(--primary); }
.nav-link.active {
  background: var(--primary);
  color: var(--primary-ink);
}

/* Make School trigger look like a normal nav-link */
.nav-trigger {
  background: transparent;
  border: none;
  cursor: pointer;
  font: inherit;
  display: inline-block;
  padding: .4rem .6rem;
  border-radius: 8px;
  color: var(--ink);
  font-size: clamp(.85rem, 1.6vw, 1rem);
}
.nav-trigger:hover {
  background: #eef2ff;
  color: var(--primary);
}

/* Add dropdown indicator to School trigger */
.nav-trigger::after {
  content: " ▼";
  font-size: 0.75em;
  margin-left: 0.25rem;
  color: var(--muted);
}
.nav-group.open > .nav-trigger::after {
  content: " ▲";
  color: var(--primary-ink);
}

/* Dropdown (click-to-open) */
.nav-group { position: relative; display: inline-block; }
.nav-group .submenu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  padding: .4rem 0;
  z-index: 1000;
}
.nav-group.open .submenu { display: block; }
.submenu-link {
  display: block;
  padding: .5rem .75rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 8px;
  font-size: 0.85rem;   /* smaller font */
  font-style: italic;   /* italics */
}
.submenu-link:hover { background: #f3f4f6; color: var(--primary); }

/* Arrange Program and Lecturers side by side (only when open) */
.nav-group.open .submenu {
  display: flex;            /* overrides earlier display:none/block when open */
  flex-direction: row;
  gap: 0.5rem;
  justify-content: center;
}
.nav-group.open .submenu .submenu-link {
  flex: 1;
  text-align: center;
}

/* Mobile toggle */
.nav-toggle {
  display: none !important;
  margin-left: auto;
  margin-right: 0.5rem;
  font-size: 1.25rem;
  border: 1px solid var(--border);
  background: white;
  padding: 0.75rem 2rem;
  min-width: 100px;
  min-height: 48px;
  border-radius: 8px;
  position: relative;
  z-index: 2001;
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Main */
main.container { padding: 2rem 1rem; }

/* Remove top gap when a hero is the first element inside the page container */
main.container > .hero:first-child,
.container > .hero:first-child,
main.container > .hero-small:first-child,
.container > .hero-small:first-child {
  margin-top: -2rem; /* negate main.container's top padding */
}

.map-container {
  margin: 2rem 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

.travel-info details {
  margin: 0.5rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  background: #fff;
  cursor: pointer;
}

.travel-info summary {
  font-weight: 600;
  cursor: pointer;
}

.travel-info p {
  margin: 0.5rem 0 0;
}

.sponsor-levels {
  display: flex;
  gap: 2rem;
  margin: 2rem 0;
}

.sponsor-card {
  flex: 1;
  border-radius: 8px;
  padding: 1.5rem;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.sponsor-card.gold {
  border: 7px solid #ddd;
  border-color: #d4af37; /* gold */
  
}
.sponsor-card.silver {
  border: 5px solid #ddd;
  border-color: #c0c0c0; /* silver */
  
}

.sponsor-card h3 {
  margin-top: 0;
}

.sponsor-card .icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.sponsor-card.gold .icon {
  color: #d4af37; /* gold medal color */
}
.sponsor-card.silver .icon {
  color: #c0c0c0; /* silver medal color */
}

/* Style sponsor tables */
.sponsors table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
  text-align: center;
}

.sponsors table th,
.sponsors table td {
  border: 1px solid #ddd;
  padding: 0.75rem;
}

.sponsors table th {
  background-color: #f4f4f4;
  font-weight: 600;
}

.sponsors table tr:nth-child(even) {
  background-color: #fafafa;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background: #f9fafb;
  margin-top: 3rem;
}
.footer .container { padding: 1rem; }
.footer p { color: var(--muted); margin: 0; }

/* Responsive */
@media (max-width: 1024px) and (pointer: coarse) {
  .header-row { position: relative; z-index: 1100; }
  .nav-toggle {
    position: relative;
    margin-right: 0.5rem;
    min-width: 100px;
    min-height: 48px;
    padding: 0.75rem 2rem;
    z-index: 2001;
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    display: inline-block !important;
  }
  .header-row { gap: .5rem; }
  /* Keep nav in a single row with horizontal scroll on small screens */
  /* Make School group full-width like other items in mobile menu */
  .site-header .nav { align-items: stretch; }
  .site-header .nav > * { width: 100%; }
  .site-header .nav .nav-group { display: block; width: 100%; }
  .site-header .nav .submenu { width: 100%; }
}

/* Responsive hero heights */
@media (max-width: 1024px) {
  .hero { height: 300px; }
  .hero-small { height: clamp(120px, 16vh, 180px); }
}

/* --- Force hamburger on small screens --- */
@media (max-width: 1024px) and (pointer: coarse) {
  .header-row { position: relative; z-index: 1100; }
  .nav-toggle {
    display: inline-block !important;
    margin-left: auto;
    margin-right: 0.5rem;
    min-width: 100px;
    min-height: 48px;
    padding: 0.75rem 2rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  
  .site-header .nav {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0,0,0,.08);
    padding: .5rem;
    gap: .25rem;
    flex-direction: column;
    min-width: 220px;
    z-index: 1000;
  }
  
  .site-header .nav.open { display: flex !important; }
  /* Submenu inside popup */
  .site-header .nav .nav-group { position: static; }
  .site-header .nav .submenu { position: static; display: none; border: 0; box-shadow: none; padding: 0; }
  .site-header .nav .nav-group.open .submenu { display: flex; flex-direction: row; gap: 0.5rem; justify-content: center; }
  .site-header .nav .nav-group.open .submenu .submenu-link { flex: 1; min-width: 0; text-align: center; }

  .site-header .nav-link,
  .site-header .nav-trigger,
  .site-header .submenu-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center !important;
  }
}
