/*
Theme Name: DIH Lazio
Theme URI: https://dih-lazio.it/
Author: Kinaweb
Description: Tema su misura per DIH Lazio – Digital Innovation Hub del Lazio. Conversione fedele della landing page approvata, con contenuti modificabili dal pannello (Aspetto > Personalizza) e News gestite come Articoli.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
Text Domain: dihlazio
*/

/* ==========================================================
   1. STILI BASE (identici alla landing page approvata)
   ========================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Open Sans', sans-serif; color: #333; background: #fff; }

:root {
  --blue: #1C3E8F;
  --blue-dark: #152d6a;
  --blue-light: #e8eef8;
  --white: #ffffff;
  --gray-bg: #f5f6f8;
  --gray-line: #e2e5ec;
  --text: #333;
  --text-light: #666;
}

/* NAVBAR */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  background: #fff; border-bottom: 2px solid var(--gray-line);
  height: 75px; display: flex; align-items: center; padding: 0 40px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.nav-logo img { height: 58px; }
.nav-menu { margin-left: auto; display: flex; align-items: center; }
.nav-menu a {
  display: block; padding: 0 16px; font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em; color: #444;
  text-decoration: none; line-height: 75px;
  border-bottom: 3px solid transparent; transition: color .2s, border-color .2s;
}
.nav-menu a:hover { color: var(--blue); border-bottom-color: var(--blue); }
.nav-cta {
  background: var(--blue) !important; color: #fff !important;
  border-radius: 3px; line-height: 1 !important;
  padding: 9px 18px !important; margin-left: 12px;
  border-bottom: none !important; font-size: 12px !important;
  transition: background .2s !important;
}
.nav-cta:hover { background: var(--blue-dark) !important; }
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.hamburger span { width: 22px; height: 2px; background: var(--blue); display: block; }

/* HERO — stile Lombardia: logo grande centrato, ultima news in evidenza */
.hero {
  margin-top: 75px;
  background: var(--gray-bg);
  border-bottom: 1px solid var(--gray-line);
}
.hero-top {
  text-align: center;
  padding: 50px 40px 30px;
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 2fr; gap: 40px; align-items: center;
}
.hero-logo-wrap { text-align: center; }
.hero-logo-wrap img { max-width: 220px; }
.hero-headline { text-align: left; }
.hero-headline h1 {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 38px; font-weight: 700; color: var(--blue);
  line-height: 1.15; margin-bottom: 14px;
}
.hero-headline h1 span { display: block; font-size: 20px; font-weight: 400; color: var(--text-light); font-family: 'Open Sans', sans-serif; margin-top: 4px; }
.hero-headline p { font-size: 15px; line-height: 1.8; color: var(--text-light); margin-bottom: 22px; max-width: 520px; }

/* ULTIMA NEWS IN EVIDENZA — come Lombardia, immagine grande + testo */
.hero-featured-news {
  background: var(--blue);
  max-width: 1100px; margin: 0 auto;
}
.hero-featured-inner {
  display: grid; grid-template-columns: 1.2fr 1fr;
  min-height: 220px;
}
.hero-news-img {
  background: var(--blue-dark);
  display: flex; align-items: center; justify-content: center;
  padding: 30px;
}
.hero-news-img svg { width: 80px; height: 80px; stroke: rgba(255,255,255,0.2); fill: none; stroke-width: 0.8; }
.hero-news-content {
  padding: 30px 36px;
  display: flex; flex-direction: column; justify-content: center;
}
.hero-news-tag {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: rgba(255,255,255,.55); margin-bottom: 10px;
}
.hero-news-content h2 {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 22px; font-weight: 700; color: #fff; line-height: 1.3; margin-bottom: 12px;
}
.hero-news-content p { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,.7); margin-bottom: 18px; }
.btn-white-outline {
  display: inline-block; padding: 9px 22px;
  border: 1.5px solid rgba(255,255,255,.6); border-radius: 3px;
  color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; text-decoration: none;
  transition: background .2s, border-color .2s;
  align-self: flex-start;
}
.btn-white-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; }

/* SEZIONI */
.section { padding: 65px 40px; }
.section.gray { background: var(--gray-bg); }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-tag {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; color: var(--blue); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.section-tag::before { content: ''; width: 24px; height: 2px; background: var(--blue); display: inline-block; }
.section-title {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 30px; font-weight: 700; color: var(--blue);
  margin-bottom: 14px; line-height: 1.2;
}
.section-lead { font-size: 14px; line-height: 1.85; color: var(--text-light); max-width: 580px; margin-bottom: 36px; }
.btn {
  display: inline-block; padding: 10px 26px;
  background: var(--blue); color: #fff; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; text-decoration: none;
  border-radius: 3px; border: 2px solid var(--blue);
  transition: background .2s, color .2s;
}
.btn:hover { background: transparent; color: var(--blue); }

/* CHI SIAMO */
.mission-split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.mission-text p { font-size: 14px; line-height: 1.85; color: var(--text-light); margin-bottom: 12px; }
.mission-text strong { color: var(--blue); font-weight: 700; }
.mission-visual { background: #fff; border: none; border-radius: 8px; padding: 40px; text-align: center; box-shadow: 0 4px 24px rgba(28,62,143,0.13); }
.mission-visual img { max-width: 180px; }
.mission-visual p { font-size: 11px; color: #999; margin-top: 14px; line-height: 1.6; }

/* 4 PILASTRI */
.pillars-title {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 22px; font-weight: 700; color: var(--blue);
  margin-top: 50px; text-align: center;
}
.pillars-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; margin-top: 22px; }
.pillar {
  background: #fff; border: 1px solid var(--gray-line);
  border-top: 3px solid var(--blue); border-radius: 3px; padding: 24px 20px;
  transition: box-shadow .2s, transform .2s;
}
.pillar:hover { box-shadow: 0 5px 22px rgba(28,62,143,0.1); transform: translateY(-2px); }
.pillar h3 { font-size: 14px; font-weight: 700; color: var(--blue); margin-bottom: 8px; }
.pillar p { font-size: 13px; line-height: 1.7; color: var(--text-light); }

/* DATI SOCIETARI (testo discreto sotto il logo) */
.mission-legal {
  margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--gray-line);
  font-size: 11px; line-height: 2; color: #9aa0ac;
}
.mission-legal span { display: block; }
.mission-legal b { font-weight: 600; color: #7a8290; }
.mission-legal a { color: #8a90a0; text-decoration: none; }
.mission-legal a:hover { color: var(--blue); text-decoration: underline; }

/* NUMERI / STATISTICHE */
.stats-heading {
  text-align: center; padding: 55px 40px 0;
}
.stats-heading h2 {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 28px; font-weight: 700; color: var(--blue); line-height: 1.2;
}
.stats { background: var(--blue); padding: 40px 40px; margin-top: 30px; }
.stats-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(6,1fr); gap: 24px; text-align: center;
}
.stat-num {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 34px; font-weight: 700; color: #fff; line-height: 1;
}
.stat-label {
  font-size: 11px; color: rgba(255,255,255,.7); margin-top: 8px;
  text-transform: uppercase; letter-spacing: .06em; line-height: 1.4;
}

/* PROGETTI EUROPEI */
.projects-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.project-card {
  display: block; text-decoration: none;
  background: #fff; border: 1px solid var(--gray-line);
  border-left: 3px solid var(--blue); border-radius: 3px; padding: 20px 22px;
  transition: box-shadow .2s, transform .2s;
}
a.project-card:hover { box-shadow: 0 5px 22px rgba(28,62,143,0.1); transform: translateY(-2px); }
.project-card h3 { font-size: 14px; font-weight: 700; color: var(--blue); margin-bottom: 5px; }
.project-card p { font-size: 12px; line-height: 1.6; color: var(--text-light); }

/* SERVIZI */
.cards-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.card {
  background: #fff; border: 1px solid var(--gray-line);
  border-top: 3px solid var(--blue); border-radius: 3px; padding: 26px 22px;
  transition: box-shadow .2s, transform .2s;
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: 0 5px 22px rgba(28,62,143,0.1); transform: translateY(-2px); }
.card-icon {
  width: 42px; height: 42px; background: var(--blue-light); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.card-icon svg { width: 20px; height: 20px; stroke: var(--blue); fill: none; stroke-width: 1.8; }
.card h3 { font-size: 14px; font-weight: 700; color: var(--blue); margin-bottom: 8px; }
.card p { font-size: 13px; line-height: 1.7; color: var(--text-light); flex: 1; }
.card-link {
  display: inline-block; margin-top: 14px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--blue);
  text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s;
}
.card-link:hover { border-bottom-color: var(--blue); }

/* NEWS */
.news-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 18px; }
.news-card {
  background: #fff; border: 1px solid var(--gray-line); border-radius: 3px;
  overflow: hidden; transition: box-shadow .2s;
  display: flex; flex-direction: column;
}
.news-card:hover { box-shadow: 0 5px 22px rgba(28,62,143,0.1); }
.news-thumb {
  height: 170px; background: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; flex-shrink: 0;
}
.news-thumb-main { height: 210px; }
.news-thumb-cat {
  position: absolute; top: 0; left: 0;
  background: var(--blue); color: #fff;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  padding: 6px 12px;
}
.news-thumb svg { width: 60px; height: 60px; stroke: var(--blue); opacity: .2; fill: none; stroke-width: 1; }
.news-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.news-date { font-size: 10px; color: #aaa; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 7px; }
.news-card h3 { font-size: 14px; font-weight: 700; color: var(--blue); line-height: 1.45; margin-bottom: 8px; }
.news-card p { font-size: 13px; line-height: 1.65; color: var(--text-light); flex: 1; }
.news-more {
  display: inline-block; margin-top: 12px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--blue);
  text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s;
}
.news-more:hover { border-bottom-color: var(--blue); }

/* CONTATTI */
.contact-split { display: grid; grid-template-columns: 1fr 1.9fr; gap: 60px; align-items: start; }
.contact-info-block { margin-bottom: 22px; }
.contact-info-block h4 {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: var(--blue); margin-bottom: 6px; border-bottom: 1px solid var(--gray-line);
  padding-bottom: 5px;
}
.contact-info-block p { font-size: 13px; line-height: 1.7; color: var(--text-light); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text); margin-bottom: 4px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; border: 1px solid var(--gray-line); border-radius: 2px;
  padding: 8px 10px; font-family: 'Open Sans', sans-serif; font-size: 13px;
  color: var(--text); background: #fff; outline: none;
  transition: border-color .2s; -webkit-appearance: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 2px rgba(28,62,143,.06);
}
.form-group textarea { min-height: 95px; resize: vertical; }
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%231C3E8F'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 26px; cursor: pointer;
}
.req { color: var(--blue); }
.form-note { font-size: 11px; color: #aaa; line-height: 1.5; margin-top: 6px; }
.form-note a { color: var(--blue); }
#form-ok { display: none; font-size: 12px; color: #2a7a3a; margin-left: 14px; }

/* FOOTER */
footer { background: var(--blue-dark); color: rgba(255,255,255,.65); padding: 50px 40px 0; }
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px;
  padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-logo > img { height: 52px; margin-bottom: 12px; filter: brightness(0) invert(1); }
.footer-logo p { font-size: 12px; line-height: 1.7; color: rgba(255,255,255,.4); margin-bottom: 14px; }
.footer-logos { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.footer-logos img { height: 46px; background: #fff; padding: 6px 10px; border-radius: 4px; filter: none; }
.footer-social { display: flex; gap: 7px; }
.footer-social a {
  width: 28px; height: 28px; border: 1px solid rgba(255,255,255,.2); border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: rgba(255,255,255,.4); text-decoration: none;
  transition: border-color .2s, color .2s;
}
.footer-social a:hover { border-color: #fff; color: #fff; }
.footer-col h4 { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #fff; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 7px; }
.footer-col ul li a { font-size: 12px; color: rgba(255,255,255,.4); text-decoration: none; transition: color .2s; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; font-size: 11px; color: rgba(255,255,255,.22);
}
.footer-bottom a { color: rgba(255,255,255,.22); text-decoration: none; transition: color .2s; }
.footer-bottom a:hover { color: rgba(255,255,255,.5); }
.kina-credit { display: flex; align-items: center; gap: 6px; }
.kina-credit img { height: 13px; opacity: .3; filter: brightness(0) invert(1); }

/* PAGE SECTIONS (anchor targets, scroll offset) */
section, .hero { scroll-margin-top: 75px; }

/* MODAL / LIGHTBOX per le news */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.55); align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #fff; border-radius: 4px; max-width: 680px; width: 90%;
  max-height: 85vh; overflow-y: auto; padding: 40px; position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 20px; font-size: 22px; cursor: pointer;
  color: #aaa; background: none; border: none; transition: color .2s;
}
.modal-close:hover { color: var(--blue); }
.modal-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--blue); margin-bottom: 8px; }
.modal-box h2 { font-family: 'Roboto Condensed', sans-serif; font-size: 24px; font-weight: 700; color: var(--blue); margin-bottom: 14px; line-height: 1.3; }
.modal-date { font-size: 11px; color: #aaa; margin-bottom: 20px; }
.modal-box p { font-size: 14px; line-height: 1.85; color: var(--text-light); margin-bottom: 12px; }

/* RESPONSIVE */
@media (max-width: 960px) {
  .hero-top { grid-template-columns: 1fr; text-align: center; }
  .hero-logo-wrap { order: -1; }
  .hero-headline { text-align: center; }
  .hero-headline p { margin: 0 auto 22px; }
  .hero-featured-inner { grid-template-columns: 1fr; }
  .hero-news-img { display: none; }
  .mission-split { grid-template-columns: 1fr; }
  .mission-visual { display: block; background: none; box-shadow: none; padding: 24px 0 0; }
  .mission-visual img { display: none; }
  .mission-legal { border-top: none; padding-top: 0; margin-top: 0; text-align: center; }
  .pillars-grid { grid-template-columns: 1fr 1fr; }
  .stats-inner { grid-template-columns: repeat(3,1fr); row-gap: 30px; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .news-grid { grid-template-columns: 1fr 1fr; }
  .contact-split { grid-template-columns: 1fr; gap: 30px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  /* ── NAVBAR MOBILE ── */
  .navbar {
    padding: 0 16px;
    justify-content: space-between;
    height: 65px;
  }
  .nav-logo {
    flex: 0 0 auto;
  }
  .nav-logo img { height: 40px; }
  .hamburger {
    display: flex;
    margin-left: auto;
    flex-shrink: 0;
  }
  .nav-menu { display: none; }
  .nav-menu.open {
    display: flex; flex-direction: column;
    position: fixed;
    top: 65px; left: 0; right: 0;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
    padding: 8px 0; z-index: 998;
  }
  .nav-menu.open a {
    line-height: 1; padding: 13px 20px;
    border-bottom: 1px solid #f0f2f7;
  }
  .nav-menu.open .nav-cta { margin: 10px 20px; }

  /* ── HERO MOBILE ── */
  .hero { margin-top: 65px; }
  .hero-top {
    grid-template-columns: 1fr;
    padding: 24px 20px 16px;
    gap: 16px;
    text-align: center;
  }
  /* nasconde il logo verticale grande nella hero su mobile — il logo è già nella navbar */
  .hero-logo-wrap { display: none; }
  .hero-headline { text-align: center; }
  .hero-headline h1 { font-size: 26px; margin-bottom: 10px; }
  .hero-headline p { font-size: 14px; margin: 0 auto 18px; }

  /* ultima news su mobile: layout colonna */
  .hero-featured-inner { grid-template-columns: 1fr; }
  .hero-news-img { display: none; }
  .hero-news-content { padding: 20px; }
  .hero-news-content h2 { font-size: 17px; }

  /* ── SEZIONI ── */
  .section { padding: 40px 16px; }
  .section-title { font-size: 24px; }
  .mission-split { grid-template-columns: 1fr; }
  .mission-visual { display: block; background: none; box-shadow: none; padding: 24px 0 0; }
  .mission-visual img { display: none; }
  .mission-legal { border-top: none; padding-top: 0; margin-top: 0; text-align: center; }
  .pillars-grid { grid-template-columns: 1fr; }
  .stats { padding: 36px 16px; }
  .stats-inner { grid-template-columns: 1fr 1fr; row-gap: 26px; gap: 16px; }
  .projects-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .contact-split { grid-template-columns: 1fr; gap: 24px; }
  .form-row { grid-template-columns: 1fr; }

  /* ── FOOTER ── */
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
}

/* Validazione form */
.field-err {
  display: none;
  font-size: 11px;
  color: #c0392b;
  margin-top: 4px;
}
.field-err.show { display: block; }
.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
  border-color: #c0392b;
}

/* Privacy checkbox */
.privacy-block {
  margin-top: 6px;
  padding: 14px;
  background: var(--gray-bg);
  border: 1px solid var(--gray-line);
  border-radius: 3px;
}
.privacy-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}
.privacy-label input[type="checkbox"] {
  width: 16px; min-width: 16px; height: 16px;
  margin-top: 2px; cursor: pointer;
  accent-color: var(--blue);
}
.privacy-label a { color: var(--blue); font-weight: 600; }

/* ==========================================================
   2. AGGIUNTE WORDPRESS (news dinamiche, pagine interne)
   ========================================================== */

/* griglia news: si adatta al numero di articoli */
.news-grid.count-1 { grid-template-columns: 1fr; max-width: 780px; }
.news-grid.count-2 { grid-template-columns: 1fr 1fr; }
.news-thumb img, .hero-news-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-thumb.no-image { background: var(--blue-light); }
.news-thumb.no-image svg { width: 60px; height: 60px; stroke: var(--blue); opacity: .25; fill: none; stroke-width: 1; }
.news-card a.news-title { color: inherit; text-decoration: none; }
.news-card a.news-title:hover { color: var(--blue); }

/* pagina singola news / pagine interne */
.page-hero {
  margin-top: 75px; background: var(--blue); color: #fff;
  padding: 60px 40px 48px;
}
.page-hero-inner { max-width: 900px; margin: 0 auto; }
.page-hero .modal-tag { color: rgba(255,255,255,.6); }
.page-hero h1 {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 34px; font-weight: 700; line-height: 1.25; margin-bottom: 12px;
}
.page-hero .page-meta { font-size: 12px; color: rgba(255,255,255,.65); }
.entry-content { max-width: 900px; margin: 0 auto; padding: 50px 40px 70px; }
.entry-content p, .entry-content li { font-size: 15px; line-height: 1.85; color: var(--text); margin-bottom: 16px; }
.entry-content h2, .entry-content h3 { font-family: 'Roboto Condensed', sans-serif; color: var(--blue); margin: 28px 0 12px; line-height: 1.25; }
.entry-content h2 { font-size: 26px; } .entry-content h3 { font-size: 20px; }
.entry-content ul, .entry-content ol { padding-left: 22px; margin-bottom: 16px; }
.entry-content img { max-width: 100%; height: auto; border-radius: 4px; }
.entry-content a { color: var(--blue); }
.entry-content blockquote { border-left: 3px solid var(--blue); padding-left: 18px; color: var(--text-light); margin: 20px 0; }
.entry-featured { max-width: 900px; margin: -30px auto 0; padding: 0 40px; }
.entry-featured img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 6px; box-shadow: 0 8px 30px rgba(28,62,143,.15); }
.back-link { display: inline-block; margin-top: 30px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--blue); text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.archive-list { max-width: 1100px; margin: 0 auto; padding: 50px 40px 70px; }

/* allineamenti standard WordPress */
.alignleft { float: left; margin: 0 20px 12px 0; }
.alignright { float: right; margin: 0 0 12px 20px; }
.aligncenter { display: block; margin: 0 auto 16px; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; color: var(--text-light); text-align: center; margin-top: 6px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* navbar: voce attiva impostata via JS + link nel menu WP */
.nav-menu a.active { color: var(--blue); border-bottom-color: var(--blue); }

@media (max-width: 620px) {
  .page-hero { margin-top: 65px; padding: 36px 16px 30px; }
  .page-hero h1 { font-size: 24px; }
  .entry-content, .archive-list, .entry-featured { padding-left: 16px; padding-right: 16px; }
  .news-grid.count-2 { grid-template-columns: 1fr; }
}

/* barra admin di WordPress (visibile solo da loggati): sposta la navbar sotto di essa */
body.admin-bar .navbar { top: 32px; }
@media (max-width: 782px) { body.admin-bar .navbar { top: 46px; } }

/* ==========================================================
   3. ADATTAMENTO AL MARKUP DEI BLOCCHI (home modificabile nell'editor)
   ========================================================== */
.wp-block-group[id] { scroll-margin-top: 75px; }
.wp-block-image { margin: 0; }
.hero-headline .hero-slogan { font-size: 20px; color: var(--text-light); margin: 0 0 14px; line-height: 1.3; max-width: none; }
.hero-headline h1 { margin-bottom: 8px; }

/* blocco Pulsanti = stile .btn del design */
.wp-block-button__link, .wp-element-button {
  display: inline-block; padding: 10px 26px; background: var(--blue); color: #fff;
  font-family: 'Open Sans', sans-serif; font-size: 12px; font-weight: 700; line-height: 1.4;
  text-transform: uppercase; letter-spacing: .06em; text-decoration: none;
  border-radius: 3px; border: 2px solid var(--blue); transition: background .2s, color .2s;
}
.wp-block-button__link:hover, .wp-element-button:hover { background: transparent; color: var(--blue); }
.mission-text .wp-block-buttons { margin-top: 18px; }

.mission-legal p { display: block; margin: 0; }
.mission-legal strong { font-weight: 600; color: #7a8290; }
.stats-inner > .wp-block-group { text-align: center; }

.project-card h3 a { color: var(--blue); text-decoration: none; }
.project-card:hover { box-shadow: 0 5px 22px rgba(28,62,143,0.1); transform: translateY(-2px); }

.card p.card-link { flex: 0 0 auto; margin-top: 14px; }
.card-link a {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--blue); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s;
}
.card-link a:hover { border-bottom-color: var(--blue); }

/* icone dei 6 servizi (via CSS, cosi' il cliente non deve gestirle) */
.card::before {
  content: ''; display: block; width: 42px; height: 42px; border-radius: 50%;
  background-color: var(--blue-light); background-repeat: no-repeat; background-position: center;
  background-size: 20px 20px; margin-bottom: 14px;
}
.card.icon-1::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C3E8F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='22 12 18 12 15 21 9 3 6 12 2 12'/%3E%3C/svg%3E"); }
.card.icon-2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C3E8F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='16' rx='2'/%3E%3Crect x='9' y='9' width='6' height='6'/%3E%3Cpath d='M9 1v3M15 1v3M9 20v3M15 20v3M20 9h3M20 14h3M1 9h3M1 14h3'/%3E%3C/svg%3E"); }
.card.icon-3::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C3E8F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E"); }
.card.icon-4::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C3E8F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E"); }
.card.icon-5::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C3E8F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 2h6M10 2v6.3a2 2 0 0 1-.3 1L5 18a2 2 0 0 0 1.7 3h10.6a2 2 0 0 0 1.7-3l-4.7-8.7a2 2 0 0 1-.3-1V2'/%3E%3C/svg%3E"); }
.card.icon-6::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C3E8F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.07 4.93a10 10 0 0 1 0 14.14M4.93 4.93a10 10 0 0 0 0 14.14'/%3E%3C/svg%3E"); }

.contact-info-block p a { color: var(--text-light); text-decoration: none; }
.contact-info-block:last-child p { font-size: 12px; }

/* ==========================================================
   4. STILI PRONTI PER ELEMENTOR (Avanzate > Classi CSS sul Container)
   ========================================================== */
.elementor-element.dih-card { background: #fff; border: 1px solid var(--gray-line); border-top: 3px solid var(--blue); border-radius: 3px; padding: 26px 22px; transition: box-shadow .2s, transform .2s; }
.elementor-element.dih-card:hover { box-shadow: 0 5px 22px rgba(28,62,143,.1); transform: translateY(-2px); }
.elementor-element.dih-project { background: #fff; border: 1px solid var(--gray-line); border-left: 3px solid var(--blue); border-radius: 3px; padding: 20px 22px; }
.elementor-element.dih-logo-box { background: #fff; border-radius: 8px; padding: 40px; box-shadow: 0 4px 24px rgba(28,62,143,.13); }
.elementor-element[id] { scroll-margin-top: 75px; }
