/*
Theme Name: Voce Finanza
Theme URI: https://example.com/voce-finanza
Author: Smart Italy Communications
Description: Tema editoriale WordPress per magazine finanziari, con homepage configurabile, pubblicita, ricerca, box autore e navigazione infinita tra articoli.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: voce-finanza
*/

:root {
  --vf-blue: #004ab5;
  --vf-blue-dark: #061742;
  --vf-cyan: #029ca3;
  --vf-cyan-soft: #e8f7f7;
  --vf-border: #d8dfec;
  --vf-text: #071436;
  --vf-muted: #536079;
  --vf-bg: #ffffff;
  --vf-soft: #f5f8fc;
  --vf-radius: 6px;
  --vf-shadow: 0 12px 30px rgba(7, 20, 54, .09);
  --vf-max: 1480px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--vf-bg);
  color: var(--vf-text);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--vf-blue);
}

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

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.vf-container {
  width: min(calc(100% - 48px), var(--vf-max));
  margin-inline: auto;
}

.vf-site-header {
  padding: 34px 0 28px;
  border-bottom: 1px solid rgba(216, 223, 236, .75);
  background: rgba(255, 255, 255, .96);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}

.vf-header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 30px;
}

.vf-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  font-size: clamp(32px, 4vw, 54px);
  text-transform: uppercase;
}

.vf-logo span:first-child { color: var(--vf-blue); }
.vf-logo span:last-child { color: var(--vf-cyan); }

.vf-logo img,
.vf-logo-image,
.custom-logo {
  width: auto;
  max-width: min(340px, 42vw);
  max-height: 58px;
  object-fit: contain;
}

.vf-main-nav ul,
.vf-social-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.vf-main-nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(18px, 2.2vw, 42px);
}

.vf-main-nav a {
  color: var(--vf-blue-dark);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.vf-main-nav .current-menu-item > a,
.vf-main-nav a:hover {
  color: var(--vf-blue);
}

.vf-video-link {
  background: var(--vf-blue);
  color: #fff !important;
  padding: 10px 16px;
  border-radius: 4px;
}

.vf-header-tools {
  display: flex;
  align-items: center;
  gap: 16px;
}

.vf-search-toggle,
.vf-menu-toggle {
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--vf-blue-dark);
  padding: 6px;
  cursor: pointer;
}

.vf-search-toggle svg,
.vf-menu-toggle svg { width: 28px; height: 28px; }

.vf-social-list {
  display: flex;
  align-items: center;
  gap: 11px;
}

.vf-social-list a {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 5px;
  color: #fff;
}

.vf-social-list svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.vf-social-youtube { background: #ff0000; }
.vf-social-instagram { background: linear-gradient(135deg, #f9ce34, #ee2a7b, #6228d7); }
.vf-social-linkedin { background: #0a66c2; }

.vf-search-panel {
  display: none;
  padding-top: 22px;
}

.vf-search-panel.is-open { display: block; }

.vf-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  max-width: 760px;
  margin-left: auto;
}

.vf-search-form input[type="search"] {
  width: 100%;
  border: 1px solid var(--vf-border);
  border-radius: var(--vf-radius);
  padding: 14px 16px;
  font: inherit;
}

.vf-button,
.vf-search-form button,
.vf-load-more {
  border: 0;
  border-radius: var(--vf-radius);
  background: var(--vf-blue);
  color: #fff;
  padding: 13px 18px;
  font-weight: 800;
  cursor: pointer;
}

.vf-main {
  padding: 26px 0 56px;
}

.vf-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(390px, .95fr);
  gap: 24px;
}

.vf-hero-card {
  min-height: 370px;
  border-radius: var(--vf-radius);
  overflow: hidden;
  position: relative;
  color: #fff;
  background: var(--vf-blue-dark);
  box-shadow: var(--vf-shadow);
}

.vf-hero-card img {
  width: 100%;
  height: 100%;
  min-height: 370px;
  object-fit: cover;
}

.vf-hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 12, 35, .82), rgba(2, 12, 35, .06) 68%);
}

.vf-hero-content {
  position: absolute;
  z-index: 1;
  inset: auto 28px 24px;
  max-width: 720px;
}

.vf-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  background: var(--vf-blue);
  color: #fff;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.vf-label.is-cyan { background: var(--vf-cyan); }

.vf-hero-title {
  margin: 14px 0 10px;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.12;
  letter-spacing: 0;
}

.vf-hero-excerpt {
  max-width: 780px;
  margin: 0 0 16px;
  font-size: clamp(17px, 1.45vw, 22px);
}

.vf-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: inherit;
  font-size: 14px;
}

.vf-meta a { font-weight: 700; }

.vf-side-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.vf-featured-row {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(180px, .74fr);
  min-height: 178px;
  border-radius: var(--vf-radius);
  border: 1px solid var(--vf-border);
  overflow: hidden;
  background: #fff;
}

.vf-featured-row:nth-child(even) {
  grid-template-columns: minmax(0, .72fr) minmax(180px, .74fr);
}

.vf-featured-row img {
  width: 100%;
  height: 100%;
  min-height: 178px;
  object-fit: cover;
}

.vf-featured-copy {
  padding: 18px 18px 14px;
}

.vf-featured-copy h2,
.vf-card h3,
.vf-list-card h3 {
  margin: 8px 0;
  line-height: 1.18;
  letter-spacing: 0;
}

.vf-featured-copy h2 { font-size: 21px; }
.vf-featured-copy p { margin: 0 0 10px; color: var(--vf-blue-dark); }

.vf-topic-rail {
  margin-top: 16px;
  border: 1px solid var(--vf-border);
  border-radius: var(--vf-radius);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
}

.vf-topic-card {
  padding: 16px 14px 18px;
  border-right: 1px solid var(--vf-border);
}

.vf-topic-card:last-child { border-right: 0; }

.vf-topic-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--vf-blue);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.vf-topic-heading svg {
  width: 28px;
  height: 28px;
  color: currentColor;
}

.vf-topic-card:nth-child(2n) .vf-topic-heading { color: var(--vf-cyan); }

.vf-topic-card img {
  width: 100%;
  aspect-ratio: 16 / 7.5;
  object-fit: cover;
  border-radius: 4px;
  background: var(--vf-soft);
}

.vf-topic-card h3 {
  font-size: 16px;
  margin: 9px 0 5px;
  line-height: 1.25;
}

.vf-section {
  margin-top: 28px;
}

.vf-section-title {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 18px;
  color: var(--vf-blue);
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
}

.vf-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #9fb4d4;
}

.vf-list-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.vf-list-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding-right: 24px;
  border-right: 1px solid var(--vf-border);
}

.vf-list-card:last-child { border-right: 0; }

.vf-list-card img {
  width: 96px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--vf-soft);
}

.vf-list-card h3 {
  font-size: 16px;
  margin-top: 0;
}

.vf-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.vf-card {
  border: 1px solid var(--vf-border);
  border-radius: var(--vf-radius);
  overflow: hidden;
  background: #fff;
}

.vf-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--vf-soft);
}

.vf-placeholder {
  width: 100%;
  min-height: 180px;
  background:
    linear-gradient(135deg, rgba(0, 74, 181, .18), rgba(2, 156, 163, .16)),
    var(--vf-soft);
}

.vf-card-body { padding: 16px; }
.vf-card h3 { font-size: 22px; }
.vf-card p { margin: 0 0 12px; color: var(--vf-muted); }

.vf-archive-header {
  padding: 28px 0 8px;
}

.vf-archive-header h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 50px);
}

.vf-pagination,
.vf-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.vf-ad {
  display: grid;
  place-items: center;
  margin: 24px auto;
  width: 100%;
  color: var(--vf-muted);
  background: repeating-linear-gradient(45deg, #f2f5fa, #f2f5fa 8px, #e9eef7 8px, #e9eef7 16px);
  border: 1px solid var(--vf-border);
  border-radius: var(--vf-radius);
  overflow: hidden;
  text-align: center;
}

.vf-ad > * { max-width: 100%; }
.vf-ad-empty { min-height: 90px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.vf-ad-leaderboard { max-width: 728px; min-height: 90px; }
.vf-ad-billboard { max-width: 970px; min-height: 250px; }
.vf-ad-mrec { max-width: 300px; min-height: 250px; }
.vf-ad-inarticle { max-width: 336px; min-height: 280px; }

.vf-single-wrap {
  display: grid;
  grid-template-columns: minmax(0, 840px) 320px;
  gap: 48px;
  align-items: start;
}

.vf-single-article {
  border-bottom: 1px solid var(--vf-border);
  padding-bottom: 34px;
  margin-bottom: 34px;
}

.vf-single-header h1 {
  margin: 10px 0 14px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.06;
}

.vf-single-excerpt {
  margin: 0 0 18px;
  color: var(--vf-muted);
  font-size: 22px;
}

.vf-single-image {
  margin: 24px 0;
  border-radius: var(--vf-radius);
  overflow: hidden;
}

.vf-single-content {
  font-size: 19px;
}

.vf-single-content a {
  color: var(--vf-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.vf-single-content p,
.vf-single-content ul,
.vf-single-content ol,
.vf-single-content blockquote {
  margin: 0 0 1.25em;
}

.vf-single-content h2,
.vf-single-content h3 {
  margin: 1.5em 0 .55em;
  line-height: 1.12;
}

.vf-post-tax {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
}

.vf-post-tax a {
  border: 1px solid var(--vf-border);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--vf-blue-dark);
  font-size: 14px;
  font-weight: 800;
}

.vf-author-box {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--vf-border);
  border-radius: var(--vf-radius);
  background: var(--vf-soft);
}

.vf-author-box img {
  border-radius: 50%;
}

.vf-author-box h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.vf-author-box p { margin: 0 0 10px; color: var(--vf-muted); }
.vf-author-link { color: var(--vf-blue); font-weight: 900; }

.vf-sidebar {
  position: sticky;
  top: 134px;
}

.vf-next-post {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid var(--vf-border);
  border-radius: var(--vf-radius);
}

.vf-site-footer {
  padding: 36px 0;
  border-top: 1px solid var(--vf-border);
  background: var(--vf-soft);
}

.vf-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--vf-muted);
}

.vf-menu-toggle { display: none; }

@media (max-width: 1180px) {
  .vf-header-inner { grid-template-columns: auto auto; justify-content: space-between; }
  .vf-main-nav {
    display: none;
    grid-column: 1 / -1;
  }
  .vf-main-nav.is-open { display: block; }
  .vf-main-nav ul { flex-wrap: wrap; justify-content: flex-start; }
  .vf-menu-toggle { display: inline-grid; }
  .vf-home-grid,
  .vf-single-wrap { grid-template-columns: 1fr; }
  .vf-topic-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vf-list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vf-sidebar { position: static; }
}

@media (max-width: 760px) {
  .vf-container { width: min(calc(100% - 28px), var(--vf-max)); }
  .vf-site-header { padding: 22px 0 18px; }
  .vf-header-inner { gap: 14px; }
  .vf-logo { font-size: 34px; }
  .vf-logo img,
  .vf-logo-image,
  .custom-logo { max-height: 46px; max-width: min(280px, 58vw); }
  .vf-social-list { display: none; }
  .vf-search-form { grid-template-columns: 1fr; }
  .vf-hero-card,
  .vf-hero-card img { min-height: 360px; }
  .vf-hero-content { inset: auto 18px 20px; }
  .vf-featured-row { grid-template-columns: 1fr; }
  .vf-featured-row img { min-height: 150px; }
  .vf-topic-rail,
  .vf-list-grid,
  .vf-card-grid { grid-template-columns: 1fr; }
  .vf-topic-card,
  .vf-list-card { border-right: 0; border-bottom: 1px solid var(--vf-border); }
  .vf-list-card:last-child { border-bottom: 0; }
  .vf-single-header h1 { font-size: 38px; }
  .vf-single-content { font-size: 18px; }
  .vf-author-box { grid-template-columns: 1fr; }
  .vf-footer-inner { display: grid; }
}
