/* 
Theme Name: Campania Patate
Theme URI: https://www.goodea.it
Description: Child theme
Author: Goodea
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 */

/* PAGE TRANSITION */
@view-transition {
  navigation: auto;
  types: fall forwards;
}
/* Configurazione Gruppo Root */
::view-transition-group(root) {
  animation-duration: 0.8s;
  animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
  perspective: 1000px;

  /* Shadow qui, non sul vecchio snapshot (riduce artefatti di alpha) */
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
}
::selection {
  background-color: #ec4c00; /* Colore di sfondo dell'evidenziazione */
  color: #ffffff;            /* Colore del testo selezionato */
}

/* Per compatibilità con Firefox */
::-moz-selection {
  background-color: #ec4c00;
  color: #ffffff;
}
/* --- ANIMAZIONI --- */
/* Vecchia pagina: Ruota dall'angolo alto-sinistra e cade */
@keyframes post-it-fall {
  0% {
    transform: rotate(0deg);
    transform-origin: left top;
    opacity: 1;
  }
  30% {
    transform: rotate(10deg);
    transform-origin: left top;
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(30deg);
    transform-origin: left top;
    opacity: 1;
  }
}

/* Nuova pagina: Parte sfocata e diventa nitida */
@keyframes fade-blur-in {
  from {
    filter: blur(20px);
    opacity: 0;
    transform: scale(0.9999);
  }
  to {
    filter: blur(0);
    opacity: 1;
    transform: scale(1);
  }
}

/* --- APPLICAZIONE --- */

::view-transition-old(root) {
  animation-name: post-it-fall;
  animation-duration: 0.8s;
  animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
  animation-fill-mode: both;

  opacity: 1 !important;
  mix-blend-mode: normal;

  /* Forza compositing più stabile (riduce “fade” percepito) */
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;

  /* evita filter sul vecchio snapshot (spostato sul group) */
  filter: none;
}

::view-transition-new(root) {
  animation-name: fade-blur-in;
  animation-duration: 0.8s;
  animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
  animation-fill-mode: both;

  mix-blend-mode: normal;
}

/* Gestione dei Types (CSS flat, senza nesting) */
html:active-view-transition-type(forwards)::view-transition-old(root) {
  animation-name: post-it-fall;
  opacity: 1 !important;
}

html:active-view-transition-type(forwards)::view-transition-new(root) {
  animation-name: fade-blur-in;
}

.titolo-prodotto .split-line{white-space: nowrap;}

h1{visibility: visible;}
h1.animated { visibility: visible;}
.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;
}

body{scroll-behavior: smooth;}
#content{overflow-x: hidden;}
.elementor-popup-modal .dialog-message{max-height:80vh !important;}

/*HEADER*/

body header > div > .e-con-inner{position: fixed;  top: 60px;  left: 50%;  transform: translate(-50%, -50%);  height: auto !important; padding-left:20px !important; padding-right:20px !important;}
body header > div > .e-con-inner:before{content: "";  height: 80%;  width: 0%;  background-color: #442e1e;  position: absolute;  left: 50%;   top: 50%;  transform: translate(-50%, -50%); border-radius: 100px; transition: all .4s ease-in-out;} 
body.sticky-header header > div > .e-con-inner:before{width: 100%;}
body header > div > .e-con-inner .elementor-widget-theme-site-logo{transition: all .4s ease-in-out .4s !important;}
body:not(.home):not(.sticky-header) header > div > .e-con-inner nav a{color:#442e1e !important;}
body:not(.home):not(.sticky-header) header > div > .e-con-inner nav a svg{fill:#442e1e !important;} 
body:not(.home):not(.sticky-header) header > div > .e-con-inner .elementor-widget-theme-site-logo{filter: sepia(1) brightness(0.2) saturate(10) hue-rotate(340deg);}
body.sticky-header header > div > .e-con-inner nav:not(.elementor-nav-menu--dropdown) a:not(.elementor-sub-item){color:#fff !important;}
body header > div > .e-con-inner nav a.elementor-item-active{font-weight:900 !important;}
body.sticky-header header > div > .e-con-inner .elementor-widget-theme-site-logo{filter: brightness(1);}
body header > div > .e-con-inner nav.elementor-nav-menu--dropdown{padding: 20px 0px;}
body header div.elementor-menu-toggle svg{transition: all .4s ease-in-out .4s !important;}
body:not(.home):not(.sticky-header) header .elementor-element div.elementor-menu-toggle svg{fill:#442e1e !important;}
body.sticky-header header .elementor-element div.elementor-menu-toggle svg{fill:#ffffff !important;}

/**/
.first-section{position:relative;}
.color-first-section{position:absolute; left:0; top:0; right:0; bottom:0; mix-blend-mode: multiply; z-index: 0;}
.video-loop video{    filter: saturate(1.5);}
.multiply {mix-blend-mode: multiply;}

/*CIRCLE BUTTONS*/
.circle-button{ padding: 24px; width: 170px; height: 170px;}
.circle-button svg{animation: rotate 10s linear infinite; transform: rotate(0deg);}
.circle-button.play > .e-text-path{position:relative;}
.circle-button.play > .e-text-path:before{content:url("img/play.svg");position: absolute; left: 53%;    top: 50%; transform: translate(-50%, -50%); width: 58px; }
.circle-button.patata > .e-text-path:before{content:url("img/patata.svg");position: absolute; left: 50%;    top: 50%; transform: translate(-50%, -50%); width: 58px; }
.circle-button.origine > .e-text-path:before{content:"";position: absolute; width:120px; height:120px; background-image: url("img/filiera-controllata.png"); background-size: contain; background-position: center;}

.circle-button.ricette{ padding: 22px; width: 140px; height: 140px;}
.circle-button.ricette.Talentine,
.little-button.Talentine,
.elementor-element.box.Talentine.elementor-widget.elementor-widget-text-editor{background-color: #541d00 !important;}
.circle-button.ricette.Crock4all,
.little-button.Crock4all,
.elementor-element.box.Crock4all.elementor-widget.elementor-widget-text-editor{background-color: #c30010 !important;}
.circle-button.ricette.Crisps4all,
.little-button.Crisps4all,
.elementor-element.box.Crisps4All.elementor-widget.elementor-widget-text-editor{background-color: #ec4c00 !important;}
.circle-button.ricette.Ricciona,
.little-button.Ricciona,
.elementor-element.box.Ricciona.elementor-widget.elementor-widget-text-editor{background-color: #a87103 !important;}
.circle-button.ricette.Robertina,
.little-button.Robertina,
.elementor-element.box.Robertina.elementor-widget.elementor-widget-text-editor{background-color: #7e1974  !important;}
.circle-button.ricette.Fresca,
.little-button.Fresca,
.elementor-element.box.Fresca.elementor-widget.elementor-widget-text-editor{background-color: #8cbd3f !important;}


.elementor-element.Crisps4All > h1,
.elementor-element.Crisps4All > h2,
.elementor-element.Crisps4All.elementor-widget-theme-post-excerpt,
.elementor-element.Crisps4All > p{color: #ec4c00 !important;}
.elementor-element.Talentine > h1,
.elementor-element.Talentine > h2,
.elementor-element.Talentine.elementor-widget-theme-post-excerpt,
.elementor-element.Talentine > p{color: #541d00 !important;}
.elementor-element.Crock4all > h1,
.elementor-element.Crock4all > h2,
.elementor-element.Crock4all.elementor-widget-theme-post-excerpt,
.elementor-element.Crock4all > p{color: #c30010 !important;}
.elementor-element.Ricciona > h1,
.elementor-element.Ricciona > h2,
.elementor-element.Ricciona.elementor-widget-theme-post-excerpt,
.elementor-element.Ricciona > p{color: #a87103 !important;}
.elementor-element.Robertina > h1,
.elementor-element.Robertina > h2,
.elementor-element.Robertina.elementor-widget-theme-post-excerpt,
.elementor-element.Robertina > p{color: #7e1974 !important;}
.elementor-element.Fresca > h1,
.elementor-element.Fresca > h2,
.elementor-element.Fresca.elementor-widget-theme-post-excerpt,
.elementor-element.Fresca > p{color: #8cbd3f !important;}



.elementor-element.box > p{color: #fff !important;}

.circle-button.ricette > .e-text-path:before{position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 58px;height: 58px; }
.circle-button.ricette.Talentine > .e-text-path:before{content:url("img/talentine.svg")}
.circle-button.ricette.Crock4all > .e-text-path:before{content:url("img/crock4all.svg");}
.circle-button.ricette.Crisps4all > .e-text-path:before{content:url("img/crisp4all.svg");}
.circle-button.ricette.Ricciona > .e-text-path:before{content:url("img/crisp4all.svg");}
.circle-button.ricette.Robertina > .e-text-path:before{content:url("img/crisp4all.svg");}
.circle-button.ricette.Fresca > .e-text-path:before{content:url("img/patata.svg");}

/*BUTTONS*/
.cp-button{
  position: relative;
  display: inline-block;
  padding: 18px 42px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: #4b2e1a;
  overflow: hidden;
  z-index: 1;
}

.cp-button::before { content: ""; position: absolute; inset: -2px; background-image: url("img/button.svg"); background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
transform: translateX(-105%);  z-index: -1;
}
.cp-button.small::before {background-image: url("img/button-small.svg");}
.cp-button:hover::before { transform: translateX(0.5%); }

/*LOOP PRODOTTI*/
.prodotto-patata > .e-con-inner > div {   padding-top: 0;}
.prodotto-patata .immagine-prodotto{ position:relative; margin-top: -53% !important;}
.prodotto-patata .immagine-prodotto img{position:relative; top:0; transition:all .5s cubic-bezier(0.25, 1, 0.5, 1);}
.prodotto-patata:hover .immagine-prodotto img{top:-20px;}

/*COOKING TYPE*/
.cooking-type[crisps4all]{background-color:#ec4c00 !important;}
.cooking-type[crock4all]{background-color:#c30010 !important;}
.cooking-type[talentine]{background-color:#541d00 !important;}
.cooking-type[ricciona]{background-color:#a87103 !important;}
.cooking-type[robertina]{background-color:#7e1974 !important;}
.cooking-type[Fresca]{background-color:#8cbd3f !important;}

/*FOTO*/
.foto{position: relative;}
.pin.left{ transform-origin: 20px 20px; transform: rotate(1deg) translateY(-30px);  }
.foto.left img{ transform-origin: 20px 20px; transform: rotate(5deg) translateY(-30px);  animation: swing 2s cubic-bezier(0.45, 0, 0.55, 1) infinite reverse; }
.foto.center img,
.foto.center .elementor-widget-video{transform-origin: top center;  transform: rotate(-1deg) translateY(30px);}
.pin.center,
.foto.right img{transform-origin: top right; transform: rotate(-3deg) translateY(-30px);}


@keyframes swing{
	0%{transform: rotate(5deg) translateY(-30px);}
	50%{transform: rotate(5.6deg) translateY(-30px);}
	100%{transform: rotate(5deg) translateY(-30px);}
}

.foto:before,
.pin:before{content:""; position:absolute; width:40px; height: 52px; background-position: center; background-repeat: no-repeat; background-size: contain; z-index: 9;}
.foto.left:before,
.pin.left:before{top:-30px; left:10px; background-image: url("img/pin-left.svg");}
.foto.center:before,
.pin.center:before{top:10px; left:50%; transform:translateX(-50%); background-image: url("img/pin-center.svg");}
.foto.right:before{top:-30px; right:1px; background-image: url("img/pin-right.svg");}

/*LOGHI*/
.loghi {  filter: sepia(0.7);}

/*RICETTE*/
.lista-ricetta:before{    content: "";  width: 100%;  top: 50px;  height: 100px;  background-image: url(img/head-list.svg);  background-size: 100%;  background-position: top center;  background-repeat: no-repeat;}
.lista-ricetta:after{    content: ""; height: calc(100% - 125px); bottom: 0; background-image: url(img/body-list.svg);  position: absolute;   width: 100%;  z-index: -1;   border-radius: 0 0 20px 20px;  background-size: 100%;  background-repeat: repeat-y;  background-position: bottom;}
.elementor-element.foto-ricetta {transform-origin: 10% top; transform: rotate(5deg) translate(-10px, -18px);}
.lista-ricetta:hover .elementor-element.foto-ricetta{animation: swingRic 2s cubic-bezier(0.45, 0, 0.55, 1) infinite reverse;}
.foto-ricetta.sticky{position:sticky; top:250px;}

@keyframes swingRic{
	0%{transform: rotate(5deg) translate(-10px, -18px);}
	50%{transform: rotate(2deg) translate(-10px, -18px);}
	100%{transform: rotate(5deg) translate(-10px, -18px);}
}

@keyframes rotate{
	0%{transform: rotate(0deg);}
	100%{transform: rotate(360deg);}
}

/*LOOP ARTICOLI*/
.articolo-blog .foto-articolo{transition:all .4s ease-in-out;}
.articolo-blog:hover .foto-articolo{filter:brightness(1.4);}

/*ARTICOLO SINGOLO*/
.tempo-lettura{color:#fff; font-weight:800;}

/*NUMERI*/
.suffisso .elementor-counter-number-suffix{    font-size: 50px;  margin-top: 20px;}
.elementor-counter-title{text-align:center; line-height: 1.2 !important; margin-top:15px !important;}

/*FORM*/
.cp-form .full{    display: flex;  flex-direction: row;  flex-wrap: nowrap;  justify-content: space-between; width:100%;}
.cp-form .full > p{width:100%;}
.cp-form .full .mid{width:48%;}
.cp-form input:focus-visible,
.cp-form textarea:focus-visible{outline: none !important;}
.cp-form .full.accept .wpcf7-list-item{margin-left:0 !important;}
.cp-form .full.accept .wpcf7-list-item label{font-weight:300px; font-size:12px; text-transform: none;}
.cp-form .sub input{padding: 0; font-weight: 900; color:var( --e-global-color-text );}
.wpcf7-radio > .first{margin:0 !important;}

/*DISTRIBUTORI*/
.pinmap:before{content:""; position:absolute; width:40px; height: 52px; background-position: center; background-repeat: no-repeat; background-size: contain; z-index: 9;}
.pinmap.left:before{top:-20px; left:-10px; background-image: url("img/pinmap-left.svg");}
.pinmap.center:before{top:10px; left:50%; transform:translateX(-50%); background-image: url("img/pinmap-center.svg");}
.pinmap.right:before{top:-20px; right:1px; background-image: url("img/pinmap-right.svg");}
.pinmap.left.gdo:before{background-image: url("img/pinmap-left-gdo.svg");}
.pinmap.left.cash:before{background-image: url("img/pinmap-left-cash.svg");}

.distributori p {border-bottom: 1px solid var(--e-global-color-primary);  line-height: 1.1;  margin-bottom: 14px !important;   width: 100%;   padding-bottom: 5px;
    display: flex;   flex-direction: column;   flex-wrap: wrap;   justify-content: flex-start;    text-align: left;   position: relative;   padding-left: 40px;
    align-items: flex-start;}

.distributori p:before {     content: "";  width: 20px;  height: 20px;   border: 1px solid;   border-radius: 50%;   margin-right: 15px;   display: block;   min-height: 20px;   max-height: 20px;   max-width: 20px;   min-width: 20px;   position: absolute;   top: -2px;   left: 4px;}

@media (max-width:1280px){
	.foto-ricetta.sticky{position:relative; top:unset;}
	.prodotto-patata > .e-con-inner > div {display: flex;  flex-direction: column;  flex-wrap: nowrap;  align-content: center;  justify-content: flex-end;}
.prodotto-patata .immagine-prodotto{margin-top: -50% !important;}
}

@media (max-width:900px){
	body.sticky-header header > div > .e-con-inner:before{width:95%;}
	.cp-form .full { flex-direction: column;}
	.cp-form .full .mid{width:100%;}
	
	body header > div > .e-con-inner{ padding-left:50px !important; padding-right:50px !important;}
	
}

@media (max-width:767px){
	.circle-button{ padding: 18px; width: 120px; height: 120px;}
	.circle-button.play > .e-text-path:before{width: 28px; }
	body.sticky-header header > div > .e-con-inner:before{width:98%;}
	.circle-button.patata > .e-text-path:before{width:44px}
	.prodotto-patata .immagine-prodotto{margin-top: -24% !important;}
	.circle-button.origine > .e-text-path:before{width: 80px; height: 80px;}
	
}

@media (max-width:400px){
	.prodotto-patata .immagine-prodotto img{height:auto !important;}
}

/* CP: rimuove grassetto box rosso "Crock4all" (widget Elementor e33d21b) */
.elementor-element.elementor-element-e33d21b,
.elementor-element.elementor-element-e33d21b p {
    font-weight: 400 !important;
}
