/*
 Theme Name: SocialTrek GP Child
 Template: generatepress
*/

/* ======================================================================
   1. HEADER FISSO + DECORAZIONI
====================================================================== */

/* HEADER FISSO E STRETTO */
.site-header,
.inside-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding-top: 3px;
    padding-bottom: 3px;
    z-index: 99999 !important;
    background: #ffffff;
    box-shadow: 0 4px 18px rgba(0,0,0,0.15) !important;
}

/* MENU PRINCIPALE IN GRASSETTO E COMPATTO */
.main-navigation .main-nav ul li a {
    padding-top: 3px !important;
    padding-bottom: 3px !important;
    font-weight: 700 !important;
}

/* Spazio sotto header fisso SOLO su desktop */
@media (max-width: 768px) {
    .site-content {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
}

/* HOME: HERO attaccata all’header */
.home .site-main,
.home .inside-article,
.home .entry-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Nasconde titoli nativi */
.page .entry-title,
.single-post .entry-title,
.single-event_listing .entry-title {
    display: none !important;
}

/* larghezza piena */
.fullwidth {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    display: block !important;
}
/* Forza i container GenerateBlocks con classe fullwidth a uscire dal layout */
.gb-container.fullwidth,
.gb-container-inner.fullwidth {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}


/* ======================================================================
   2. ST-BUTTON YELLOW – Pulsante giallo SocialTrek
====================================================================== */

.st-button,
.gb-button.st-button,
.wp-block-button__link.st-button {
    background-color: #fe951c !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 14px 28px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    border: none !important;
    cursor: pointer !important;
    transition: background-color .22s ease, transform .22s ease, box-shadow .22s ease !important;
}

/* Hover */
.st-button:hover,
.gb-button.st-button:hover,
.wp-block-button__link.st-button:hover {
    background-color: #1c6334 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

/* Pulsante Torna Su sopra menu PWA */
a.generate-back-to-top {
    bottom: 40px !important;
    z-index: 100001 !important;
}

/* ============================================================
   CTA MOBILE STICKY
============================================================ */
/* STICKY CTA — visibile sempre */
.st-sticky-cta {
    position: fixed;
    bottom: 0;          /* fondamentale per desktop */
    left: 0;
    width: 100%;
    background: #1c6334;
    padding: 14px 0;
    text-align: center;
    z-index: 100000;    /* sopra al menu PWA */
    display: block;

    /* permette al pulsante Torna Su di stare davanti */
    pointer-events: none;
}

.st-sticky-cta a {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;

    /* il link rimane cliccabile */
    pointer-events: auto;
}

.st-sticky-cta a:hover {
    color: #fe951c;
}


/* --- FIX PER PWA --- */
/* In PWA il menu sta in basso, quindi lo sticky deve salire */
html.is-pwa .st-sticky-cta {
    bottom: 60px; /* spazio per il menu PWA */
}

/* ======================================================================
   3. HERO GENERALE SOCIAL TREK
====================================================================== */

.st-hero {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    height: 240px;
    background-image: url('https://socialtrek.it/wp-content/uploads/2021/08/banner_03-scaled-1.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 40px 20px;
    box-sizing: border-box;
}

.st-hero h1 {
    color: #ffffff;
    font-size: 42px;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 3px 12px rgba(0,0,0,0.4);
}

/* HERO HOME */
.home-hero {
    overflow: hidden;
}

.home-hero img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* OFFSET HERO sotto header fisso */
.home .site-main {
    margin-top: 60px !important;
}

/* HERO MOBILE */
@media (max-width: 768px) {
    .home-hero {
        min-height: 240px !important;
    }

    .st-hero {
        height: 160px;
        padding: 20px;
    }

    .st-hero h1 {
        font-size: 28px;
    }
}

/* ======================================================================
   4. PADDING GENERALE
====================================================================== */

.inside-article,
.entry-content {
    padding: 20px 20px !important;
}

@media (max-width: 768px) {
    .inside-article,
    .entry-content {
        padding: 10px 10px !important;
    }
}

html.is-pwa .inside-article,
html.is-pwa .entry-content {
    padding: 5px !important;
}

/* BLOCCO ANTI-SCROLL LATERALE */
html, body {
    overflow-x: hidden !important;
}

/* ======================================================================
   5. WP EVENT MANAGER – PAGINA EVENTO
====================================================================== */

.single-event_listing .wpem-single-event-right-content {
    display: none !important;
}

.single-event_listing .wpem-single-event-left-content {
    width: 100% !important;
    max-width: 100% !important;
}

.single-event_listing .wpem-row {
    display: block !important;
}

/* BOX INFO EVENTI */
.st-event-box {
    background: #f7f3ea;
    border-left: 6px solid #1c6334;
    padding: 25px 20px;
    margin-top: 40px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.st-event-box h3 {
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 20px;
    color: #1c6334;
    font-weight: 700;
}

.st-event-box p,
.st-event-box li {
    line-height: 1.5;
    margin-bottom: 8px;
}

.st-event-box ol,
.st-event-box ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.st-event-box a {
    color: #1c6334;
    font-weight: 700;
    text-decoration: underline;
}
/* Sfondo grigio sul contenuto evento scaduto */
body.st-event-scaduto-page .entry-content {
    background-color: #f0f0f0;
    padding: 20px;
}

/* Esclude SEMPRE l'immagine di copertina, qualunque sia la sua classe */
body.st-event-scaduto-page .entry-content img {
    background-color: transparent !important;
}

/* Esclude il box "evento concluso" con il form di riprogrammazione */
body.st-event-scaduto-page .st-event-box-past,
body.st-event-scaduto-page #st-riprogramma-wrapper {
    background-color: #fff !important;
    padding: 20px;
    border-radius: 8px;
}

/* Esclude anche eventuali contenitori interni del form Forminator */
body.st-event-scaduto-page #st-riprogramma-wrapper * {
    background-color: transparent !important;
}

/* ======================================================================================
/* Ombra e sollevamento sulla card intera (dove probabilmente è già presente l'ombra) 
====================================================================================== */
.wpem-event-layout-wrapper {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    border-radius: 8px;
    overflow: hidden; /* utile per non far sborare l'immagine dagli angoli arrotondati */
}

.wpem-event-layout-wrapper:hover {
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
    transform: translateY(-4px);
}

/* Contenitore dell'immagine: taglia lo zoom */
.wpem-event-banner {
    overflow: hidden;
    position: relative;
}

/* L'immagine vera è un background-image, quindi animiamo transform sul div stesso */
.wpem-event-banner-img {
    background-size: cover;
    background-position: center;
    transition: transform 0.45s ease, filter 0.3s ease;
}

.wpem-event-layout-wrapper:hover .wpem-event-banner-img {
    transform: scale(1.08);
    filter: brightness(0.92);
}

/* ======================================================================
   6. PWA – GENERALE
====================================================================== */

/* Nasconde la barra admin WordPress SOLO in modalità PWA */
html.is-pwa #wpadminbar {
    display: none !important;
}

html.is-pwa body {
	overflow-x: hidden !important;
}

html.is-pwa header,
html.is-pwa .site-header,
html.is-pwa #masthead {
    display: none !important;
}

html.is-pwa .site-content,
html.is-pwa .content-area,
html.is-pwa .inside-article {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

html.is-pwa .footer-widgets,
html.is-pwa .inside-footer-widgets {
    display: none !important;
}

/* MENU PWA */
#menu-pwa { 
  display: none;
}

html.is-pwa #menu-pwa {
  display: flex !important;
  position: fixed;
  bottom: 0;
  left: 0 !important;
  right: 0 !important;
  height: 60px;
  background: #1c6334;
  justify-content: space-evenly;
  align-items: center;
  z-index: 9999;
  width: 100vw !important;
}

html.is-pwa #menu-pwa a {
  font-size: 0;
  width: 20%;
  text-align: center;
}

html.is-pwa #menu-pwa a::before {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 22px;
  color: white;
}

html.is-pwa .pwa-blog::before { content: "\f075"; }
html.is-pwa .pwa-hike::before { content: "\f6ec"; }
html.is-pwa .pwa-rank::before { content: "\f091"; }
html.is-pwa .pwa-diary::before { content: "\f2b9"; }
html.is-pwa .pwa-user::before { content: "\f304"; }

/* ======================================================================
   9. CONTATORI – versione aggiornata con colori Social Trek
====================================================================== */

/* Forza il font Dashicons anche su mobile */
.dashicons {
    font-family: "dashicons" !important;
    speak: none;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
}

.st-contatori-wrapper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin: 40px 0;
}

/* Box singolo */
.st-contatore {
  text-align: center;
  padding: 20px 10px;
}

/* Icona – FIX MOBILE */
.st-contatore-icon {
  font-size: 48px;
  line-height: 1;
  display: inline-flex !important;     /* fix */
  align-items: center !important;      /* fix */
  justify-content: center !important;  /* fix */
  width: auto !important;              /* fix */
  height: auto !important;             /* fix */
  margin: 0 auto 6px;
  color: #fe951c; /* colore icona */
}

/* Numero grande */
.st-contatore-num {
  font-size: 48px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1;
  margin-bottom: 8px;
}

/* Etichetta */
.st-contatore-label {
  font-size: 16px;
  font-weight: 500;
  color: #1c6334; /* colore label */
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
  .st-contatori-wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .st-contatore-icon {
    font-size: 40px !important; /* fix mobile */
  }

  .st-contatore-num {
    font-size: 36px;
  }
}

@media (max-width: 480px) {
  .st-contatori-wrapper {
    grid-template-columns: 1fr;
  }

  .st-contatore-icon {
    font-size: 36px !important; /* fix mobile */
  }

  .st-contatore-num {
    font-size: 32px;
  }
}

/* Animazione */
.st-bounce {  
  animation: stBounce 0.25s ease-out;
}

@keyframes stBounce {  
  0% { transform: scale(1); }  
  50% { transform: scale(1.08); }  
  100% { transform: scale(1); }
}
