/*
 Theme Name: GPA
 Description: Child theme ottimizzato basato su Twenty Seventeen
 Author: Grieco Pelino Avvocati
 Author URI: https://griecopelino.com
 Template: twentyseventeen
 Version: 2.1
*/

/* ==========================================================================
   VARIABILI CSS PER COLORI E VALORI COMUNI
   ========================================================================== */
:root {
  --color-primary: #4d73ff;
  --color-text: #000;
  --color-background: #fff;
  --color-light-gray: #f1f1f1;
  --font-body: "Merriweather", "Helvetica Neue", helvetica, arial, sans-serif;
  --font-heading: "Lora", "Helvetica Neue", helvetica, arial, sans-serif;
  --font-display: "Oswald", "Helvetica Neue", helvetica, arial, sans-serif;
}

/* ==========================================================================
   FONT FACE - OTTIMIZZATI PER PERFORMANCE
   ========================================================================== */

/* Merriweather - Font per il corpo del testo */
@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: local('Merriweather'),
       url('https://www.griecopelino.com/wp-content/themes/gpa/fonts/merriweather-v21-latin-300.woff2') format('woff2'),
       url('https://www.griecopelino.com/wp-content/themes/gpa/fonts/merriweather-v21-latin-300.woff') format('woff');
}

@font-face {
  font-family: 'Merriweather';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: local('Merriweather'),
       url('https://www.griecopelino.com/wp-content/themes/gpa/fonts/merriweather-v21-latin-300italic.woff2') format('woff2'),
       url('https://www.griecopelino.com/wp-content/themes/gpa/fonts/merriweather-v21-latin-300italic.woff') format('woff');
}

@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: local('Merriweather'),
       url('https://www.griecopelino.com/wp-content/themes/gpa/fonts/merriweather-v21-latin-900.woff2') format('woff2'),
       url('https://www.griecopelino.com/wp-content/themes/gpa/fonts/merriweather-v21-latin-900.woff') format('woff');
}

@font-face {
  font-family: 'Merriweather';
  font-style: italic;
  font-weight: 900;
  font-display: swap;
  src: local('Merriweather'),
       url('https://www.griecopelino.com/wp-content/themes/gpa/fonts/merriweather-v21-latin-900italic.woff2') format('woff2'),
       url('https://www.griecopelino.com/wp-content/themes/gpa/fonts/merriweather-v21-latin-900italic.woff') format('woff');
}
/* Lora - Font per i titoli */
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-display: swap; 
  font-weight: 400 700;
  src: local(''), 
       url('https://www.griecopelino.com/wp-content/themes/gpa/fonts/Lora-VariableFont_wght.ttf') format('truetype-variations');
}

@font-face {
  font-family: 'Lora';
  font-style: italic;
  font-display: swap;
  font-weight: 400 700;
  src: local(''),
       url('https://www.griecopelino.com/wp-content/themes/gpa/fonts/Lora-Italic-VariableFont_wght.ttf') format('truetype-variations');
}
	
/* Oswald - Font display */
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: local('Oswald'),
       url('https://www.griecopelino.com/wp-content/themes/gpa/fonts/oswald-v31-latin-300.woff2') format('woff2'),
       url('https://www.griecopelino.com/wp-content/themes/gpa/fonts/oswald-v31-latin-300.woff') format('woff');
}

@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Oswald'),
       url('https://www.griecopelino.com/wp-content/themes/gpa/fonts/oswald-v31-latin-regular.woff2') format('woff2'),
       url('https://www.griecopelino.com/wp-content/themes/gpa/fonts/oswald-v31-latin-regular.woff') format('woff');
}

/* ==========================================================================
   LAYOUT GENERALE E GUTENBERG FIX
   ========================================================================== */

/* Fix overflow per Gutenberg su mobile - mantienilo se ancora necessario */
html, 
body {
  overflow-x: hidden !important;
}

/* Container responsive per video/iframe */
.group {
  position: relative;
  padding-bottom: 56.25%;
  padding-top: 35px;
  height: 0;
  overflow: hidden;
}

.group iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Immagine poster per video */
#poster-image {
  background: url('https://www.griecopelino.com/wp-content/uploads/2020/06/GDPR__ready.jpg') center center;
  background-size: cover;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  z-index: 10;
  transition: all 0.3s ease-in;
}

/* ==========================================================================
   TIPOGRAFIA
   ========================================================================== */

body,
button,
input,
select,
textarea {
  color: var(--color-text);
  font-family: var(--font-body) !important;
  font-size: 0.9375rem !important;
  font-weight: 300;
  line-height: 1.8;
  text-align: justify;
}

/* Media query per smartphone - allineamento a sinistra per migliorare la leggibilità */
@media only screen and (max-width: 768px) {
  body,
  button,
  input,
  select,
  textarea,
  .entry-content,
  .entry-content p,
  .entry-content li {
    text-align: left;
  }
}

/* Titoli H1 - Versione con maggiore specificità per sovrascrivere il tema */
h1,
.blog .entry-title,
.archive .entry-title,
.category .entry-title,
.tag .entry-title,
.single-post .entry-title,
.single-post .entry-header .entry-title {  /* ← Specificità maggiore */
  font-family: var(--font-heading) !important;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
  margin-top: 20px;
  margin-bottom: 30px;
  text-align: left !important;  /* ← Aggiunto !important */
  line-height: 1.2;
}

@media only screen and (max-width: 768px) {
  h1,
  .blog .entry-title,
  .archive .entry-title,
  .category .entry-title,
  .tag .entry-title,
  .single-post .entry-title,
  .single-post .entry-header .entry-title {  /* ← Specificità maggiore */
    font-size: 1.625rem !important;
    text-align: left !important;  /* ← Aggiunto !important */
  }
}

 
.entry-content h2 {
  color: var(--color-text) !important;
  font-family: var(--font-heading) !important;
  font-size: 1.6rem;
  font-weight: 700 !important;
  margin-top: 3.125rem;
  margin-bottom: 0.625rem;
}

.entry-content h3,
.entry-content h4 {
  color: var(--color-text) !important;
  font-family: var(--font-heading) !important;
  font-size: 1.0625rem !important;
  font-weight: 700 !important;
  margin-bottom: 2.1875rem !important;
  text-align: left;
}

h5 {
  color: var(--color-text);
  font-size: 0.9375rem !important;
  font-weight: 900;
  text-transform: none !important;
}
 
h6 {
  color: var(--color-text);
  font-family: var(--font-display) !important;
  font-size: 1.3125rem;
  font-weight: 300;
  text-transform: uppercase;
}

.navigation-top a, .navigation-top span, .menu-toggle {
	color: #000;
	font-family: "Oswald", "Helvetica Neue", helvetica, arial, sans-serif !important;
	font-size: 17px !important;
	font-size: 1.0625rem !important;
	font-weight: 300;
	line-height: 1.8;
	text-transform: uppercase;
}


/* Testo popup */
p .popuptext {
  font-family: var(--font-display) !important;
  font-size: 0.8125rem !important;
  letter-spacing: 1px;
  font-weight: 300;
  text-transform: uppercase;
}

/* ==========================================================================
   COMPONENTI SPECIALIZZATI
   ========================================================================== */

/* SVG Icons */
.mod-svg {
  stroke-width: 1;
}

#info {
  stroke-width: 2;
}

#check {
  stroke-width: 2;
  color: #2bb437;
}

/* Sistema contatti offuscati - anti-spam */
.gpama::after {
  content: attr(data-nam1) attr(data-nam2) "@" attr(data-dom1) attr(data-avv3) attr(data-dom2) attr(data-dom3)"." attr(data-avv3) "m";
}

.gpama2::after {
  content: attr(data-nam1) attr(data-nam2) "@" attr(data-dom1) attr(data-avv3) attr(data-dom2) attr(data-dom3)"." attr(data-avv3) "m";
}

.gpama3::after {
  content: attr(data-navv) "." attr(data-navv1) attr(data-avv3) attr(data-dom2) attr(data-dom3)"@" attr(data-dom1) attr(data-avv3) attr(data-dom2) attr(data-dom3)"." attr(data-avv3) "m";
}

.gpama4::after {
  content: attr(data-navv) "." attr(data-navv2) attr(data-avv4) attr(data-dom1) attr(data-avv3)"@" attr(data-dom1) attr(data-avv3) attr(data-dom2) attr(data-dom3)"." attr(data-avv3) "m";
}

.gpate1::after {
  content: attr(data-ita) " 051 " attr(data-ini) ".21." attr(data-cod);
}

.gpate2::after {
  content: " / " attr(data-ini2) ".56." attr(data-cod2);
}

.gpfx::after {
  content: attr(data-ita) " 051 " attr(data-ini3) ".23." attr(data-cod3);
}

.gpape::after {
  content: attr(data-navv) "." attr(data-navv1) attr(data-avv3) attr(data-dom2) attr(data-dom3) "@" attr(data-dom2) "c." attr(data-dom5) " / " attr(data-navv) "." attr(data-navv2) attr(data-avv4) attr(data-dom1) attr(data-avv3) "@" attr(data-dom2) "c." attr(data-dom5);
}

.gpask::after {
  content: attr(data-dom1) attr(data-avv3) attr(data-dom2) attr(data-dom3) attr(data-navv) attr(data-dom6) attr(data-dom7);
}

.gpaiv1::after {
  content: attr(data-pri) attr(data-mid) "21" attr(data-fin);
}

.gpaiv2::after {
  content: attr(data-pri2) attr(data-mid2) "50" attr(data-fin2);
}

/* Liste personalizzate */
ul li.lista::before {
  content: "\2022";
  color: var(--color-primary);
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
  padding-top: 1em;
}

/* Footer categorie */
.entry-footer .cat-links {
  font-size: 0.48rem !important;
}

/* Utility classes */
.tondo {
  border-radius: 50%;
}

/* ==========================================================================
   POPUP INFORMATIVI
   ========================================================================== */

.popup {
  position: relative;
  margin-left: 1vw;
  display: inline-block;
  cursor: pointer;
}

.popup .popuptext {
  visibility: hidden;
  width: 160px;
  background-color: var(--color-primary);
  color: var(--color-background);
  text-align: center;
  font-size: 8px;
  border-radius: 10px;
  padding: 10px;
  position: absolute;
  bottom: 150%;
  left: 50%;
  margin-left: -80px;
  z-index: 1;
  box-shadow: 1px 2px 6px 1px rgba(0, 0, 0, 0.5);
}

.popup .popuptext::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  margin-left: -0.5em;
  bottom: -0.7em;
  left: 50%;
  box-sizing: border-box;
  border: 0.4em solid black;
  border-color: transparent transparent var(--color-primary) var(--color-primary);
  transform-origin: 0 0;
  transform: rotate(-45deg);
  box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.3);
}

.popup .popuptext.popb::after {
  border-color: transparent transparent var(--color-background) var(--color-background);
}

.popup .show {
  visibility: visible;
  animation: fadeIn 1.5s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================================================
   FORM STYLING
   ========================================================================== */

.nf-field-element textarea {
  background-color: var(--color-light-gray);
}

.nf-field-element input {
  background-color: var(--color-primary);
}

/* ==========================================================================
   PERSONALIZZAZIONI TEMA PARENT
   ========================================================================== */

/* Nascondi elementi non desiderati */
.site-info,
.page .entry-header,
.blog .page-title,
.widget-title,
.single-featured-image-header {
  display: none;
}

/* Nasconde, solo visivamente, tag e categorie negli articoli */
.entry-footer .cat-links,
.entry-footer .tags-links {
  display: none;
}


/* Rimuovi sottolineatura dai link nei widget */
.widget a,
.site-footer .widget-area a,
.widget_authors a strong:hover {
  box-shadow: none;
}

/* Header customization */
.custom-header-media:before {
  display: none;
}


/* ==========================================================================
   PAGINE DEI PROFILI ***** ELIMINARE QUESTO CSS
   ========================================================================== */

/* CSS per tutte le pagine del team */
.page-avv-enrico-pelino .entry-title,
.profilo-team .page-title,
.profilo-team .wp-block-post-title {
    display: none !important;
}


/* ==========================================================================
   DISTANZIAMENTO E SEPARATORI ESTRATTI DEI POST
   ========================================================================== */
   
/* Rimuove bordi e imposta spaziatura + posizionamento per i post */
.blog .post,
.archive .post,
.category .post,
.tag .post {
  border: none !important;
  padding-bottom: 3em;
  margin-bottom: 3em;
  position: relative;
}

/* Nasconde eventuali <hr> interni ai post */
.blog .post hr,
.archive .post hr,
.category .post hr,
.tag .post hr {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Rimuove pseudo-elementi generati prima dei post */
.blog .post::before,
.archive .post::before,
.category .post::before,
.tag .post::before {
  content: none !important;
  display: none !important;
}


/* Nasconde l'intero blocco .entry-footer */
.entry-footer {
  display: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  height: 0 !important;
}


/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Logo responsive */
.site-branding .wrap {
  margin-left: 2%;
}

.has-header-image.twentyseventeen-front-page .site-branding {
  vertical-align: top;
}

.custom-logo-link img {
  height: 80px;
}

/* Tablet e Desktop */
@media screen and (min-width: 48em) {
  .has-header-image.twentyseventeen-front-page .site-branding,
  .has-header-video.twentyseventeen-front-page .site-branding,
  .has-header-image.home.blog .site-branding .wrap,
  .has-header-video.home.blog .site-branding {
    top: 10% !important;
    margin-left: 0% !important;
    bottom: initial !important;
  }
  
  .custom-logo-link img {
    height: 150px;
  }
  
  .page-one-column .panel-content .wrap {
    max-width: 100% !important;
  }
  
  .panel-image {
    height: 40vh;
    max-height: 1200px;
  }
}

/* Header heights - Desktop */
@media screen and (min-width: 1025px) {
  .has-header-image.twentyseventeen-front-page .custom-header {
    height: 100vh;
    background-color: var(--color-background);
  }
}

/* Header heights - Tablet */
@media screen and (max-width: 1024px) {
  .has-header-image.twentyseventeen-front-page .custom-header {
    height: 53vh;
    background-color: var(--color-background);
  }
}

/* Header heights e Panel images - Mobile */
@media screen and (max-width: 480px) {
  .has-header-image.twentyseventeen-front-page .custom-header {
    height: 32vh;
    background-color: var(--color-background);
  }
  
  .panel-image {
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    height: 25vh;
    max-height: 1200px;
    /* Rimosso background-attachment: fixed per performance mobile */
  }
}

/* Blog layout responsive */
@media screen and (min-width: 30em) {
  .blog:not(.has-sidebar) #primary article,
  .archive:not(.page-one-column):not(.has-sidebar) #primary article,
  .search:not(.has-sidebar) #primary article,
  .navigation.pagination,
  body.blog .site-content .page-header,
  body.archive .site-content .page-header,
  body.search .site-content .page-header {
    float: none;
    margin-left: auto;
    margin-right: auto;
    max-width: 60%; /* larghezza colonna blog*/
    width: auto;
  }
}

/* ==========================================================================
   GUTENBERG ALIGNMENT SUPPORT
   ========================================================================== */

.wrap {
  max-width: 90%;
}

.entry-content .alignwide {
  margin-left: -80px;
  margin-right: -80px;
}

.entry-content .alignfull {
  margin-left: calc(-100vw / 2 + 100% / 2);
  margin-right: calc(-100vw / 2 + 100% / 2);
  max-width: 100vw;
}

.alignfull img {
  width: 100vw;
}

/* Header media full height */
.twentyseventeen-front-page.has-header-image .custom-header-media,
.twentyseventeen-front-page.has-header-video .custom-header-media,
.home.blog.has-header-image .custom-header-media,
.home.blog.has-header-video .custom-header-media {
  height: 100vh;
  max-height: 100%;
  overflow: hidden;
}

/* ULTERIORI REGOLE */
.page .entry-title,
.single-post .entry-title,
.blog .page-title {
  text-align: center;
}

/* ==========================================================================
   LARGHEZZA CONTENUTI
   ========================================================================== */

body.page:not(.blog):not(.archive):not(.page-id-3282) .entry-content {
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: auto !important;
}

body.page-id-3282 .entry-content {
  max-width: 70% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: auto !important;
}
/* Mobile: Homepage più larga */
@media screen and (max-width: 768px) {
  body.page-id-3282 .entry-content {
    max-width: 100% !important; /* o 95% se preferisci ancora più largo */
  }
}

/* Tablet: Larghezza intermedia (opzionale) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  body.page-id-3282 .entry-content {
    max-width: 80% !important;
  }
}


/* Eccezioni per elementi che devono rimanere a tutto schermo */
.page:not(.blog):not(.archive) .entry-content .alignfull,
.page:not(.blog):not(.archive) .entry-content .alignwide {
  max-width: none;
  margin-left: calc(-100vw / 2 + 100% / 2);
  margin-right: calc(-100vw / 2 + 100% / 2);
}

/* Le panel images rimangono a tutto schermo */
.panel-image,
.custom-header-media {
  max-width: 100vw;
  margin-left: 0;
  margin-right: 0;
}

/* Responsive: aumenta un po' su mobile per leggibilità */
@media screen and (max-width: 768px) {
  .page:not(.blog):not(.archive) .entry-content {
    max-width: 100%;
  }
}
/* ==========================================================================
   FIX CHIRURGICO MENU - SOLO LARGHEZZA
   ========================================================================== */

/* Allarga solo il container del menu senza toccare funzionalità */
.navigation-top .wrap {
    max-width: 100%;
}

/* Centra il menu SOLO su desktop - non interferisce con mobile toggle */
@media screen and (min-width: 768px) {
    .navigation-top {
        text-align: center !important;
    }

    .navigation-top .main-navigation {
        text-align: center !important;
    }

    .navigation-top .main-navigation ul {
        display: inline-block !important;
        text-align: left !important;
    }
}

