/* -----------------------------------------------------------
   GLOBAL SETTINGS
----------------------------------------------------------- */

:root {
    --primary: #003033;
    --gray-light: #ddd9d9;
    --gray: #6e6e6e;
    --dark-gray: #333;
    --white: #ffffff;

    --font-main: 'Dosis', sans-serif;
    --font-heading: 'Open Sans', sans-serif;
    --font-accent: 'Indie Flower', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--font-accent);
    background: var(--white);
    hyphens: auto;
}

/* TYPOGRAPHY ------------------------------------------------ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: #000;
}

h3 {
    font-size: 40px;
    padding-top: 50px;
    margin-bottom: 5px;
}

p, li {
    font-family: var(--font-main);
    color: #000;
}

a {
    font-family: var(--font-main);
    font-weight: 500;
    color: var(--gray);
    text-decoration: none;
    transition: 0.3s;
}

a:hover {
    color: var(--primary);
}

hr {
    width: 30px;
    height: 2px;
    background: var(--primary);
    border: none;
    margin: 20px auto;
}

/* ANIMATIONS ------------------------------------------------ */

.blink {
    animation: blink 2s ease-in infinite;
}

@keyframes blink {
    0%,100% { opacity: 1; }
    50% { opacity: .1; }
}

/* -----------------------------------------------------------
   HEADER
----------------------------------------------------------- */

header {
    width: 100%;
    height: 200px;
    background: var(--white);
}

.mitte {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* -----------------------------------------------------------
   NAVIGATION
----------------------------------------------------------- */
 nav {
      background-color: var(--gray-light);
      display: flex;
      justify-content: center;
      gap: 2rem;
      padding: 1rem;
      flex-wrap: nowrap;
    }

    nav a {
      color: var(--dark-gray);
      text-decoration: none;
      font-weight: bold;
      transition: color 0.3s;
    }

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


/* -----------------------------------------------------------
   INTRO SECTION
----------------------------------------------------------- */

#home h1 {
    padding-top: 50px;
    font-size: 50px;
    text-align: center;
}

#home p {
    padding: 0 20px;
    font-size: 20px;
    text-align: center;
}


  .mahausservice-intro {
    max-width: 1000px;
    margin: 30px auto;
    padding: 20px;
    
    line-height: 1.6;
  }
  .mahausservice-intro h2 {
    margin-top: 10px;
	padding: 10px 16px;
	font-size: 35px;
    font-weight: 700;
	color: var(--gray);
    text-align: center;
  }
  .mahausservice-intro h3 {
    margin-top: 20px;
    padding: 10px 16px;
	color: var(--gray);
    text-align: center;
  }
  .mahausservice-intro ul {
    margin: 10px 0 30px 20px;
	padding: 0 15% 20px;
    font-size: 20px;
    text-align: center;	
  }
  .mahausservice-intro li {
  list-style: none;
  }
  .mahausservice-intro .btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 16px;
    background:  var(--gray);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
  }
  .mahausservice-intro .btn:hover {
    background: #43a047;
  }

/* -----------------------------------------------------------
   PFEIL
----------------------------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;  /* unten links */

    width: 50px;
    height: 50px;

    display: flex;
    justify-content: center;   /* horizontal zentriert */
    align-items: center;        /* vertikal zentriert */

    background: transparent;    /* Hintergrund durchsichtig */
    color: #333;
    font-size: 28px;
    
    border-radius: 50%;
    border: 2px solid #333;     /* Rahmen bleibt */
    text-decoration: none;
    cursor: pointer;

	z-index: 9999;
	
    transition: transform 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Hover-Effekt */
.back-to-top:hover {
    transform: scale(1.15);
    color: #555;
    border-color: #555;
}

/* Optional: erst anzeigen wenn gescrollt */
.back-to-top.hide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* -----------------------------------------------------------
   GENERIC SECTION LAYOUT
----------------------------------------------------------- */

section {
    max-width: 1000px;
    padding: 2rem 1rem;
    margin: auto;
}

/* Animation-Klasse */
.section-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: 0.6s ease-out;
}

.section-visible {
    opacity: 1;
    transform: translateY(0);
}

section h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--gray-light);
    padding-bottom: .5rem;
    text-align: center;
}

/* SERVICES -------------------------------------------------- */

.service {
    background: var(--gray-light);
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 6px;
}

.service img {
    width: 100%;
    height: auto;
    margin-top: 1rem;
    border-radius: 5px;
}

/* FORMS ----------------------------------------------------- */

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

select, input, textarea {
    padding: .8rem;
    border: 1px solid var(--gray);
    border-radius: 4px;
    font-size: 1rem;
}

button {
    background: var(--dark-gray);
    color: var(--white);
    border: none;
    padding: .8rem;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    background: var(--gray);
}

/* -----------------------------------------------------------
   REFERENZen
----------------------------------------------------------- */

/* --- Galerie Layout --- */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 Bilder nebeneinander */
    gap: 12px;
    max-width: 1000px;
    margin: auto;
}

.gallery img {
    width: 100%;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* --- Hover Effekt --- */
.gallery img:hover {
    transform: scale(1.05);
    filter: brightness(0.85);
}

/* --- Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
}

/* -----------------------------------------------------------
   FOOTER
----------------------------------------------------------- */

footer {
    background: var(--white);
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer p {
    font-size: 12px;
    color: var(--primary);
}

footer ul {
    display: flex;
    gap: 20px;
    list-style: none;
}

#sub-nav li a {
    color: var(--gray);
    font-size: 18px;
}

/* -----------------------------------------------------------
   LEGAL SECTIONS (Impressum, AGB, Bildernachweis)
----------------------------------------------------------- */

.legal-section {
    background: var(--white);
    padding: 0 15%;
}

.legal-section h3 {
    text-align: center;
    padding-top: 50px;
}

.legal-section hr {
    margin-bottom: 50px;
}

.legal-section h4,
.legal-section h5 {
    text-align: left;
}

.legal-section h6 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
	padding-top: 50px;
    padding-bottom: .5rem;
    text-align: center;
}

.legal-section p {
    padding: 10px 0 20px;
    font-size: 17px;
    text-align: justify;
}

.legal-section ul {
    padding-bottom: 20px;
}

.legal-section ul li {
    margin-left: 20px;
    padding-bottom: 5px;
}

/* -----------------------------------------------------------
   Cookies
----------------------------------------------------------- */

  /* Modal Hintergrund */
  .cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .cookie-modal.show {
    opacity: 1;
    pointer-events: all;
  }

  /* Modal Inhalt */
  .cookie-modal-content {
    background-color: #fff;
    color: #000;
    padding: 25px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    font-family: Arial, sans-serif;
    text-align: left;
    transform: translateY(-30px);
    transition: transform 0.3s ease;
  }

  .cookie-modal.show .cookie-modal-content {
    transform: translateY(0);
  }

  .cookie-modal-content h3 {
    margin-top: 0;
  }

  .cookie-modal-content button {
    background-color: var(--gray);
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 5px;
  }

  .cookie-modal-content button:hover {
    background-color: #45a049;
  }

  .cookie-modal-content label {
    display: block;
    margin-bottom: 5px;
  }

  /* Einstellungen ändern Button */
  .cookie-change-btn {
    position: fixed;
    bottom: 15px;
    right: 15px;
    background-color: var(--gray);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    z-index: 1001;
  }

  .cookie-change-btn:hover {
    background-color: #45a049;
  }

  
  /* -----------------------------------------------------------
   MOBILE OPTIMIERUNG – PRO VERSION
   Für Smartphones bis 600px
----------------------------------------------------------- */

@media (max-width: 600px) {

    /* -------------------------------
       HEADER
    --------------------------------*/
    header {
        height: auto;
        padding: 20px 0;
    }

    header img {
        width: 220px;
        height: auto;
    }

    /* -------------------------------
       NAVIGATION – mobile Version
    --------------------------------*/
    nav {
        flex-direction: column;
        gap: 0.7rem;
        font-size: 18px;
        padding: 10px;
    }

    nav a {
        padding: 8px 0;
        width: 100%;
        text-align: center;
    }

    /* -------------------------------
       STARTSEITE
    --------------------------------*/
    #home h1 {
        font-size: 32px;
        padding-top: 40px;
        line-height: 1.2;
    }

    .mahausservice-intro h2 {
        font-size: 24px;
        padding: 0 5%;
    }

    #home p {
        padding: 0 8%;
        font-size: 17px;
        line-height: 1.6;
    }

    /* -------------------------------
       GENERELLE SECTIONS
    --------------------------------*/
    section {
        padding: 1.5rem 0.8rem;
    }

    section h2 {
        font-size: 26px;
    }

    /* -------------------------------
       SERVICE BOXEN
    --------------------------------*/
    .service {
        padding: 0.8rem;
        margin-bottom: 1.2rem;
    }

    .service p {
        font-size: 17px;
        text-align: left;
        line-height: 1.5;
    }

    .service img {
        margin-top: 0.8rem;
        border-radius: 4px;
    }

    /* -------------------------------
       KONTAKT
    --------------------------------*/
    form {
        gap: 0.8rem;
    }

	select, input, textarea {
        font-size: 16px;
    }

    button {
        padding: 0.8rem;
        font-size: 17px;
        border-radius: 6px;
    }

    .kontakt-highlight {
        font-size: 18px;
    }

    /* -------------------------------
       FOOTER
    --------------------------------*/
    footer {
        flex-direction: column;
        gap: 10px;
        padding: 20px;
        text-align: center;
    }

    #sub-nav {
        gap: 15px;
    }

    #sub-nav li a {
        font-size: 16px;
    }

    /* -------------------------------
       LEGAL SECTIONS
    --------------------------------*/
    .legal-section {
        padding: 0 5%;
    }

    .legal-section p {
        font-size: 16px;
        text-align: left; /* bessere Lesbarkeit mobil */
    }

    .legal-section h6 {
        font-size: 24px;
    }

    /* -------------------------------
       COOKIE-MODAL
    --------------------------------*/
    .cookie-modal-content {
        max-width: 90%;
        padding: 20px;
    }

    .cookie-modal-content button {
        width: 100%;
        margin-bottom: 8px;
    }
}
	/* -------------------------------
       GALLERY
    --------------------------------*/
	
	@media screen and (max-width: 900px) {
		.gallery {
			grid-template-columns: repeat(2, 1fr); /* 2 Bilder auf Tablet */
		}
	}

	@media screen and (max-width: 600px) {
		.gallery {
			grid-template-columns: repeat(1, 1fr); /* 1 Bild auf Handy */
		}
	}
	
/* -----------------------------------------------------------
   HAMBURGER MENU
----------------------------------------------------------- */

/* Button */
.burger {
    width: 32px;
    height: 26px;
    display: none; /* Desktop versteckt */
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 5000; /* GANZ oben */
}

.burger span {
    width: 100%;
    height: 4px;
    background: #000;
    border-radius: 4px;
    transition: 0.3s;
}

/* Animation Burger → X */
.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}
.burger.active span:nth-child(2) {
    opacity: 0;
}
.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -7px);
}

/* Mobile Navigation */
.sticky-nav {
    display: none; /* Mobile standardmäßig versteckt */
    flex-direction: column;
}

.sticky-nav.mobile-hidden {
    display: none !important;
}

.sticky-nav.mobile-visible {
    display: flex !important;
    flex-direction: column;
}

@media (max-width: 800px) {
    nav {
        flex-direction: column; /* untereinander */
        gap: 0.7rem;
        font-size: 18px;
        padding: 10px;
    }

    nav a {
        width: 100%;
        text-align: center;
        padding: 8px 0;
    }

    .burger {
        display: flex; /* Hamburger sichtbar */
    }
}