
html, body {
  overflow-x: hidden;
  width: 100%;
}
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css");

/* Design System Variables */
:root {
  --color-primary: #00406c;
  --color-secondary: #AFCADC;
  --color-accent: #FABF74;
  --color-text: #2d3748;
  --color-text-muted: #718096;
  --color-text-light: #ffffff;
  --color-bg-light: #f4f7fa;
  --color-bg-white: #ffffff;

  --font-heading: 'Nunito', sans-serif;
  --font-body: 'Inter', sans-serif;

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 40px rgba(0, 64, 108, 0.15);
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

::selection {
  background: var(--color-accent);
  color: var(--color-primary);
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.75;
  background-color: var(--color-bg-light);
  font-size: 1.025rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  letter-spacing: -0.3px;
}

p {
  color: var(--color-text-muted);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* Navigation */
.navbar {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: padding 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  padding: 0.4rem 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.logo-img {
  height: 54px;
  transition: height 0.3s ease;
}

.navbar.scrolled .logo-img {
  height: 44px;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--color-text-light);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.3px;
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-accent);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--color-text-light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.hero {
  background: linear-gradient(160deg, rgba(0, 40, 80, 0.72) 0%, rgba(0, 64, 108, 0.45) 100%),
    url('/images/helena-lopes-7FC4WpyYcfQ-unsplash.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--color-text-light);
  padding: var(--spacing-xl) 5%;
  text-align: center;
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero h1 {
  font-size: 3.4rem;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-light);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.hero p {
  font-size: 1.15rem;
  max-width: 650px;
  margin-bottom: var(--spacing-md);
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.8;
}

/* Buttons */
.hero-btns {
  display: flex;
  gap: 1.25rem;
  margin-top: var(--spacing-md);
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 0.8rem 2.2rem;
  font-size: 0.82rem;
  border-radius: 50px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-primary);
  box-shadow: 0 4px 18px rgba(250, 191, 116, 0.45);
}

.btn-primary:hover {
  background-color: #fff;
  border-color: var(--color-accent);
  color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(250, 191, 116, 0.4);
}

.btn-outline {
  border: 2px solid rgba(255, 255, 255, 0.75);
  color: var(--color-text-light);
  backdrop-filter: blur(4px);
}

.btn-outline:hover {
  background-color: var(--color-text-light);
  border-color: var(--color-text-light);
  color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

/* Section Common */
.section {
  padding: var(--spacing-lg) 0;
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: var(--spacing-lg);
  position: relative;
  padding-bottom: 1.25rem;
  letter-spacing: -0.4px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 3px;
  background-color: var(--color-accent);
  border-radius: 2px;
}

/* Section title left-aligned variant */
.section-title.text-left {
  text-align: left;
}

.section-title.text-left::after {
  left: 0;
  transform: none;
}

/* Card Grid */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.card {
  background: var(--color-bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
}

.card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.card:hover::after {
  opacity: 1;
}

.card-img-top {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-img-top {
  transform: scale(1.04);
}

.card-content {
  padding: var(--spacing-md);
}

.card h3 {
  margin-top: 0.5rem;
  font-size: 1.15rem;
  color: var(--color-primary);
}

.card p {
  font-size: 0.95rem;
  line-height: 1.7;
}

/* CTA Section (Aktuelles & Events style) */
.section-cta {
  background: linear-gradient(135deg, var(--color-primary) 0%, #005a96 100%);
  color: var(--color-text-light);
  padding: var(--spacing-xl) 5%;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.section-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.section-cta::after {
  content: '';
  position: absolute;
  bottom: -60%;
  left: -5%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(175, 202, 220, 0.08);
  pointer-events: none;
}

.section-cta h2 {
  color: #fff;
  margin-bottom: 1rem;
  font-size: 2rem;
}

.section-cta p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 540px;
  margin: 0 auto 2.5rem auto;
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Footer & Wave */
.footer-wrapper {
  position: relative;
  margin-top: 0;
}

.footer-wave {
  width: 100%;
  line-height: 0;
  display: block;
  position: relative;
  z-index: 1;
}

.footer-wave img {
  width: 100%;
  height: 180px;
  display: block;
  margin-bottom: 0;
}

.rcw-footer {
  background-color: #1f436d;
  color: var(--color-text-light);
  padding: 3rem 0;
  position: relative;
  z-index: 1;
  margin-top: 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-brand .footer-logo {
  height: 80px;
  margin-bottom: 2rem;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 1;
}

.rcw-footer h4 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  font-family: 'AttenRoundNew', sans-serif;
  font-weight: 600;
}

.rcw-footer p,
.rcw-footer a {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #fff;
  text-decoration: none;
}

.rcw-footer a:hover {
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  margin-top: 5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  opacity: 0.6;
}

/* Map Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 2rem;
  border: 1px solid #888;
  width: 90%;
  max-width: 500px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  text-align: center;
}

.close-modal {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  top: 10px;
  right: 20px;
  cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.modal h2 {
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.modal p {
  margin-bottom: 2rem;
  color: var(--color-text);
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hover effect for placeholder overlay */
#map-placeholder:hover .map-overlay-hint {
  opacity: 1 !important;
}

/* Map Modal Cancel Button */
#cancel-map {
  border-color: #e0e0e0;
  color: #666;
}

#cancel-map:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background-color: transparent;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--color-primary);
    flex-direction: column;
    padding: var(--spacing-md);
    text-align: center;
    gap: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero h1 {
    font-size: 2.1rem;
    letter-spacing: -0.5px;
  }

  .hero p {
    font-size: 1rem;
    padding: 0 10px;
  }

  .hero-btns {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
    padding: 0 20px;
  }

  .btn {
    padding: 0.85rem 1.25rem;
    width: 100%;
    white-space: normal; /* Fixes overflowing text on mobile buttons! */
    text-align: center;
    line-height: 1.4;
  }

  .section-title {
    font-size: 1.7rem;
    margin-bottom: 2rem;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }
  
  .page-header {
    padding: 3rem 0 2rem;
  }

  .card-content {
    padding: 1.25rem; /* Less padding inside boxes to give text space to breathe */
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 0 1rem;
    text-align: center;
  }
  
  .rcw-footer h4 {
    margin-bottom: 1rem;
  }
  
  .section {
    padding: 2.5rem 0;
  }
  
  .grid-container {
    gap: 1.25rem;
  }
}

/* Animations */
.reveal {
  position: relative;
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
  opacity: 1;
}

.reveal-up {
  transform: translateY(28px);
}

.reveal-up.active {
  transform: translateY(0);
}

.reveal-left {
  transform: translateX(-30px);
}

.reveal-left.active {
  transform: translateX(0);
}

.reveal-right {
  transform: translateX(30px);
}

.reveal-right.active {
  transform: translateX(0);
}

/* Page header for inner pages */
.page-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, #005a96 100%);
  padding: 4rem 0 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::after {
  content: '';
  position: absolute;
  top: -60%;
  right: -5%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.page-header h1 {
  color: #fff;
  font-size: 2.4rem;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 0;
}

.page-header h1::after {
  content: '';
  display: block;
  width: 52px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
  margin: 1rem auto 0;
}

/* --- JOOMLA FULL WIDTH FIX ---
Bricht Layout-Container auf 100% Bildschirmbreite auf 
(verhindert, dass Joomla die Hintergrundfarben abschneidet) */
.navbar,
.hero,
.section-cta,
.footer-wrapper,
.page-header {
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  max-width: 100vw !important;
}

ul.nav-links {
  margin-bottom: 0;
}