/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */

:focus-visible {
    outline: #003C71 auto 1px !important;
}

.otgs-development-site-front-end {
    display: none;
}

.wpml-header-language-switcher {
    position: relative;
}

.wpml-header-language-switcher::before {
    content: "/";
    position: absolute;
    right: 50%;
    top: 0;
    transform: translate(120%, 90%);
    display: inline;
    color: #003c71;
    font-weight: 400;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    line-height: 16px;
}

.wpml-header-language-switcher .wpml-ls-current-language span{
    font-weight: 700;
}

.wpml-header-language-switcher .wpml-ls-item a:hover{
    font-size: 16px !important;
    font-weight: 400 !important;
    font-style: unset !important;
    line-height: 16px !important;
}

.wpml-header-language-switcher :not(.wpml-ls-current-language) a:hover {
    color : #003c71 !important;
}

/*********** 
MEGA MENU 
**********/

.mobile-header-menu {
    height: 100px;
}

.header-logo path{
    transition: 300ms;
    cursor: pointer;
}

@media screen and (max-width: 1200px) {

    .header-logo-wrap {
        line-height: normal !important;
    }

    .elementor-menu-toggle__icon--open {
        display: flex;
    }

    .header-logo-wrap a {
        display: grid;
    }

    .header-logo path {
      fill: #003C71 !important;
    }

    .header-logo {
        width: 140px !important;
    }

    .elementor-nav-menu--dropdown .elementor-item.highlighted,
    .elementor-nav-menu--dropdown .elementor-item:hover {
        background-color: #003C71;
    }

    .elementor-nav-menu--dropdown .division.menu-item a {
        font-size: 22px !important;
        color: #003C71 !important;
    }

    .elementor-nav-menu--dropdown .division.menu-item a {
        font-size: 22px !important;
        color: #003C71 !important;
    }

    .elementor-nav-menu--dropdown .division.menu-item a,
    .elementor-nav-menu--dropdown .family.menu-item a {
        padding-left: 40px !important;
    }

    .elementor-nav-menu--dropdown .family.menu-item .sub-menu .menu-item a.elementor-sub-item {
        padding-left: 60px !important;
    }
}

@media screen and (max-width: 767px) {
    .header-logo {
        width: 120px !important;
    }

    .mobile-header-menu {
        height: 60px;
    }

    .elementor-menu-toggle__icon--close svg {
        width: 18px;
    }
}

.first-level-menu .e-con-inner {
    margin: 0 !important;
    padding-left: 45px;
    padding-top: 45px;
    border-right: 1px solid #969494;
}

.first-level-menu .e-n-menu-title {
    padding-left: 0 !important;
    cursor: pointer !important;
}

.first-level-menu .e-n-menu-title-container {
    cursor: pointer !important;
}

.first-level-menu .e-n-menu-title-text {
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
}

.first-level-menu .e-n-menu-title-text:hover {
    color: #969494 !important;
}

.vertical-menu .e-n-menu-heading {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 100px);
}

.vertical-menu .e-n-menu-content.e-active {
    position: absolute;
    top: 0 !important;
    right: 0 !important;
    left: 550px !important;
    width: 100% !important;
    height: 100% !important;
}

.vertical-menu .e-n-menu-title-container {
    position: unset;
}

.vertical-menu .e-n-menu-title.e-click {
    width: 100%;
}

.vertical-menu .e-n-menu-icon {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

:where(.elementor-widget-n-menu .e-n-menu-content>.e-con) {
    background-color: transparent !important;
}

.wpml-header-language-switcher-wrap {
    padding: 0 !important;
}

#menu-prodotti button[aria-expanded="true"] ~ div.e-n-menu-title-container > span.e-n-menu-title-text , 
#menu-news button[aria-expanded="true"] ~ div.e-n-menu-title-container > span.e-n-menu-title-text {
    color: #003c71 !important;
}

#menu-flooring span, 
#menu-roofing span, 
#news-corporate span, 
#news-blog span {
    color: #003c71 !important;
    font-size: 24px;
    font-weight: 400;
}

#menu-flooring span, #menu-roofing span {
    cursor: default;
}

#news-blog {
    margin-top: 50px;
}

.vertical-menu li.e-n-menu-item div.e-child {
    padding-left: 0 !important;
}

.elementor-nav-menu--layout-vertical .see-all-menu a{
    font-weight: 600 !important;
    margin-bottom: 20px;
}

.elementor-nav-menu--layout-vertical .elementor-item {
    transition: all 0.2s !important;
}

.elementor-nav-menu--layout-vertical .elementor-item:hover {
    color: #003c71 !important;
}


/*******************
ACCORDION Image HP
********************/

.accordion-image-hp .column {
    transition: width 0.5s;
    overflow: hidden;
    cursor: pointer;
}


.accordion-image-hp .column:after {
    content: '';
    background: rgba(0,0,0,0.5);
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    z-index: 0;
}


/*Tablet and mobile, below 1025px*/
@media (max-width: 1024px) {
    .accordion-image-hp .column {
        transition: height 0.5s;
        height: 100px;
    }

    /*Clicked column styling*/
    .accordion-image-hp .expanded {
        height: 500px !important;
    }
}

/* Base: desktop > 1366px */
.accordion-image-hp .expanded {
    width: 150% !important;
    cursor: default;
  }
  
  .accordion-image-hp .column.expanded:after {
    background: transparent;
  }
  
  /* <= 1366px */
  @media (max-width: 1366px) {
    .accordion-image-hp .expanded {
      width: 90% !important;
    }
  }
  
  /* <= 1200px */
  @media (max-width: 1200px) {
    .accordion-image-hp .expanded {
      width: 135% !important;
    }

    .accordion-image-hp .accordion-hp-counter {
        font-size: 38px !important;
    }
  }
  
  /* <= 1024px : layout verticale (height) */
  @media (max-width: 1024px) {
    .accordion-image-hp .column {
      transition: height 0.5s;
      height: 100px;
    }
    .accordion-image-hp .expanded {
      /* neutralizza il width delle view più grandi */
      width: 100% !important;
      height: 500px !important;
    }
  }
  
  /* <= 880px : layout verticale più compatto */
  @media (max-width: 880px) {
    .accordion-image-hp .column {
      height: 90px;
    }
    .accordion-image-hp .expanded {
      height: 420px !important;
    }
  }

  @media (max-width: 767px) {
    .accordion-image-hp .accordion-hp-counter {
        top: 0 !important;
        right: 30px !important;
        font-size: 26px !important;
    }
  }
  

/*Inner elements inside column container styling*/
.accordion-image-hp .inner-element {
    opacity: 0;
    transition: opacity 0s;
    z-index: 2;
}

/*Inner elements made visible on clicked column*/
.accordion-image-hp .inner-element.active {
    opacity: 1;
    transition: opacity 0.5s 0.4s;
}

.elementor-button:hover {
    font-size: 16px !important;
    font-weight: 300 !important;
}

.accordion-next-left,
.accordion-next-right {
    opacity: 0;
    transition: all 0s;
    z-index: 3;
    pointer-events: none;
    cursor: pointer;
}

.accordion-next-left.active,
.accordion-next-right.active {
    opacity: 1;
    transition: all 2s;
    pointer-events: auto;
}

/********************
Custom Slider HP
*********************/

#hp-custom-slider .swiper-pagination-bullets {
    left: -83%;
    top: unset;
    height: 100%;
    transform: unset;
    width: 81%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 30px
}

#hp-custom-slider {
  /* Slides content variables */
  --slide-1-content: "Tetti";
  --slide-2-content: "Pareti";
  --slide-3-content: "Pavimenti";
}

#hp-custom-slider .swiper-pagination-bullet {
    background: transparent;
}

#hp-custom-slider .swiper-pagination-bullet:not(:last-child) {
    margin-bottom: 40px;
}

#hp-custom-slider .swiper-pagination-bullet::after {
    content: '';
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #003C71;
    position: absolute;
}


#hp-custom-slider .swiper-pagination-bullet:first-child::before {
    content: var(--slide-1-content);
 }

 
#hp-custom-slider .swiper-pagination-bullet:nth-child(2)::before {
    content: var(--slide-2-content);
 }


#hp-custom-slider .swiper-pagination-bullet:nth-child(3)::before {
    content: var(--slide-3-content);
  }
  
#hp-custom-slider .swiper-pagination-bullet::before {
    font-family: 'Schibsted Grotesk', sans-serif;
    font-size: 32px;
    line-height: 40px;
    font-weight: 400;
    color: #003C71;
  }
  
#hp-custom-slider span.swiper-pagination-bullet.swiper-pagination-bullet-active {
    transition: 300ms;
}

#hp-custom-slider span.swiper-pagination-bullet.swiper-pagination-bullet-active:before {
    margin-left: 20px;
}
  
@media (max-width:880px) {
    #hp-custom-slider .swiper-pagination-bullets {
        left: 0;
        top: unset;
        bottom: -150px;
        width: 100%;
    }
}

/*************************
sanitize contact form 7
**************************/
input[type=date], 
input[type=email], 
input[type=number], 
input[type=password], 
input[type=search], 
input[type=tel], 
input[type=text], 
input[type=url], 
select, 
textarea {
    border: none !important;
    border-bottom: 1px solid #003C71 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    margin-top: 15px;
}

input[type=submit] {
    margin-top: 15px;
}

/* ===== Variabili ===== */
:root{
    --aplena-blue:#003C71;
    --chk-size:28px;
    --chk-radius:0;
}
  
  /* ===== Grid 2 colonne ===== */
  .contact-page-form br{
      display: none;
  }

.contact-page-form .consent {
	font-size: 12px;
}

  .cf7-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
  .cf7-grid .col-full{ grid-column:1 / -1; }
  
  /* ===== Campi base ===== */
  .cf7-label{ display:block; font-weight:600; margin-bottom:6px; letter-spacing:.02em;}
  .sr-only{
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
  }
  .cf7-input,.cf7-textarea{ width:100%; padding:10px 12px; border:1px solid #ddd; border-radius:6px; box-sizing:border-box; }
  .cf7-textarea{ min-height:100px; resize:vertical; }
  
  /* ===== Acceptance: layout + checkbox custom 28x28 ===== */
  .wpcf7 .wpcf7-acceptance .wpcf7-list-item{ margin:0 0 14px 0; }
  
  /* label: checkbox staccata dal testo */
  .wpcf7 .wpcf7-acceptance .wpcf7-list-item > label{
    display:grid;
    grid-template-columns: var(--chk-size) 1fr;
    column-gap:14px;
    align-items:start;
    line-height:1.45;
    cursor:pointer;
  }
  
  /* checkbox nativo → stile custom */
  .wpcf7 .wpcf7-acceptance .wpcf7-list-item > label > input[type="checkbox"]{
    -webkit-appearance:none !important;
    appearance:none !important;
    width:var(--chk-size) !important;
    height:var(--chk-size) !important;
    margin:0;
    border:2px solid var(--aplena-blue) !important;
    border-radius:var(--chk-radius);
    background:transparent;
    box-sizing:border-box;
    background-repeat:no-repeat;
    background-position:center;
    background-size:70% 70%;
    transition: background-color .2s ease, border-color .2s ease,
                box-shadow .2s ease, transform .18s ease;
  }
  
  /* checked: riempie + spunta SVG + micro-pop */
  .wpcf7 .wpcf7-acceptance .wpcf7-list-item > label > input[type="checkbox"]:checked{
    background-color:var(--aplena-blue) !important;
    border-color:var(--aplena-blue) !important;
    box-shadow:0 0 0 4px rgba(0,60,113,.12);
    transform:scale(.98);
    background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 8"><path d="M1 4l3 3 7-7" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') !important;
    animation:aplena-pop .18s ease-out;
  }
  
  /* focus tastiera */
  .wpcf7 .wpcf7-acceptance .wpcf7-list-item > label > input[type="checkbox"]:focus-visible{
    outline:none;
    box-shadow:0 0 0 4px rgba(0,60,113,.28);
  }
  
  /* animazione */
  @keyframes aplena-pop{
    0%{ transform:scale(.9); }
    60%{ transform:scale(1.06); }
    100%{ transform:scale(1); }
  }
  
  /* Fallback colore (se appearance viene ignorato) */
  .wpcf7 form input[type="checkbox"]{ accent-color: var(--aplena-blue); cursor:pointer;}
  
  .btn-submit p {
      display: flex;
      flex-direction: row-reverse;
      align-items: center;
  }
  
  /* Submit (opzionale) */
  .cf7-submit{ cursor:pointer;}
  
  @media (max-width:768px){ 
    .cf7-grid { 
        grid-template-columns:1fr; 
    }
  }

/* Google Maps Widget Customization */
/* Contenitore del widget */
.elementor-widget-google_maps .elementor-custom-embed{ position:relative; }

/* Tinta blu sopra la mappa */
.elementor-widget-google_maps .elementor-custom-embed::after{
  content:"";
  position:absolute; 
  inset:0;
  background:#003C71;
  mix-blend-mode:overlay;
  opacity:1;
  pointer-events:none;
}

/* Bullet Swiper Pagination Roofing & Flooring */
/* === Parametri regolabili ===
   --dash-len / --gap-len   : lunghezza tratto e spazio (in gradi)
   --ring-thickness         : spessore del bordo tratteggiato
   --inner-gap              : distanza immagine ↔ bordo (spazio vuoto)
   --ring-color             : colore dei tratti
   --gap-color              : colore dello spazio vuoto (nero nello shot)
*/
body.aplena-archive-post-type-roofing .swiper-pagination-bullet,
body.aplena-archive-post-type-flooring .swiper-pagination-bullet {
  --ring-color: #fff;
  --gap-color: #000;
  --dash-len: 22deg;
  --gap-len: 14deg;
  --ring-thickness: 1px;
  --inner-gap: 10px;

  position: relative;
  width: 115px;
  height: 115px;
  margin: 0 15px !important;
  border: none;
  border-radius: 999px;
  overflow: hidden;      /* ok: gli anelli stanno dentro */
  background: transparent;
  line-height: 0;
  opacity: 1;
}

/* anello “spazio vuoto”, sopra l’immagine */
body.aplena-archive-post-type-roofing .swiper-pagination-bullet::before,
body.aplena-archive-post-type-flooring .swiper-pagination-bullet::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  pointer-events: none;
  z-index: 1;

  /* riempi un bordo interno (ring + gap) con il colore dello “spazio” */
  box-shadow:
    inset 0 0 0 calc(var(--ring-thickness) + var(--inner-gap)) var(--gap-color);
}

/* anello tratteggiato */
body.aplena-archive-post-type-roofing .swiper-pagination-bullet::after,
body.aplena-archive-post-type-flooring .swiper-pagination-bullet::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  pointer-events: none;
  z-index: 2;
  background: repeating-conic-gradient(
    from 0deg,
    var(--ring-color) 0 var(--dash-len),
    transparent 0 calc(var(--dash-len) + var(--gap-len))
  );

  /* tieni solo un anello esterno di spessore --ring-thickness */
  -webkit-mask: radial-gradient(farthest-side,
    transparent calc(100% - var(--ring-thickness) - .5px),
    #000       calc(100% - var(--ring-thickness)));
          mask: radial-gradient(farthest-side,
    transparent calc(100% - var(--ring-thickness) - .5px),
    #000       calc(100% - var(--ring-thickness)));
}

/* stato attivo */
body.aplena-archive-post-type-roofing .swiper-pagination-bullet-active,
body.aplena-archive-post-type-flooring .swiper-pagination-bullet-active {
  transform: scale(1.2);
  transition: transform .2s ease;
}

/* immagine: resta dietro agli anelli */
body.aplena-archive-post-type-roofing .swiper-pagination-bullet img,
body.aplena-archive-post-type-flooring .swiper-pagination-bullet img {
  position: relative;
  z-index: 0;                 /* sotto ::before/::after */
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 290%;
  transform: scale(4.4);
  transform-origin: center;
  transition: transform .2s ease, filter .2s ease;
  box-shadow: none;           /* il bordo è gestito dai pseudo-elementi */
  filter: grayscale(1) opacity(0.4);
}

body.aplena-archive-post-type-roofing .swiper-pagination-bullet-active img,
body.aplena-archive-post-type-flooring .swiper-pagination-bullet-active img {
  filter: none;
}

/* fallback (senza conic-gradient) */
@supports not (background: conic-gradient(#000 0 1deg, transparent 0 2deg)) {
  body.aplena-archive-post-type-roofing .swiper-pagination-bullet,
  body.aplena-archive-post-type-flooring .swiper-pagination-bullet {
    border: var(--ring-thickness) dashed var(--ring-color);
  }
}


/* <= 1366px */
@media (max-width: 1366px) {
    body.aplena-archive-post-type-roofing .swiper-pagination-bullet,
    body.aplena-archive-post-type-flooring .swiper-pagination-bullet {
        --inner-gap: 8px;
        width: 90px;
        height: 90px;
        margin: 0 10px !important;
    }
}

@media (max-width: 767px) {
    body.aplena-archive-post-type-roofing .swiper-pagination-bullet,
    body.aplena-archive-post-type-flooring .swiper-pagination-bullet {
        --inner-gap: 5px;
        width: 40px;
        height: 40px;
        margin: 0 8px !important;
    }
}

/**********************
STICKY HEADER
***********************/
/* Stato base: overlay trasparente (nessun impatto sul layout)*/
header.elementor-location-header .transparent-header,
header.elementor-location-header .mobile-header-menu{
  position: absolute; 
  top: 0; left: 0; right: 0;
  background-color: transparent;
  will-change: transform;
}

header.elementor-location-header .transparent-header .e-n-menu-title-text,
header.elementor-location-header .transparent-header .elementor-nav-menu a,
header.elementor-location-header .transparent-header .wpml-ls-link,
header.elementor-location-header .transparent-header .wpml-ls-native{
  color:#F2F2F2;
  transition: color .4s ease, background-color .4s ease !important;
}

header.elementor-location-header .transparent-header .e-n-menu-title:hover .e-n-menu-title-text,
header.elementor-location-header .transparent-header .elementor-nav-menu a:hover{
  color:#969494;
}

header.elementor-location-header .transparent-header.is-sticky,
header.elementor-location-header .colored-header.is-sticky,
header.elementor-location-header .mobile-header-menu.is-sticky{
  position: fixed;
  top: 0; left: 0; right: 0;
  background-color: #F2F2F2 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  transform: translateY(-105%);
  transition: transform .4s ease, background-color .4s ease, box-shadow .4s ease !important;
  z-index: 9999;
}
header.elementor-location-header .transparent-header.is-sticky.show,
header.elementor-location-header .colored-header.is-sticky.show,
header.elementor-location-header .mobile-header-menu.is-sticky.show{
  transform: translateY(0);
}

header.elementor-location-header .is-sticky .e-n-menu-title-text,
header.elementor-location-header .is-sticky .elementor-nav-menu a,
header.elementor-location-header .is-sticky .wpml-ls-link,
header.elementor-location-header .is-sticky .wpml-ls-native{
  color: #969494 !important;
}

header.elementor-location-header .is-sticky .e-n-menu-title.e-current .e-n-menu-title-text,
header.elementor-location-header .is-sticky .elementor-nav-menu .current-menu-item > a,
header.elementor-location-header .is-sticky .elementor-nav-menu .elementor-item-active{
  color: #003C71 !important;
}

header.elementor-location-header .is-sticky .e-n-menu-title:hover .e-n-menu-title-text,
header.elementor-location-header .is-sticky .elementor-nav-menu a:hover{
  color: #003C71 !important;
}

body.admin-bar header.elementor-location-header .is-sticky{ top:32px; }
@media (max-width:782px){
  body.admin-bar header.elementor-location-header .is-sticky{ top:46px; }
}

header.elementor-location-header .is-sticky .e-n-menu-wrapper{
  left: 0 !important;
  width: 100% !important;
  /*--stretch-left: 0 !important;
  --stretch-width: 100vw !important;*/
}

header.elementor-location-header .is-sticky .header-logo path{ fill: #003C71 !important; }

.transparent-header .e-n-menu-heading div.e-current span {
	font-weight: 500 !important;
	color: #969494 !important;
}
