/* ========== Grundlayout und Body ========== */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #ffffff;
  color: #000000;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ========== Header & Navigation ========== */
header {
  background-color: #ffffff;
  border-bottom: 2px solid #e0e0e0;
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav ul li {
  margin: 0 15px;
}

nav ul li a {
  text-decoration: none;
  color: #000;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 5px;
}

nav ul li a:hover,
nav ul li a.active {
  background-color: #ff0000;
  color: #fff;
}

/* ========== Main Content Bereich ========== */
main {
  flex: 1;
  padding: 40px 20px;
  max-width: 800px;
  margin: 0 auto;
}

/* ========== Footer ========== */
footer {
  text-align: center;
  padding: 20px 0;
  background-color: #f5f5f5;
  color: #777;
  margin-top: auto;
}

/* ========== Cards Wrapper für Team, Leistungen etc. ========== */
.cards-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.card {
  width: 180px;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  background-color: #f9f9f9;
}

.card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%; /* Hier runde Bilder für Team etc. */
  margin-bottom: 8px;
}

/* ========== News-Artikel Standard-Styling ========== */
.news-article.pinned {
  border-left: 6px solid #007BFF; /* freundliches Blau */
  background-color: #E6F0FF;      /* hellblauer Hintergrund */
  padding-left: 15px;             /* Abstand zum Rand */
  position: relative;
}

.news-article .pinned-label {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #007BFF;
  color: white;
  font-weight: 600;
  font-size: 0.9em;
  padding: 3px 10px;
  border-radius: 3px;
  user-select: none;
  box-shadow: 0 0 6px rgba(0,123,255,0.4);
}

/* Angepasstes Styling: Kleintierfarm Artikel pinned */
/* Kein grüner Balken, kein Hintergrund, nur grüne Umrandung und Schatten */
.kleintierfarm-article.pinned {
  border-left: none;                 /* grüner Balken weg */
  background-color: #fff;            /* kein grüner Hintergrund */
  border: 1px solid #28a745;         /* grüne Umrandung */
  box-shadow: 0 0 8px 2px rgba(40, 167, 69, 0.4); /* leichter Schatten */
  position: relative;
}

.kleintierfarm-article .pinned-label {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(40, 167, 69, 0.9);
  color: white;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  user-select: none;
}

/* ========== Grundstruktur für Seiten ähnlich team.php, leistungen.php ========== */
.page-title {
  font-size: 2.5rem;
  margin-bottom: 0.3em;
  font-weight: 700;
  color: #222;
}

.intro-text {
  font-size: 1.2rem;
  margin-bottom: 2em;
  color: #555;
}

/* ========== News-Liste (Container) ========== */
.news-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.8rem;
  justify-content: flex-start;
}

/* ========== News-Card Styling ========== */
.news-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 3px 6px rgb(0 0 0 / 0.05);
  width: 100%;
  max-width: 700px;           /* Etwas breiter als vorher */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.3s ease;
}


.news-card.pinned {
  border-color: #007bff;
  box-shadow: 0 0 8px 2px rgba(0, 123, 255, 0.4);
}

.pinned-label {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 123, 255, 0.9); /* passend zu deinem blauen Rahmen bei .pinned */
  color: white;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  user-select: none;
}

/* Bildcontainer innerhalb der News-Card */
.card-image-wrapper {
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Standard für alle Bilder: cover */
.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
}

/* Ausnahme für das Default-Bild */
.card-image-wrapper.default-img img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ========== Inhalt der Card ========== */
.card-content {
  padding: 1em 1.3em 1.5em;
  flex-grow: 1;
}

.card-title {
  margin: 0 0 0.5em 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #222;
}

.card-text {
  font-size: 1rem;
  line-height: 1.45;
  color: #444;
  white-space: pre-wrap;
}

/* ========== Buttons oben rechts in der Card ========== */
.card-actions {
  position: absolute;         /* Buttons werden oben rechts über das Bild gelegt */
  top: 8px;
  right: 8px;
  display: flex;
  gap: 0.7em;
  z-index: 10;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.25s ease;
  white-space: nowrap;
}

.btn-edit {
  background-color: #007bff;
  color: #fff;
}

.btn-edit:hover {
  background-color: #0056b3;
}

.btn-pin {
  background-color: #28a745;
  color: #fff;
}

.news-card.pinned .btn-pin {
  background-color: #dc3545;
}

.btn-pin:hover {
  filter: brightness(85%);
}

/* ========== Responsive Anpassungen ========== */
@media (max-width: 480px) {
  .news-list {
    flex-direction: column;
  }
  .news-card {
    max-width: 100%;
  }
}

/* ========== Kein News-Text Styling (wenn keine News vorhanden) ========== */
.no-news {
  font-style: italic;
  color: #777;
  font-size: 1.15rem;
  margin-top: 2rem;
  text-align: center;
}

/* === Kleintierfarm Container und Cards === */
.kleintierfarm-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.8rem;
  justify-content: flex-start;
}

/* Karte im Stil der News-Cards, aber maximal 700px breit */
.kleintierfarm-article {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 3px 6px rgb(0 0 0 / 0.05);
  width: 100%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.3s ease;
  padding-bottom: 1rem;
}

/* login.php: 

/* Container für das Login-Formular */
.page-login form {
  max-width: 350px;
  margin: 20px auto 40px auto;
  padding: 25px 30px;
  background-color: #f9f9f9;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.page-login form label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #333;
}

.page-login form input[type="text"],
.page-login form input[type="password"] {
  width: 100%;
  padding: 10px 14px;
  font-size: 1rem;
  border: 1.8px solid #ccc;
  border-radius: 6px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.page-login form input[type="text"]:focus,
.page-login form input[type="password"]:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 8px rgba(74, 144, 226, 0.5);
}

.page-login form button {
  margin-top: 15px;
  width: 100%;
  background-color: #4a90e2;
  color: white;
  font-weight: 700;
  padding: 12px 0;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.page-login form button:hover {
  background-color: #357ABD;
}

/* Optional: Responsive */
@media (max-width: 400px) {
  .page-login form {
    margin: 15px;
    padding: 20px;
  }
}

/* Team.php

/* Buttons in team.php, passend zu den Cards */
.cards-wrapper .card button,
form button {
  background-color: #2a7ae2;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-shadow: 0 2px 5px rgb(42 122 226 / 0.4);
}

.cards-wrapper .card button:hover,
form button:hover {
  background-color: #1e5bb8;
  box-shadow: 0 4px 8px rgb(30 91 184 / 0.6);
}

/* Eingabefelder und Textareas */
.cards-wrapper input[type="text"],
.cards-wrapper input[type="file"],
.cards-wrapper textarea,
form input[type="text"],
form input[type="file"],
form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1.8px solid #d1d5db; /* dezentes helles Grau */
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  font-family: inherit;
  box-sizing: border-box;
  margin-top: 4px;
  margin-bottom: 12px;
}

.cards-wrapper input[type="text"]:focus,
.cards-wrapper input[type="file"]:focus,
.cards-wrapper textarea:focus,
form input[type="text"]:focus,
form input[type="file"]:focus,
form textarea:focus {
  outline: none;
  border-color: #2a7ae2;
  box-shadow: 0 0 6px #2a7ae2aa;
}

/* Kleinere Buttons im Inline-Formular (Löschen) */
.cards-wrapper form.inline button {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 5px;
  background-color: #e03e3e;
  box-shadow: 0 2px 5px rgb(224 62 62 / 0.4);
}

.cards-wrapper form.inline button:hover {
  background-color: #b32b2b;
  box-shadow: 0 4px 8px rgb(179 43 43 / 0.6);
}

/* Edit-Formulare schön abgesetzt */
.edit-form {
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.1);
  padding: 15px;
  margin-top: 12px;
}

/* Formularüberschriften */
h2 {
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: 700;
  color: #222;
}

/* Datei-Input ausblenden, eigenen Button und Text anzeigen */
.file-upload-wrapper {
  position: relative;
  display: inline-block;
}

.file-upload-wrapper input[type="file"] {
  opacity: 0;
  width: 120px;
  height: 35px;
  position: absolute;
  left: 0;
  top: 0;
  cursor: pointer;
  z-index: 2;
}

.file-upload-btn {
  display: inline-block;
  padding: 8px 15px;
  background-color: #2a7ae2;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
}

.file-upload-text {
  font-size: 0.8rem;
  color: #666;
  margin-top: 4px;
  user-select: none;
}

.team-page .card form.inline-form button,
.team-page .card button.edit {
    margin-right: 8px;
}

.team-page .card form.inline-form button:last-child,
.team-page .card button.edit:last-child {
    margin-right: 0;
}

.button {
  background-color: #007bff;
  border: none;
  color: white;
  padding: 8px 16px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: inline-block;
  user-select: none;
}

.button:hover {
  background-color: #0056b3;
}

.button.danger {
  background-color: #dc3545;
}

.button.danger:hover {
  background-color: #a71d2a;
}

.button.edit {
  background-color: #28a745;
}

.button.edit:hover {
  background-color: #1e7a31;
}

input[type="text"],
textarea,
input[type="file"] {
  width: 100%;
  padding: 8px 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #fafafa;
  box-sizing: border-box;
  transition: border-color 0.25s ease;
  font-family: inherit;
  resize: vertical;
  margin-top: 4px;
  margin-bottom: 12px;
}

input[type="text"]:focus,
textarea:focus,
input[type="file"]:focus {
  border-color: #007bff;
  outline: none;
  background-color: #fff;
}

.edit-form, .add-form {
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 15px;
  margin-top: 15px;
}
.edit-form.hidden {
  display: none;
}

.inline-form {
  display: inline;
}
.inline-form button {
  margin-right: 8px;
}

.card .button {
  margin: 5px 5px 0 5px;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* News-Buttons: Standard blau */
.btn-news {
  background-color: #007bff;
}

/* Kleintierfarm-Buttons: Standard grün */
.btn-kleintierfarm {
  background-color: #28a745;
}

/* Wenn angepinnt: rot (überschreibt Standardfarben) */
.btn.pinned {
  background-color: #dc3545 !important;
}

/* Admin-Tabelle dezent und einheitlich */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    color: #333;
}

.admin-table th {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    text-align: left;
    border-radius: 6px 6px 0 0;
}

.admin-table td {
    background-color: #f9f9f9;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.admin-table tr td:first-child {
    border-left: none;
}

.admin-table tr td:last-child {
    border-right: none;
}

.admin-table tr:hover td {
    background-color: #e6f0ff;
}

.admin-table select {
    padding: 5px 8px;
    border: 1px solid #bbb;
    border-radius: 4px;
    background: white;
    font-size: 0.9rem;
}

.admin-table button {
    margin-left: 8px;
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.admin-table button:hover {
    background-color: #007bff;
}

.admin-table em {
    color: #666;
    font-style: normal;
    font-weight: 600;
}

/* Box-Sizing global setzen, falls noch nicht vorhanden */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Kleintierfarm-Artikel Breite und Box-Modell anpassen */
.kleintierfarm-article,
.kleintierfarm-article.pinned {
  width: 100%;           /* oder feste Breite z.B. 300px, je nach Layout */
  max-width: 700px;      /* max-Breite anpassen wie gewünscht */
  box-sizing: border-box; /* wichtig für Padding & Border */
}

/* Header-Grundlayout */
header {
  display: flex;
  align-items: center;
  background-color: #ffffff;
  border-bottom: 2px solid #e0e0e0;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  gap: 20px;
  justify-content: space-between;
}

/* Logo-Text links */
header .logo a {
  font-weight: bold;
  font-size: 1.5rem;
  color: #333333;
  text-decoration: none;
  white-space: nowrap;
}

/* Burger-Button - versteckt auf Desktop */
.burger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 25px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100; /* über dem Menü */
}

.burger span {
  width: 100%;
  height: 3px;
  background-color: #333333;
  border-radius: 2px;
  display: block;
}

/* Navigation */
nav.nav-menu {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  /* Desktop: Menü horizontal, sichtbar */
  max-height: none;        /* keine Begrenzung */
  overflow: visible;       /* Standard Overflow */
  position: static;        /* keine fixe Position */
  flex-direction: row;     /* horizontal */
  background: transparent; /* transparent, kein BG */
  box-shadow: none;
  transition: none;
}

/* UL in nav: Menü horizontal */
nav.nav-menu ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

/* Links im Menü */
nav.nav-menu ul li a {
  color: #333333;           /* Dunkelgrau/Schwarz normal */
  text-decoration: none;
  font-weight: 600;         /* schön kräftig */
  font-size: 1rem;          /* normale Schriftgröße */
  padding: 0.5rem 1rem;
  white-space: nowrap;
  transition: color 0.3s;
}

nav.nav-menu ul li a:hover {
  color: #000000;           /* Schwarz beim Hover */
}

nav.nav-menu ul li a.active {
  color: #333333;           /* gleiche Farbe wie normal */
  font-weight: 700;         /* nur noch fetter, keine Farbe oder Unterstrich */
  text-decoration: none;
}

/* Mobile/Tablet */
@media (max-width: 1400px) {
  .burger {
    display: flex;  /* Burger sichtbar machen */
  }

  nav.nav-menu {
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    position: fixed;
    top: 60px;       /* unter Header */
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: max-height 0.3s ease;
    z-index: 1000;
    display: flex; /* wichtig, damit flex-direction wirkt */
  }

  nav.nav-menu.open {
    max-height: 500px; /* oder größer je nach Inhalt */
  }

  nav.nav-menu ul {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
    width: 100%;
    text-align: center;
  }

  nav.nav-menu ul li a {
    padding: 0.75rem 0;
    width: 100%;
    font-size: 1rem;
  }

  /* Aktiver Link im geöffneten Burger-Menü etwas kompakter */
  nav.nav-menu.open ul li a.active {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    font-size: 0.9rem;
  }
}

/* Bilder Slider */

.card-image-wrapper.slider-wrapper {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 1rem;
}

.slide-img {
  width: 100%;
  height: auto;
  display: none; /* Nur aktives Bild wird sichtbar */
}

.slide-img.active {
  display: block;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: none;
  color: white;
  font-size: 1.5rem;
  padding: 0.2rem 0.7rem;
  cursor: pointer;
  user-select: none;
  border-radius: 3px;
  z-index: 10;
  /* Sichtbar machen: */
  display: block;
}

.prev-btn {
  left: 0.5rem;
}

.next-btn {
  right: 0.5rem;
}

.slider-btn:hover {
  background: rgba(0,0,0,0.8);
}

