/*
 Theme Name:   Astra Child
 Template:     astra
*/

/* ======================================================
   Global Layout Fix gegen horizontales Scrollen
====================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
}


/* ======================================================
   Desktop Sticky Header
====================================================== */
#custom-sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: #e3dbd5;

    display: flex;
    align-items: center;

    padding: 5px 15px;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Fix gegen Breiten-Overflow bei Sticky Header */
#custom-sticky-nav,
#mobile-sticky-bar {
    box-sizing: border-box;
}

/* Logo */
.sticky-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sticky-logo a {
  display: block;
  flex-shrink: 0;
}

.sticky-logo img,
.custom-logo {
  height: 70px;
  width: auto;
  display: block;
}

.logo-subtext {
  font-size: 16px;
  line-height: 1.3;
  color: #5d4251;
  white-space: nowrap;
}

/* Navigation */
.sticky-menu {
    display: flex;
    gap: 5px;
    margin-left: auto;
    align-items: center;
}

.sticky-menu a {
    text-decoration: none;
    font-weight: 400;
    color: #464d57;
    padding: 5px 6px;
    white-space: nowrap;
}

.sticky-menu a:hover {
    color: #d2a56e;
}


/* ======================================================
   Mobile Sticky Header
====================================================== */
#mobile-sticky-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: #e3dbd5;
    border-bottom: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

/* Obere Leiste: Logo + Hamburger */
.mobile-bar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 8px;
    min-height: 70px; /* garantiert Platz für Logo */
}

/* Mobile Logo Container */
#mobile-sticky-bar .mobile-logo,
#mobile-sticky-bar .mobile-logo a {
    display: flex !important;
    align-items: center;
    margin: 0 !important;
    padding: 0 !important;
}

/* Mobile Logo Bild */
#mobile-sticky-bar .mobile-logo img,
#mobile-sticky-bar .mobile-logo .custom-logo {
    display: block !important;
    max-height: 75px !important;
    min-height: 60px !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hamburger Button */
#mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#mobile-menu-toggle span {
    width: 22px;
    height: 2px;
    background: #333;
    display: block;
    transition: all 0.3s ease;
}

/* Hamburger X Animation */
#mobile-sticky-bar.open #mobile-menu-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#mobile-sticky-bar.open #mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
}
#mobile-sticky-bar.open #mobile-menu-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menü */
#mobile-menu {
    display: flex;
    flex-direction: column;
    border-top: 1px solid #ddd;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobile-menu a {
    padding: 12px 16px;
    font-size: 15px;
    text-decoration: none;
    color: #464d57;
    border-bottom: 1px solid #eee;
}

/* ======================================================
   Anker-Offset wegen Sticky Header
====================================================== */
[id] {
    scroll-margin-top: 90px;
}

/* ======================================================
   Media Queries
====================================================== */

/* Desktop: normale Navigation, Mobile-Sticky-Bar ausblenden */
@media (min-width: 1201px) {
    #mobile-sticky-bar {
        display: none !important;
    }

    /* Desktop-Menü flexibler, bricht um bei wenig Platz */
    .sticky-menu {
        display: flex;
        gap: 5px;          /* enger Abstand zwischen Menüpunkten */
        flex-wrap: wrap;    /* automatische Umbrüche */
    }
}

/* Mobile / Tablets: Hamburger aktivieren, Desktop-Navigation ausblenden */
@media (max-width: 1200px) {  
    #custom-sticky-nav {
        display: none !important;
    }

    #mobile-sticky-bar {
        display: flex !important;
    }

    /* Anker-Offset für Scrollen */
    [id] {
        scroll-margin-top: 70px;
    }
}
/* ======================================================
   Kontaktformular Styling
====================================================== */
.wpcf7-form label,
.wpcf7-form input,
.wpcf7-form textarea,
.wpcf7-form .wpcf7-acceptance label {
    color: #fbf7f7;
    font-family: inherit;
}

/* Eingabefelder */
.wpcf7-form input,
.wpcf7-form textarea {
    border: none;
    border-bottom: 1px solid #464d57;
    background-color: #aab0bd;
    padding: 8px 4px;
    width: 100%;
    box-sizing: border-box;
    font-size: 16px;
}

/* Fokus */
.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
    outline: none;
    border-bottom-color: #464d57;
}

/* Placeholder */
.wpcf7-form input::placeholder,
.wpcf7-form textarea::placeholder {
    color: #6f7787;
    opacity: 0.7;
}

/* Textarea */
.wpcf7-form textarea {
    resize: vertical;
    min-height: 80px;
    max-height: 120px;
}

/* Checkbox */
.wpcf7-form .wpcf7-acceptance {
    display: flex;
    align-items: center;
    margin: 12px 0;
}

.wpcf7-form .wpcf7-acceptance input[type="checkbox"] {
    accent-color: #6d673f;
    width: 18px;
    height: 18px;
    margin-right: 8px;
}

.wpcf7-form .wpcf7-acceptance label {
    font-size: 14px;
}

/* Submit Button */
.wpcf7-form input[type="submit"] {
    padding: 8px 12px;
    font-size: 16px;
    width: auto;
    display: inline-block;
    border: 1px solid #464d57;
    background-color: #aab0bd;
    color: #464d57;
    cursor: pointer;
    float: right;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.wpcf7-form input[type="submit"]:hover {
    background-color: #cad2e1;
    color: #aab0bd;
}


/* Mobile Formular */
@media (max-width: 767px) {
    .wpcf7-form input,
    .wpcf7-form textarea {
        font-size: 16px;
        padding: 8px 4px;
    }

    .wpcf7-form input[type="submit"] {
        padding: 6px 10px;
        font-size: 16px;
    }
}


html {
  scroll-behavior: smooth;
}

/* ======================================================
   Parallax / Fixed Background für deine Sections
====================================================== */

/* Standard Parallax (Desktop + Android) */
.parallax-section {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed;
    min-height: 100vh;
    min-height: 100svh; /* echte sichtbare Höhe auf Mobile */
    position: relative; /* wichtig für iOS Fake Parallax */
    overflow: hidden;
}

/* iPhone / iPad Fix */
.ios-device .parallax-section {
    background-attachment: scroll !important; /* Safari Bug umgehen */
    min-height: 70vh;
    min-height: 70svh;
}

/* ======================================================
   Fake Fixed Parallax für iOS
====================================================== */

.ios-device .parallax-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%; /* doppelte Höhe für sanften Scroll */
    background-image: inherit; /* übernimmt das Hintergrundbild */
    background-size: cover;
    background-position: center center;
    z-index: -1; /* hinter dem Content */
    transform: translateY(0);
    transition: transform 0.1s linear;
}

/* iOS Fake Parallax Scroll Variable */
.ios-device .parallax-section::before {
    transform: translateY(var(--parallax-offset, 0));
}
