/* ============ Design Tokens ============ */
:root{
  --deep: #012456;
  --blue: #044F8A;
  --primary: #0889C0;
  --accent: #1CCDEC;
  --light: #D7ECF5;
  --paper: #F9FCFD;

  --text: #0B1B2A;
  --muted: rgba(11,27,42,.72);

  --radius: 16px;
  --radius-lg: 22px;

  --shadow: 0 10px 30px rgba(1,36,86,.18);
  --shadow-soft: 0 8px 20px rgba(1,36,86,.12);

  --container: 1100px;

  --space-1: .5rem;
  --space-2: .75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;

  --focus: 0 0 0 4px rgba(28,205,236,.35);
}

/* ============ Base ============ */
*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  line-height: 1.5;
  background: linear-gradient(
    180deg,
    #F4F6F8 0%,
    #FAFBFC 45%,
    #FFFFFF 100%
  );
}

img{
  max-width: 100%;
  height: auto;
  display: block;
}

a{
  color: var(--blue);
  text-decoration: none;
}

a:hover{
  text-decoration: underline;
}

:focus-visible{
  outline: none;
  box-shadow: var(--focus);
  border-radius: 10px;
}

.container{
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
}

.section{
  padding: clamp(2.25rem, 4vw, 3.5rem) 0;
}

.section--tight{
  padding-top: clamp(1.25rem, 3vw, 1.75rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

h1,h2,h3{
  line-height: 1.15;
  margin: 0 0 .75rem 0;
}

h1{
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
}

h2{
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  letter-spacing: -0.01em;
}

h3{
  font-size: 1.15rem;
}

p{
  margin: 0 0 1rem 0;
  color: var(--muted);
}

.small{
  font-size: .92rem;
  color: var(--muted);
}

/* ============ Header / Nav ============ */
.header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(249,252,253,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(1,36,86,.10);
}

.nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 0;
  gap: 1rem;
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  font-weight: 800;
  color: var(--deep);
}

.brand img{
  height: 52px;
}

@media (min-width: 900px){
  .brand img{
    height: 60px;
  }
}

.brand span{
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.navlinks{
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navlinks a{
  padding: .55rem .75rem;
  border-radius: 12px;
  color: var(--deep);
  text-decoration: none;
  font-weight: 600;
}

.navlinks a[aria-current="page"]{
  background: rgba(8,137,192,.10);
  color: var(--blue);
}

.navlinks a:hover{
  background: rgba(8,137,192,.08);
  text-decoration: none;
}

.navtoggle{
  display: none;
  border: 1px solid rgba(1,36,86,.15);
  background: white;
  border-radius: 12px;
  padding: .55rem .7rem;
  cursor: pointer;
}

.navtoggle svg{
  width: 22px;
  height: 22px;
}

/* Mobile nav */
@media (max-width: 860px){
  .navtoggle{
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .navlinks{
    position: absolute;
    left: 0;
    right: 0;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: rgba(249,252,253,.96);
    border-bottom: 1px solid rgba(1,36,86,.10);
    padding: .75rem 0;
  }

  .navlinks.is-open{
    display: flex;
  }

  .navlinks a{
    margin: 0 .9rem;
  }
}

/* ============ Hero ============ */
.hero{
  padding-top: clamp(2.25rem, 5vw, 3.5rem);
  padding-bottom: clamp(1.75rem, 4vw, 2.25rem);
  background: transparent;
  border-bottom: none;
}

.hero-grid{
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
}

@media (max-width: 860px){
  .hero-grid{
    grid-template-columns: 1fr;
  }
}

.hero-card{
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(1,36,86,.10);
  box-shadow: var(--shadow-soft);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
}

.hero-actions{
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.25rem;
}

/* ============ Buttons ============ */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8rem 1.05rem;
  border-radius: 14px;
  border: 1px solid rgba(1,36,86,.12);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary{
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border: none;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover{
  filter: brightness(1.02);
  text-decoration: none;
}

.btn-ghost{
  background: rgba(255,255,255,.65);
  color: var(--deep);
}

.btn-ghost:hover{
  background: rgba(255,255,255,.9);
  text-decoration: none;
}

/* ============ Cards / Grids ============ */
.grid{
  display: grid;
  gap: 1rem;
}

.grid-3{
  grid-template-columns: repeat(3, 1fr);
}

.grid-2{
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 860px){
  .grid-3,
  .grid-2{
    grid-template-columns: 1fr;
  }
}

.card{
  border-radius: var(--radius);
  background: white;
  border: 1px solid rgba(1,36,86,.10);
  box-shadow: var(--shadow-soft);
  padding: 1.1rem;
}

.card .badge{
  margin-bottom: .75rem;
}

.card h3{
  margin-bottom: .5rem;
}

.badge{
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .6rem;
  border-radius: 999px;
  background: rgba(8,137,192,.10);
  color: var(--blue);
  font-weight: 700;
  font-size: .85rem;
}

.hr{
  height: 1px;
  background: rgba(1,36,86,.10);
  margin: 1.25rem 0;
}

/* ============ Footer ============ */
.footer{
  margin-top: 2rem;
  border-top: 1px solid rgba(1,36,86,.10);
  background: linear-gradient(180deg, rgba(215,236,245,.55), rgba(249,252,253,1));
}

.footer-inner{
  padding: 1.75rem 0;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 1rem;
}

@media (max-width: 860px){
  .footer-inner{
    grid-template-columns: 1fr;
  }
}

.footer a{
  font-weight: 650;
}

.footer-links{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 860px){
  .footer-links{
    justify-content: flex-start;
  }
}

.footer-social{
  display: inline-flex;
  gap: .5rem;
  align-items: center;
}

.socialbtn{
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  text-decoration: none;
}

.socialbtn svg{
  width: 16px;
  height: 16px;
  fill: var(--muted);
  transition: fill .2s ease, transform .2s ease;
}

.socialbtn:hover svg{
  fill: var(--blue);
  transform: translateY(-1px);
}

/* ============ Page Header ============ */
.pagehead{
  padding: 2.2rem 0 1rem 0;
  background: transparent;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

/* ============ Events / Gallery ============ */
.event-card{
  display: grid;
  grid-template-columns: 1.6fr 300px;
  gap: 1.5rem;
  align-items: start; /* Text und Bilder oben ausrichten */
}

.event-card > div:first-child {
  align-self: start;
}

.event-image-wrapper{
  width: 300px;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.event-image-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  width: 100%;
}

.event-image-grid img{
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  display: block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.event-image-grid img:hover{
  transform: scale(1.02);
  opacity: 0.95;
}

.gallery-link{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 0.6rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.gallery-link svg{
  width: 16px;
  height: 16px;
}

.gallery-link:hover{
  opacity: 1;
}

/* ============ Lightbox ============ */
.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 28, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox.open{
  display: flex;
}

.lightbox img{
  max-width: 90%;
  max-height: 85%;
  border-radius: 16px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next{
  position: absolute;
  border: none;
  background: rgba(255,255,255,0.15);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
}

.lightbox-close{
  top: 20px;
  right: 20px;
}

.lightbox-prev{
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next{
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

/* ============ Responsive ============ */
@media (max-width: 800px){
  .event-card{
    grid-template-columns: 1fr;
  }

  .event-image-wrapper{
    width: 100%;
    max-width: 300px;
    margin-left: 0;
  }
}

.event-preview-image {
  display: block;
  margin-bottom: 0.75rem;
  border-radius: 14px;
  overflow: hidden;
}

.event-preview-image img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.event-preview-image:hover img {
  transform: scale(1.03);
  opacity: 0.95;
}

.event-mini {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 1rem;
  align-items: center; 
}

.event-mini-image {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  align-self: start;
 align-self: center; 
}

.event-mini-image img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.event-mini-image:hover img {
  transform: scale(1.03);
  opacity: 0.95;
}

@media (max-width: 700px) {
  .event-mini {
    grid-template-columns: 1fr;
  }

  .event-mini-image img {
    height: 160px;
  }
}