/*
 * CSS Custom per i template del tema Studio Simpled
 * Variabili globali derivate da standard_sviluppo_custom.md e dall'analisi del sito
 */

:root {
  /* Brand Colors - Simpled BrandBook */
  --primary-color: #F7F5F7;       /* Bianco web */
  --text-main: #19191A;           /* Nero web */
  --text-muted: #6F6E70;          /* Grigio scuro */
  --accent-green: #00C454;        /* Verde Simpled */
  --accent-purple: #8200C4;       /* Viola Simpled */
  --dark-purple: #440066;         /* Viola scuro */
  --footer-bg: #8200C4;           /* Footer Viola Simpled */
  --footer-text: #FFFFFF;
  
  /* Fonts */
  --font-primary: 'Inter', -apple-system, Arial, sans-serif;
  --font-secondary: 'Lora', serif;

  /* Spacing e Layout */
  --container-width: 1200px;
  --padding-section: 80px 20px;
  --border-radius-base: 24px;     /* Bordi organici coerenti col brand */
  
  /* Shadows */
  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* -------------------------------------- */
/* Reset Base & Typography                */
/* -------------------------------------- */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  color: var(--text-main);
  background-color: #ffffff;
  line-height: 1.4;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
  color: var(--accent-purple);
  margin-top: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: var(--accent-green);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-purple);
}

img {
  max-width: 100%;
  height: auto;
}

/* -------------------------------------- */
/* Layout Containers                      */
/* -------------------------------------- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: var(--padding-section);
}

.bg-light {
  background-color: var(--primary-color);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

@media (max-width: 768px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------- */
/* Componenti Comuni                      */
/* -------------------------------------- */
.btn-primary {
  display: inline-block;
  background-color: var(--accent-purple);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--border-radius-base);
  font-weight: 600;
  letter-spacing: 0.3px;
  text-align: center;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
  background-color: var(--dark-purple);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  display: inline-block;
  background-color: transparent;
  color: var(--accent-purple);
  padding: 12px 26px;
  border-radius: var(--border-radius-base);
  font-weight: 600;
  border: 2px solid var(--accent-purple);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
  background-color: var(--accent-purple);
  color: #fff;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* -------------------------------------- */
/* Header & Navigation                    */
/* -------------------------------------- */
.site-header {
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
}

.top-bar {
  background-color: var(--dark-purple);
  padding: 8px 0;
  font-size: 0.9rem;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.top-bar-inner a {
  color: #ffffff !important;
  font-weight: 500;
  transition: opacity 0.2s;
}

.top-bar-inner a:hover {
  opacity: 0.85;
}

.main-nav {
  padding-top: 20px;
  padding-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 30px;
}

.nav-links li a {
  color: var(--text-main);
  font-weight: 500;
}

.nav-links li a:hover {
  color: var(--accent-purple);
}

.nav-links li a[href="#"] {
  cursor: default;
}

/* -------------------------------------- */
/* Footer                                 */
/* -------------------------------------- */
.site-footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 60px 0 20px;
}

.site-footer .grid-2 {
  gap: 100px;
}

.site-footer a {
  color: #eeeeee;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-legal-links {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-legal-links a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7) !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-legal-links a:hover {
  color: #ffffff !important;
  text-decoration: underline;
}

/* -------------------------------------- */
/* Stili Hamburger Menu                   */
/* -------------------------------------- */
.mobile-menu-toggle {
  display: none; /* Nascosto su desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1002;
}

.hamburger-line {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background-color: var(--accent-purple);
  transition: all 0.3s ease;
}

.mobile-menu-toggle.is-active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.footer-col h4 {
  font-family: var(--font-primary);
  font-size: 1.25rem;
  margin-bottom: 5px;
}

.footer-col p {
  font-size: 0.95rem;
  line-height: 1.4;
  margin: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 40px;
  padding-top: 20px;
  font-size: 0.85rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
}

/* -------------------------------------- */
/* Hero Section (Home & Servizi)          */
/* -------------------------------------- */
.hero-section {
  background-color: var(--primary-color);
  padding: 80px 20px;
  text-align: center;
  position: relative;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.hero-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--accent-green);
  border-radius: 2px;
}

html {
  scroll-behavior: smooth;
}

/* -------------------------------------- */
/* Stili per Blocchi Nativi Gutenberg     */
/* -------------------------------------- */

/* Accordion (Details nativo Gutenberg) */
details.wp-block-details {
  border-bottom: 1px solid #ddd;
  padding: 15px 0;
  background: transparent;
}
details.wp-block-details summary {
  color: var(--accent-purple);
  font-weight: 600;
  cursor: pointer;
  font-size: 1.1rem;
  list-style: none;
  position: relative;
  padding-left: 30px;
}
details.wp-block-details summary::-webkit-details-marker {
  display: none;
}
details.wp-block-details summary::before {
  content: '+';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--accent-green);
  transition: transform 0.3s;
}
details.wp-block-details[open] summary::before {
  content: '-';
}
details.wp-block-details .wp-block-details__content {
  padding: 15px 0 15px 30px;
  color: var(--text-main);
  font-size: 1.05rem;
  line-height: 1.4;
}

/* Accordion Custom (Studio Simpled Pill Style) */
.accordion-wrapper {
  margin: 40px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

details.custom-accordion {
  background: transparent;
  border: none;
  margin-bottom: 0;
}

details.custom-accordion summary {
  color: var(--accent-purple);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 18px 30px;
  list-style: none;
  outline: none;
  background-color: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--border-radius-base);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  box-shadow: var(--shadow-sm);
}

details.custom-accordion summary::-webkit-details-marker {
  display: none;
}

details.custom-accordion summary::before {
  content: '+';
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent-purple);
  margin-right: 5px;
  transition: transform 0.3s ease;
}

details.custom-accordion[open] summary {
  background-color: #f1edf2; /* Grigio-viola chiarissimo dello screenshot */
  border-color: #d3cfd3;
}

details.custom-accordion[open] summary::before {
  content: '-';
}

details.custom-accordion .accordion-content {
  margin-top: 15px;
  padding: 30px 40px;
  background-color: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: var(--border-radius-base);
  color: var(--text-main);
  font-size: 1.05rem;
  line-height: 1.4;
  box-shadow: var(--shadow-sm);
  animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

details.custom-accordion .accordion-content p {
  margin-top: 0;
  margin-bottom: 15px;
}

details.custom-accordion .accordion-content ul {
  padding-left: 20px;
  margin-top: 10px;
  margin-bottom: 15px;
}

details.custom-accordion .accordion-content li {
  margin-bottom: 8px;
  list-style-type: disc;
}

details.custom-accordion .accordion-content strong {
  color: var(--accent-purple);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* CTA Box (Group Block con classe personalizzata) */
.cta-box-custom {
  background-color: var(--accent-purple);
  color: #fff;
  border-radius: var(--border-radius-base);
  padding: 40px;
  text-align: center;
  margin: 40px 0;
}

.cta-box-custom h2 {
  color: #fff;
}

/* -------------------------------------- */
/* Stili Pagina Blog (Replicazione Elementor) */
/* -------------------------------------- */

.blog-card {
  background-color: #ffffff !important;
  border-radius: var(--border-radius-base);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.blog-card .post-thumbnail {
  overflow: hidden;
  border-radius: var(--border-radius-base) var(--border-radius-base) 0 0;
  position: relative;
}

.blog-card .post-thumbnail img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.blog-card:hover .post-thumbnail img {
  transform: scale(1.05);
}

.blog-card .post-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card .post-categories {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--dark-purple);
}

.blog-card .post-categories a {
  color: var(--dark-purple) !important; /* Viola più scuro #440066 */
  font-weight: 600;
  transition: color 0.2s ease;
}

.blog-card .post-categories a:hover {
  color: var(--accent-green) !important;
}

.blog-card .post-categories .meta-icon {
  margin-right: 4px;
  vertical-align: middle;
  color: var(--dark-purple);
}

.blog-card .post-title {
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 12px;
  line-height: 1.3;
  min-height: 48px; /* Assicura allineamento verticale tra le card */
}

.blog-card .post-title a {
  color: var(--accent-purple);
  transition: color 0.3s ease;
}

.blog-card .post-title a:hover {
  color: var(--accent-green);
}

.blog-card .post-excerpt {
  margin-bottom: 20px;
  color: var(--text-main);
  flex-grow: 1;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Footer della card (allineamento orizzontale data e bottone) */
.blog-card .post-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid rgba(0, 0, 0, 0.05); /* Sottile linea divisoria */
}

.blog-card .post-date {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  color: #777;
}

.blog-card .post-date .meta-icon {
  margin-right: 6px;
  vertical-align: middle;
  color: var(--accent-purple);
}

/* Pulsante Leggi di più stile Elementor pill */
.blog-card .btn-readmore {
  display: inline-block;
  background-color: rgba(16, 185, 129, 0.1); /* Sfondo verde tenue */
  color: var(--accent-green);
  padding: 10px 20px;
  border-radius: var(--border-radius-base);
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card .btn-readmore:hover {
  background-color: var(--accent-green);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* -------------------------------------- */
/* Hero Section (Replicazione Elementor)  */
/* -------------------------------------- */

.page-hero-section {
  background-color: var(--primary-color);
  padding: 100px 20px 80px;
  text-align: center;
  position: relative;
  width: 100%;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.page-hero-section .hero-title {
  color: var(--accent-purple) !important;
  font-family: var(--font-secondary);
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  padding-bottom: 12px;
  display: inline-block;
  line-height: 1.2;
  position: relative;
}

.page-hero-section .hero-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--accent-green);
  border-radius: 2px;
}

@media (max-width: 768px) {
  .page-hero-section {
    padding: 60px 20px 40px;
  }
  .page-hero-section .hero-title {
    font-size: 2.5rem;
  }
}

/* -------------------------------------- */
/* Pagina Contatti Custom                 */
/* -------------------------------------- */

/* Griglia per le informazioni di contatto */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  max-width: 900px;
  margin: 40px auto;
}

.contacts-col {
  display: flex;
  flex-direction: column;
}

.info-block {
  margin-bottom: 20px;
}

.info-title {
  font-size: 1.8rem;
  color: var(--accent-purple);
  font-weight: 700;
  text-align: center;
  margin-top: 0;
  margin-bottom: 25px;
  font-family: var(--font-primary);
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
  width: fit-content;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.info-item:hover {
  transform: translateX(6px);
}

.info-item:hover .info-icon svg {
  stroke: var(--accent-green);
}

.info-icon {
  color: var(--accent-purple);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 4px;
}

.info-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--accent-purple);
  fill: none;
}

.info-text {
  display: flex;
  flex-direction: column;
}

.info-link-val, 
.info-value {
  font-size: 1.2rem;
  color: var(--text-main);
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s ease;
}

.info-link-val:hover {
  color: var(--accent-purple);
}

.info-label {
  font-size: 0.85rem;
  color: var(--text-main);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Wrapper per la Mappa */
.map-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  overflow: hidden;
}

/* Sezione Form Contatti */
.contact-form-section {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
}

.form-section-title {
  font-size: 2.2rem;
  color: var(--accent-purple);
  font-family: var(--font-secondary); /* Lora */
  font-weight: 400;
  margin-top: 0;
  margin-bottom: 8px;
}

.form-section-subtitle {
  font-size: 1.15rem;
  color: var(--accent-purple);
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 35px;
}

.contact-form-card {
  background-color: #ffffff;
  padding: 50px;
  border-radius: var(--border-radius-base);
  text-align: left;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  position: relative;
}

.form-row .form-group {
  margin-bottom: 0;
}

.form-group label {
  font-size: 1rem;
  color: var(--text-main);
  font-weight: 600;
  margin-bottom: 8px;
  transition: color 0.25s ease;
}

.form-group:focus-within label {
  color: var(--accent-purple);
}

.form-group input, 
.form-group textarea {
  background-color: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 8px;
  padding: 14px 18px;
  font-family: var(--font-primary);
  font-size: 1.05rem;
  color: var(--text-main);
  width: 100%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input:focus, 
.form-group textarea:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
  outline: none;
}

.form-group-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 25px 0;
}

.form-group-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-green);
  cursor: pointer;
  margin: 0;
}

.form-group-checkbox label {
  font-size: 1rem;
  color: var(--text-main);
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.form-group-checkbox label a {
  color: var(--accent-purple);
  font-weight: 600;
  text-decoration: underline;
}

.form-group-checkbox label a:hover {
  color: var(--accent-green);
}

.btn-primary-form {
  display: inline-block;
  background-color: var(--accent-purple);
  color: #ffffff;
  padding: 14px 35px;
  border-radius: var(--border-radius-base);
  font-weight: 700;
  letter-spacing: 0.3px;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary-form:hover {
  background-color: var(--dark-purple);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary-form:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* Responsività */
@media (max-width: 768px) {
  .contacts-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    margin: 30px auto;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .contact-form-card {
    padding: 30px 20px;
  }
}

/* Fallback e Mappa Interattiva */
.map-container-fallback {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.map-container-fallback iframe {
  border: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.5s ease;
  z-index: 2;
}

/* Nasconde l'iframe vuoto o bloccato (ad es. Iubenda in about:blank) */
.map-container-fallback iframe[src="about:blank"],
.map-container-fallback iframe:not([src]) {
  opacity: 0;
  pointer-events: none;
}

/* Mostra l'iframe quando viene attivato con l'URL reale */
.map-container-fallback iframe:not([src="about:blank"]) {
  opacity: 1;
  pointer-events: auto;
  background: #ffffff;
}

.map-fallback-overlay {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.95);
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1;
}

@media (max-width: 768px) {
  .map-fallback-overlay {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    text-align: center;
  }
}

/* -------------------------------------- */
/* Stili Dropdown Menu Fallback           */
/* -------------------------------------- */
.nav-links li {
  position: relative;
}

.nav-links .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  list-style: none;
  padding: 10px 0;
  margin: 0;
  min-width: 280px;
  z-index: 999;
  border-radius: 8px;
  border-top: 3px solid var(--accent-purple);
}

.nav-links .sub-menu li {
  width: 100%;
}

.nav-links .sub-menu li a {
  display: block;
  padding: 10px 20px;
  font-size: 0.95rem;
  color: var(--text-main);
  text-align: left;
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
}

.nav-links .sub-menu li a:hover {
  background-color: var(--primary-color);
  color: var(--accent-purple);
}

.nav-links li:hover > .sub-menu {
  display: block;
}

/* -------------------------------------- */
/* Stili Homepage Slider                  */
/* -------------------------------------- */
.home-hero-slider {
  position: relative;
  width: 100%;
  height: 90vh;
  z-index: 10;
  background-color: #19191a;
}

.slider-slides {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.slider-slides .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  z-index: 1;
}

.slider-slides .slide.active {
  opacity: 1;
  z-index: 2;
}

.slider-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  background: rgba(25, 25, 26, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.slider-title {
  color: #ffffff !important;
  font-family: var(--font-secondary); /* Lora */
  font-size: 3.8rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 35px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.slider-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Bottoni personalizzati per lo slider */
.btn-primary-purple {
  display: inline-block;
  background-color: var(--accent-purple);
  color: #fff !important;
  padding: 15px 35px;
  border-radius: var(--border-radius-base);
  font-weight: 600;
  font-size: 1.05rem;
  text-align: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(130, 0, 196, 0.3);
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-primary-purple:hover {
  background-color: var(--dark-purple);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(130, 0, 196, 0.4);
}

.btn-primary-green {
  display: inline-block;
  background-color: var(--accent-green);
  color: #fff !important;
  padding: 15px 35px;
  border-radius: var(--border-radius-base);
  font-weight: 600;
  font-size: 1.05rem;
  text-align: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 196, 84, 0.3);
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-primary-green:hover {
  background-color: #009942;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 196, 84, 0.4);
}

/* Freccia giù dello slider */
.scroll-down-arrow {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  width: 55px;
  height: 55px;
  background-color: var(--accent-green);
  color: #ffffff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: background-color 0.2s, transform 0.2s, bottom 0.3s;
}

.scroll-down-arrow:hover {
  background-color: #00a546;
  transform: translateX(-50%) translateY(3px);
}

.scroll-down-arrow svg {
  width: 24px;
  height: 24px;
  stroke: #ffffff;
}

/* Ancoraggio dello scorrimento */
#main-nav-anchor {
  scroll-margin-top: 30px;
}

/* Menu Sticky */
.header-bottom {
  background-color: #f7f5f7;
  width: 100%;
}

.header-bottom.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 3000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  animation: slideDownMenu 0.3s ease-in-out;
  border-bottom: 1px solid #eee;
}

.header-bottom.is-sticky .main-nav {
  padding-top: 12px;
  padding-bottom: 12px;
}

@keyframes slideDownMenu {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* -------------------------------------- */
/* Stili Sezione Statistiche (Contatori)   */
/* -------------------------------------- */
.stats-section-custom {
  background-color: var(--accent-purple);
  padding: 100px 20px;
  position: relative;
  color: #ffffff;
  text-align: center;
  overflow: hidden;
}

.stats-section-custom h2 {
  color: #ffffff !important;
  font-family: var(--font-secondary); /* Lora */
  font-size: 2.8rem;
  font-weight: 400;
  margin-top: 0;
  margin-bottom: 60px;
  position: relative;
  z-index: 5;
}

.stats-circle-container {
  display: flex;
  justify-content: center;
  gap: 60px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 5;
}

.stats-circle-item {
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background-color: #e5e3e6; /* Sfondo cerchi grigio chiaro */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.stats-circle-item:hover {
  transform: scale(1.03);
}

.stats-circle-value {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent-purple);
  line-height: 1.1;
  font-family: var(--font-primary);
}

.stats-circle-label {
  font-size: 0.95rem;
  color: var(--accent-purple);
  font-weight: 600;
  margin-top: 5px;
  text-transform: lowercase;
  max-width: 160px;
  line-height: 1.3;
}

/* Shape Dividers Slanted */
.custom-shape-divider-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  z-index: 2;
}

.custom-shape-divider-top svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 40px;
}

.custom-shape-divider-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  z-index: 2;
}

.custom-shape-divider-bottom svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 40px;
}

/* Responsività */
@media (max-width: 992px) {
  .stats-circle-container {
    gap: 30px;
  }
  .stats-circle-item {
    width: 200px;
    height: 200px;
  }
  .stats-circle-value {
    font-size: 2.8rem;
  }
}

@media (max-width: 768px) {
  .home-hero-slider {
    height: 75vh;
  }
  .slider-title {
    font-size: 2.2rem;
    padding: 0 15px;
  }
  .stats-section-custom {
    padding: 80px 20px;
  }
  .stats-section-custom h2 {
    font-size: 2.2rem;
    margin-bottom: 40px;
  }
  .stats-circle-container {
    flex-direction: column;
    align-items: center;
    gap: 35px;
  }

  /* Fix Menu di Navigazione su Mobile */
  .main-nav {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
  }
  .mobile-menu-toggle {
    display: block;
    margin-left: auto;
  }
  .navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1001;
    padding: 20px 0;
  }
  .navigation.is-open {
    display: block;
    animation: slideDownMenu 0.3s ease-in-out;
  }
  .nav-links {
    flex-direction: column;
    gap: 15px;
    align-items: center;
    width: 100%;
    text-align: center;
  }
  .nav-links li {
    width: 100%;
  }
  .nav-links .sub-menu {
    position: static;
    transform: none;
    display: block;
    box-shadow: none;
    border: none;
    background-color: #f7f5f7;
    padding: 10px 0;
    min-width: unset;
    margin-top: 10px;
  }
  .nav-links .sub-menu li a {
    text-align: center;
    padding: 8px 10px;
    color: var(--accent-purple);
  }

  /* Fix Bottoni Hero Slider su Mobile */
  .slider-buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  .btn-primary-purple, .btn-primary-green {
    width: 100%;
    padding: 12px 20px;
    font-size: 1rem;
    box-sizing: border-box;
  }
}

/* -------------------------------------- */
/* Preloader Animato                      */
/* -------------------------------------- */
#site-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff;
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

#site-preloader img {
  max-width: 250px;
  animation: pulseLogo 2s infinite ease-in-out;
}

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

body.preloader-hidden #site-preloader {
  opacity: 0;
  visibility: hidden;
}

/* -------------------------------------- */
/* Custom Scrollbar                       */
/* -------------------------------------- */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #f7f5f7; 
}

::-webkit-scrollbar-thumb {
  background: var(--accent-purple); 
  border-radius: 6px;
  border: 3px solid #f7f5f7; /* Crea uno spazio visivo ai lati */
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-green); 
}

/* -------------------------------------- */
/* Redesign Singolo Articolo (Blog)       */
/* -------------------------------------- */
.single-post-hero {
    position: relative;
    padding: 80px 0 150px;
    background-color: var(--primary-color);
    text-align: center;
}

.single-post-meta {
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 20px;
    font-weight: 500;
}

.single-post-meta .post-category {
    color: var(--accent-green);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

.single-post-title {
    font-family: var(--font-secondary);
    font-size: 3rem;
    color: var(--accent-purple);
    margin-bottom: 0;
    line-height: 1.2;
}

.single-post-thumbnail-wrapper {
    max-width: 1000px;
    margin: -100px auto 60px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.single-post-thumbnail-wrapper img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-base);
    box-shadow: var(--shadow-lg);
    display: block;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-base);
    pointer-events: none;
}

.single-post-body {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

.single-post-share {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eaeaea;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f7f5f7;
    color: #777777;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background-color: var(--accent-green);
    color: #ffffff;
    transform: translateY(-2px);
}

.single-post-content {
    font-size: 1.25rem;
    line-height: 1.4;
    color: #222222;
}

.single-post-content h2 {
    font-family: var(--font-secondary);
    color: var(--accent-purple);
    font-size: 2rem;
    margin-top: 50px;
    margin-bottom: 25px;
}

.single-post-content h3 {
    font-family: var(--font-secondary);
    color: var(--accent-purple);
    font-size: 1.5rem;
    margin-top: 40px;
    margin-bottom: 20px;
}

.single-post-content p {
    margin-bottom: 20px;
}

.single-post-content ul, .single-post-content ol {
    margin-bottom: 25px;
    padding-left: 20px;
}

.single-post-content li {
    margin-bottom: 10px;
}

.single-post-content blockquote {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--accent-purple);
    border-left: 4px solid var(--accent-green);
    padding: 20px 30px;
    margin: 40px 0;
    background-color: #f7f5f7;
    border-radius: 0 10px 10px 0;
}

.single-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px 0;
    filter: brightness(0.9);
}

/* Sidebar & Navigazione Articolo */
.single-post-main-container {
    margin-top: 40px;
    margin-bottom: 80px;
}

.single-post-main-container .row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.single-post-main-container .col-lg-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    padding-right: 15px;
    padding-left: 15px;
    box-sizing: border-box;
}

.single-post-main-container .col-lg-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding-right: 15px;
    padding-left: 15px;
    box-sizing: border-box;
}

.single-post-sidebar {
    position: sticky;
    top: 120px;
}

.sidebar-share-box {
    background-color: #ffffff;
    padding: 25px 30px;
    border-radius: var(--border-radius-base);
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
}

.sidebar-share-box .single-post-share {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-related-posts {
    background-color: #ffffff;
    padding: 30px;
    border-radius: var(--border-radius-base);
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: var(--shadow-sm);
}

.sidebar-title {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    color: var(--accent-purple);
    margin-bottom: 25px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-green);
    display: inline-block;
}

.sidebar-posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-post-card {
    display: flex;
    gap: 15px;
    align-items: center;
    transition: transform 0.2s ease;
}

.sidebar-post-card:hover {
    transform: translateX(5px);
}

.sidebar-post-thumbnail {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
}

.sidebar-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sidebar-post-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-post-date {
    font-size: 0.8rem;
    color: #888888;
    font-weight: 500;
}

.sidebar-post-title {
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.sidebar-post-title a {
    color: var(--text-main);
    transition: color 0.2s ease;
}

.sidebar-post-title a:hover {
    color: var(--accent-purple);
}

/* Frecce Navigazione Articolo */
.post-navigation-arrows {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eaeaea;
    padding-top: 40px;
    margin-top: 60px;
    gap: 20px;
}

.nav-arrow {
    flex: 1;
    max-width: 50%;
}

.nav-arrow a {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-main);
    padding: 15px 20px;
    background-color: #ffffff;
    border-radius: var(--border-radius-base);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-sizing: border-box;
}

.nav-arrow-prev a {
    justify-content: flex-start;
}

.nav-arrow-next a {
    justify-content: flex-end;
    text-align: right;
}

.nav-arrow a:hover {
    background-color: #ffffff;
    border-color: var(--accent-purple);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.nav-arrow a svg {
    color: var(--accent-green);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.nav-arrow-prev a:hover svg {
    transform: translateX(-4px);
}

.nav-arrow-next a:hover svg {
    transform: translateX(4px);
}

.nav-arrow-info {
    display: flex;
    flex-direction: column;
}

.nav-label {
    font-size: 0.75rem;
    color: #888888;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-purple);
    margin-top: 2px;
    line-height: 1.3;
}

@media (max-width: 992px) {
    .single-post-main-container .col-lg-8,
    .single-post-main-container .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .single-post-sidebar {
        position: static;
        margin-top: 50px;
    }
    .post-navigation-arrows {
        flex-direction: column;
        gap: 15px;
    }
    .nav-arrow {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .site-footer .grid-2 {
        gap: 30px;
    }
    .scroll-down-arrow {
        bottom: 15px;
    }
    .cta-box-custom {
        padding: 30px 20px;
        margin: 30px 0;
    }
    .cta-box-custom h2 {
        font-size: 1.7rem !important;
        line-height: 1.3;
    }
    .single-post-title {
        font-size: 2.2rem;
    }
    .single-post-hero {
        padding: 60px 0 100px;
    }
    .single-post-thumbnail-wrapper {
        margin-top: -60px;
    }
}
