/*
Theme Name: Business Lombardia
Theme URI: https://example.com/businesslombardia
Author: Smart Italy Communications
Author URI: https://example.com
Description: Tema editoriale WordPress per Business Lombardia, con homepage configurabile, advertising, search in header, box autore e lettura continua.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: businesslombardia
Tags: blog, news, custom-logo, custom-menu, featured-images, theme-options
*/

:root {
  --bl-ink: #07111f;
  --bl-ink-soft: #314052;
  --bl-navy: #02111f;
  --bl-navy-2: #061a2e;
  --bl-blue: #0757d8;
  --bl-blue-2: #0a6cff;
  --bl-line: #dde4ef;
  --bl-surface: #ffffff;
  --bl-muted: #f4f7fb;
  --bl-footer: #00101d;
  --bl-radius: 0;
  --bl-content: 1180px;
  --bl-font: "Inter", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--bl-ink);
  background: var(--bl-surface);
  font-family: var(--bl-font);
  font-size: 16px;
  line-height: 1.55;
}

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

a:hover {
  color: var(--bl-blue);
}

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

.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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(1, 13, 24, 0.96);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  max-width: var(--bl-content);
  margin: 0 auto;
  min-height: 96px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-branding {
  display: flex;
  align-items: center;
  min-width: 260px;
}

.custom-logo-link,
.site-title {
  color: var(--bl-blue-2);
  font-size: clamp(1.65rem, 3vw, 2.18rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.custom-logo-link img {
  max-height: 58px;
  width: auto;
}

.site-nav {
  flex: 1;
}

.site-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
}

.site-nav a {
  color: #fff;
  font-size: 0.93rem;
  font-weight: 700;
}

.site-nav a:hover,
.site-nav .current-menu-item > a {
  color: var(--bl-blue-2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.search-toggle,
.menu-toggle,
.load-more-button,
.newsletter-submit,
.button-link {
  border: 0;
  border-radius: var(--bl-radius);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.search-toggle,
.menu-toggle {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: transparent;
}

.search-toggle:hover,
.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.social-links a {
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
}

.header-search {
  display: none;
  background: #061827;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.header-search.is-open {
  display: block;
}

.header-search form {
  max-width: var(--bl-content);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  gap: 12px;
}

.header-search input[type="search"],
.newsletter-form input[type="email"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  padding: 0 18px;
  font: inherit;
}

.header-search input[type="submit"],
.newsletter-submit,
.button-link,
.load-more-button {
  min-height: 48px;
  padding: 0 24px;
  background: var(--bl-blue);
  color: #fff;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.menu-toggle {
  display: none;
}

.hero {
  background: var(--bl-navy);
  color: #fff;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.45fr);
  min-height: 420px;
}

.hero__copy {
  padding: clamp(48px, 7vw, 78px) clamp(24px, 5vw, 44px);
  align-self: center;
  max-width: 540px;
  margin-left: max(0px, calc((100vw - var(--bl-content)) / 2));
}

.eyebrow,
.card-category,
.section-more,
.province-card__more,
.post-meta a,
.entry-footer a {
  color: var(--bl-blue);
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
}

.hero h1 {
  margin: 24px 0 18px;
  font-size: clamp(2.05rem, 4.3vw, 3.05rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero p {
  max-width: 480px;
  margin: 0 0 28px;
  font-size: 1.08rem;
}

.hero__media {
  min-height: 420px;
  background: #132337;
}

.hero__media img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.container {
  max-width: var(--bl-content);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 36px 0 38px;
}

.section--muted {
  background: var(--bl-muted);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.section-title {
  margin: 0;
  font-size: clamp(1.5rem, 2.7vw, 1.9rem);
  line-height: 1.2;
}

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

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

.post-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.post-card__image {
  aspect-ratio: 16 / 10.5;
  background: #dce5ef;
  overflow: hidden;
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card h3,
.side-story h3,
.feature-copy h3,
.province-card h3 {
  margin: 10px 0 12px;
  line-height: 1.18;
  letter-spacing: 0;
}

.post-card h3 {
  font-size: 1.22rem;
}

.post-card p,
.feature-copy p,
.province-card p {
  margin: 0 0 18px;
  color: var(--bl-ink-soft);
}

.post-date {
  margin-top: auto;
  color: #607086;
  font-size: 0.86rem;
}

.deep-grid {
  display: grid;
  grid-template-columns: 1.38fr 1fr;
  gap: 18px;
}

.feature-story {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  background: #fff;
  border: 1px solid var(--bl-line);
}

.feature-story__image {
  min-height: 320px;
  background: #dce5ef;
}

.feature-story__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-copy {
  padding: 34px 28px;
  align-self: center;
}

.feature-copy h3 {
  font-size: 1.55rem;
}

.side-list {
  display: grid;
  gap: 18px;
}

.side-story {
  display: grid;
  grid-template-columns: 180px 1fr;
  background: #fff;
  border: 1px solid var(--bl-line);
  min-height: 150px;
}

.side-story__image {
  background: #dce5ef;
}

.side-story__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.side-story__content {
  padding: 24px;
}

.side-story h3 {
  font-size: 1.22rem;
}

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

.province-card__image {
  aspect-ratio: 16 / 8.2;
  background: #dce5ef;
  overflow: hidden;
}

.province-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.province-card h3 {
  margin-bottom: 4px;
  color: var(--bl-blue);
  font-size: 1rem;
}

.province-card p {
  font-size: 0.95rem;
}

.ad-slot {
  margin: 28px auto;
  max-width: var(--bl-content);
  padding: 0 24px;
}

.ad-slot__inner {
  min-height: 90px;
  display: grid;
  place-items: center;
  border: 1px dashed #b8c5d6;
  background: #f7f9fc;
  color: #66758a;
  text-align: center;
  overflow: hidden;
}

.ad-slot--leaderboard .ad-slot__inner {
  min-height: 90px;
}

.ad-slot--medium-rectangle .ad-slot__inner {
  max-width: 300px;
  min-height: 250px;
  margin: 0 auto;
}

.ad-slot--billboard .ad-slot__inner {
  min-height: 250px;
}

.site-footer {
  background: var(--bl-footer);
  color: #fff;
}

.newsletter-band {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.newsletter-band__inner {
  max-width: var(--bl-content);
  margin: 0 auto;
  padding: 30px 24px;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  align-items: center;
  gap: 32px;
}

.newsletter-title {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.25;
}

.newsletter-title svg {
  flex: 0 0 54px;
}

.newsletter-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}

.footer-main {
  max-width: var(--bl-content);
  margin: 0 auto;
  padding: 28px 24px 36px;
  display: grid;
  grid-template-columns: 1.35fr 1fr 0.9fr;
  gap: 52px;
}

.footer-logo {
  color: var(--bl-blue-2);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.footer-about p,
.footer-links a,
.footer-copy {
  color: rgba(255, 255, 255, 0.78);
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 32px;
}

.footer-links h2,
.footer-social h2 {
  grid-column: 1 / -1;
  margin: 0 0 6px;
  color: #fff;
  font-size: 1rem;
}

.footer-copy {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.88rem;
}

.content-area {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px;
}

.archive-area,
.search-area {
  max-width: var(--bl-content);
  margin: 0 auto;
  padding: 48px 24px;
}

.page-title,
.entry-title {
  margin: 0 0 18px;
  font-size: clamp(2rem, 5vw, 3.65rem);
  line-height: 1.05;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 26px;
  color: #64748b;
}

.entry-meta a {
  color: var(--bl-blue);
  font-weight: 800;
}

.entry-hero {
  margin: 0 0 34px;
}

.entry-hero img {
  width: 100%;
}

.entry-content {
  font-size: 1.08rem;
}

.entry-content a {
  color: var(--bl-blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.entry-content h2,
.entry-content h3 {
  margin: 1.5em 0 0.55em;
  line-height: 1.18;
}

.entry-footer {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--bl-line);
}

.author-box {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 20px;
  margin-top: 38px;
  padding: 26px;
  border: 1px solid var(--bl-line);
  background: var(--bl-muted);
}

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

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

.author-box p {
  margin: 0;
  color: var(--bl-ink-soft);
}

.next-article {
  margin-top: 38px;
  padding-top: 26px;
  border-top: 3px solid var(--bl-ink);
}

.next-article-divider {
  margin: 58px 0;
  border-top: 1px solid var(--bl-line);
}

.next-article__link {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  align-items: center;
}

.next-article img {
  aspect-ratio: 16 / 10;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.load-more-wrap {
  text-align: center;
  padding: 26px 0 6px;
}

.infinite-status {
  min-height: 24px;
  color: #64748b;
  font-size: 0.92rem;
}

.not-found {
  padding: 68px 24px;
  text-align: center;
}

@media (max-width: 980px) {
  .site-header__inner {
    min-height: 76px;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 76px;
    display: none;
    background: #061827;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    padding: 18px 24px 26px;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-branding {
    min-width: 0;
    flex: 1;
  }

  .social-links {
    display: none;
  }

  .hero__inner,
  .deep-grid,
  .feature-story,
  .newsletter-band__inner,
  .footer-main {
    grid-template-columns: 1fr;
  }

  .hero__copy {
    max-width: none;
    margin-left: 0;
  }

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

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .site-header__inner {
    padding: 0 16px;
    gap: 10px;
  }

  .site-title {
    font-size: 1.45rem;
  }

  .header-search form,
  .newsletter-form,
  .side-story,
  .next-article__link,
  .author-box {
    grid-template-columns: 1fr;
  }

  .header-search form {
    padding: 14px 16px;
  }

  .hero__inner {
    min-height: 0;
  }

  .hero__media,
  .hero__media img {
    min-height: 260px;
  }

  .posts-grid,
  .province-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 30px 0;
  }

  .container,
  .content-area,
  .archive-area,
  .search-area {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .feature-copy,
  .side-story__content {
    padding: 22px;
  }

  .newsletter-band__inner,
  .footer-main {
    padding-left: 16px;
    padding-right: 16px;
  }
}
