/*
Theme Name: Business Radar Italia
Theme URI: https://example.com/business-radar-italia
Author: Codex
Author URI: https://openai.com
Description: Tema editoriale WordPress per Business Radar Italia, con homepage configurabile, ricerca in header, spazi pubblicitari e lettura continua degli articoli.
Version: 1.0.0
Requires at least: 6.1
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: business-radar-italia
*/

:root {
  --bri-ink: #071c49;
  --bri-muted: #5d6b83;
  --bri-border: #dce4ef;
  --bri-soft: #f5f8fb;
  --bri-teal: #008982;
  --bri-white: #ffffff;
  --bri-shadow: 0 16px 36px rgba(7, 28, 73, 0.08);
  --bri-serif: Georgia, "Times New Roman", serif;
  --bri-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--bri-ink);
  background: var(--bri-white);
  font-family: var(--bri-sans);
  font-size: 16px;
  line-height: 1.6;
}

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

a:hover,
a:focus {
  color: var(--bri-teal);
}

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

.placeholder-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(0, 137, 130, 0.65), rgba(7, 28, 73, 0.95)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 18px);
}

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

.site-container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.topbar {
  border-bottom: 1px solid var(--bri-border);
  font-size: 14px;
  font-weight: 700;
}

.topbar__inner,
.site-header__main,
.site-header__navrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.topbar__links,
.social-links,
.primary-menu,
.footer-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topbar__inner {
  min-height: 52px;
}

.social-links {
  gap: 18px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  color: var(--bri-ink);
  font-size: 13px;
  font-weight: 800;
}

.site-header {
  background: rgba(255, 255, 255, 0.98);
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(220, 228, 239, 0.75);
}

.site-header__main {
  min-height: 132px;
}

.site-branding {
  display: block;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.9;
}

.site-branding__business {
  display: block;
  font-size: clamp(38px, 5vw, 62px);
}

.site-branding__radar {
  color: var(--bri-teal);
}

.site-branding__italia {
  display: block;
  font-size: clamp(28px, 3.6vw, 44px);
}

.site-header__navrow {
  flex: 1;
  justify-content: flex-end;
}

.primary-menu {
  font-weight: 800;
  color: #061946;
}

.primary-menu a {
  display: block;
  padding: 10px 0;
}

.header-search {
  position: relative;
}

.header-search__toggle {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--bri-ink);
  cursor: pointer;
}

.header-search__toggle svg {
  width: 24px;
  height: 24px;
}

.header-search__form {
  position: absolute;
  right: 0;
  top: 48px;
  display: none;
  width: min(360px, calc(100vw - 48px));
  padding: 12px;
  background: var(--bri-white);
  border: 1px solid var(--bri-border);
  border-radius: 8px;
  box-shadow: var(--bri-shadow);
}

.header-search.is-open .header-search__form {
  display: flex;
}

.header-search__form input[type="search"] {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--bri-border);
  border-radius: 6px 0 0 6px;
  padding: 12px 14px;
  color: var(--bri-ink);
}

.header-search__form button {
  border: 0;
  border-radius: 0 6px 6px 0;
  padding: 0 16px;
  color: var(--bri-white);
  background: var(--bri-teal);
  font-weight: 800;
  cursor: pointer;
}

.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 28px auto;
  color: var(--bri-muted);
  background: repeating-linear-gradient(135deg, #f6f8fb 0, #f6f8fb 10px, #eef3f7 10px, #eef3f7 20px);
  border: 1px dashed #b9c6d5;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
}

.ad-slot--leaderboard {
  min-height: 90px;
  max-width: 970px;
}

.ad-slot--mrec {
  min-height: 250px;
  max-width: 336px;
}

.home-lead {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.hero-card {
  position: relative;
  min-height: 565px;
  overflow: hidden;
  border-radius: 8px;
  background: #10284f;
  color: var(--bri-white);
  box-shadow: var(--bri-shadow);
}

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

.hero-card .placeholder-image {
  height: 100%;
  min-height: 565px;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 28, 73, 0.05) 20%, rgba(2, 6, 20, 0.88) 100%);
}

.hero-card__content {
  position: absolute;
  z-index: 2;
  left: 32px;
  right: 32px;
  bottom: 28px;
}

.kicker {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 9px;
  border-radius: 2px;
  color: var(--bri-white);
  background: var(--bri-teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-card h1 {
  max-width: 760px;
  margin: 0 0 16px;
  font-family: var(--bri-serif);
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.03;
  letter-spacing: 0;
}

.hero-card p {
  max-width: 780px;
  margin: 0 0 22px;
  font-size: 18px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: inherit;
  font-size: 14px;
  font-weight: 700;
}

.meta a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.side-stack {
  display: grid;
  gap: 16px;
}

.compact-card,
.news-column,
.section-card,
.author-box,
.comment-respond,
.comments-area {
  border: 1px solid var(--bri-border);
  border-radius: 8px;
  background: var(--bri-white);
}

.compact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 18px;
  padding: 18px;
  min-height: 176px;
}

.compact-card__category,
.section-title,
.news-column__category {
  color: var(--bri-teal);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.compact-card h2,
.section-card h3,
.news-column h3 {
  margin: 8px 0;
  font-family: var(--bri-serif);
  line-height: 1.17;
}

.compact-card h2 {
  font-size: 22px;
}

.compact-card p,
.section-card p,
.news-column p {
  margin: 0 0 12px;
  color: var(--bri-muted);
  font-size: 14px;
  line-height: 1.45;
}

.compact-card img {
  width: 150px;
  height: 146px;
  border-radius: 6px;
  object-fit: cover;
}

.home-grid {
  display: grid;
  grid-template-columns: 0.85fr repeat(4, 1fr);
  gap: 14px;
  margin: 36px 0 60px;
}

.home-section h2 {
  margin: 0 0 16px;
  font-family: var(--bri-serif);
  font-size: 24px;
  line-height: 1.1;
}

.home-section h2::after {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  margin-top: 8px;
  background: var(--bri-teal);
}

.news-column {
  padding: 18px;
}

.news-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--bri-border);
}

.news-list li:first-child {
  padding-top: 0;
}

.news-list time {
  color: var(--bri-muted);
  font-size: 13px;
}

.all-news-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  font-weight: 900;
}

.section-card {
  overflow: hidden;
}

.section-card__main {
  padding: 16px;
}

.section-card__image {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
}

.section-card h3 {
  font-size: 21px;
}

.mini-list {
  margin: 0;
  padding: 0 16px 16px;
  list-style: none;
}

.mini-list li {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--bri-border);
}

.mini-list img {
  width: 82px;
  height: 70px;
  border-radius: 6px;
  object-fit: cover;
}

.mini-list h4 {
  margin: 0 0 8px;
  font-family: var(--bri-serif);
  font-size: 15px;
  line-height: 1.22;
}

.site-main {
  padding-bottom: 64px;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 320px;
  gap: 48px;
  align-items: start;
  margin-top: 38px;
}

.article-header .kicker {
  margin-bottom: 18px;
}

.article-title {
  margin: 0 0 16px;
  font-family: var(--bri-serif);
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.03;
}

.article-excerpt {
  margin: 0 0 18px;
  color: var(--bri-muted);
  font-size: 20px;
}

.featured-image {
  margin: 28px 0;
  overflow: hidden;
  border-radius: 8px;
}

.article-content {
  color: #11254e;
  font-family: var(--bri-serif);
  font-size: 20px;
  line-height: 1.78;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote {
  margin: 0 0 1.35em;
}

.article-content a {
  color: var(--bri-teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-taxonomies {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
}

.post-taxonomies a {
  padding: 6px 10px;
  border: 1px solid var(--bri-border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.author-box {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  margin-top: 42px;
  padding: 22px;
}

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

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

.author-box p {
  margin: 0 0 12px;
  color: var(--bri-muted);
}

.sidebar {
  position: sticky;
  top: 170px;
}

.sidebar .widget {
  margin-bottom: 24px;
}

.site-footer {
  padding: 46px 0 32px;
  background: #f4f7fa;
  border-top: 1px solid var(--bri-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 38px;
}

.footer-brand {
  font-size: 34px;
  font-weight: 900;
  line-height: 0.95;
}

.footer-brand span {
  color: var(--bri-teal);
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 14px;
  font-size: 14px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: #18305a;
  font-size: 14px;
}

.footer-menu {
  display: grid;
  gap: 6px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 44px;
}

.archive-header,
.search-header {
  margin: 38px 0 24px;
}

.archive-header h1,
.search-header h1 {
  margin: 0;
  font-family: var(--bri-serif);
  font-size: clamp(34px, 4vw, 54px);
}

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

.load-more {
  display: flex;
  justify-content: center;
  margin: 34px 0;
}

.load-more button,
.nav-links a,
.nav-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--bri-border);
  border-radius: 6px;
  background: var(--bri-white);
  color: var(--bri-ink);
  font-weight: 900;
}

.load-more button {
  cursor: pointer;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.pagination {
  display: none;
}

.infinite-status {
  min-height: 26px;
  margin: 20px 0;
  color: var(--bri-muted);
  text-align: center;
}

.single-next-separator {
  margin: 54px 0 36px;
  border: 0;
  border-top: 1px solid var(--bri-border);
}

.comments-area {
  margin-top: 42px;
  padding: 24px;
}

.comment-list {
  padding-left: 24px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--bri-border);
  border-radius: 6px;
  padding: 12px;
}

.comment-form input[type="submit"] {
  width: auto;
  border: 0;
  background: var(--bri-teal);
  color: var(--bri-white);
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 1040px) {
  .site-header__main,
  .site-header__navrow {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header__main {
    padding: 24px 0;
  }

  .primary-menu,
  .topbar__links {
    flex-wrap: wrap;
    gap: 16px;
  }

  .home-lead,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .home-grid,
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar {
    position: static;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-container {
    width: min(100% - 28px, 1200px);
  }

  .topbar__inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .hero-card,
  .hero-card img {
    min-height: 450px;
  }

  .hero-card__content {
    left: 18px;
    right: 18px;
  }

  .compact-card {
    grid-template-columns: 1fr;
  }

  .compact-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .home-grid,
  .post-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .author-box {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
