/*
Theme Name: Farecon
Theme URI: https://farecon.local/
Author: Smart Italy Communications
Description: Tema editoriale WordPress ispirato a Farecon, con homepage configurabile, search in header, advertising slot, box autore e infinite scroll.
Version: 1.0.3
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: farecon
*/

:root {
  --fc-black: #080b0a;
  --fc-ink: #151716;
  --fc-muted: #6f7470;
  --fc-line: #e5e7e5;
  --fc-soft: #f7f8f7;
  --fc-green: #05b531;
  --fc-green-dark: #008f25;
  --fc-white: #fff;
  --fc-radius: 6px;
  --fc-max: 1388px;
  --fc-shadow: 0 12px 36px rgba(4, 10, 8, .08);
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--fc-white);
  color: var(--fc-ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

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

a:hover,
a:focus {
  color: var(--fc-green-dark);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid rgba(229, 231, 229, .86);
  backdrop-filter: blur(12px);
}

.header-inner,
.site-main,
.site-footer-inner {
  width: min(calc(100% - 40px), var(--fc-max));
  margin: 0 auto;
}

.header-inner {
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 98px;
}

.header-inner > * {
  min-width: 0;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  min-width: 250px;
}

.site-branding .custom-logo-link {
  display: block;
  max-width: 100%;
}

.site-branding .custom-logo {
  width: auto;
  max-width: min(260px, 100%);
  max-height: 72px;
}

.brand-mark {
  width: 44px;
  height: 54px;
}

.brand-text strong {
  display: block;
  color: var(--fc-black);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  line-height: .9;
  letter-spacing: 0;
}

.brand-text span {
  display: block;
  margin-top: 4px;
  color: #202522;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.main-navigation ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-navigation {
  min-width: 0;
  max-width: 100%;
}

.main-navigation a {
  color: var(--fc-black);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.header-search {
  position: relative;
  width: clamp(180px, 18vw, 250px);
}

.header-search .search-field {
  width: 100%;
  height: 40px;
  padding: 0 42px 0 14px;
  border: 1px solid var(--fc-line);
  border-radius: 999px;
  font-size: 14px;
}

.header-search .search-submit {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--fc-green);
  color: var(--fc-white);
  cursor: pointer;
}

.video-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--fc-green);
  border-radius: 6px;
  color: var(--fc-black);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.site-main {
  padding: 28px 0 56px;
}

.ad-slot {
  width: 100%;
  margin: 24px 0;
  overflow: hidden;
  border: 1px dashed #cbd1cc;
  border-radius: var(--fc-radius);
  background: #fafafa;
  color: var(--fc-muted);
  text-align: center;
}

.ad-slot:empty {
  display: none;
}

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

.ad-mobile {
  min-height: 250px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(360px, .92fr);
  gap: 14px;
  margin-bottom: 30px;
}

.hero-feature {
  position: relative;
  min-height: 432px;
  overflow: hidden;
  border-radius: var(--fc-radius);
  background: var(--fc-black);
}

.hero-main-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-feature img,
.side-story img,
.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-feature > img {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, rgba(0, 0, 0, .76), rgba(0, 0, 0, .18) 62%, rgba(0, 0, 0, 0));
  pointer-events: none;
}

.hero-content {
  position: absolute;
  left: clamp(20px, 4vw, 34px);
  right: 24px;
  bottom: 34px;
  z-index: 3;
  max-width: 720px;
  color: var(--fc-white);
}

.kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--fc-green);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-title {
  margin: 0 0 14px;
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 900;
  line-height: .98;
}

.hero-title a {
  color: var(--fc-white);
}

.hero-excerpt {
  max-width: 680px;
  margin: 0 0 24px;
  font-size: 18px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--fc-muted);
  font-size: 13px;
}

.hero-content .post-meta {
  color: rgba(255, 255, 255, .9);
}

.post-meta a {
  color: var(--fc-green);
  font-weight: 800;
}

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

.side-story {
  display: grid;
  grid-template-columns: 45% 1fr;
  min-height: 136px;
  overflow: hidden;
  border: 1px solid var(--fc-line);
  border-radius: var(--fc-radius);
  background: var(--fc-white);
}

.side-story-image {
  min-height: 136px;
}

.side-story-body {
  padding: 18px;
}

.side-story h3,
.post-card h3 {
  margin: 0 0 8px;
  color: var(--fc-black);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.05;
}

.side-story p,
.post-card p {
  margin: 0 0 10px;
  color: var(--fc-muted);
  font-size: 14px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 28px 0 16px;
  padding-top: 12px;
  border-top: 1px solid var(--fc-line);
}

.section-heading h2 {
  position: relative;
  margin: 0;
  padding-bottom: 10px;
  color: var(--fc-black);
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.section-heading h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 3px;
  background: var(--fc-green);
}

.section-heading select {
  min-width: 190px;
  height: 38px;
  border: 1px solid var(--fc-line);
  border-radius: var(--fc-radius);
  background: var(--fc-white);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.post-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--fc-line);
  border-radius: var(--fc-radius);
  background: var(--fc-white);
}

.post-card-image {
  display: block;
  aspect-ratio: 16 / 7;
  background: var(--fc-soft);
}

.post-card-body {
  position: relative;
  z-index: 1;
  min-height: 142px;
  padding: 14px 14px 38px;
  background: var(--fc-white);
}

.post-card h3 {
  display: block;
  min-height: 40px;
  margin: 0 0 8px;
  color: var(--fc-black);
  font-size: 18px;
}

.post-card h3 a {
  color: var(--fc-black);
}

.bookmark {
  position: absolute;
  right: 13px;
  bottom: 12px;
  width: 18px;
  height: 22px;
  border: 1.6px solid var(--fc-black);
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
}

.bookmark::after {
  content: "";
  position: absolute;
  left: 3px;
  bottom: -7px;
  width: 10px;
  height: 10px;
  border-right: 1.6px solid var(--fc-black);
  border-bottom: 1.6px solid var(--fc-black);
  background: var(--fc-white);
  transform: rotate(45deg);
}

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

.opinion-card {
  padding: 22px;
  border: 1px solid var(--fc-line);
  border-radius: var(--fc-radius);
  background: var(--fc-soft);
}

.opinion-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.1;
}

.archive-header,
.search-header {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--fc-line);
}

.archive-header h1,
.search-header h1 {
  margin: 0;
  color: var(--fc-black);
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1;
}

.single-wrap {
  display: grid;
  grid-template-columns: minmax(0, 790px);
  justify-content: center;
  gap: 34px;
  align-items: start;
  width: 100%;
  max-width: 790px;
  margin: 0 auto;
}

.single-stream,
.single-article,
.single-header,
.entry-content {
  min-width: 0;
  max-width: 100%;
}

.single-article {
  padding-bottom: 36px;
  border-bottom: 1px solid var(--fc-line);
}

.single-title {
  margin: 8px 0 18px;
  color: var(--fc-black);
  font-size: clamp(42px, 6vw, 70px);
  font-weight: 900;
  line-height: .98;
  overflow-wrap: break-word;
  hyphens: auto;
}

.single-excerpt {
  margin: 0 0 24px;
  color: #3d423e;
  font-size: 22px;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.single-featured {
  margin: 28px 0;
  overflow: hidden;
  border-radius: var(--fc-radius);
}

.entry-content {
  color: #202522;
  font-size: 19px;
  line-height: 1.75;
  overflow-wrap: break-word;
}

.entry-content a {
  color: var(--fc-green-dark);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

.entry-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 30px 0;
  color: var(--fc-muted);
  font-size: 14px;
}

.entry-footer-links a {
  padding: 5px 9px;
  border: 1px solid var(--fc-line);
  border-radius: 999px;
  color: var(--fc-black);
  font-weight: 800;
}

.author-box {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 18px;
  margin-top: 34px;
  padding: 22px;
  border: 1px solid var(--fc-line);
  border-radius: var(--fc-radius);
  background: var(--fc-soft);
}

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

.author-box h2 {
  margin: 0 0 7px;
  font-size: 21px;
}

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

.single-sidebar {
  position: static;
  width: 100%;
  max-width: 790px;
  margin: 0 auto;
}

.next-article-card {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--fc-line);
  border-radius: var(--fc-radius);
}

.next-article-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--fc-green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.next-article-card strong {
  display: block;
  color: var(--fc-black);
  font-size: 20px;
  line-height: 1.12;
}

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

.load-more {
  min-width: 190px;
  min-height: 44px;
  border: 1px solid var(--fc-black);
  border-radius: var(--fc-radius);
  background: var(--fc-white);
  color: var(--fc-black);
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.load-more[disabled] {
  opacity: .5;
  cursor: progress;
}

.site-footer {
  border-top: 1px solid var(--fc-line);
  background: var(--fc-black);
  color: var(--fc-white);
}

.site-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 32px 0;
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
}

@media (max-width: 1120px) {
  .header-inner {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px 0;
  }

  .site-branding,
  .header-tools {
    justify-content: center;
  }

  .hero-grid,
  .single-wrap {
    grid-template-columns: 1fr;
  }

  .single-wrap {
    max-width: 790px;
  }

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

  .single-sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  .header-inner,
  .site-main,
  .site-footer-inner {
    width: min(calc(100% - 24px), var(--fc-max));
  }

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

  .site-branding .custom-logo {
    max-width: min(220px, 100%);
  }

  .brand-text strong {
    font-size: 31px;
  }

  .main-navigation {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .main-navigation ul {
    justify-content: flex-start;
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
    padding-bottom: 6px;
  }

  .main-navigation a {
    white-space: nowrap;
  }

  .header-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .header-search {
    width: 100%;
  }

  .video-pill {
    justify-content: center;
  }

  .hero-feature {
    min-height: 460px;
  }

  .hero-feature::after {
    background: linear-gradient(0deg, rgba(0, 0, 0, .85), rgba(0, 0, 0, .18));
  }

  .side-story,
  .post-grid,
  .opinions-grid {
    grid-template-columns: 1fr;
  }

  .side-story-image {
    aspect-ratio: 16 / 8;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .single-title {
    font-size: 36px;
  }

  .entry-content {
    font-size: 18px;
  }

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

  .site-footer-inner {
    flex-direction: column;
  }
}
