/* =============================================================================
   WERBEAUF CHILD THEME STYLES
================================================================================
   Theme Name:     WERBEAUF
   Theme URI:      https://www.werbeauf.com
   Description:    Werbeauf Child Theme
   Template:       Divi
   Author:         Ronald
   Author URI:     https://www.werbeauf.com
============================================================================= */


/* ============================================================
   0. GLOBALE RESETS
   ============================================================ */

/* Nur den rechten Teil der Admin Bar (User/Suche) ausblenden */
#wpadminbar .ab-top-secondary {
    display: none !important;
}

html {
    scrollbar-gutter: stable;
}

body.custom-background { 
    background-color: transparent !important; 
}

body.no-scroll {
    overflow: hidden !important;
    height: 100vh !important;
    touch-action: none; 
}

.header-desktop__list,
.header-mobile__list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: normal !important;
}


/* ============================================================
   1. VISIBILITY TOGGLE (Mobile First Logic)
   ============================================================ */

.header-desktop { display: none !important; }
.header-mobile  { display: block !important; }

@media (min-width: 981px) {
    .header-desktop { display: flex !important; }
    .header-mobile  { display: none !important; }
}


/* ============================================================
   2. DESKTOP HEADER (Layout & Styling - AB 981px)
   ============================================================ */

@media (min-width: 981px) {

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

    .header-desktop {
        position: relative;
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        display: flex !important;        
        justify-content: center; 
        align-items: center;
        flex-direction: column;
        background-color: #f1f1f1;
    }

    .header-desktop__inner {
        width: 95%;
        margin: 0 auto;
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        box-sizing: border-box;
        padding: 50px 0;
        transition: padding .45s ease;
    }

    .header-desktop__col {
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        padding: 0 1.5rem;
        padding-bottom: 7px;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        max-width: 430px;
    }

    .header-desktop__col::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: #000;
    }

    .header-desktop__list {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .header-desktop__link {
        display: inline-block;
        font-family: "Cormorant Unicase", serif;
        text-transform: uppercase;
        color: #000;
        font-size: 16px;
        line-height: 1.2;
        white-space: nowrap;
        transform: scale(1);
        transition: transform .5s ease, color .5s ease;
        transform-origin: center center;
    }

    .header-desktop__link:hover {
        color: #d05916;
        transform: scale(1.05);
    }

    .header-desktop__logo-wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
        padding-inline: 1.5rem;
    }

    .header-desktop__logo-img {
        display: block;
        height: 100%;
        max-height: 50px;
        width: 100%;
        object-fit: contain;
        transition: max-height .45s ease;
    }

    /* --- Sticky Desktop --- */
    .header-desktop.is-sticky {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 99999;
        width: 100%;
        background-color: rgba(241, 241, 241, 0.8);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
        padding: 0 !important;
    }

    /* FIX: Wenn Admin Bar da ist, Header nach unten schieben */
    body.admin-bar .header-desktop.is-sticky {
        top: 32px !important;
    }

    .header-desktop.is-sticky .header-desktop__inner {
        padding: 10px 0;
        width: 95%;
    }

    .header-desktop.is-sticky .header-desktop__logo-img {
        max-height: 30px;
    }

    /* --- SICHERHEITS-REGELN (Kill-Switch für Mobile Overlay am Desktop) --- */
    .header-mobile__overlay {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    body.no-scroll {
        overflow: auto !important;
        height: auto !important;
    }
}


/* ============================================================
   3. MOBILE HEADER (BIS 980px)
   ============================================================ */

@media (max-width: 980px) {
    
    .header-mobile {
        position: relative;
        width: 100%;
        height: auto;
        z-index: 10;
        box-sizing: border-box !important;
        background-color: transparent;
    }

    .header-mobile__bar {
        display: flex !important;
        width: 93% !important; 
        max-width: 1200px;
        margin: 0 auto !important;
        justify-content: center;
        align-items: center;
        position: relative;
        z-index: 20 !important;
        background-color: #f1f1f1; 
        padding: 20px 10px !important;
        transition: padding .45s ease;
    }
    
    @media (max-width: 767px) {
        .header-mobile__bar {
            width: 90% !important; 
        }
    }
    
    .header-mobile__inner {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .header-mobile__logo-wrapper,
    .header-mobile__toggle-wrapper {
        display: flex;
        align-items: center;
        height: 100%;
    }

    .header-mobile__logo-wrapper a {
        display: flex !important;
        align-items: center !important;
        height: 100%;
        line-height: 0;
    }
    
    .header-mobile__logo-img {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 40px;
        width: auto;
        object-fit: contain;
    }

    .header-mobile__toggle-btn {
        width: 40px;
        height: 40px;
        display: flex;
        justify-content: center;
        align-items: center;
        border: none; 
        background-color: #d05e29;
        border-radius: 3px;
        cursor: pointer;
        z-index: 30 !important;
    }
        
    .header-mobile__hamburger-icon::before {
        content: "a";
        font-family: "ETmodules";
        font-size: 34px;
        color: #fff;
        display: block;
    }
    
    .header-mobile__toggle-btn.is-active { 
        display: none; 
    }
        
    /* --- Sticky Mobile Header --- */
    .header-mobile.is-sticky {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 100;   
    }

    /* FIX: Mobile Sticky Anpassung für Admin Bar */
    body.admin-bar .header-mobile.is-sticky {
        top: 32px !important;
    }
    @media (max-width: 782px) {
        body.admin-bar .header-mobile.is-sticky {
            top: 46px !important; /* WP Admin Bar ist auf kleinen Handys höher */
        }
    }

    .header-mobile.is-sticky .header-mobile__bar {
        background-color: rgba(241, 241, 241, 0.90);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
        padding: 10px 10px !important;
    }
  
    .header-mobile.is-sticky .header-mobile__logo-img {
        height: 30px !important; 
    }


    /* ============================================================
       4. MOBILE OVERLAY / DRAWER
       ============================================================ */

    .header-mobile__overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        height: 100dvh !important; /* Optimierung für Mobile Browser */
        
        background-color: rgba(0, 0, 0, 0.95) !important;
        z-index: 9999990 !important; 
        display: flex;
        flex-direction: column;
        justify-content: flex-start;

        opacity: 0;
        visibility: hidden;
        pointer-events: auto;
        box-sizing: border-box !important;
    }

    /* FIX: Overlay nicht von Admin Bar verdecken lassen */
    body.admin-bar .header-mobile__overlay {
        top: 32px !important;
        height: calc(100vh - 32px) !important;
    }
    @media (max-width: 782px) {
        body.admin-bar .header-mobile__overlay {
            top: 46px !important;
            height: calc(100vh - 46px) !important;
        }
    }

    .header-mobile__overlay.is-active {
        opacity: 1;
        visibility: visible;
    }

    .header-mobile__drawer-top {
        display: flex;
        justify-content: space-between; 
        align-items: center;
        width: 93%;
        max-width: 1200px;
        margin: 0 auto;
        padding: 20px 10px;
        box-sizing: border-box;
        flex-shrink: 0;
    }

    .header-mobile__drawer-top::before {
        display: none !important; 
        content: none !important;
    }

    .header-mobile__overlay.is-sticky .header-mobile__drawer-top {
        padding: 10px 10px;
    }

    @media (max-width: 767px) {
        .header-mobile__drawer-top {
            width: 90%;
        }
    }

    /* Logo Wrapper im Overlay */
    .header-mobile__drawer-logo-wrapper, 
    .header-mobile__drawer-logo-wrapper a {
        display: flex !important;
        justify-content: flex-start; 
        align-items: center !important;
        height: 100%;
        flex-grow: 0;
        line-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .header-mobile__drawer-logo-img {
        height: 40px; 
        width: auto;
        object-fit: contain;
        filter: brightness(0) invert(1);
        display: block !important;
        margin: 0 !important; 
        transition: height 0.4s ease;
    }

    .header-mobile__overlay.is-sticky .header-mobile__drawer-logo-img {
        height: 30px;
    }

    .header-mobile__close {
        width: 40px; 
        height: 40px;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: #d05e29; 
        border-radius: 3px;
        border: none;
        cursor: pointer;
        padding: 0;
        flex-shrink: 0;
        font-size: 34px; 
        line-height: 1;
        color: #fff;
        margin: 0; 
    }

    .header-mobile__close:hover {
        background-color: #b04b1e;
    }

    .header-mobile__drawer {
        position: absolute; 
        top: 0;
        left: 0;
        width: 100%;
        height: 100%; 
        box-sizing: border-box; 
        z-index: 9999991 !important; 
        display: flex !important;
        flex-direction: column !important;
        pointer-events: none;
    }

    .header-mobile__drawer-top,
    .header-mobile__drawer-content {
        pointer-events: auto; 
    }
    
    .header-mobile__drawer-content {
        flex-grow: 1; 
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 2rem;
        width: 100%;
        max-width: 100%; 
        box-sizing: border-box;
        overflow-y: auto; 
        -webkit-overflow-scrolling: touch;
    }

    .header-mobile__title {
        font-family: "Cormorant Unicase", serif;
        font-size: 2.1em;
        text-transform: uppercase;
        letter-spacing: 2px;
        color: #fff;
        text-align: center;
        position: relative;
        display: inline-block;
        padding-bottom: 10px;
    }
    
    .header-mobile__title::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: -15px;
        right: -15px;
        height: 1px;
        background: #fff;
    }
    
    .header-mobile__list {
        list-style: none;
        padding: 0;
        margin: 0 0 30px 0;
        width: 100%;
        text-align: center;
    }

    .header-mobile__item { 
        margin-bottom: 15px; 
    }

    .header-mobile__link {
        font-family: 'Forum', serif !important;
        text-decoration: none;
        color: #fff;
        font-size: 1.2em;
        text-transform: uppercase;
        padding: 5px 0;
        display: block;
        transform: scale(1);
        transition: transform .5s ease, color .5s ease;
        transform-origin: center center;
    }

    .header-mobile__link:hover {
        color: #d05e29;
    }

    a.header-mobile__cta.et_pb_button.et_pb_button_white {
        font-family: 'Forum', serif !important;
        display: inline-block !important;
        background: transparent !important; 
        border: 1px solid #fff !important;
        color: #fff !important;
        font-size: 1.1em !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        text-decoration: none !important;
        padding: 15px 30px !important;
    }

    a.header-mobile__cta.et_pb_button.et_pb_button_white:hover {
        background-color: #fff !important;
        color: #000 !important; 
        border-color: #fff !important;
        padding: 15px 30px !important;
    }

    a.header-mobile__cta.et_pb_button.et_pb_button_white:after {
        display: none !important;
    }

} /* ENDE MEDIA QUERY MOBILE */


/* ============================================================
   5. BUTTONS
   ============================================================ */

@font-face {
  font-family: 'MyCustomIcons';
  src: url('/wp-content/themes/Divi-child/fonts/ElegantIcons.eot');
  src: url('/wp-content/themes/Divi-child/fonts/ElegantIcons.eot?#iefix') format('embedded-opentype'),
    url('/wp-content/themes/Divi-child/fonts/ElegantIcons.woff') format('woff'),
    url('/wp-content/themes/Divi-child/fonts/ElegantIcons.ttf') format('truetype'),
    url('/wp-content/themes/Divi-child/fonts/ElegantIcons.svg#ElegantIcons') format('svg');
  font-weight: normal;
  font-style: normal; /* Semicolon hinzugefügt */
}

.et_pb_button,
.et_pb_module .et_pb_button,
.et_pb_header_button_wrapper .et_pb_button {
  all: unset !important;
  display: inline-block !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  font-family: 'Forum', serif !important;
  font-weight: 400 !important;
  text-transform: uppercase !important;
  font-size: 17px !important;
  line-height: 1.2em !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  text-decoration: none !important;
  color: #D05916 !important;
  border: 1px solid #D05916 !important;
  background: transparent !important;
  border-radius: 0 !important;
  position: relative !important;
  padding: .5em 2.8em .5em 1.3em !important;
  transition: background .3s, color .3s !important
}

.et_pb_button:hover,
.et_pb_module .et_pb_button:hover,
.et_pb_header_button_wrapper .et_pb_button:hover {
  padding: .5em 2.8em .5em 1.3em !important;
  background: rgba(208, 89, 22, .5) !important;
  color: #fff !important;
  border: 1px solid #D05916 !important
}

.et_pb_button::after,
.et_pb_module .et_pb_button::after,
.et_pb_header_button_wrapper .et_pb_button::after {
  content: "\50" !important;
  font-family: 'MyCustomIcons', 'ETmodules', sans-serif !important;
  font-weight: 400 !important;
  display: inline-block !important;
  position: absolute !important;
  right: .8em !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  font-size: 17px !important;
  color: inherit !important
}

.et_pb_button:hover::after {
  color: #fff !important
}

.et_pb_button:active,
.et_pb_module .et_pb_button:active,
.et_pb_header_button_wrapper .et_pb_button:active {
  background-color: #D05916 !important
}

.et_pb_button::before,
.et_pb_module .et_pb_button::before {
  display: none !important
}

.et_pb_button.et_pb_button_white,
.et_pb_module .et_pb_button.et_pb_button_white,
.et_pb_header_button_wrapper .et_pb_button.et_pb_button_white {
  background: rgba(241, 241, 241, 0.1) !important;
  border-color: #fff !important;
  color: #fff !important
}

.et_pb_button.et_pb_button_white:hover,
.et_pb_module .et_pb_button.et_pb_button_white:hover,
.et_pb_header_button_wrapper .et_pb_button.et_pb_button_white:hover {
  background: rgba(241, 241, 241, 0.3) !important;
  color: #fff !important;
  border-color: #fff !important
}

@media (max-width:980px) {
  .et_pb_button,
  .et_pb_module .et_pb_button,
  .et_pb_header_button_wrapper .et_pb_button {
    font-size: 16px !important;
    padding: .5em 2.5em .5em 1.1em !important
  }

  .et_pb_button:hover,
  .et_pb_module .et_pb_button:hover,
  .et_pb_header_button_wrapper .et_pb_button:hover {
    padding: .5em 2.5em .5em 1.1em !important
  }

  .et_pb_button::after,
  .et_pb_module .et_pb_button::after,
  .et_pb_header_button_wrapper .et_pb_button::after {
    right: .6em !important
  }
}

@media (max-width:767px) {
  .et_pb_button,
  .et_pb_module .et_pb_button,
  .et_pb_header_button_wrapper .et_pb_button {
    font-size: 15px !important;
    padding: .45em 2.2em .45em .9em !important
  }

  .et_pb_button:hover,
  .et_pb_module .et_pb_button:hover,
  .et_pb_header_button_wrapper .et_pb_button:hover {
    padding: .45em 2.2em .45em .9em !important
  }

  .et_pb_button::after,
  .et_pb_module .et_pb_button::after,
  .et_pb_header_button_wrapper .et_pb_button::after {
    right: .5em !important
  }
}


/* ============================================================
   6. CUSTOM ELLIPSE HEADLINES
   ============================================================ */

h2.ellipse {
  font-family: "Cormorant Unicase", serif;
  text-transform: uppercase;
  color: #1a1a1a;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 35px 50px;
  border: 1px solid #d05e29;
  border-radius: 50%/50%;
  background: transparent;
  box-sizing: border-box;
  text-align: center;
  font-size: 34px
}

@media (max-width:980px) {
  h2.ellipse {
    font-size: 30px;
    padding: 30px 43px
  }
}

@media (max-width:767px) {
  h2.ellipse {
    font-size: 28px;
    padding: 26px 37px
  }
}


/* ============================================================
   7. FOOTER MENU
   ============================================================ */

.legal-menu {
  width: 100%;
  text-align: center
}

.legal-menu ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex !important
}

.legal-menu li+li::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 16px;
  background: rgba(95, 120, 140, .35);
  margin: 0 14px;
  vertical-align: middle;
  transform: translateY(1px)
}

.legal-menu a {
  font-family: "Cormorant Unicase", serif;
  font-weight: 400 !important;
  font-size: 16px !important;
  text-transform: uppercase;
  text-decoration: none;
  color: #1a1a1a;
  transition: opacity .25s ease;
  display: inline-block;
  padding: 4px 0 0
}

.legal-menu a:hover {
  opacity: 1;
  color: #d05916
}

.legal-menu a.active {
  color: #d05916 !important;
  opacity: 1 !important
}

@media (max-width:980px) {
  .legal-menu a {
    font-size: 15px !important
  }
}

@media (max-width:767px) {
  .legal-menu {
    text-align: center
  }

  .legal-menu a {
    font-size: 14px !important
  }
}

@media (max-width:300px) {
  .legal-menu ul {
    flex-direction: column !important;
    gap: 10px !important
  }

  .legal-menu li+li::before {
    display: none !important
  }
}

.footer-copyright-info {
  font-family: "Forum", serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.2 !important
}

@media (max-width:980px) {
  .footer-copyright-info {
    font-size: 15px
  }
}

@media (max-width:767px) {
  .footer-copyright-info {
    font-size: 14px;
    margin-left: auto;
    margin-right: auto;
    text-align: center !important
  }
}