/*
Theme Name: Addolcitori Italia
Theme URI: https://addolcitoriitalia.it/
Author: Addolcitori Italia
Description: Tema editoriale proprietario per il portale Addolcitori Italia.
Version: 1.1.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: addolcitori-italia
*/

:root {
  --ai-navy: #0b2942;
  --ai-blue: #0b5f8a;
  --ai-aqua: #00a7a0;
  --ai-aqua-dark: #007c78;
  --ai-mint: #e8f7f5;
  --ai-sky: #edf6fb;
  --ai-sand: #f6f2e9;
  --ai-ink: #172733;
  --ai-muted: #5b6c78;
  --ai-line: #d8e4e9;
  --ai-white: #ffffff;
  --ai-warning: #a24f19;
  --ai-radius: 18px;
  --ai-radius-sm: 10px;
  --ai-shadow: 0 18px 50px rgba(11, 41, 66, .10);
  --ai-container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ai-ink);
  background: #fbfdfe;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ai-blue); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--ai-aqua-dark); }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid #ffb84d; outline-offset: 3px; }

.ai-container { width: min(calc(100% - 40px), var(--ai-container)); margin-inline: auto; }
.ai-narrow { width: min(calc(100% - 40px), 820px); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.skip-link:focus { clip: auto; width: auto; height: auto; margin: 12px; padding: 10px 14px; z-index: 9999; background: #fff; color: #000; }

.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--ai-line); backdrop-filter: blur(14px); }
.admin-bar .site-header { top: 32px; }
.header-inner { min-height: 82px; display: flex; align-items: center; gap: 28px; }
.site-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ai-navy); text-decoration: none; font-weight: 850; letter-spacing: -.035em; white-space: nowrap; }
.site-brand svg { width: 40px; height: 40px; flex: 0 0 40px; }
.site-brand span { font-size: 1.17rem; }
.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; align-items: center; gap: 22px; margin: 0; padding: 0; list-style: none; }
.primary-nav a { color: var(--ai-ink); font-size: .88rem; font-weight: 720; text-decoration: none; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { color: var(--ai-aqua-dark); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-search, .nav-business, .menu-toggle { border: 1px solid var(--ai-line); background: #fff; color: var(--ai-navy); border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 760; }
.nav-search { width: 44px; }
.nav-business { padding: 0 17px; border-color: var(--ai-navy); }
.nav-business:hover { color: #fff; background: var(--ai-navy); }
.menu-toggle { display: none; width: 44px; cursor: pointer; }

.ai-hero { position: relative; overflow: hidden; padding: clamp(72px, 9vw, 126px) 0 88px; background: linear-gradient(135deg, #eef9fb 0%, #f8fbfd 48%, #e8f7f5 100%); }
.ai-hero::before, .ai-hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.ai-hero::before { width: 420px; height: 420px; right: -130px; top: -130px; background: radial-gradient(circle, rgba(0,167,160,.22), rgba(0,167,160,0) 68%); }
.ai-hero::after { width: 360px; height: 360px; left: -180px; bottom: -220px; background: radial-gradient(circle, rgba(11,95,138,.15), rgba(11,95,138,0) 70%); }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr); gap: clamp(36px, 7vw, 88px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 18px; color: var(--ai-aqua-dark); font-size: .79rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 25px; height: 3px; border-radius: 9px; background: var(--ai-aqua); }
.ai-hero h1 { max-width: 760px; margin: 0 0 22px; color: var(--ai-navy); font-size: clamp(2.55rem, 5.9vw, 5.1rem); line-height: .99; letter-spacing: -.058em; }
.ai-hero .lead { max-width: 680px; margin: 0 0 30px; color: #385161; font-size: clamp(1.06rem, 1.7vw, 1.28rem); line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button, .wp-element-button, input[type="submit"] { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--ai-aqua-dark); color: #fff; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover, .wp-element-button:hover, input[type="submit"]:hover { color: #fff; background: var(--ai-navy); transform: translateY(-2px); box-shadow: 0 12px 24px rgba(11,41,66,.16); }
.button-secondary { color: var(--ai-navy); background: #fff; border: 1px solid var(--ai-line); }
.hero-visual { position: relative; min-height: 440px; display: grid; place-items: center; }
.hero-orbit { width: min(100%, 440px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.7); border: 1px solid rgba(11,95,138,.12); box-shadow: var(--ai-shadow); }
.hero-orbit svg { width: 72%; height: 72%; }
.hero-note { position: absolute; max-width: 225px; padding: 15px 17px; border: 1px solid rgba(11,95,138,.13); border-radius: 14px; background: rgba(255,255,255,.96); box-shadow: 0 12px 32px rgba(11,41,66,.12); font-size: .84rem; line-height: 1.42; }
.hero-note strong { display: block; color: var(--ai-navy); }
.hero-note.one { top: 7%; left: -2%; }
.hero-note.two { right: -1%; bottom: 9%; }

.trust-strip { margin-top: -30px; position: relative; z-index: 2; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--ai-line); border-radius: var(--ai-radius); overflow: hidden; background: #fff; box-shadow: var(--ai-shadow); }
.trust-item { padding: 23px; border-right: 1px solid var(--ai-line); }
.trust-item:last-child { border: 0; }
.trust-item strong { display: block; color: var(--ai-navy); font-size: .95rem; }
.trust-item span { color: var(--ai-muted); font-size: .82rem; }

.section { padding: clamp(70px, 9vw, 112px) 0; }
.section-soft { background: var(--ai-sky); }
.section-mint { background: var(--ai-mint); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 34px; }
.section-heading h2 { max-width: 760px; margin: 0; color: var(--ai-navy); font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.08; letter-spacing: -.045em; }
.section-heading p { max-width: 520px; margin: 0; color: var(--ai-muted); }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.topic-card, .article-card, .business-card { position: relative; display: flex; flex-direction: column; min-height: 100%; padding: 27px; border: 1px solid var(--ai-line); border-radius: var(--ai-radius); background: #fff; box-shadow: 0 8px 26px rgba(11,41,66,.055); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.topic-card:hover, .article-card:hover, .business-card:hover { transform: translateY(-4px); border-color: rgba(0,167,160,.48); box-shadow: var(--ai-shadow); }
.card-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 14px; color: var(--ai-aqua-dark); background: var(--ai-mint); }
.card-icon svg { width: 25px; height: 25px; }
.topic-card h3, .article-card h2, .article-card h3 { margin: 0 0 10px; color: var(--ai-navy); font-size: 1.22rem; line-height: 1.25; letter-spacing: -.025em; }
.topic-card p, .article-card p { margin: 0 0 20px; color: var(--ai-muted); font-size: .94rem; }
.card-link { margin-top: auto; color: var(--ai-aqua-dark); font-weight: 790; text-decoration: none; }
.card-link::after { content: " →"; }

.pathway { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: path; }
.path-step { counter-increment: path; padding: 22px 18px; border-radius: 14px; background: #fff; border: 1px solid var(--ai-line); }
.path-step::before { content: counter(path, decimal-leading-zero); display: block; margin-bottom: 22px; color: var(--ai-aqua-dark); font-weight: 900; font-size: .78rem; letter-spacing: .08em; }
.path-step strong { display: block; color: var(--ai-navy); font-size: .98rem; line-height: 1.3; }

.page-hero { padding: clamp(56px, 8vw, 92px) 0 46px; background: linear-gradient(135deg, #eef9fb, #fff); border-bottom: 1px solid var(--ai-line); }
.breadcrumbs { margin: 0 0 20px; color: var(--ai-muted); font-size: .79rem; }
.breadcrumbs a { color: var(--ai-muted); text-decoration: none; }
.breadcrumbs span { margin: 0 6px; }
.page-hero h1 { max-width: 900px; margin: 0 0 20px; color: var(--ai-navy); font-size: clamp(2.25rem, 5vw, 4.35rem); line-height: 1.04; letter-spacing: -.052em; }
.page-hero .excerpt { max-width: 780px; margin: 0; color: #445b69; font-size: 1.1rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 23px; color: var(--ai-muted); font-size: .82rem; }

.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 64px; align-items: start; padding: 58px 0 96px; }
.article-content { min-width: 0; }
.article-content > * { max-width: 780px; }
.article-content > .alignwide { max-width: 980px; }
.article-content h2 { margin: 2.3em 0 .65em; color: var(--ai-navy); font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1.18; letter-spacing: -.035em; }
.article-content h3 { margin: 1.8em 0 .55em; color: var(--ai-navy); font-size: 1.28rem; line-height: 1.28; }
.article-content p, .article-content li { color: #263d4b; }
.article-content strong { color: #102f43; font-weight: 820; }
.article-content ul, .article-content ol { padding-left: 1.25em; }
.article-content li + li { margin-top: .45em; }
.article-content blockquote { margin: 28px 0; padding: 22px 25px; border-left: 4px solid var(--ai-aqua); background: var(--ai-mint); border-radius: 0 var(--ai-radius-sm) var(--ai-radius-sm) 0; }
.article-content figure { margin: 34px 0; }
.article-content figcaption { margin-top: 10px; color: var(--ai-muted); font-size: .8rem; line-height: 1.45; }
.aic-content-visual { overflow: hidden; border: 1px solid var(--ai-line); border-radius: var(--ai-radius); background: var(--ai-sky); box-shadow: var(--ai-shadow); }
.aic-content-visual img { display: block; width: 100%; height: auto; }
.aic-content-visual figcaption { margin: 0; padding: 11px 16px; background: #fff; }
.article-content table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 30px 0; border: 1px solid var(--ai-line); border-radius: 14px; overflow: hidden; font-size: .9rem; }
.article-content th, .article-content td { padding: 14px 16px; border-bottom: 1px solid var(--ai-line); text-align: left; vertical-align: top; }
.article-content th { color: var(--ai-navy); background: var(--ai-sky); }
.article-content tr:last-child td { border-bottom: 0; }

.table-scroll { max-width: 980px; overflow-x: auto; margin: 30px 0; border-radius: 14px; -webkit-overflow-scrolling: touch; }
.table-scroll table { min-width: 720px; margin: 0; }
.verified-data-table td:first-child { color: var(--ai-navy); white-space: nowrap; }
.evidence-note, .myth-verdict {
  max-width: 780px;
  margin: 24px 0;
  padding: 18px 21px;
  border: 1px solid #b9e5e1;
  border-left: 5px solid var(--ai-aqua-dark);
  border-radius: 12px;
  background: var(--ai-mint);
}
.evidence-note p:last-child, .myth-verdict p:last-child { margin-bottom: 0; }
.myth-verdict { border-color: #d5e2e8; border-left-color: var(--ai-blue); background: var(--ai-sky); }
.installation-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 980px; margin: 30px 0; }
.installation-flow > * { padding: 18px; border: 1px solid var(--ai-line); border-radius: 12px; background: #fff; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 780px; margin: 30px 0; }
.check-grid section { padding: 21px; border: 1px solid var(--ai-line); border-radius: 14px; background: #fff; }
.check-grid h3 { margin-top: 0; }

.key-takeaways, .source-box, .article-cta, .cross-project-note {
  max-width: 780px;
  margin: 30px 0;
  padding: 24px 26px;
  border: 1px solid var(--ai-line);
  border-radius: var(--ai-radius);
  background: #fff;
}
.key-takeaways { border-color: #b9e5e1; background: var(--ai-mint); }
.source-box { color: var(--ai-muted); background: #f7fafb; font-size: .9rem; }
.article-cta { color: #fff; border: 0; background: linear-gradient(135deg, var(--ai-navy), #125d78); box-shadow: var(--ai-shadow); }
.article-cta strong, .article-cta a { color: #fff; }
.article-cta .button { background: var(--ai-aqua-dark); }
.cross-project-note { border-left: 5px solid var(--ai-aqua); background: var(--ai-sky); }
.key-takeaways h2, .source-box h2, .article-cta h2, .cross-project-note h2 { margin-top: 0; }
.hub-directory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 980px; margin: 30px 0; }
.hub-directory section { padding: 22px; border: 1px solid var(--ai-line); border-radius: 14px; background: #fff; box-shadow: 0 7px 22px rgba(11,41,66,.05); }
.hub-directory h3 { margin-top: 0; }
.hub-directory p { margin-bottom: 0; font-size: .94rem; }

.quick-answer, .info-box, .warning-box, .disclosure-box { margin: 28px 0; padding: 23px 25px; border-radius: 14px; }
.quick-answer { background: var(--ai-navy); color: #fff; }
.quick-answer strong, .quick-answer h2, .quick-answer h3 { color: #fff; }
.quick-answer p:last-child, .info-box p:last-child, .warning-box p:last-child { margin-bottom: 0; }
.info-box { border: 1px solid #b9e5e1; background: var(--ai-mint); }
.warning-box { border: 1px solid #efd1b8; background: #fff7ef; }
.disclosure-box { border: 1px dashed #b6c6cf; color: var(--ai-muted); background: #f8fafb; font-size: .84rem; }
.next-step { margin-top: 45px; padding: 29px; border-radius: var(--ai-radius); background: linear-gradient(135deg, var(--ai-navy), #124c6e); color: #fff; }
.next-step h2, .next-step h3 { margin-top: 0; color: #fff; }
.next-step a { color: #fff; font-weight: 800; }

.article-sidebar { position: sticky; top: 112px; }
.sidebar-box { padding: 22px; border: 1px solid var(--ai-line); border-radius: 14px; background: #fff; }
.sidebar-box + .sidebar-box { margin-top: 18px; }
.sidebar-box h2, .sidebar-box h3 { margin: 0 0 12px; color: var(--ai-navy); font-size: .98rem; }
.sidebar-box ul { margin: 0; padding: 0; list-style: none; }
.sidebar-box li + li { margin-top: 9px; }
.sidebar-box a { font-size: .86rem; line-height: 1.35; text-decoration: none; }

.featured-media { width: min(calc(100% - 40px), 1080px); margin: -22px auto 0; position: relative; z-index: 2; }
.featured-media img { width: 100%; aspect-ratio: 1200/630; object-fit: cover; border-radius: var(--ai-radius); box-shadow: var(--ai-shadow); }

.archive-header { padding: 64px 0 42px; }
.archive-header h1 { margin: 0 0 12px; color: var(--ai-navy); font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: -.05em; }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding-bottom: 90px; }
.article-card { padding: 0; overflow: hidden; }
.article-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.article-card-content { display: flex; flex: 1; flex-direction: column; padding: 23px; }
.article-card .meta { margin-bottom: 9px; color: var(--ai-muted); font-size: .75rem; }

.site-footer { color: #d9e7ef; background: var(--ai-navy); }
.footer-main { display: grid; grid-template-columns: 1.25fr repeat(3, 1fr); gap: 45px; padding: 68px 0 46px; }
.footer-main h2, .footer-main h3 { margin: 0 0 15px; color: #fff; font-size: .98rem; }
.footer-main p { color: #b8ccd8; font-size: .88rem; }
.footer-main ul { margin: 0; padding: 0; list-style: none; }
.footer-main li + li { margin-top: 8px; }
.footer-main a { color: #d9e7ef; font-size: .86rem; text-decoration: none; }
.footer-main a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; gap: 25px; padding: 20px 0 28px; border-top: 1px solid rgba(255,255,255,.12); color: #9db7c7; font-size: .76rem; }

.coming-soon { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 80% 0, rgba(0,167,160,.25), transparent 38%), linear-gradient(145deg, #061f33, #0b3f5e); color: #fff; }
.coming-card { width: min(100%, 760px); padding: clamp(34px, 7vw, 70px); border: 1px solid rgba(255,255,255,.16); border-radius: 28px; background: rgba(255,255,255,.08); box-shadow: 0 35px 90px rgba(0,0,0,.24); backdrop-filter: blur(18px); }
.coming-card .site-brand { color: #fff; }
.coming-card h1 { margin: 55px 0 20px; font-size: clamp(2.45rem, 7vw, 5.25rem); line-height: 1; letter-spacing: -.055em; }
.coming-card p { max-width: 600px; color: #cce0ea; font-size: 1.08rem; }
.coming-status { display: inline-flex; align-items: center; gap: 9px; margin-top: 30px; padding: 10px 14px; border-radius: 999px; background: rgba(255,255,255,.1); font-size: .8rem; }
.coming-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #55dfb9; box-shadow: 0 0 0 6px rgba(85,223,185,.12); }

.pagination { display: flex; gap: 8px; justify-content: center; margin: 45px 0; }
.pagination .page-numbers { min-width: 42px; min-height: 42px; display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--ai-line); border-radius: 999px; text-decoration: none; }
.pagination .current { color: #fff; border-color: var(--ai-navy); background: var(--ai-navy); }

@media (max-width: 1020px) {
  .primary-nav { display: none; position: absolute; inset: 82px 20px auto; padding: 18px; border: 1px solid var(--ai-line); border-radius: 16px; background: #fff; box-shadow: var(--ai-shadow); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: grid; gap: 4px; }
  .primary-nav a { display: block; padding: 10px; }
  .menu-toggle { display: inline-flex; }
  .header-actions { margin-left: auto; }
  .nav-business { display: none; }
  .hero-grid, .content-layout { grid-template-columns: 1fr; }
  .hero-visual { min-height: 380px; }
  .article-sidebar { position: static; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-item:nth-child(2) { border-right: 0; }
  .trust-item:nth-child(-n+2) { border-bottom: 1px solid var(--ai-line); }
  .card-grid, .archive-grid { grid-template-columns: repeat(2, 1fr); }
  .pathway { grid-template-columns: repeat(3, 1fr); }
  .footer-main { grid-template-columns: 1.2fr 1fr 1fr; }
  .footer-main > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .ai-container, .ai-narrow { width: min(calc(100% - 28px), var(--ai-container)); }
  .admin-bar .site-header { top: 46px; }
  .header-inner { min-height: 70px; gap: 10px; }
  .site-brand span { font-size: 1rem; }
  .site-brand svg { width: 34px; height: 34px; flex-basis: 34px; }
  .primary-nav { inset: 70px 14px auto; }
  .nav-search { display: none; }
  .ai-hero { padding-top: 58px; }
  .hero-grid { gap: 32px; }
  .hero-visual { min-height: 310px; }
  .hero-note { max-width: 180px; font-size: .75rem; }
  .trust-grid, .card-grid, .archive-grid, .pathway, .footer-main { grid-template-columns: 1fr; }
  .trust-item { border-right: 0; border-bottom: 1px solid var(--ai-line); }
  .trust-item:last-child { border-bottom: 0; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 15px; }
  .article-content table { display: block; overflow-x: auto; white-space: nowrap; }
  .footer-main { gap: 30px; }
  .footer-main > div:first-child { grid-column: auto; }
  .footer-bottom { display: block; }
  .hub-directory { grid-template-columns: 1fr; }
  .installation-flow, .check-grid { grid-template-columns: 1fr; }
}
