:root{
  --steel-gray: #6f7b86; /* Stahlgrau */
  --dark-blue: #08306b; /* Dunkelblau */
  --accent-orange: #ff6a00; /* Orange */
  --bg: #f7f9fb;
  --text: #1b1b1b;
  --muted: #69707a;
  --max-width: 1100px;
  --radius: 8px;
  --gap: 1rem;
  font-size: 16px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Reset & basics */
* {box-sizing: border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.45;
  font-size: 16px;
}

/* Main - Heaeder FONT */
body h2{color:var(--accent-orange);margin-top:0.4rem}

.wrap{
  width:calc(100% - 2rem);
  max-width:var(--max-width);
  margin:0 auto;
  padding:1rem 0;
}

/* Header */
.site-header{
  background:linear-gradient(0deg, rgba(11,48,107,0.02), rgba(11,48,107,0.02));
  border-bottom:1px solid rgba(15,23,30,0.04);
}
.site-header .wrap{display:flex;align-items:center;gap:1rem;justify-content:space-between;padding:0.5rem 0}
.brand{display:flex;align-items:center;gap:0.6rem;text-decoration:none;color:var(--dark-blue)}
/* .logo{width:44px;height:44px;object-fit:contain;border-radius:6px;background:var(--steel-gray);padding:6px} */
.logo{width:148px;height:44px;object-fit:contain;border-radius:6px;background:var(--steel-gray);padding:1px}
.school-name{font-weight:700;font-size:1.05rem;color:var(--dark-blue)}

/* Navigation layout */
.main-nav{ display:flex; align-items:center; gap: 0.6rem}
.primary-links{list-style:none;margin:0;padding:0;display:flex;align-items:center;gap:0.6rem}
.main-nav .nav-link{
  color: var(--steel-gray);
  text-decoration: none;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  display: inline-block;
}
/* .main-nav .nav-link:hover{color:white;background: var(--dark-blue)} */
/* Active link: orange background */
/* .main-nav .nav-link.active { */
  /* background: var(--accent-orange); */
  /* color: #fff; */
  /* border-radius: 6px; */
  /* padding: 0.45rem 0.6rem; */
/* } */
.main-nav .nav-link:hover{color:white;background: var(--accent-orange)}
/* Active link: orange background */
.main-nav .nav-link.active {
  background: var(--dark-blue);
  color: #fff;
  border-radius: 6px;
  padding: 0.45rem 0.6rem;
}

/* Nav toggle (mobile) */
.nav-toggle{ display: none; background: transparent; border: 0; padding: 8px; cursor: pointer; }
.hamburger{ width: 22px; height: 2px; background: var(--steel-gray); display: block; position: relative; }
.hamburger::after, .hamburger::before{ content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--steel-gray); display: block; }
.hamburger::before{ top: -6px; }
.hamburger::after{ bottom: -6px; }

/* Hero */
.hero{
  background: linear-gradient(90deg, rgba(8,48,107,0.9), rgba(111,123,134,0.05));
  color: white; padding: 3.2rem 0;
}
.hero-inner{ display:flex; flex-direction:column; gap: 0.8rem; }
.hero h1{ margin: 0; font-size: clamp(1.6rem, 3.6vw, 2.6rem); font-weight: 800; }
/* .lead{ opacity: 0.95; max-width: 60ch; } */
.lead{ opacity: 0.95; max-width: 65ch; }

/* Buttons */
.btn{ display:inline-block; padding: 0.6rem 1rem; border-radius: 8px; text-decoration: none; border: 0; cursor: pointer; }
.btn.primary{ background: var(--accent-orange); color: white; }
.btn.secondary{ background: transparent; color: var(--dark-blue); border: 1px solid rgba(11,48,107,0.08); margin-bottom: 1px;}
.hero .btn {margin-bottom: 2px;}

/* Features */
.features{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding: 2rem 0; }
.features article{ background: white; padding: 1.2rem; border-radius: 10px; box-shadow: 0 6px 18px rgba(15,23,30,0.04); }


.schulsong-wrapper {
  display: inline-flex;
  justify-content: center;
  gap: 0.5rem; /* Abstand zwischen SVG und Text */
  /* min-width: unset; */
  align-items: center;
  margin-bottom: 1px;
}



/* Gallery */
.gallery-section{ padding: 2rem 0; }
.gallery-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.8rem; }
.gallery-item{ background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 8px 20px rgba(15,23,30,0.04); display:flex; flex-direction:column; }
.gallery-item img{ width: 100%; height: 170px; object-fit: cover; display: block; cursor: pointer; }
.gallery-item figcaption{ text-align:center ; padding: 0.6rem 0.8rem; font-size: 0.95rem; color: var(--muted); }

/* Lightbox */
.lightbox{ position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,0.7); z-index: 9999; padding: 2rem; }
.lightbox[aria-hidden="false"]{ display: flex; }
.lb-stage{ min-width: 55%; max-width: 100%; max-height: 80%; display:flex; flex-direction:column; align-items:center; }
.lb-stage img{ border-radius: 8px; box-shadow: 0 12px 36px rgba(0,0,0,0.6);
              /* min-width: 500px, auto; */
			  max-width: 80vw;
			  /* max-height: 70vh; */
			  /* max-width: 400px; */
			  /* max-height: 400px;  */
			  /* width: auto; */
			  /* height: auto; */
 }
.lb-caption{ color: white; margin-top: 0.6rem; }
.lb-close, .lb-prev, .lb-next{
  background: transparent; border: 0; color: white; font-size: 1.6rem; cursor: pointer; padding: 0.6rem; border-radius: 6px;
}
.lb-prev, .lb-next{ position: fixed; top: 50%; transform: translateY(-50%); background: rgba(11,48,107,0.4); padding: 0.7rem; }
.lb-prev{ left: 12px; }
.lb-next{ right: 12px; }
.lb-close{ position: fixed; top: 14px; right: 18px; background: rgba(0,0,0,0.25); }

/* Cards */
.cards{ display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.card{ background: white; padding: 1rem; border-radius: 10px; box-shadow: 0 6px 18px rgba(15,23,30,0.04); overflow-x: auto; /*Scrollbar aktivieren*/;margin-bottom: 0.3rem; /*or try 0.2rem or even 0*/;}
.card h3{ margin-top: 0; color: var(--accent-orange);margin-bottom: 0.3rem; /* or try 0.2rem or even 0 */; }

/* FIX INDEX GALLERY */
.main-gallery .gallery-item {
  width: 170px;
}


/* Footer */
.site-footer{ background: white; border-top: 1px solid rgba(15,23,30,0.04); padding: 1.2rem 0; margin-top: 2rem; }
.footer-inner{ display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.footer-links a{ display: inline-block; margin-left: 0.8rem; color: var(--steel-gray); text-decoration: none; }

/* Dropdown specific styles (closed by default) */
.has-dropdown { position: relative; display: inline-block; }
.dropdown-toggle { background: transparent; border: 0; color: var(--steel-gray); padding: 0.45rem; cursor: pointer; border-radius: 6px; display: inline-flex; align-items: center; }
.dropdown-toggle svg { display: block; width: 20px; height: 14px; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(11,48,107,0.12);
  border-radius: 8px;
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  z-index: 60;
  opacity: 0;
  transform-origin: top right;
  transform: scaleY(0.95);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

/* visible state controlled via aria-expanded attribute on container */
.has-dropdown[aria-expanded="true"] > .dropdown-menu {
  opacity: 1;
  transform: scaleY(1);
  pointer-events: auto;
}

.dropdown-menu li + li { margin-top: 0.25rem; }
.dropdown-menu .nav-link {
  display: block;
  padding: 0.6rem 0.9rem;
  /* color: var(--steel-gray); */
  color: var(--steel-gray);
  border-radius: 6px;
}
/* .dropdown-menu .nav-link:hover { background: rgba(8,48,107,0.06); color: var(--dark-blue); } */
.dropdown-menu .nav-link:hover { background: var(--accent-orange); color: white; }

/* Accessibility focus styles */
a:focus, button:focus, .nav-link:focus {
  outline: 3px solid rgba(255,106,0,0.18);
  outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 900px){
  .features{ grid-template-columns: repeat(2,1fr); }
  .hero {
    padding: 1rem 0;
  }

}


@media (max-width: 700px) {

  /* one row in small display */
  .features {
    grid-template-columns: 1fr;
    gap: 0.6rem;
	padding: 1rem 0;
  }
  .features article {
    font-size: 0.95rem;
  }
  
  .features h2 {
    margin-top: 0;
  }

  .hero-inner{ gap: 0.05rem; }
  
  /* .article.h2{ margin: 0; font-size: clamp(1.6rem, 3.6vw, 2.6rem); font-weight: 800; } */


  /* Hamburger-Button sichtbar machen */
  .nav-toggle {display:block;background:transparent;border:none;cursor:pointer;padding:8px;}
  .hamburger {width:22px;height:2px;background:var(--steel-gray);display:block;position:relative;}
  .hamburger::before,.hamburger::after {content:"";position:absolute;left:0;right:0;height:2px;background:var(--steel-gray);}
  .hamburger::before {top:-6px;}
  .hamburger::after {bottom:-6px;  }

  /* Navigation verstecken */
  .main-nav .primary-links {
    display: none;
    flex-direction: column;
    gap: 0;
    background: white;
    position: fixed;
    top: 64px;
    right: 12px;
    max-width: 80vw;
    border-radius: 5px;
    box-shadow: 0 5px 10px rgba(15, 23, 30, 0.12);
    padding: 4px;
    max-height: 80vh;
    /* overflow-y: auto; */
    /* z-index: 1000; */
  }

  /* Navigation anzeigen, wenn aria-hidden="false" */
  .main-nav[aria-hidden="false"] .primary-links {
    display: flex;
  }

  /* Links im Menü */
  .main-nav .primary-links .nav-link {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    width: 100%;
	/* height: 10px; */
    color: var(--steel-gray);
    text-decoration: none;
  }

  /* Alle primary links mit Orange, auch der aktuelle */
  .main-nav .primary-links .nav-link:hover {
    /* background: var(--accent-orange); */
    color: white;
  }

  /* Dropdown-Menü mobil vereinfachen */
  .dropdown-menu {
    position: static;
    box-shadow: none;
    background: transparent;
    padding: 0;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .has-dropdown {
	/* display: flex; */
    /* width: 100%; */
	max-width: 80vh;
	/* justify-content: center; */
	max-height: 80vh; /* maximal 80% der Bildschirmhöhe */
	overflow-y: auto; /* Scrollbar aktivieren */
  }
  
  /* Hamburger-Button nur in der Hauptnavigation */
  nav.main-nav .hamburger {
    display: block;
  }
 
/* Hide hamburger icon if it appears inside dropdowns */
.dropdown-toggle svg {
  display: none !important;
}



}

/* Utility classes */
.muted { color: var(--muted); }
.meta { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.6rem; }

/* Tables used on Termine page */
.events-table th, .events-table td { padding: 8px; border-bottom: 1px solid #eaeaea; text-align: left; }
.events-table thead th { font-weight: 700; background: transparent; color: var(--dark-blue); }

/* Small touch-target improvements */
.primary-links .nav-link, .dropdown-toggle { -webkit-tap-highlight-color: rgba(0,0,0,0); }


/**MODALIMAGES**/
/* Style the Image Used to Trigger the Modal */
.modal-img,
#myImg {
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

#myImg:hover{
  opacity: 0.7;
  border-radius: 8px;
}

.preview-figure {
  display: flex;
  flex-direction: column;
  align-items: center;       /* horizontal zentrieren */
  gap: 0.5rem;
  margin: 0 auto 1rem;       /* zentrieren und Abstand nach unten */
  width: fit-content;        /* passt sich Bildgröße an */
}



/* zentrierte Bildunterschrift */
.preview-caption {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

/* Optional: kleinere Version auf sehr kleinen Bildschirmen */
@media (max-width: 420px) {
    .hero .btn {
		white-space: nowrap;
		display: block;
		margin: 2px auto; /* zentriert und Abstand nach unten */
		min-width: 250px;
		width: fit-content ;
		/* margin-bottom: 2px; */
		text-align : center;
		}
  .preview-figure .modal-img { width: 120px; max-width: 90%}
  /* .preview-figure .modal-img { width: 130px} */
  .events-table {
    transform: scale(0.73);
	padding: 2px 2px;
    transform-origin: top left;
    width: 100%;
  }
}

/* Optional: kleinere Version auf sehr kleinen Bildschirmen */
@media (max-width: 600px) {
    .hero .btn {
		white-space: nowrap;
		display: block;
		margin: 2px auto; /* zentriert und Abstand nach unten */
		min-width: 250px;
		width: fit-content ;
		/* margin-bottom: 2px; */
		text-align : center;
		}
  .preview-figure .modal-img { width: 120px; max-width: 90%}
  /* .preview-figure .modal-img { width: 130px} */

}


/* The Modal (background) */
.modal {
  display: none; /*Hidden by default*/
  position: fixed; /*Stay in place*/
  z-index: 1; /*Sit on top*/
  padding-top: 100px; /*Location of the box*/
  left: 0;
  top: 0;
  width: 100%; /*Full width*/
  height: 100%; /*Full height*/
  overflow: auto; /*Enable scroll if needed*/
  background-color: rgb(0,0,0); /*Fallback color*/
  background-color: rgba(0,0,0,0.9); /*Black w/ opacity*/
}

/* Modal Content (Image) */
.modal-content {
  margin: auto;
  display: block;
  /* width: 80%; */
  width: auto;
  /* max-width: 700px; */
  max-width: 80%;
  /* height: 80%; */
  height: 80%;
  /* max-height: 80vh; */
  max-height: 80%;
  object-fit: contain;
  border-radius: 8px;
}

/* Caption of Modal Image (Image Text) - Same Width as the Image */
#caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 600px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  height: 150px;
}

/* Add Animation - Zoom in the Modal */
.modal-content, #caption {
  animation-name: zoom;
  animation-duration: 0.6s;
}

@keyframes zoom {
  from {transform:scale(0)}
  to {transform:scale(1)}
}

/* The Close Button */
.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 700px){
  .modal-content {
    width: 100%;
	border-radius: 8px;
  }
}

/* End of file */
