/*
Theme Name:     masdemas
Theme URI:      n/a
Template:       kadence
Author:         Matthias Reinders
Author URI:     n/a
Description:    Child Theme Description
Version:        1.0
License:        GNU General Public License v3.0 (or later)
License URI:    https://www.gnu.org/licenses/gpl-3.0.html
*/

/* Kadence Column Forms */
.wp-block-kadence-column.formbox {
    min-height: 600px;
}

.formbox-text {
    min-height: 220px;
}

/* Content Boxes */
.box-white p {
    text-align: center !important;
}

/* Remove Shadows */
.entry.single-entry {
    box-shadow: none !important;
}

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */

/* Header Height Control */
.site-main-header-inner-wrap {
    min-height: 50px !important;
    max-height: 50px !important;
    overflow: visible !important;
}

/* Logo Styling - Standard */
.site-branding {
    align-self: flex-start !important;
    overflow: visible !important;
}

.site-branding a.brand img {
    max-width: 220px;
    height: auto;
    transform: translateY(10px);
}

.site-branding a.brand img.svg-logo-image {
    width: 180px;
    padding-top: 40px !important;
}

/* Social Header Button */
a.social-button.header-social-item.social-link-custom1.has-custom-image {
    padding-left: 50px;
    padding-right: 20px;
}

/* Navigation Active State - NUR Desktop */
@media (min-width: 1025px) {
    .current-menu-item a {
        position: relative;
        border-bottom: none;
    }

    .current-menu-item a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: calc(2em / 2);
        right: calc(2em / 2);
        height: 5px;
        background-color: currentColor;
    }
    
    /* SubMenu Border-Linie entfernen - alle Links und States */
    ul.sub-menu a::after,
    ul.sub-menu a:hover::after,
    ul.sub-menu a:focus::after,
    ul.sub-menu .current-menu-item a::after,
    ul.sub-menu .current-menu-item a:hover::after,
    ul.sub-menu .current-menu-item a:focus::after {
        display: none !important;
        content: none !important;
    }
    
    /* Header Schatten - nur Desktop */
    .site-header-row-container-inner {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    /* SubMenu Links linksbündig - nur Desktop */
    ul.sub-menu a {
        text-align: left;
    }
}

/* ==========================================================================
   3. FOOTER STYLING
   ========================================================================== */

/* Footer Base Styling - CSS Custom Properties */
:root {
    --footer-bg-color: #BEEBFD; /* Standard: Hellblau für Pages */
}

/* Posts, 404-Seite und Suchseite bekommen weiße Footer-Farbe */
body.single-post,
body.page-id-17662,
body.page-id-18002 {
    --footer-bg-color: #fff;
}

.site-footer-row-container-inner {
    /* Basis-Styling ohne Border-Radius - wird nur für Desktop gesetzt */
}

/* Footer Desktop Styling - NUR ab 1025px */
@media (min-width: 1025px) {
    .content-style-boxed .site-footer-row-container-inner {
        position: relative;
        margin-right: 40px;
        border-radius: 0 30px 0 0;
    }
    
    /* Footer Background Extension - Verwendet CSS Custom Property */
    .content-style-boxed .site-footer-row-container-inner::after {
        content: "";
        position: absolute;
        top: 0;
        right: -40px;
        bottom: 0;
        width: 200px;
        background-color: var(--footer-bg-color);
        border-radius: 0 0 0 0;
        z-index: -1;
    }
    
    /* Footer Container Overflow */
    .content-style-boxed .site-middle-footer-wrap,
    .content-style-boxed .site-footer,
    .content-style-boxed .site-footer-wrap,
    .content-style-boxed #wrapper,
    .content-style-boxed .site {
        overflow: visible !important;
    }
}

/* Footer Mobile Styling */
@media (max-width: 767px) {
    .content-style-boxed .site-footer-row-container-inner {
        margin-right: 0;
        border-radius: 0;
    }
    
    .content-style-boxed .site-footer-row-container-inner::after {
        display: none;
    }
    
    /* Mobile Header/Footer Padding */
    header#masthead, 
    footer#colophon {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* Team Photo Base Styles */
.foto-team,
.foto-team-beirat,
.foto-team-ggmbh,
.foto-team-geschaeftsstelle {
    position: relative;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    padding: 3.5%;
    box-sizing: border-box;
    margin: 20px;
    aspect-ratio: 1/1;
    width: 300px;
    height: 300px;
}

/* Team Photo Images */
.foto-team img,
.foto-team-beirat img,
.foto-team-ggmbh img,
.foto-team-geschaeftsstelle img {
    position: relative;
    top: 4%;
    left: -2.5%;
    border-radius: 50%;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Team Photo Backgrounds */
.foto-team {
    background-image: url('https://ntfn.de/wp-content/uploads/2025/07/kreis-hintergrund.svg');
}

.foto-team-beirat {
    background-image: url('https://ntfn.de/wp-content/uploads/2025/07/kreis-hintergrund-beirat.svg');
}

.foto-team-ggmbh {
    background-image: url('https://ntfn.de/wp-content/uploads/2025/07/kreis-hintergrund-ggmbh.svg');
}

.foto-team-geschaeftsstelle {
    background-image: url('https://ntfn.de/wp-content/uploads/2025/07/kreis-hintergrund-geschaeftsstelle.svg');
}

/* ==========================================================================
   5. BROWSER COMPATIBILITY
   ========================================================================== */
/* Safari Fallback for Team Photos */
@supports not (aspect-ratio: 1/1) {
    .foto-team,
    .foto-team-beirat,
    .foto-team-ggmbh,
    .foto-team-geschaeftsstelle {
        width: 300px;
        height: 300px;
    }
    
    .foto-team img,
    .foto-team-beirat img,
    .foto-team-ggmbh img,
    .foto-team-geschaeftsstelle img {
        position: absolute;
        top: 8px;
        left: -5px;
        width: calc(100% - 8px);
        height: calc(100% - 8px);
    }
}

/* ==========================================================================
   6. RESPONSIVE DESIGN
   ========================================================================== */
/* Team Photos Mobile Styling */
@media (max-width: 768px) {
    .foto-team,
    .foto-team-beirat,
    .foto-team-ggmbh,
    .foto-team-geschaeftsstelle {
        width: 220px;
        height: 220px;
        padding: 2%;
    }
    
    @supports not (aspect-ratio: 1/1) {
        .foto-team img,
        .foto-team-beirat img,
        .foto-team-ggmbh img,
        .foto-team-geschaeftsstelle img {
            top: 6px;
            left: -4px;
            width: calc(100% - 6px);
            height: calc(100% - 6px);
        }
    }
}

/* Smartphone Breakpoint */
@media (max-width: 480px) {
    .foto-team,
    .foto-team-beirat,
    .foto-team-ggmbh,
    .foto-team-geschaeftsstelle {
        width: 180px;
        height: 180px;
        padding: 2%;
    }
    
    @supports not (aspect-ratio: 1/1) {
        .foto-team img,
        .foto-team-beirat img,
        .foto-team-ggmbh img,
        .foto-team-geschaeftsstelle img {
            top: 4px;
            left: -3px;
            width: calc(100% - 4px);
            height: calc(100% - 4px);
        }
    }
}
    
    @supports not (aspect-ratio: 1/1) {
        .foto-team img,
        .foto-team-beirat img,
        .foto-team-ggmbh img,
        .foto-team-geschaeftsstelle img {
            top: 4px;
            left: -3px;
            width: calc(100% - 4px);
            height: calc(100% - 4px);
        }
    }
}

/* Page ID 390 - Custom Header Override */
.page-id-390 .site-branding a.brand img {
    max-width: 80px !important;
    transform: none !important;
    padding-top: 0 !important;
}

.page-id-390 .site-branding a.brand img.svg-logo-image {
    width: 80px !important;
    padding-top: 0 !important;
}

.page-id-390 .site-main-header-inner-wrap {
    min-height: 50px !important;
    max-height: none !important;
    overflow: hidden !important;
}

.page-id-390 .site-branding {
    align-self: center !important;
    overflow: hidden !important;
}

  .yolawo-widget {
      background-color: #f5f5f5 !important;
      border: 1px solid #ddd;
      border-radius: 8px;
      padding: 10px;
  }

.kt-blocks-accordion-icon-trigger {
    margin-right: 20px !important;
}

/* Zentrierte SVG-Darstellung für Kadence Image Block */
figure.wp-block-kadence-image.size-large.image-is-svg.svg-zentriert, figure.wp-block-kadence-image.image-is-svg.svg-zentriert {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 0 auto;
}

/* Submenu Styling - Border-Radius Problem lösen */
ul.sub-menu {
    border-radius: 8px !important;
}

/* Border-Radius UNIVERSAL - Safari-kompatibel */
ul.sub-menu,
ul.sub-menu:hover,
ul.sub-menu li,
ul.sub-menu li:hover,
ul.sub-menu a,
ul.sub-menu a:hover,
ul.sub-menu a:focus,
ul.sub-menu a:active {
    border-radius: 8px !important;
}

/* WebKit-spezifisch für Safari */
@supports (-webkit-appearance: none) {
    ul.sub-menu {
        -webkit-border-radius: 8px !important;
        border-radius: 8px !important;
    }
}

ul.sub-menu a {
    border-bottom: none !important;
}

/* ==========================================================================
   7. MOBILE CONTENT SPACING - Abstände entfernen
   ========================================================================== */
@media screen and (max-width: 1024px) {
    .content-area {
        margin-top: 0px !important;
        margin-bottom: 0px !important;
    }
    
    h3.wp-block-kadence-advancedheading {
        font-size: 35px !important;
    }
    
    
    /* Navigation Active State komplett entfernen auf Mobile */
    .current-menu-item a,
    .current-menu-item a:hover,
    .current-menu-item a:focus,
    .current-menu-item a:active,
    .current-menu-item > a,
    .current-menu-item > a:hover,
    .current-menu-item > a:focus,
    .current-menu-item > a:active,
    .primary-navigation .current-menu-item a,
    .primary-navigation .current-menu-item a:hover,
    .primary-navigation .current-menu-item a:focus,
    .main-navigation .current-menu-item a,
    .main-navigation .current-menu-item a:hover,
    .main-navigation .current-menu-item a:focus,
    .header-navigation .current-menu-item a,
    .header-navigation .current-menu-item a:hover,
    .header-navigation .current-menu-item a:focus,
    .site-header .current-menu-item a,
    .site-header .current-menu-item a:hover,
    .site-header .current-menu-item a:focus {
        position: static !important;
        border-bottom: none !important;
        border: none !important;
        text-decoration: none !important;
        box-shadow: none !important;
        outline: none !important;
    }

    .current-menu-item a::after,
    .current-menu-item a:hover::after,
    .current-menu-item a:focus::after,
    .current-menu-item > a::after,
    .current-menu-item > a:hover::after,
    .current-menu-item > a:focus::after,
    .primary-navigation .current-menu-item a::after,
    .primary-navigation .current-menu-item a:hover::after,
    .primary-navigation .current-menu-item a:focus::after,
    .main-navigation .current-menu-item a::after,
    .main-navigation .current-menu-item a:hover::after,
    .main-navigation .current-menu-item a:focus::after,
    .header-navigation .current-menu-item a::after,
    .header-navigation .current-menu-item a:hover::after,
    .header-navigation .current-menu-item a:focus::after,
    .site-header .current-menu-item a::after,
    .site-header .current-menu-item a:hover::after,
    .site-header .current-menu-item a:focus::after {
        display: none !important;
        content: none !important;
        border: none !important;
        border-bottom: none !important;
    }
}

/* ==========================================================================
   8. MOBILE ONLY - Unter 768px
   ========================================================================== */
@media screen and (max-width: 768px) {
    /* Kadence Tabs Mobile Styling - Universal für alle Tab IDs */
    .wp-block-kadence-tabs [class*="kt-tabs-id"] > .kt-tabs-content-wrap > .kt-tabs-accordion-title .kt-tab-title {
        margin-top: 20px !important;
        margin-right: 0px !important;
    }
}

/* Formulare */

div#wpforms-1432 {
  padding-left: 0;
  width: 100% !important;
}

button#wpforms-submit-1432, button#wpforms-submit-1471 {
  text-transform: uppercase;
  font-weight: 700;
}

button#wpforms-submit-1471 {
  background: #87c5e8;
  color: #1A202C;
  border: 2px solid #87c5e8;
}

/* Suchergebnisse Titel zentriert - spezifischer */
h1.search-results-title {
  text-align: center !important;
  margin-bottom: 2rem;
}

/* Falls das auch nicht funktioniert - noch spezifischer */
.page-id-18002 h1.search-results-title {
  text-align: center !important;
  margin-bottom: 2rem;
}

article.search-result-item {
    margin-bottom: 30px;
}

article.search-result-item {
    border: 1px solid lightgrey;
    padding: 20px;
    border-radius: 10px;
}