/* =========================================================
   Fischereiverein Theme (Bootstrap 5 friendly)
   Colors: Blue / White / Grey — Desktop + Mobile
   NOTE: No .container/.row width overrides, no global img sizing.
   ========================================================= */
/* ---------- Design Tokens ---------- */
:root {
  --accent-mint: #4fbfa8;
  /* kraeftig / frisch gruen */
  --brand-50: #ecfdf5;
  --brand-100: #d1fae5;
  --brand-200: #a7f3d0;
  --brand-300: #6ee7b7;
  --brand-500: #10b981;
  --brand-600: #059669;
  /* primary (kraeftig) */
  --brand-700: #047857;
  --brand-800: #065f46;

  --ink: #0f172a;
  /* text */
  --muted: #64748b;
  /* secondary text */
  --border: #d1e7dd;
  /* borders */
  --bg: #f2fbf6;
  /* app background */
  --surface: #ffffff;
  /* cards/sections */
  --surface-2: #f7fdf9;

  --shadow-sm: 0 6px 18px rgba(2, 8, 23, .06);
  --shadow-md: 0 10px 26px rgba(2, 8, 23, .10);

  --radius-xl: 1rem;
  /* ~rounded-4 */
}

/* Bootstrap variable overrides (colors only) */
:root {
  --bs-primary: var(--brand-600);
  --bs-link-color: var(--brand-600);
  --bs-link-hover-color: var(--brand-700);
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--bg);
  --bs-border-color: var(--border);
}

/* ---------- Base ---------- */
.fv-body {
  background: var(--bg) !important;
  /* overrides body.bg-white */
  color: var(--ink);
}

::selection {
  background: var(--brand-200);
}

/* Links: make Bootstrap “dark links” still feel branded */
a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.link-dark,
.text-dark a {
  color: var(--brand-700) !important;
}

.link-dark:hover,
.text-dark a:hover {
  color: var(--brand-800) !important;
}

/* Secondary text */
.text-secondary {
  color: var(--muted) !important;
}

/* ---------- Header / Navbar ---------- */
.fv-header {
  background:
    radial-gradient(900px 260px at 0% 0%, rgba(5, 150, 105, .10), rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, #ecfdf5 0%, #ffffff 70%);
}

.fv-navbar {
  background:
    linear-gradient(180deg, rgba(236, 253, 245, .92) 0%, rgba(255, 255, 255, .78) 75%) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.fv-navbar .navbar-nav .nav-link {
  color: var(--ink);
  border-radius: 999px;
  padding: .48rem .78rem;
  line-height: 1.1;
}

.fv-navbar .navbar-nav .nav-link:hover {
  background: var(--brand-50);
  color: var(--brand-700);
}

.fv-navbar .navbar-nav .nav-link.is-active,
.fv-navbar .navbar-nav .nav-link.active {
  background: var(--brand-50);
  color: var(--brand-700);
  font-weight: 650;
  box-shadow: inset 0 0 0 1px var(--brand-200);
}

/* Dropdown */
.dropdown-menu {
  border-color: var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.dropdown-item {
  border-radius: 10px;
}

.dropdown-item:hover {
  background: var(--brand-50);
  color: var(--brand-700);
}

.dropdown-item.active,
.dropdown-item:active {
  background: var(--brand-50);
  color: var(--brand-700);
}

/* Logo: defensive only (no global img rules!) */
header img,
.navbar-brand img,
.site-logo img {
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  object-fit: contain;
}

/* ---------- Surfaces / “Cards” ---------- */
/* Your pages use many: .border.rounded-4.bg-white  */
.border.rounded-4 {
  border-color: var(--border) !important;
}

.bg-white {
  background-color: var(--surface) !important;
}

/* Give sections/cards a subtle premium look without breaking layout */
.border.rounded-4.bg-white {
  box-shadow: var(--shadow-sm);
}

/* Headline areas / hero blocks */
section>.border.rounded-4.bg-white.text-center {
  background:
    linear-gradient(180deg, var(--surface), var(--surface-2)) !important;
  border-color: var(--border) !important;
}

/* Inner “panels” (news boxes etc.) */
article.border.rounded-4.bg-white {
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

article.border.rounded-4.bg-white:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-200) !important;
}

/* Small header rows inside panels */
.border-bottom {
  border-color: var(--border) !important;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
  letter-spacing: -0.02em;
}

/* Subtle brand accent on key titles */
h1.h3,
.page-title,
.section-title {
  color: var(--brand-700);
}

/* ---------- Buttons ---------- */
/* Map “outline-dark” to a branded, calm style (since your markup uses it a lot) */
.btn-outline-dark {
  color: var(--brand-700);
  border-color: var(--brand-200);
  background: transparent;
}

.btn-outline-dark:hover {
  color: var(--brand-700);
  background: var(--brand-50);
  border-color: var(--brand-300);
}

.btn-primary {
  background-color: var(--brand-600);
  border-color: var(--brand-600);
}

.btn-primary:hover {
  background-color: var(--brand-700);
  border-color: var(--brand-700);
}

/* Pills a bit nicer */
.rounded-pill {
  box-shadow: 0 1px 0 rgba(2, 8, 23, .04);
}

/* ---------- Badges (Dates) ---------- */
.badge.text-bg-light.border {
  background: var(--brand-50) !important;
  border-color: var(--brand-200) !important;
  color: var(--brand-800) !important;
  font-weight: 600;
}

/* ---------- Lists ---------- */
.list-group,
.list-group-item {
  border-color: var(--border) !important;
}

.list-group-item:hover {
  background: var(--brand-50);
}

/* ---------- Forms ---------- */
.form-control,
.form-select {
  border-color: var(--border);
  border-radius: 12px;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand-300);
  box-shadow: 0 0 0 .25rem rgba(5, 150, 105, .16);
}

/* ---------- Tables ---------- */
.table {
  --bs-table-border-color: var(--border);
}

.table thead th {
  color: var(--brand-700);
}

.table-hover tbody tr:hover {
  background: var(--brand-50);
}

/* ---------- Mobile Offcanvas menu (less eintönig) ---------- */
.offcanvas {
  background:
    linear-gradient(180deg, rgba(236, 253, 245, .92), rgba(255, 255, 255, .92));
  border-left: 1px solid var(--border);
}

.offcanvas-header {
  border-bottom: 1px solid var(--border);
}

.offcanvas .nav-link {
  border-radius: 14px;
  padding: .72rem .9rem;
  margin: .16rem 0;
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--border);
  color: var(--ink);
}

.offcanvas .nav-link:hover {
  background: var(--brand-50);
  border-color: var(--brand-200);
  color: var(--brand-700);
}

.offcanvas .nav-link.is-active,
.offcanvas .nav-link.active {
  background: var(--brand-50);
  border-color: var(--brand-300);
  color: var(--brand-700);
  font-weight: 650;
}

/* Make the offcanvas close button clearer */
.offcanvas .btn-close {
  filter: none;
  opacity: .75;
}

.offcanvas .btn-close:hover {
  opacity: 1;
}

/* ---------- Footer ---------- */
footer {
  background:
    radial-gradient(900px 260px at 0% 0%, rgba(5, 150, 105, .08), rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, rgba(236, 253, 245, .92) 0%, rgba(255, 255, 255, .92) 70%);
  backdrop-filter: blur(10px);
  color: var(--ink);
}

footer a {
  color: var(--brand-700);
}

footer a:hover {
  color: var(--brand-800);
}

footer.border-top {
  border-color: var(--border) !important;
}

/* ---------- Small polish ---------- */
@media (max-width: 575.98px) {

  /* tighten hero padding on very small screens */
  section>.border.rounded-4.p-4 {
    padding: 1.1rem !important;
  }
}


/* ---------- Logo sizing ---------- */
header img,
.navbar-brand img,
.site-logo img {
  max-height: 120px;
}

@media (max-width: 575.98px) {

  header img,
  .navbar-brand img,
  .site-logo img {
    max-height: 50px;
  }
}


/* ---------- Card / Panel Enhancements ---------- */

/* Main cards */
.border.rounded-4.bg-white {
  position: relative;
  overflow: hidden;
}

/* Soft blue accent stripe */
.border.rounded-4.bg-white::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, var(--brand-200), var(--brand-500));
  opacity: .9;
}

/* Inner article cards */
article.border.rounded-4.bg-white {
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fdf9 100%) !important;
}

/* Hover glow */
article.border.rounded-4.bg-white:hover {
  box-shadow:
    0 10px 26px rgba(16, 185, 129, .18),
    0 0 0 1px var(--brand-200);
}

/* Section headers inside cards */
.border.rounded-4.bg-white>.d-flex.border-bottom {
  background: linear-gradient(90deg, var(--brand-50), #ffffff);
}

/* Small icon dots for list items */
article.border.rounded-4.bg-white ul li::marker {
  color: var(--brand-600);
}



/* =========================================================
   Tuning: weniger “Rahmen”, mehr Design-Hierarchie
   (Overrides to reduce the heavy blue outlines and add depth)
   ========================================================= */

/* Remove the always-on thick accent stripe */
.border.rounded-4.bg-white::before {
  opacity: 0 !important;
}

/* Main panels: softer depth + gentle tint */
.border.rounded-4.bg-white {
  background:
    radial-gradient(900px 260px at 0% 0%, rgba(5, 150, 105, .10), rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, #ffffff 0%, #f7fdf9 100%) !important;
  border-color: rgba(15, 23, 42, .10) !important;
  box-shadow: 0 10px 28px rgba(2, 8, 23, .08) !important;
}

/* Inner articles: calm baseline, accent appears on hover */
article.border.rounded-4.bg-white {
  position: relative;
  overflow: hidden;
  background: #ffffff !important;
  border-color: rgba(5, 150, 105, .22) !important;
  box-shadow: 0 6px 18px rgba(2, 8, 23, .06) !important;
}

article.border.rounded-4.bg-white::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--brand-200), var(--brand-600));
  opacity: 0;
  transition: opacity .15s ease;
}

article.border.rounded-4.bg-white:hover::before {
  opacity: 1;
}

article.border.rounded-4.bg-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(2, 8, 23, .12) !important;
  border-color: rgba(5, 150, 105, .35) !important;
}

/* Header rows inside cards: clearer hierarchy */
.border.rounded-4.bg-white>.d-flex.border-bottom {
  background:
    linear-gradient(90deg, rgba(5, 150, 105, .10), rgba(255, 255, 255, 0) 55%) !important;
  border-bottom-color: rgba(5, 150, 105, .18) !important;
}

/* Titles inside the big panels: add subtle underline accent */
.border.rounded-4.bg-white h3,
.border.rounded-4.bg-white h4 {
  position: relative;
}

.border.rounded-4.bg-white h3::after,
.border.rounded-4.bg-white h4::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin-top: .35rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-300), var(--brand-600));
  opacity: .9;
}

/* Date badges: a touch more “chip” feel */
.badge.text-bg-light.border {
  background: linear-gradient(180deg, var(--brand-50), #ffffff) !important;
  border-color: rgba(5, 150, 105, .30) !important;
  color: var(--brand-800) !important;
}

/* Buttons on cards: make them look less plain */
.btn-outline-dark {
  background: rgba(255, 255, 255, .75);
}

.btn-outline-dark:hover {
  background: rgba(236, 253, 245, .95);
}



/* ---------- Fix: Dropdown above content ---------- */
.fv-header,
.fv-navbar {
  position: relative;
  z-index: 1050;
  /* above common content layers */
}

/* Ensure dropdowns render on top even if sections create stacking contexts */
.dropdown-menu {
  z-index: 2000;
}


/* Active state for dropdown items (desktop) */
.dropdown-item.is-active {
  background: var(--brand-50);
  color: var(--brand-800);
  font-weight: 600;
}



/* ---------- Mobile: Offcanvas not “too high” (safe-area + spacing) ---------- */
/* iOS/Android safe-area so the offcanvas header doesn't sit under the status bar/notch */
@supports (padding-top: env(safe-area-inset-top)) {
  .offcanvas {
    padding-top: env(safe-area-inset-top);
  }

  .offcanvas-header {
    padding-top: calc(1rem + env(safe-area-inset-top));
  }
}


.fv-offcanvas-top .nav-link {
  border-radius: 14px;
  padding: .78rem .95rem;
  background: rgba(255, 255, 255, .85);
  border: 1px solid var(--border);
}

.fv-offcanvas-top .nav-link.is-active {
  background: var(--brand-100);
  border-color: var(--brand-300);
  color: var(--brand-800);
  font-weight: 650;
}





/* ---------- Desktop Navbar Height Fix ---------- */
.fv-navbar {
  padding-top: 0.2rem !important;
  padding-bottom: 0.2rem !important;
}

.fv-navbar .navbar-nav .nav-link {
  padding-top: .35rem;
  padding-bottom: .35rem;
  line-height: 1.1;
}

@media (min-width: 992px) {
  .fv-navbar .navbar-collapse {
    min-height: auto;
  }
}



/* ---------- Mobile menu: open from TOP and cover full screen ---------- */
/* Bootstrap offcanvas-top defaults to height: 30vh; we want full height */
#mobileMenu.offcanvas-top {
  height: 100vh !important;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
}

/* Ensure body area scrolls nicely */
#mobileMenu .offcanvas-body {
  overflow-y: auto;
  padding-bottom: 1.25rem;
}

/* Optional: a little handle bar at top for affordance */
#mobileMenu .offcanvas-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: inherit;
}



/* ---------- Hide header when mobile menu is open ---------- */
body.fv-offcanvas-open .fv-header {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}



/* ---------- Offcanvas header alignment (Mobile) ---------- */
#mobileMenu .offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

/* Force close button to the far right */
#mobileMenu .offcanvas-header .btn-close {
  margin-left: auto;
}

header.fv-header img.header-fish {
  width: 500px !important;
  height: 155px !important;
  max-width: none !important;
  max-height: none !important;
  flex: 0 0 500px !important;
  flex-shrink: 0 !important;
  object-fit: cover !important;
  /* fills 500x130 canvas */
  object-position: right center !important;
  display: block;
}

/* ---------- Theme Switch (Light/Dark) ---------- */
.theme-switch {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.theme-switch .switch {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  width: 46px;
  height: 24px;
}

.theme-switch .switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-switch .slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(100, 116, 139, .35);
  border: 1px solid rgba(100, 116, 139, .35);
  transition: .2s ease;
}

.theme-switch .slider:before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 2.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  transition: .2s ease;
}

.theme-switch input:checked+.slider {
  background: rgba(59, 130, 246, .55);
  border-color: rgba(59, 130, 246, .55);
}

.theme-switch input:checked+.slider:before {
  transform: translateX(22px);
}

.theme-switch .label {
  font-size: .9rem;
  color: inherit;
  opacity: .85;
  user-select: none;
}


/* ---------- Termine Anmelden (Registration Page) ---------- */
:root {
  --event-bg: rgba(255, 255, 255, 0.7);
  --event-border: rgba(25, 135, 84, 0.12);
  --event-hover-bg: rgba(255, 255, 255, 0.9);
  --event-hover-border: rgba(25, 135, 84, 0.3);
  --event-title-color: #1a4d2e;
  --event-detail-color: #555555;
  --badge-bg: #ffffff;
  --badge-border: #e8f5ed;
  --badge-text: #1a4d2e;
  --badge-sub-text: #666666;
  --section-bg: rgba(255, 255, 255, 0.4);
  --section-border: rgba(25, 135, 84, 0.1);
  --header-bg: rgba(255, 255, 255, 0.5);
  --header-border: rgba(25, 135, 84, 0.15);
}

.section-container {
  background: var(--section-bg);
  border: 1px solid var(--section-border);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

@media (min-width: 768px) {
  .section-container {
    padding: 1.5rem;
  }
}

.header-box {
  background: var(--header-bg);
  border: 1px solid var(--header-border);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

@media (min-width: 768px) {
  .header-box {
    padding: 3rem;
  }
}

.inner-card {
  background: transparent;
  border: 1px solid var(--section-border);
  border-radius: 1rem;
  padding: 1.5rem;
  height: 100%;
}

.event-card {
  background: var(--event-bg);
  border: 1px solid var(--event-border);
  border-radius: 12px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(5px);
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-color: var(--event-hover-border);
  background: var(--event-hover-bg);
}

.event-card.is-past {
  opacity: 0.5;
}

.date-badge-container {
  min-width: 60px;
}

.date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: 8px;
  padding: 4px 8px;
  line-height: 1.1;
}

.date-badge .day {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--badge-text);
}

.date-badge .month {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--badge-sub-text);
}

.event-card .event-title {
  color: var(--event-title-color) !important;
  font-weight: 700;
}

.event-card .event-details,
.event-card .detail-item {
  color: var(--event-detail-color) !important;
}

.status-info {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 10px;
  background: rgba(128, 128, 128, 0.08);
  border: 1px solid rgba(128, 128, 128, 0.12);
  border-radius: 8px;
}

.btn-xs {
  padding: 0.1rem 0.4rem;
  font-size: 0.75rem;
}

.x-small {
  font-size: 0.75rem;
}

@media (max-width: 991px) {
  .event-card .submit-btn {
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    width: 100%;
    margin-top: 0.5rem;
  }
}

@media (max-width: 767px) {
  .event-card {
    margin-left: -5px;
    margin-right: -5px;
  }

  .event-card .submit-btn {
    width: 100%;
    margin-top: 0.5rem;
  }
}