/* -----------------------------
   Fonts
   ----------------------------- */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/montserrat-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./fonts/montserrat-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/open-sans-400.woff2') format('woff2');
}

/* -----------------------------
   CSS Variables (Theme)
   ----------------------------- */
:root {
  --background: #D4F1F4;
  --text: #05445E;
  --accent: #189AB4;
  --highlight: #75E6DA;
  --secondary-bg: rgba(255, 255, 255, 0.85);
  --portfolio-bg: #E5F8FA;
  --logo-bg: rgba(0, 0, 0, 0.3);
}

.dark-mode {
  --background: #05445E;
  --text: #D4F1F4;
  --accent: #75E6DA;
  --highlight: #189AB4;
  --secondary-bg: rgba(3, 45, 65, 0.85);
  --portfolio-bg: #03394F;
  --logo-bg: rgba(255, 255, 255, 0.3);
}

/* -----------------------------
   Reset / Preferences
   ----------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

html, body {
  height: 100%;
  margin: 0;
}

/* -----------------------------
   Base styles (merged duplicates)
   ----------------------------- */
body {
  font-family: 'Open Sans', sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease, opacity 0.4s ease;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  opacity: 0; /* Smooth fade-in to avoid FOUC */
}

body.loaded {
  opacity: 1;
}

main {
  flex: 1 0 auto;
}

/* -----------------------------
   Layout: Header / Nav / Logo
   ----------------------------- */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--secondary-bg);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  backdrop-filter: blur(5px);
}

 .scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  z-index: 1001;
  transition: width 0.3s ease;
}

.logo-container {
  display: flex;
  align-items: center;
  position: relative;
}

.logo-img {
  height: 3rem;
  width: auto;
  max-width: 30px;
  vertical-align: middle;
  display: inline-block;
  overflow: hidden;
  cursor: pointer;
  z-index: 1;
}

.logo-background {
  position: absolute;
  width: 60px;
  height: 60px;
  background-color: var(--logo-bg);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: -1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 5px;
}

nav {
  flex-grow: 1;
  display: flex;
  justify-content: center;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 1rem;
}

nav a:hover { color: var(--accent); }

nav a.active {
  color: var(--accent);
  font-weight: 700;
  position: relative;
}

nav a.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.controls { display: flex; align-items: center; gap: 0.5rem; }
.theme-toggle, .lang-toggle { background: none; border: none; font-size: 0.9rem; cursor: pointer; color: var(--text); }

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text);
  position: relative;
  width: 30px;
  height: 30px;
  transition: all 0.3s ease;
  z-index: 1001;
}

.hamburger span { display: block; position: absolute; height: 3px; width: 100%; background: var(--text); border-radius: 3px; opacity: 1; left: 0; transform: rotate(0deg); transition: .25s ease-in-out; }
.hamburger span:nth-child(1) { top: 6px; }
.hamburger span:nth-child(2) { top: 13px; }
.hamburger span:nth-child(3) { top: 20px; }
.hamburger.active span:nth-child(1) { top: 13px; transform: rotate(135deg); }
.hamburger.active span:nth-child(2) { opacity: 0; left: -60px; }
.hamburger.active span:nth-child(3) { top: 13px; transform: rotate(-135deg); }

/* -----------------------------
   Sections & Hero
   ----------------------------- */
.section {
  padding: 4rem 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  padding-top: calc(4rem + 70px);
}
.section:first-child { padding-top: 0; }
.section.animate { opacity: 1; transform: translateY(0); }
.section h2 { font-family: 'Montserrat', sans-serif; font-size: 2.2rem; margin-bottom: 2.5rem; padding-bottom: 0.5rem; display: inline-block; border-bottom: 3px solid var(--accent); }

#hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(to bottom, var(--text), var(--accent));
  color: white;
  padding-top: 0;
}
.dark-mode #hero { background: linear-gradient(to bottom, var(--accent), var(--highlight)); }
#hero h1 { font-size: 3.5rem; font-family: 'Montserrat', sans-serif; opacity: 0; animation: fadeIn 1s ease 0.5s forwards; max-width: 90%; }
#hero h1 .name { color: white; }

/* -----------------------------
   About / Hobby Notice
   ----------------------------- */
#about { background-color: var(--secondary-bg); text-align: center; }
.about-content { max-width: 800px; margin: 0 auto; padding: 0 2rem; }
#about p { font-size: 1.1rem; line-height: 1.8; margin-bottom: 0; }

.hobby-notice { margin-top: 2rem; padding: 1.2rem 1.5rem; background-color: rgba(117, 230, 218, 0.15); border-left: 4px solid var(--highlight); border-radius: 8px; max-width: 600px; margin-left: auto; margin-right: auto; }
.hobby-note { margin: 0; font-style: italic; color: var(--text); font-size: 0.95rem; text-align: center; line-height: 1.6; }
.dark-mode .hobby-notice { background-color: rgba(117, 230, 218, 0.08); border-left-color: var(--accent); }

/* -----------------------------
   Services / Contact / Portfolio
   ----------------------------- */
#services { background-color: var(--background); text-align: center; }
#contact { background-color: var(--secondary-bg); text-align: center; }
#portfolio { background-color: var(--portfolio-bg); text-align: center; }

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; max-width: 1200px; margin: 0 auto; }
.service-item { background: var(--secondary-bg); padding: 2rem; border-radius: 10px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); transition: transform 0.3s ease, box-shadow 0.3s ease; border: 2px solid transparent; }
.service-item:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); border-color: var(--accent); }
.service-item h3 { font-family: 'Montserrat', sans-serif; font-size: 1.4rem; color: var(--accent); margin-bottom: 1rem; }
.service-item p { color: var(--text); line-height: 1.6; }

.contact-info { background: var(--secondary-bg); padding: 2rem; border-radius: 10px; margin-bottom: 3rem; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); max-width: 500px; margin-left: auto; margin-right: auto; }
.contact-info h3 { font-family: 'Montserrat', sans-serif; color: var(--accent); margin-bottom: 1.5rem; font-size: 1.3rem; }
.contact-details { text-align: left; }
.contact-details p { margin-bottom: 0.8rem; display: flex; align-items: center; gap: 0.5rem; }
.contact-details strong { color: var(--accent); min-width: 80px; }

/* -----------------------------
   Portfolio Grid & Items
   ----------------------------- */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); grid-auto-rows: 20px; gap: 20px; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.portfolio-item { position: relative; overflow: visible; cursor: pointer; transition: all 0.3s ease; width: 100%; padding-bottom: 2.5rem; }
.portfolio-item:hover { transform: translateY(-5px); }
.portfolio-item img { width: 100%; height: auto; display: block; object-fit: contain; transition: transform 0.3s ease; border-radius: 12px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); }
.portfolio-item:hover img { transform: scale(1.05); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15); }
.overlay { position: absolute; bottom: 0; left: 0; right: 0; color: var(--text); padding: 0.75rem 0; font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 1rem; text-align: center; opacity: 0.8; transition: opacity 0.3s ease; }
.portfolio-item:hover .overlay { opacity: 1; }

/* -----------------------------
   Modal
   ----------------------------- */
.modal { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.95); align-items: center; justify-content: center; z-index: 2000; padding: 2rem; }
.modal-content { position: relative; max-width: 95vw; max-height: 95vh; text-align: center; }
.modal-content img { max-width: 100%; max-height: 85vh; object-fit: contain; border-radius: 8px; }
.modal h3, .modal p { color: white; margin-top: 1rem; max-width: 80%; }
.modal-close { position: absolute; top: -15px; right: -15px; width: 45px; height: 45px; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(4px); color: white; border: none; border-radius: 50%; font-size: 1.8rem; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6); transition: all 0.3s ease; }
.modal-close:hover { background: var(--accent); transform: scale(1.1); }

/* -----------------------------
   Forms & Buttons
   ----------------------------- */
form { display: flex; flex-direction: column; gap: 1rem; max-width: 500px; margin: 0 auto; }
input, textarea, button { padding: 0.5rem; border: 1px solid var(--accent); background-color: var(--background); color: var(--text); font-family: 'Open Sans', sans-serif; border-radius: 4px; }
input:focus, textarea:focus { outline: none; border-color: var(--highlight); box-shadow: 0 0 0 3px rgba(24, 154, 180, 0.1); }
input:hover, textarea:hover { border-color: var(--highlight); }
button { background-color: var(--accent); color: white; border: none; cursor: pointer; transition: background-color 0.3s ease; position: relative; overflow: hidden; }
button:hover { background-color: var(--highlight); }
button::after { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.3); transform: translate(-50%, -50%); transition: width 0.6s, height 0.6s; }
button:active::after { width: 300px; height: 300px; }

/* Accessibility focus styles */
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Loading state */
.loading { opacity: 0.6; pointer-events: none; }

/* -----------------------------
   Footer
   ----------------------------- */
footer { text-align: center; padding: 1rem; background-color: var(--secondary-bg); flex-shrink: 0; margin-top: auto; }
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* -----------------------------
   Cookie Banner
   ----------------------------- */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background-color: var(--secondary-bg); padding: 1.5rem; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); z-index: 9999; display: none; backdrop-filter: blur(5px); }
.cookie-banner.show { display: block; animation: slideUp 0.3s ease; }
.cookie-content { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cookie-text { flex: 1; margin: 0; }
.cookie-text a { color: var(--accent); }
.cookie-accept { padding: 0.75rem 2rem; background-color: var(--accent); color: white; border: none; border-radius: 5px; cursor: pointer; font-family: 'Montserrat', sans-serif; transition: background-color 0.3s ease; }
.cookie-accept:hover { background-color: var(--highlight); }

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* -----------------------------
   Back-to-top button
   ----------------------------- */
.back-to-top { position: fixed; bottom: 2rem; right: 2rem; width: 50px; height: 50px; border-radius: 50%; background: var(--accent); color: white; border: none; font-size: 1.5rem; cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 999; display: flex; align-items: center; justify-content: center; }
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--highlight); transform: translateY(-5px); }

/* -----------------------------
   Animations
   ----------------------------- */
@keyframes fadeIn { to { opacity: 1; } }

/* -----------------------------
   Responsive helpers & media
   (grouped: mobile first adjustments)
   ----------------------------- */
@media (max-width: 768px) {
  .portfolio-grid { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 20px; padding: 0 0.5rem; }
  .portfolio-item { padding-bottom: 2rem; }
  .portfolio-item img { max-height: 400px; border-radius: 10px; }
  .overlay { font-size: 0.9rem; padding: 0.5rem 0; opacity: 1; }

  .hamburger { display: block; }
  nav { display: none; position: absolute; top: 100%; left: 0; width: 100%; background-color: var(--secondary-bg); padding: 1rem; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); transform: translateX(0); transition: all 0.3s ease; flex-grow: unset; justify-content: flex-start; }
  nav.active { display: block; animation: slideDown 0.3s ease forwards; }

  @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

  nav ul { flex-direction: column; align-items: center; gap: 1rem; }
  #hero h1 { font-size: 2.5rem; }
  .section { padding: 2.5rem 1rem; padding-top: calc(2.5rem + 60px); }
  .section:first-child { padding-top: 0; }
  .section h2 { font-size: 1.8rem; margin-bottom: 2rem; }
  .logo-img { height: 2.5rem; max-width: 25px; }
  .logo-background { width: 50px; height: 50px; }
  .theme-toggle, .lang-toggle { font-size: 0.8rem; }
  header { padding: 0.75rem 1rem; }
  .services-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .service-item { padding: 1.5rem; }
  .contact-info { margin-bottom: 2rem; padding: 1.5rem; }
  .cookie-content { flex-direction: column; gap: 1rem; align-items: flex-start; }
  .cookie-accept { align-self: flex-end; }

  .back-to-top { bottom: 1.5rem; right: 1.5rem; width: 45px; height: 45px; font-size: 1.3rem; }
  .modal-close { width: 40px; height: 40px; font-size: 1.6rem; top: -12px; right: -12px; }
  .modal h3, .modal p { font-size: 0.9rem; }

  .privacy-page main, .impressum-page main { padding-top: 70px; }
  .legal-content { padding: 2rem 1.5rem; margin: 1.5rem auto; }
  .legal-content h2 { font-size: 1.9rem; }
  .legal-content h3 { font-size: 1.3rem; }
}

@media (max-width: 480px) {
  .portfolio-grid { gap: 15px; }
  .portfolio-item img { max-height: 300px; border-radius: 8px; }
  .overlay { font-size: 0.85rem; }
  .about-content { padding: 0 1rem; }
  .hobby-notice { padding: 1rem; }
  .back-to-top { bottom: 1rem; right: 1rem; width: 40px; height: 40px; font-size: 1.2rem; }
}

@media (min-width: 1200px) {
  #about p { font-size: 1.15rem; line-height: 1.9; }
  .about-content { max-width: 900px; }
}

@media (min-width: 1600px) {
  .about-content { max-width: 1000px; }
  #about p { font-size: 1.2rem; line-height: 2; }
}

/* -----------------------------
   Utility & legal pages
   ----------------------------- */
.privacy-page main, .impressum-page main { padding-top: 80px; }

.legal-content { background: var(--secondary-bg); padding: 3rem 2.5rem; border-radius: 16px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15); max-width: 900px; margin: 2.5rem auto; text-align: left; }
.legal-content h2 { font-family: 'Montserrat', sans-serif; font-size: 2.2rem; margin: 0 auto 2.5rem; padding-bottom: 0.5rem; display: inline-block; border-bottom: 3px solid var(--accent); color: var(--text); text-align: center; width: fit-content; position: relative; left: 50%; transform: translateX(-50%); }
.legal-content h3, .legal-contact h3 { color: var(--accent); font-size: 1.4rem; margin: 2rem 0 1rem; font-weight: 600; }
.legal-contact { background: none; padding: 0; margin: 1.5rem auto 2.5rem; text-align: center; max-width: 600px; }
.legal-contact p { margin-bottom: 0.6rem; font-size: 1.05rem; }
.legal-content a { color: inherit; text-decoration: none; }
.legal-content a:hover { color: var(--accent); text-decoration: underline; }
.legal-content a[href^="mailto:"], .legal-content a[href^="tel:"] { color: inherit; text-decoration: none; }
.legal-content a:hover, .legal-content a[href^="mailto:"]:hover, .legal-content a[href^="tel:"]:hover { color: var(--accent); text-decoration: none; }
.legal-content strong { color: var(--accent); }

/* Back button */
.back-button { display: block; width: fit-content; margin: 2rem auto; padding: 0.8rem 2rem; background: var(--accent); color: white; text-decoration: none; border-radius: 8px; font-weight: bold; transition: background 0.3s; }
.back-button:hover { background: var(--highlight); }

.contact-details {
  text-align: left;
}

.contact-details p {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-details strong {
  color: var(--accent);
  min-width: 80px;
}

/* Portfolio Grid - Masonry with Rounded Corners */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-auto-rows: 20px;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.portfolio-item {
  position: relative;
  overflow: visible;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  padding-bottom: 2.5rem;
}

.portfolio-item:hover {
  transform: translateY(-5px);
}

.portfolio-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.3s ease;
  border-radius: 12px; /* Rounded corners */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.portfolio-item:hover img {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  color: var(--text);
  padding: 0.75rem 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.portfolio-item:hover .overlay {
  opacity: 1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 20px;
    padding: 0 0.5rem;
  }
  
  .portfolio-item {
    padding-bottom: 2rem;
  }
  
  .portfolio-item img {
    max-height: 400px;
    border-radius: 10px; /* Slightly smaller radius on mobile */
  }
  
  .overlay {
    font-size: 0.9rem;
    padding: 0.5rem 0;
    opacity: 1;
  }
}

@media (max-width: 480px) {
  .portfolio-grid {
    gap: 15px;
  }
  
  .portfolio-item img {
    max-height: 300px;
    border-radius: 8px; /* Even smaller radius on very small screens */
  }
  
  .overlay {
    font-size: 0.85rem;
  }
}

/* Modal Improvements – Clean floating close button, no overlap */
.modal {
  display: none; /* flex when opened via JS */
  position: fixed;
  inset: 0; /* Modern shorthand for top/right/bottom/left: 0 */
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 2rem; /* Safe space on small screens */
}

.modal-content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  text-align: center;
}

.modal-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px; /* Soft corners for polish */
}

.modal h3,
.modal p {
  color: white; /* Better contrast on dark overlay */
  margin-top: 1rem;
  max-width: 80%;
}

.modal-close {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 45px;
  height: 45px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--accent);
  transform: scale(1.1);
}

/* Mobile touch-friendly tweak */
@media (max-width: 768px) {
  .modal-close {
    width: 40px;
    height: 40px;
    font-size: 1.6rem;
    top: -12px;
    right: -12px;
  }
  
  .modal h3,
  .modal p {
    font-size: 0.9rem; /* Slightly smaller on mobile */
  }
}

/* Form Styles */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

input, textarea, button {
  padding: 0.5rem;
  border: 1px solid var(--accent);
  background-color: var(--background);
  color: var(--text);
  font-family: 'Open Sans', sans-serif;
  border-radius: 4px;
}

/* Better form focus states */
input:focus, textarea:focus {
  outline: none;
  border-color: var(--highlight);
  box-shadow: 0 0 0 3px rgba(24, 154, 180, 0.1);
}

/* Add hover states for form elements */
input:hover, textarea:hover {
  border-color: var(--highlight);
}

button {
  background-color: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

button:hover {
  background-color: var(--highlight);
}

/* Better button feedback */
button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:active::after {
  width: 300px;
  height: 300px;
}

/* Add focus-visible for keyboard navigation */
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Loading state */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  background-color: var(--secondary-bg);
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

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

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--secondary-bg);
  padding: 1.5rem;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  display: none;
  backdrop-filter: blur(5px);
}

.cookie-banner.show {
  display: block;
  animation: slideUp 0.3s ease;
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  margin: 0;
}

.cookie-text a {
  color: var(--accent);
}

.cookie-accept {
  padding: 0.75rem 2rem;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  transition: background-color 0.3s ease;
}

.cookie-accept:hover {
  background-color: var(--highlight);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--highlight);
  transform: translateY(-5px);
}

/* Animations */
@keyframes fadeIn {
  to { opacity: 1; }
}

/* Large screens optimization */
@media (min-width: 1200px) {
  #about p {
    font-size: 1.15rem;
    line-height: 1.9;
  }
  
  .about-content {
    max-width: 900px;
  }
}

/* Extra large screens */
@media (min-width: 1600px) {
  .about-content {
    max-width: 1000px;
  }
  
  #about p {
    font-size: 1.2rem;
    line-height: 2;
  }
}

/* Media Queries */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
  
  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--secondary-bg);
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateX(0);
    transition: all 0.3s ease;
    flex-grow: unset;
    justify-content: flex-start;
  }
  
  nav.active {
    display: block;
    animation: slideDown 0.3s ease forwards;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  #hero h1 {
    font-size: 2.5rem;
  }
  
  .section {
    padding: 2.5rem 1rem;
    padding-top: calc(2.5rem + 60px);
  }
  
  .section:first-child {
    padding-top: 0;
  }
  
  .section h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
  }
  
  .logo-img {
    height: 2.5rem;
    max-width: 25px;
  }
  
  .logo-background {
    width: 50px;
    height: 50px;
  }
  
  .theme-toggle, .lang-toggle {
    font-size: 0.8rem;
  }
  
  header {
    padding: 0.75rem 1rem;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .service-item {
    padding: 1.5rem;
  }
  
  .contact-info {
    margin-bottom: 2rem;
    padding: 1.5rem;
  }
  
  .cookie-content {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .cookie-accept {
    align-self: flex-end;
  }
  
  /* Back to top mobile adjustment */
  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  /* Mobile adjustments for about section */
  .about-content {
    padding: 0 1rem;
  }
  
  .hobby-notice {
    padding: 1rem;
  }
  
  /* Back to top mobile adjustment */
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

/* Consistent link styling globally */
a[href^="mailto:"] {
  color: var(--accent);
  text-decoration: underline;
}

a[href^="mailto:"]:hover {
  color: var(--highlight);
}

html, body {
  height: 100%;
  margin: 0;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main {
  flex: 1 0 auto;
}
footer {
  flex-shrink: 0;
  margin-top: auto; /* Extra push */
}

/*padding*/
.privacy-page main,
.impressum-page main {
  padding-top: 80px; /* Etwas mehr als Header-Höhe für Sicherheit */
}

/* Einheitliche Legal-Content-Card (Impressum & Datenschutz) */
.legal-content {
  background: var(--secondary-bg);
  padding: 3rem 2.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  max-width: 900px;
  margin: 2.5rem auto;
  text-align: left;
}

/* Haupt-Titel (h2) – exakt wie Section-Titel auf Index + zentrierter Unterstrich */
.legal-content h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.2rem;
  margin: 0 auto 2.5rem;
  padding-bottom: 0.5rem;
  display: inline-block;
  border-bottom: 3px solid var(--accent);
  color: var(--text);
  text-align: center;
  width: fit-content;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.legal-content h3,
.legal-contact h3 {
  color: var(--accent);           /* Dunkel wie "Kontaktinformationen" & Abschnitte */
  font-size: 1.4rem;            /* Oder 1.3rem mobile */
  margin: 2rem 0 1rem;          /* Enger Abstand */
  font-weight: 600;
}

/* Kontakt-Infos oben (zentriert, kein eigener Hintergrund) */
.legal-contact {
  background: none;
  padding: 0;
  margin: 1.5rem auto 2.5rem;   /* Weniger Abstand oben/unten */
  text-align: center;
  max-width: 600px;
}

.legal-contact p {
  margin-bottom: 0.6rem;        /* Enger, wie Index Kontakt-Details */
  font-size: 1.05rem;
}

/* Subtle Links in Legal-Content – unauffällig bis Hover */
.legal-content a {
  color: inherit;
  text-decoration: none;
}

.legal-content a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Speziell mailto/tel – komplett unsichtbar bis Hover */
.legal-content a[href^="mailto:"],
.legal-content a[href^="tel:"] {
  color: inherit;
  text-decoration: none;
}

.legal-content a:hover,
.legal-content a[href^="mailto:"]:hover,
.legal-content a[href^="tel:"]:hover {
  color: var(--accent);
  text-decoration: none;        /* Kein Strich! */
}

/* Strong in Legal-Content dunkel (wie Index Kontakt) */
.legal-content strong {
  color: var(--accent);
}

/* Smooth Fade-In gegen FOUC */
body {
  opacity: 0;
  transition: opacity 0.4s ease;
}

body.loaded {
  opacity: 1;
}

/* Back-Button (einheitlich) */
.back-button {
  display: block;
  width: fit-content;
  margin: 2rem auto;
  padding: 0.8rem 2rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: background 0.3s;
}

.back-button:hover {
  background: var(--highlight);
}

/* Mobile Anpassungen für Legal-Content */
@media (max-width: 768px) {
  .privacy-page main,
  .impressum-page main {
    padding-top: 70px;
  }

  .legal-content {
    padding: 2rem 1.5rem;
    margin: 1.5rem auto;
  }
  
  .legal-content h2 {
    font-size: 1.9rem;
  }
  
  .legal-content h3 {
    font-size: 1.3rem;
  }
  
  /* Top-Kontakt exakt wie .contact-details auf Index */
  .legal-contact {
    background: none;
    padding: 0;
    margin: 2rem auto 3rem;
    text-align: center;
    max-width: 600px;
  }

  .legal-contact h3 {
    color: var(--accent);           /* Dunkel wie "Kontaktinformationen" */
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
  }
}