/*
Theme Name: Divi Child
Template: Divi
Version: 1.0.0
Author: Flanke 7
*/

/* ==========================================================================
   Aufbau:
     1.  Portfolio Excerpt (Startseite Projektbereich)
     2.  Header & Top Menu
     3.  Globale Buttons
     4.  Filterbares Portfolio
     5.  Blog / News
     6.  Globale Headings
     7.  Mobile Menu / Slide-In Navigation
     8.  Portfolio Excerpt Absolute Fix
     9.  Pb-Button Hover Animation
     10. Image Clip Hero (Startseite)
     11. RSS Feed Layout
     12. Page-spezifische Header Farben
     13. Startseite Intro / Hero Boxen
     14. Leistungen Hero (Desktop / Mobile Switch)
     15. reCAPTCHA Badge
     16. Globale Form Hover (et_pb_contact_form)
     17. Top Menu Typografie
     18. Rösch Karriere Formular (CF7 - rsf- Prefix)
   ========================================================================== */

/* ==========================================================================
   1. Portfolio Excerpt (Startseite Projektbereich)
   ========================================================================== */

.et_pb_portfolio_items .project-excerpt {
  position: relative;
  top: 105%;
  left: 36%;
}

/* ==========================================================================
     2. Header & Top Menu
     ========================================================================== */

#top-menu li {
  padding-right: 40px;
}

.et_pb_menu--without-logo .et_pb_menu__menu > nav > ul > li {
  padding-right: 25px;
}

.mobile_menu_bar:before {
  padding-right: 25px;
  color: #fff !important;
}

/* ==========================================================================
     3. Globale Buttons (btn-link mit Underline-Animation)
     ========================================================================== */

.btn-link {
  text-decoration: none;
  color: #1a497b;
  font-size: 20px;
  font-weight: 600;
}

.btn {
  position: relative;
}

.btn-link:after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 25%;
  height: 1.9px;
  background-color: #1a497b;
  transition: 300ms;
}

.btn-link:hover:after {
  width: 110%;
}

/* ==========================================================================
     4. Filterbares Portfolio
     ========================================================================== */

.et_pb_filterable_portfolio .et_pb_portfolio_filters li {
  padding-right: 15px;
}

.et_pb_portfolio_filter {
  padding-bottom: 10px;
}

.et_pb_filterable_portfolio .et_pb_portfolio_filters li a {
  border-radius: 25px !important;
}

.et_pb_portfolio_item {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.et_pb_module_header {
  padding: 4rem;
  font-weight: 600;
}

.et_pb_portfolio_filters ul li:first-of-type {
  display: none;
}

.et_pb_filterable_portfolio .et_pb_portfolio_item.active {
  animation: none;
  transition: 300ms;
}

.et_pb_filterable_portfolio .et_pb_portfolio_filters li a.active {
  background: #1a497b;
  color: #fff !important;
}

.filter_text {
  line-height: 1.7;
  letter-spacing: 0.4px;
}

@media screen and (max-width: 490px) {
  .et_pb_column .et_pb_filterable_portfolio .et_pb_portfolio_filters li {
    width: 100%;
  }
  .et_pb_portfolio_item {
    display: inherit;
  }
  .et_pb_module_header {
    padding: 0;
  }
}

/* ==========================================================================
     5. Blog / News
     ========================================================================== */

.et_pb_column .et_pb_blog_grid .column.size-1of1 .et_pb_post {
  margin-right: 0;
  margin-bottom: 0% !important;
  width: 100%;
  padding: 10px;
}

.blog-underline a {
  border-bottom: 1px solid #ccc;
}

.blog-underline a:hover {
  border-bottom: 2px solid #1a497b;
}

/* ==========================================================================
     6. Globale Headings
     ========================================================================== */

h5 {
  padding-top: 25px;
  margin-bottom: 15px;
  font-size: 18px;
  line-height: 1.2;
  border-bottom: 0.25px solid rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
     7. Mobile Menu / Slide-In Navigation
     ========================================================================== */

/* Hamburger > X Icon Toggle */
#et_mobile_nav_menu .mobile_nav.opened .mobile_menu_bar::before {
  content: "\4d";
}

/* Sub-Sub Menu Arrow */
#top-menu
  .menu-item-has-children
  .menu-item-has-children
  > a:first-child::after,
#et-secondary-nav
  .menu-item-has-children
  .menu-item-has-children
  > a:first-child::after {
  content: "5";
}

/* Toggle für Sub-Menus */
#main-header #mobile_menu.et_mobile_menu .menu-item-has-children {
  position: relative;
}

#main-header #mobile_menu.et_mobile_menu .sub-menu-toggle {
  position: absolute;
  z-index: 1;
  width: 36px;
  height: 36px;
  line-height: 36px;
  border-radius: 50%;
  top: 5px;
  right: 30px;
  cursor: pointer;
  text-align: center;
}

#main-header #mobile_menu.et_mobile_menu .sub-menu-toggle.popped {
  background-color: rgba(255, 255, 255, 0.2);
}

#main-header #mobile_menu.et_mobile_menu .sub-menu-toggle::before {
  font-family: "ETmodules" !important;
  font-weight: normal;
  font-style: normal;
  font-variant: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 36px;
  font-size: 24px;
  text-transform: none;
  speak: none;
  content: "\33";
  color: #fff !important;
}

#main-header #mobile_menu.et_mobile_menu .sub-menu-toggle.popped::before {
  content: "\32";
}

#main-header #mobile_menu.et_mobile_menu .sub-menu-toggle ~ ul.sub-menu {
  display: none !important;
  padding-left: 0;
}

#main-header #mobile_menu.et_mobile_menu .sub-menu-toggle.popped ~ ul.sub-menu {
  display: block !important;
}

#main-header #mobile_menu.et_mobile_menu li li {
  padding-left: 0;
}

#main-header #mobile_menu.et_mobile_menu li a {
  padding-left: 20px;
  padding-right: 20px;
  font-weight: 200;
  font-size: 26px;
}

#main-header #mobile_menu.et_mobile_menu li li li a {
  padding-left: 60px;
  padding-right: 20px;
}

#main-header #mobile_menu.et_mobile_menu .menu-item-has-children > a {
  background-color: transparent;
  font-weight: 200 !important;
}

#main-header #mobile_menu.et_mobile_menu li.current-menu-item > a {
  font-weight: 600;
}

/* Font Awesome */
.fa {
  margin-right: 15px;
}

/* Slide-In Mobile Menu */
@media only screen and (max-width: 980px) {
  #mobile_menu {
    display: block !important;
    min-height: 100vh;
    height: 100%;
    top: 0;
    right: 0;
    position: fixed;
    z-index: 9998;
    border-top: none;
    padding-top: 80px !important;
  }

  .mobile_nav.opened body {
    overflow: hidden !important;
  }

  .et_mobile_menu li a {
    color: #fff !important;
    width: 100%;
    float: left;
    text-align: left;
    border-left: 1px solid #fff;
    margin: 15px 0px 0px 15px;
    transition: 0.2s;
  }

  .mobile_nav ul#mobile_menu .current_page_item > a {
    color: #fff !important;
  }

  .mobile_nav.closed #mobile_menu {
    background: rgba(51, 51, 51, 0.9) !important;
    -webkit-transform: translateX(100%);
    -moz-transform: translateX(100%);
    -ms-transform: translateX(100%);
    -o-transform: translateX(100%);
    transform: translateX(100%);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transition: -webkit-transform 0.4s 0s;
    -moz-transition: -moz-transform 0.4s 0s;
    transition: transform 0.4s 0s;
    background: #164a7e !important;
  }

  .mobile_nav.opened #mobile_menu {
    background: #164a7e !important;
    -webkit-transform: translateX(0);
    -moz-transform: translateX(0);
    -ms-transform: translateX(0);
    -o-transform: translateX(0);
    transform: translateX(0);
    -webkit-overflow-scrolling: touch;
    -webkit-transition: -webkit-transform 0.4s 0s;
    -moz-transition: -moz-transform 0.4s 0s;
    transition: transform 0.4s 0s;
  }

  #main-header .container.clearfix.et_menu_container {
    width: 100%;
  }

  .mobile_menu_bar:before {
    color: #fff !important;
  }

  .mobile_nav.opened .mobile_menu_bar:before {
    content: "\4d";
    color: #fff !important;
    z-index: 9999;
  }

  .et_header_style_split .mobile_menu_bar,
  .et_header_style_left .mobile_menu_bar {
    z-index: 9999;
  }

  #et-top-navigation {
    padding-right: 5px;
  }

  #logo {
    padding-left: 25px;
  }
}

@media only screen and (min-width: 481px) {
  #mobile_menu {
    width: 340px;
    margin-left: calc(100% - 340px);
  }
}

@media only screen and (max-width: 480px) {
  #mobile_menu {
    width: 290px;
    margin-left: calc(100% - 290px);
  }
}

@media (max-width: 980px) {
  .et_pb_menu .et_pb_menu__menu {
    display: block !important;
  }
  .et_mobile_nav_menu {
    display: none !important;
  }
}

/* ==========================================================================
     8. Portfolio Excerpt Absolute Fix
     ========================================================================== */

.et_pb_portfolio_items .project-excerpt {
  position: absolute;
}

/* ==========================================================================
     9. PB-Button Hover Animation
     ========================================================================== */

body #page-container .et_pb_section .et_pb_button:after {
  right: 10px;
  transition: 0.1s;
}

body #page-container .et_pb_section .et_pb_button:hover:after {
  right: 0;
}

#btn-no-transition .et_pb_button {
  transition: none !important;
}

/* ==========================================================================
     10. Image Clip Hero (Startseite)
     ========================================================================== */

@media screen and (max-width: 1600px) {
  .image-clip {
    width: 970px !important;
    clip-path: polygon(
      50% 0%,
      100% 0,
      100% 100%,
      20% 100%,
      20% 55%,
      35% 55%,
      35% 0
    ) !important;
  }
  .clip-text.et_pb_text_1 {
    position: relative !important;
    width: 600px !important;
    left: 0;
  }
}

@media screen and (max-width: 1350px) {
  .image-clip {
    display: none;
  }
  .clip-text {
    margin-left: 0 !important;
    left: auto !important;
  }
}

@media all and (min-width: 1350px) {
  .clip-mobile {
    display: none;
  }
}

@media screen and (max-width: 769px) {
  .clip-text {
    position: relative !important;
    width: 100px !important;
  }
}

/* ==========================================================================
     11. RSS Feed Layout
     ========================================================================== */

@media screen and (min-width: 1140px) {
  .wpra-item-list--bullets.wpra-item-list--default {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-gap: 20px;
  }
}

@media screen and (max-width: 1139px) and (min-width: 769px) {
  .wpra-item-list--bullets.wpra-item-list--default {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 20px;
  }
}

@media screen and (max-width: 768px) {
  .wpra-item-list--bullets.wpra-item-list--default {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 20px;
  }
}

div.wpra-list-template .wpra-item-list > li.wpra-item {
  list-style: none;
}

/* ==========================================================================
     12. Page-spezifische Header Farben
     ========================================================================== */

.page-id-932 #main-header {
  background: #164a7e !important;
}

.page-id-3 #main-header {
  background: #164a7e !important;
}

/* ==========================================================================
     13. Startseite Intro / Hero Boxen
     ========================================================================== */

@media screen and (max-width: 1375px) and (min-width: 981px) {
  .startseite-intro > .et_pb_column_6 {
    padding: 0 4rem 0 7rem !important;
    width: 175% !important;
  }
  .hero-boxen {
    width: 90% !important;
  }
}

/* ==========================================================================
     14. Leistungen Hero (Desktop / Mobile Switch)
     ========================================================================== */

@media screen and (max-width: 1919px) and (min-width: 1280px) {
  .leistungen-hero-desktop .leistungen-row1 {
    max-width: 35%;
  }
  .leistungen-hero-desktop .leistungen-row2 {
    max-width: 120%;
  }
  .leistungen-row2 .et_pb_text_1 {
    max-width: 110%;
    margin-left: -35% !important;
  }
  .leistungen-row2 .et_pb_text_2 {
    width: 120%;
    max-width: 800px;
  }
}

@media (min-width: 1280px) {
  .leistungen-hero-mobile {
    display: none;
  }
}

@media (max-width: 1279px) {
  .leistungen-hero-desktop {
    display: none;
  }
}

@media (min-width: 2300px) {
  .leistungen-hero-desktop .et_pb_row {
    width: 70%;
  }
}

/* ==========================================================================
     15. reCAPTCHA Badge
     ========================================================================== */

.grecaptcha-badge {
  visibility: hidden !important;
}

/* ==========================================================================
     16. Globale Form Hover (et_pb_contact_form)
     ========================================================================== */

#et_pb_contact_form_0 button:hover {
  color: #fff;
  background: #164a7e !important;
}

/* ==========================================================================
     17. Top Menu Typografie
     ========================================================================== */

#top-menu li {
  letter-spacing: 1.8px;
  font-weight: 600;
}

#top-menu li a {
  text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
     18. Rösch Karriere Formular (Contact Form 7 - rsf- Prefix)
     --------------------------------------------------------------------------
     Eigenständiges Formular auf der Karriere-Seite.
     Wrapper im Layout: <section id="roesch-form">...</section>
     Klassen-Prefix "rsf-" um Kollision mit globalem .rf- CSS zu vermeiden.
     ========================================================================== */

/* --- 18.1 Variablen & Wrapper --- */
#roesch-form {
  --rsf-bg: #ffffff;
  --rsf-border: #e2e6ec;
  --rsf-border-focus: #164a7e;
  --rsf-text: #1a2330;
  --rsf-muted: #6b7785;
  --rsf-placeholder: #aab3bf;
  --rsf-track: #f4f6f9;
  --rsf-primary: #164a7e;
  --rsf-primary-hover: #103c68;
  --rsf-radius: 10px;
  --rsf-radius-pill: 999px;
  --rsf-field-height: 48px;

  font-family: inherit;
  color: var(--rsf-text);
}

#roesch-form .rsf-card {
  background: var(--rsf-bg);
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(20, 35, 60, 0.06);
  max-width: 760px;
  margin: 0 auto;
}

/* --- 18.2 Grid Layout --- */
#roesch-form .rsf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}

#roesch-form .rsf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

#roesch-form .rsf-field.rsf-full {
  grid-column: 1 / -1;
}

#roesch-form .rsf-field .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

/* --- 18.3 Labels --- */
#roesch-form .rsf-field > label,
#roesch-form .rsf-group-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--rsf-muted);
  text-transform: uppercase;
  margin: 0;
}

#roesch-form .rsf-optional {
  color: #c5cbd4;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

/* --- 18.4 Inputs / Select / Textarea --- */
#roesch-form .rsf-field input[type="text"],
#roesch-form .rsf-field input[type="email"],
#roesch-form .rsf-field input[type="tel"],
#roesch-form .rsf-field select,
#roesch-form .rsf-field textarea {
  width: 100% !important;
  height: var(--rsf-field-height) !important;
  padding: 0 16px !important;
  font-size: 15px !important;
  line-height: 1.4 !important;
  color: var(--rsf-text) !important;
  background: var(--rsf-bg) !important;
  border: 1px solid var(--rsf-border) !important;
  border-radius: var(--rsf-radius) !important;
  box-shadow: none !important;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit !important;
}

#roesch-form .rsf-field textarea {
  height: auto !important;
  min-height: 120px !important;
  padding: 14px 16px !important;
  resize: vertical;
}

#roesch-form .rsf-field input::placeholder,
#roesch-form .rsf-field textarea::placeholder {
  color: var(--rsf-placeholder);
  opacity: 1;
}

#roesch-form .rsf-field input:focus,
#roesch-form .rsf-field select:focus,
#roesch-form .rsf-field textarea:focus {
  outline: none !important;
  border-color: var(--rsf-border-focus) !important;
  box-shadow: 0 0 0 3px rgba(22, 74, 126, 0.12) !important;
}

#roesch-form .rsf-field select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3e%3cpath fill='none' stroke='%236b7785' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 18px center !important;
  background-size: 12px 8px !important;
  padding-right: 44px !important;
}

/* --- 18.5 Toggle (Radio Group als Pill-Switch) --- */
#roesch-form .rsf-toggle .wpcf7-radio {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  background: var(--rsf-track);
  border-radius: var(--rsf-radius-pill);
  padding: 4px;
  gap: 0;
}

#roesch-form .rsf-toggle .wpcf7-list-item {
  margin: 0 !important;
  display: block;
}

#roesch-form .rsf-toggle .wpcf7-list-item label {
  display: block;
  cursor: pointer;
  position: relative;
  margin: 0;
}

#roesch-form .rsf-toggle .wpcf7-list-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

#roesch-form .rsf-toggle .wpcf7-list-item-label {
  display: block;
  padding: 10px 16px;
  text-align: center;
  border-radius: var(--rsf-radius-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--rsf-muted);
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
  user-select: none;
}

#roesch-form
  .rsf-toggle
  .wpcf7-list-item
  input[type="radio"]:checked
  + .wpcf7-list-item-label {
  background: #fff;
  color: var(--rsf-primary);
  box-shadow: 0 1px 3px rgba(20, 35, 60, 0.1);
  font-weight: 600;
}

/* --- 18.6 Submit Button --- */
#roesch-form .rsf-btn-wrap {
  margin-top: 24px;
  text-align: center;
}

#roesch-form input[type="submit"].rsf-btn,
#roesch-form .rsf-btn {
  display: inline-block !important;
  width: auto !important;
  min-width: 260px;
  height: auto !important;
  padding: 14px 36px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.01em !important;
  color: #fff !important;
  background: var(--rsf-primary) !important;
  border: none !important;
  border-radius: var(--rsf-radius-pill) !important;
  box-shadow: 0 4px 14px rgba(22, 74, 126, 0.25) !important;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
  text-transform: none !important;
  font-family: inherit !important;
}

#roesch-form input[type="submit"].rsf-btn:hover,
#roesch-form .rsf-btn:hover {
  background: var(--rsf-primary-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(22, 74, 126, 0.3) !important;
}

#roesch-form input[type="submit"].rsf-btn:active {
  transform: translateY(0);
}

#roesch-form .wpcf7-spinner {
  vertical-align: middle;
  margin-left: 12px;
}

/* --- 18.7 Trust Row (stabil ausgerichtet, auch mit Divi-Overrides) --- */
#roesch-form .rsf-trust {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  justify-items: center;
  gap: 14px 20px;
  margin-top: 24px;
  font-size: 13px;
  color: var(--rsf-muted);
}

#roesch-form .rsf-trust .rsf-trust-item {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 280px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #f4f7fa;
  border: 1px solid #e8edf3;
  line-height: 1.3;
  white-space: normal;
  text-align: center;
}

#roesch-form .rsf-trust .rsf-check {
  display: inline-flex !important;
  flex: 0 0 18px;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(22, 74, 126, 0.1);
}

#roesch-form .rsf-trust .rsf-check svg {
  display: block !important;
  width: 10px;
  height: 10px;
}

#roesch-form .rsf-trust .rsf-trust-text {
  margin-top: 1px;
  display: inline-block;
  text-align: center;
}

/* --- 18.8 Divider & Adresse --- */
#roesch-form .rsf-divider {
  height: 1px;
  background: var(--rsf-border);
  margin: 24px 0 16px;
}

#roesch-form .rsf-address {
  text-align: center;
  font-size: 13px;
  color: var(--rsf-muted);
  margin: 0;
}

#roesch-form .rsf-address a {
  color: var(--rsf-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

#roesch-form .rsf-address a:hover {
  border-bottom-color: var(--rsf-primary);
}

/* --- 18.9 CF7 Validierungs-Messages --- */
#roesch-form .wpcf7-response-output {
  margin: 20px 0 0 !important;
  padding: 12px 16px !important;
  border-radius: var(--rsf-radius) !important;
  font-size: 14px;
}

#roesch-form .wpcf7-not-valid-tip {
  font-size: 12px !important;
  margin-top: 4px !important;
  color: #d7403a !important;
}

#roesch-form .wpcf7-not-valid {
  border-color: #d7403a !important;
}

/* --- 18.10 Mobile (<= 640px) --- */
@media (max-width: 640px) {
  #roesch-form .rsf-card {
    padding: 20px;
    border-radius: 12px;
  }

  #roesch-form .rsf-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* Toggle: 3 Spalten beibehalten, kompakter aber weiterhin lesbar */
  #roesch-form .rsf-toggle .wpcf7-radio {
    grid-template-columns: repeat(3, 1fr) !important;
    padding: 3px !important;
  }

  #roesch-form .rsf-toggle .wpcf7-list-item-label {
    padding: 9px 4px !important;
    font-size: 11.5px !important;
    text-align: center !important;
    letter-spacing: 0;
  }

  /* Submit Full-Width */
  #roesch-form input[type="submit"].rsf-btn,
  #roesch-form .rsf-btn {
    width: 100% !important;
    min-width: 0;
  }

  /* Trust: untereinander, zentriert, klar lesbar */
  #roesch-form .rsf-trust {
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    gap: 10px !important;
    margin-top: 18px;
  }

  #roesch-form .rsf-trust .rsf-trust-item {
    max-width: 100%;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 12px;
    white-space: normal;
    line-height: 1.3;
    text-align: center;
  }
}
