/* =========================================
   FONT
========================================= */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');

body {
  font-family: 'Open Sans', sans-serif;
  position: relative;
  min-height: 100vh;
  margin: 0;
  color: #2c6b2f;
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: url('pattern2.png');
  background-size: 150px auto;
  background-repeat: repeat;
  opacity: 0.9;
  z-index: 0;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(circle, rgba(204,255,102,0.8), rgba(0,102,0,0.8));
  z-index: -1;
  pointer-events: none;
}

header, main, footer, .container, .logo-text-container {
  position: relative;
  z-index: 2;
}

/* =========================================
   TEXT & LINKS
========================================= */
h1,h2,h3,h4,h5,h6,p,span,label { color: #2c6b2f; }

h1 {
  color: #1a4d1a !important;
  text-shadow: 1px 1px 3px rgba(255,255,255,0.8), 0 0 8px rgba(0,0,0,0.25);
  letter-spacing: 0.5px;
  font-weight: 700 !important;
  text-align: center;
  margin: 0.5rem 0 0.75rem 0;
  line-height: 1.3;
  font-family: 'Open Sans', sans-serif;
}
h1 small {
  display: block;
  color: #336633 !important;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.6);
  font-weight: 500;
  font-size: 0.65em;
  margin-top: 0.3rem;
}

.logo-text-container,
.logo-text-container h1,
.logo-text-container .headline-text {
  position: relative !important;
  z-index: 999 !important;
  background: transparent !important;
}

a {
  color: #2c6b2f;
  text-decoration: none;
}
a:hover, a:focus { color: #1f4d22; text-decoration: underline; }

/* =========================================
   ANIMATIONEN
========================================= */
@keyframes fadeInAnimation { 0%{opacity:0;} 100%{opacity:1;} }
.fade-in { animation: fadeInAnimation 1.5s ease-in forwards; }

@keyframes slideFadeGlow {
  0% { opacity:0; transform:translateY(20px); box-shadow:0 0 0 rgba(44,107,47,0); }
  100% { opacity:1; transform:translateY(0); box-shadow:0 8px 20px rgba(44,107,47,0.3); }
}

/* =========================================
   FORMULARE
========================================= */
textarea, input[type="text"], input[type="password"], select {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #2c6b2f;
  border-radius: 12px;
  font-size: 1.1rem;
  font-family: Arial, sans-serif;
  color: #2c6b2f;
  resize: vertical;
  /*background-color: rgba(255,255,255,0.95);*/
  background: #ffffff; /* deckendes Weiß */
}
textarea:focus, input:focus, select:focus {
  outline: none;
  border-color: #1f4d22;
  box-shadow: 0 0 6px rgba(44,107,47,0.4);
}

/* =========================================
   BUTTONS
========================================= */
.logout-wrapper .logout-button {
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.25s ease;
}
.logout-wrapper .logout-button:hover {
  background-color: #bb2d3b !important;
  transform: translateY(-1px);
}

.btn-success {
  background-color: #2c6b2f !important;
  border-color: #2c6b2f !important;
  color: #fff !important;
  font-weight: 600;
  transition: all 0.25s ease;
}
.btn-success:hover, .btn-success:focus {
  background-color: #1f4d22 !important;
  border-color: #1f4d22 !important;
  box-shadow: 0 4px 10px rgba(44,107,47,0.3);
  transform: translateY(-1px);
}
.btn-outline-success {
  color: #2c6b2f !important;
  border-color: #2c6b2f !important;
  font-weight: 600;
  transition: all 0.25s ease;
}
.btn-outline-success:hover, .btn-outline-success:focus {
  background-color: #2c6b2f !important;
  color: #fff !important;
  border-color: #1f4d22 !important;
  box-shadow: 0 4px 10px rgba(44,107,47,0.3);
  transform: translateY(-1px);
}

/* =========================================
   FOOTER
========================================= */
footer, .footer {
  background-color: #fff;
  padding: 1rem 0;
  text-align: center;
  font-size: 0.95rem;
  color: #2c6b2f;
  position: relative;
  z-index: 2;
}
footer a, .footer a { color: #006600; }
footer a:hover, footer a:focus { color: #1f4d22; text-decoration: underline; }
.cookie-banner, .cookie-banner span { color: #ffcc00 !important; }
.cookie-banner a { color: #00ffff !important; text-decoration: underline; }
.cookie-banner a:hover { color: #fff !important; }

/* =========================================
   DATEIEN / TABELLEN / FILTER
========================================= */
.table-wrapper, #filter, .login_container {
  width: 90%;
  max-width: 1200px;
  margin: 20px auto;
  background: #ffffff; /* deckendes Weiß */
  /*background: rgba(255,255,255,0.92);*/  
  border: 1px solid #2c6b2f;
  padding: 20px 25px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(44,107,47,0.25);
}
.datei {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 1rem;
  border-bottom: 1px solid #ddd;
}
.file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon { font-size: 1.3em; color: #2c6b2f; text-decoration: none; }
.icon:hover { color: #1f4d22; }

.responsive-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  border-radius: 12px;
  overflow: hidden;
}
.responsive-table th, .responsive-table td {
  padding: 10px;
  border: 1px solid #ccc;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.responsive-table th { background-color: #e0e0e0; }
.responsive-table td:nth-child(1) { background-color: #c6efce; }
/*.responsive-table td:nth-child(2) { background-color: #ddebf7; }
.responsive-table td:nth-child(3) { background-color: #fce5cd; }*/
.responsive-table td:nth-child(4) { background-color: #c6efce; }
.responsive-table td:nth-child(5) { background-color: #ddebf7; }
.responsive-table tr:hover td { background-color: #fad6b4; }
.responsive-table td a { word-break: break-word; text-decoration: none; color: #0a58ca; }
.responsive-table td a:hover { text-decoration: underline; }

/* Checkbox */
.filter-checkbox {
  width: 20px;
  height: 20px;
  accent-color: #2c6b2f;
  vertical-align: left;
  margin-right: 0;
}
.login_container label {
  font-size: 1.2rem;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

/* =========================================
   TEILÜBERSCHRIFTEN & LINIEN
========================================= */
.klassen-trennung {
  display: block;
  margin: 20px 0 10px 0;
  padding: 6px 12px;
  font-weight: bold;
  font-size: 1rem;
  color: #1f4d22 !important;
  background-color: #b8e986;
  border-radius: 4px;
  text-align: left;
}
.gradient-line {
  height: 3px;
  background: linear-gradient(to right, #2c6b2f, #b8e986, #2c6b2f);
  border: none;
  margin: 6px 0 12px 0;
}

/* =========================================
   DATENSCHUTZ & IMPRESSUM
========================================= */
.card-body h2, .datenschutz-box h2, .impressum-box h2 {
  border-bottom: 2px dotted #b0b0b0;
  padding-bottom: 6px;
  margin: 1.5rem 0 1rem 0;
  color: #2c6b2f;
}
.card-body h3 {
  font-size: 1.5em;
  border-bottom: 1px dotted #b0b0b0;
  padding-bottom: 6px;
  margin: 1.5rem 0 1rem 0;
  color: #2c6b2f;
}

/* =========================================
   KARTEN THEMAFARBEN
========================================= */
.thema-willkommen .card { border: 3px solid #2e8b57; background-color: rgba(255,255,255,0.95); }
.thema-auszeit .card { border: 3px solid #ff8800; background-color: rgba(255,255,255,0.95); }
.thema-lernen .card { border: 3px solid #7b5ad9; background-color: rgba(255,255,255,0.95); }
.thema-sperrzone .card { border: 3px solid #0077b6; background-color: rgba(255,255,255,0.95); }
.thema-privat .card { border: 3px solid #d43f3f; background-color: rgba(255,255,255,0.95); }

.thema-willkommen .btn-success { background-color:#2e8b57 !important; border-color:#26734a !important; }
.thema-auszeit .btn-success { background-color:#ff8800 !important; border-color:#e67300 !important; color:#fff !important; }
.thema-lernen .btn-success { background-color:#7b5ad9 !important; border-color:#6548b8 !important; }
.thema-sperrzone .btn-success { background-color:#0077b6 !important; border-color:#005f8a !important; }
.thema-privat .btn-success { background-color:#d43f3f !important; border-color:#a92f2f !important; }

.thema-willkommen .btn-success:hover { background-color:#257347 !important; }
.thema-auszeit .btn-success:hover { background-color:#e67300 !important; }
.thema-lernen .btn-success:hover { background-color:#6548b8 !important; }
.thema-sperrzone .btn-success:hover { background-color:#005f8a !important; }
.thema-privat .btn-success:hover { background-color:#a92f2f !important; }

/* =========================================
   Karten animieren
   ========================================= */  
.card.h-100 {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card.h-100:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 25px rgba(0,0,0,0.4);
}

/* =========================================
   GALERIE / LIGHTBOX
========================================= */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px,1fr));
  gap: 24px;
  padding: 10px;
  justify-items: center;
}
.gallery.few-items { grid-template-columns: repeat(auto-fit, minmax(400px,1fr)); }
@media(max-width:1024px){ .gallery.few-items { grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); } }
@media(max-width:768px){ .gallery.few-items { grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); } }
@media(max-width:480px){ .gallery.few-items { grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); } }

.item {
  position: relative; width: 100%; aspect-ratio: 4/3; overflow: hidden;
  border-radius: 14px; background:#f7f7f7; box-shadow:0 6px 18px rgba(0,0,0,0.12);
  transform: translateY(20px); opacity:0;
  animation: slideFadeGlow 0.8s ease forwards;
}
.item:nth-child(odd){animation-delay:0.1s;} .item:nth-child(even){animation-delay:0.2s;}
.item img, .item video{
  border: 4px solid #fff;
  box-shadow:0 4px 16px rgba(0,0,0,0.2);
  border-radius: inherit;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease, box-shadow 0.5s ease;
}
.item:hover img, .item:hover video{ transform:scale(1.1); filter:brightness(1.15) contrast(1.1); box-shadow:0 8px 25px rgba(44,107,47,0.5); border-color: rgba(255,255,255,0.9);}
.item span{
  position:absolute; bottom:0; left:0; width:100%; text-align:center; font-size:0.9em; font-weight:500;
  color:white; background: rgba(0,0,0,0.6); padding:4px 0; border-radius:0 0 8px 8px;
  opacity:0; transform:translateY(10px); transition: all 0.3s ease;
}
.item:hover span{ opacity:1; transform:translateY(0); }

/* =========================================
   Für Weihnachten und roten Hintergrund
========================================= */
.advent-banner {
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.2s;
}

.advent-banner:hover {
    background: yellow !important;
    color: black !important;
}

/* =========================================
   Styling für breadcrumb.php
========================================= */

.breadcrumbs {
    font-size: 0.9em;
    margin: 15px 0 25px;
    text-align: left;
}
.breadcrumbs a {
    text-decoration: none;
    color: #007BFF;
}
.breadcrumbs span {
    color: #555;
}
.breadcrumbs a:hover { 
    text-decoration: underline; 
}

/* =========================================
   RESPONSIVE
========================================= */
@media(max-width:900px){
  .table-wrapper{ width:95%; padding:15px; }
  .table-wrapper table{ display:block; overflow-x:auto; white-space:nowrap; }
  .table-wrapper th, .table-wrapper td{ padding:8px 10px; font-size:0.95rem; }
  .filter-gruppe{ display:flex; flex-wrap:wrap; gap:6px; }
  .filter-gruppe label{ flex:1 1 45%; margin-bottom:6px; }
}
@media(max-width:768px){
  #chatBox, #privateBox, textarea{ max-width:90vw; font-size:1rem; }
  .datei{ flex-direction:row; gap:8px; font-size:1rem; }
  .file-name{ max-width:85%; }
}
@media(max-width:600px){
  #filter, .table-wrapper{ padding:10px 12px; }
  .table-wrapper th{ font-size:1rem; }
  .datei{ flex-wrap:wrap; font-size:0.9rem; }
  .file-name{ width:100%; white-space:normal; }
  .icon{ font-size:1.2em; }
}

.content{ flex:1; padding:30px; display:flex; flex-direction:column; align-items:center; }
#map{ width:100%; height:80vh; max-width:900px; }
@media(max-width:1024px){
  .sidebar{ width:95%; max-height:none; margin:10px auto; border-right:none; border-bottom:1px solid #ccc; padding:10px 15px; }
  #track-info{ margin-top:10px; }
  .content{ width:100%; padding:15px; align-items:center; }
  #map{ width:95%; max-width:700px; height:auto; aspect-ratio:1/1; margin:15px auto; }
}

canvas { all: unset; }
