/*
Theme Name: Fenedo
Description: Custom theme developed for Fenedo.
Version: 1.0.0
Author: Coders³
Author URI: https://coders3.com/
Text Domain: fenedo
*/


/*
* Add new fixes here, not in the Customizer.
*/

/* L1: CTA banner - let the buttons wrap instead of overflowing (long DE labels) */
@media only screen and (min-width:1024px){
  .b-cta__banner{flex-wrap:wrap;row-gap:30px}
  .b-cta__banner .cta{flex-wrap:wrap;margin-left:auto;justify-content:flex-end}
  .b-cta__banner .book .info{min-width:220px}
}

/* L4: long German words in card titles hyphenate instead of overflowing the card */
.card-service .title,.card-process .title,.card-product .title{overflow-wrap:break-word}
@media only screen and (max-width:767px){.card-service .title,.card-process .title,.card-product .title{-webkit-hyphens:auto;hyphens:auto;hyphenate-limit-chars:14 5 5}}

/* L5: readable card descriptions on the dark cards (was #597584 on #152b37, 3.0:1) */
body .b-hero__list .card-service .content .description,
body .b-process__list .card-process .content .description{color:#c9dbe3}
body .b-process__list .card-process .step{color:#a9c0cb}

/* L6: product card titles on phones ("Aluminiumfenster" was cut) */
@media only screen and (max-width:767px){
  .b-products__list .card-product__image .title{font-size:clamp(24px,7.5vw,35px)}
}

/* L14: footer Impressum/Datenschutz links readable and tappable */
.m-footer__wrapper .data .link{color:#152b37;display:inline-flex;align-items:center;min-height:32px}
.m-footer__wrapper .data .link:after{background-color:#152b37;bottom:4px}
.m-footer__wrapper .menu .menu-item>a{display:inline-flex;align-items:center;min-height:32px}

/* Footer-only menu items (DE): complaint link and mobile contact bar never show in the header menu */
#header-menu .fx-reklamation,#header-menu .fx-sticky{display:none!important}

/* Mobile sticky contact bar (DE menu items with class fx-sticky) */
#footer-menu .fx-sticky{display:none}
@media only screen and (max-width:767px){
  html[lang="de-DE"] body{padding-bottom:calc(58px + env(safe-area-inset-bottom))}
  #footer-menu .fx-sticky{display:block;position:fixed;bottom:0;width:33.3334%;height:calc(58px + env(safe-area-inset-bottom));z-index:990;margin:0;background:#152b37;border-top:1px solid rgba(139,210,233,.35)}
  #footer-menu .fx-sticky.fx-call{left:0}
  #footer-menu .fx-sticky.fx-wa{left:33.3333%;border-left:1px solid rgba(139,210,233,.35)}
  #footer-menu .fx-sticky.fx-book{left:66.6666%;background:#8bd2e9}
  #footer-menu .fx-sticky>a{display:flex;align-items:center;justify-content:center;height:58px;padding:0 6px;color:#fff;font-size:15px;font-weight:500;line-height:1.15;text-align:center}
  #footer-menu .fx-sticky.fx-book>a{color:#152b37}
  #footer-menu .fx-sticky>a:after{display:none}
  html[lang="de-DE"] .cky-btn-revisit-wrapper{bottom:calc(72px + env(safe-area-inset-bottom))!important}
}

/* Aufmass / measurement pages: intro with H1 above the form (all languages) */
.fx-aufmass-intro{background:#8bd2e9;margin:0!important;padding:64px 20px 4px;text-align:center}
.fx-aufmass-intro>*{max-width:1040px;margin-left:auto!important;margin-right:auto!important}
.fx-aufmass-intro h1{font-size:52px;line-height:1.1;margin-bottom:22px}
.fx-aufmass-intro p{font-size:20px;line-height:1.45;color:#152b37}
.fx-aufmass-intro ul{list-style:none;padding:0;display:flex;flex-wrap:wrap;justify-content:center;gap:10px 12px;margin-top:22px;margin-bottom:22px}
.fx-aufmass-intro li{background:#fff;color:#152b37;border-radius:30px;padding:8px 18px;font-size:16px;line-height:1.3;margin:0}
.fx-aufmass-intro li:before{display:none}
.fx-aufmass-intro a{color:#152b37;text-decoration:underline;font-weight:600}
@media only screen and (max-width:767px){
  .fx-aufmass-intro{padding:32px 16px 0}
  .fx-aufmass-intro h1{font-size:30px;line-height:1.15}
  .fx-aufmass-intro p{font-size:16px}
  .fx-aufmass-intro li{font-size:14px;padding:6px 12px}
}
.fx-aufmass-intro + .b-hero-booking .b-hero-booking__cooperation{display:none}
.fx-aufmass-intro + .b-hero-booking .b-hero-booking__booking{padding-top:40px}
.fx-aufmass-intro + .b-hero-booking .b-hero-booking__form .title{font-size:44px;line-height:1.15}
@media only screen and (max-width:767px){.fx-aufmass-intro + .b-hero-booking .b-hero-booking__form .title{font-size:28px}}

/* Page H1 above ACF contact block (contact pages) */
.fx-page-h1{box-sizing:border-box;max-width:1440px;margin:0 auto!important;padding:56px 40px 0}
@media only screen and (max-width:1199px){.fx-page-h1{padding:40px 36px 0}}
@media only screen and (max-width:767px){.fx-page-h1{padding:28px 36px 0}.fx-page-h1 h1{font-size:34px;line-height:1.15}}

/* DE contact: complaint box for existing customers */
.fx-reklamation-box{margin-top:28px;padding:20px 22px;border:1px solid rgba(21,43,55,.2);border-radius:5px}
.fx-reklamation-box p{margin:0 0 8px}
.fx-reklamation-box .u-button{display:inline-flex;margin-top:8px}
.fx-reklamation-box{margin-bottom:24px}
.fx-reklamation-box .u-button{text-decoration:none}
@media only screen and (min-width:1200px){.m-footer__wrapper .data{flex-shrink:0}.m-footer__wrapper .menu{justify-content:flex-end}}

/* L3: carousels before the (delayed) theme script starts - same layout as after init instead of one stretched card */
body .swiper:not(.swiper-initialized)>.swiper-wrapper>.swiper-slide{margin-right:20px}
body .tabs-content .swiper:not(.swiper-initialized)>.swiper-wrapper>.swiper-slide{margin-right:16px}
@media only screen and (min-width:768px){
  body .b-process__list .swiper:not(.swiper-initialized) .swiper-slide,body .b-hero__list .swiper:not(.swiper-initialized) .swiper-slide,body .b-features__list .swiper:not(.swiper-initialized) .swiper-slide{width:calc((100% - 20px)/2)}
  body .tabs-content .swiper:not(.swiper-initialized)>.swiper-wrapper>.swiper-slide{width:calc((100% - 24px)/2);margin-right:24px}
}
@media only screen and (min-width:1200px){
  body .b-process__list .swiper:not(.swiper-initialized) .swiper-slide,body .b-hero__list .swiper:not(.swiper-initialized) .swiper-slide,body .b-features__list .swiper:not(.swiper-initialized) .swiper-slide{width:calc((100% - 60px)/4)}
  body .tabs-content .swiper:not(.swiper-initialized)>.swiper-wrapper>.swiper-slide{width:calc((100% - 72px)/4)}
}
@media only screen and (min-width:1440px){
  body .b-process__list .swiper:not(.swiper-initialized) .swiper-slide,body .b-hero__list .swiper:not(.swiper-initialized) .swiper-slide,body .b-features__list .swiper:not(.swiper-initialized) .swiper-slide{width:calc((100% - 160px)/5);margin-right:40px}
}

/* Long single-word page titles (e.g. "Datenschutzbestimmungen") must not overflow on phones */
.main-content h1.wp-block-heading,.fx-page-h1 h1{overflow-wrap:break-word}
@media only screen and (max-width:767px){.main-content h1.wp-block-heading,.fx-page-h1 h1{-webkit-hyphens:auto;hyphens:auto;hyphenate-limit-chars:14 5 5}}
@media only screen and (max-width:767px){.main-content > h1.wp-block-heading{font-size:32px;line-height:1.15}}

/* fx-projects 2026-10-08: keep 2-3 project cards filling the row on large screens */
@media only screen and (min-width:1200px){
  body .b-featured-realizations .swiper-wrapper>.swiper-slide:first-child:nth-last-child(3),
  body .b-featured-realizations .swiper-wrapper>.swiper-slide:first-child:nth-last-child(3)~.swiper-slide{width:calc((100% - 48px)/3)!important;margin-right:24px!important}
  body .b-featured-realizations .swiper-wrapper>.swiper-slide:first-child:nth-last-child(2),
  body .b-featured-realizations .swiper-wrapper>.swiper-slide:first-child:nth-last-child(2)~.swiper-slide{width:calc((100% - 24px)/2)!important;margin-right:24px!important}
  body .b-featured-realizations .swiper-wrapper>.swiper-slide:first-child:nth-last-child(-n+3)~.swiper-slide:last-child{margin-right:0!important}
}

/* Fenedo 2026-10-09: on phones the contact form comes before the FAQ in the shared "Kontakt & FAQ" block (desktop/tablet unchanged) */
@media only screen and (max-width:767px){
  .b-contact-faq__wrapper>.b-contact-faq__contact{order:-1}
}

/* Fenedo 2026-10-11: on German pages the contact form comes before the FAQ in the shared "Kontakt & FAQ" block */
html[lang="de-DE"] .b-contact-faq__wrapper>.b-contact-faq__contact{order:-1}

/* Fenedo 2026-10-11: on PL, FR and EN pages the contact form comes before the FAQ in the shared block */
html[lang="pl-PL"] .b-contact-faq__wrapper>.b-contact-faq__contact,
html[lang="fr-FR"] .b-contact-faq__wrapper>.b-contact-faq__contact,
html[lang="en-US"] .b-contact-faq__wrapper>.b-contact-faq__contact{order:-1}

/* Fenedo 2026-10-11: keep homepage section navigation behind the full contact block */
/* #contact{background-color:#fff;z-index:101} */

/* Fenedo 2026-10-11: show the step navigation only while the process section is in view */
/* html{scroll-timeline-name:--fenedo-page;scroll-timeline-axis:block}
.u-submenu{opacity:0;pointer-events:none;animation:fenedo-process-nav 1ms linear both;animation-timeline:--fenedo-page;animation-range:1500px 2800px}
html[lang="de-DE"] .u-submenu{animation-range:1600px 2900px}
html[lang="fr-FR"] .u-submenu{animation-range:1550px 2800px}
@keyframes fenedo-process-nav{0%,100%{opacity:0;pointer-events:none}1%,99%{opacity:1;pointer-events:auto}} */
