/*
Theme Name:   Giroveloce GP
Theme URI:    https://giroveloce.it
Description:  Child theme GeneratePress per Giroveloce.it
Author:       Giroveloce
Template:     generatepress
Version:      1.0.7
*/

/* ================================================
   GOOGLE FONTS
   ================================================ */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;800;900&family=Inter:wght@400;500;600;700;800&display=swap');

/* ================================================
   VARIABILI CSS
   ================================================ */
:root {
  --red:       #b20000;
  --red2:      #7a0000;
  --black:     #111111;
  --text:      #222222;
  --muted:     #666666;
  --border:    #e8e8e8;
  --bg:        #f5f5f5;
  --white:     #ffffff;
  --container: 1200px;
  --sidebar-width: 300px;
}

/* ================================================
   RESET / GLOBAL
   ================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
}

a { text-decoration: none; }

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

/* ================================================
   HEADER
   ================================================ */
#masthead {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.inside-header {
  padding: 18px 0;
  display: flex;
  align-items: center;
  min-height: auto;
}

.site-description {
  display: none !important;
}

/* Logo */
.main-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 34px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0;
  padding: 0 0 0 14px;
  border-left: 4px solid var(--red);
  line-height: 1;
}

.main-title a {
  color: var(--black);
  text-decoration: none;
}

.main-title a:hover {
  color: var(--black);
  opacity: 0.85;
}

/* ".IT" in rosso superscript — iniettato via JS */
.gv-logo-it {
  color: var(--red);
  font-size: 0.50em;
  vertical-align: super;
  font-weight: 800;
  letter-spacing: 0;
}

/* ================================================
   NAVIGAZIONE PRIMARIA
   ================================================ */
.main-navigation {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.main-navigation .inside-navigation {
  padding: 0;
}

.main-navigation ul li > a {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: #333333;
  padding: 15px 16px;
  transition: color 0.15s;
  border-bottom: none;
}

.main-navigation ul li > a:hover {
  color: var(--red);
}

/* Voce attiva: box-shadow invece di border-bottom */
.main-navigation ul li.current-menu-item > a,
.main-navigation ul li.current_page_item > a,
.main-navigation ul li.current-menu-ancestor > a,
.main-navigation ul li.current-page-ancestor > a {
  color: var(--red);
  box-shadow: inset 0 -2px 0 var(--red);
}

/* Pill "Pitlane Value" */
.main-navigation ul li > a[href*="pitlane-value"] {
  border: 1.5px solid var(--red);
  border-radius: 20px;
  color: var(--red);
  padding: 6px 14px;
  margin: auto 6px;
  line-height: 1;
  display: inline-block;
}

.main-navigation ul li.current-menu-item > a[href*="pitlane-value"],
.main-navigation ul li.current-page-ancestor > a[href*="pitlane-value"] {
  background: #b20000 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.main-navigation ul li > a[href*="pitlane-value"]:hover {
  background: var(--red);
  color: var(--white);
  box-shadow: none;
}

/* ================================================
   CONTAINER
   ================================================ */
.grid-container {
  max-width: var(--container);
}

.site-content {
  padding-top: 24px;
  padding-bottom: 40px;
}

/* ================================================
   HERO — iniettato fuori da .site-content via JS
   ================================================ */
.gv-hero-wrapper {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px 20px 0;
}

.gv-hero-wrapper article {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 380px;
  transition: box-shadow 0.2s;
}

.gv-hero-wrapper article:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.09);
}

/* Immagine hero — colonna sinistra */
.gv-hero-wrapper .featured-image {
  margin: 0;
  overflow: hidden;
}

.gv-hero-wrapper .featured-image a {
  display: block;
  height: 100%;
}

.gv-hero-wrapper .featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
  transition: transform 0.3s;
}

.gv-hero-wrapper article:hover .featured-image img {
  transform: scale(1.02);
}

/* Testo hero — colonna destra */
.gv-hero-wrapper .inside-article {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gv-hero-wrapper .entry-header .cat-links {
  margin-bottom: 10px;
}

.gv-hero-wrapper .entry-header .cat-links a {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--red);
  text-decoration: none;
}

.gv-hero-wrapper .entry-header .entry-title {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 25px;
  line-height: 1.25;
  margin: 0 0 14px;
  color: var(--text);
}

.gv-hero-wrapper .entry-header .entry-title a {
  color: var(--text);
  text-decoration: none;
}

.gv-hero-wrapper .entry-header .entry-title a:hover {
  color: var(--red);
}

.gv-hero-wrapper .entry-meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 14px;
}

.gv-hero-wrapper .entry-meta a {
  color: var(--muted);
}

.gv-hero-wrapper .entry-summary {
  font-size: 14px;
  line-height: 1.6;
  color: #555555;
}

.gv-hero-wrapper .entry-summary p {
  margin: 0;
}

/* ================================================
   GRIGLIA ARTICOLI (dal 2° in poi)
   ================================================ */
.home .site-main,
.blog .site-main,
.archive .site-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.home article,
.blog article,
.archive article {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.home article:hover,
.blog article:hover,
.archive article:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}

/* Immagine card */
.home article .featured-image,
.blog article .featured-image,
.archive article .featured-image {
  margin: 0;
  overflow: hidden;
  flex-shrink: 0;
}

.home article .featured-image img,
.blog article .featured-image img,
.archive article .featured-image img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  border-radius: 0;
  transition: transform 0.3s;
}

.home article:hover .featured-image img,
.blog article:hover .featured-image img,
.archive article:hover .featured-image img {
  transform: scale(1.03);
}

/* Inside article */
.home article .inside-article,
.blog article .inside-article,
.archive article .inside-article {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Categoria */
.home article .cat-links a,
.blog article .cat-links a,
.archive article .cat-links a {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--red);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 6px;
}

/* Titolo card */
.home article .entry-title,
.blog article .entry-title,
.archive article .entry-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
  margin: 0 0 8px;
}

.home article .entry-title a,
.blog article .entry-title a,
.archive article .entry-title a {
  color: var(--text);
  text-decoration: none;
}

.home article .entry-title a:hover,
.blog article .entry-title a:hover,
.archive article .entry-title a:hover {
  color: var(--red);
}

/* Meta (data autore) */
.home article .entry-meta,
.blog article .entry-meta,
.archive article .entry-meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}

.home article .entry-meta a,
.blog article .entry-meta a,
.archive article .entry-meta a {
  color: var(--muted);
  text-decoration: none;
}

/* Excerpt */
.home article .entry-summary,
.blog article .entry-summary,
.archive article .entry-summary {
  font-size: 13px;
  line-height: 1.55;
  color: #555555;
  flex: 1;
}

.home article .entry-summary p,
.blog article .entry-summary p,
.archive article .entry-summary p {
  margin: 0;
}

/* Entry footer */
.home article .entry-footer,
.blog article .entry-footer,
.archive article .entry-footer {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
}

/* ================================================
   SIDEBAR
   ================================================ */
.widget-area.sidebar.is-right-sidebar {
  min-width: var(--sidebar-width);
}

.sidebar .widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.sidebar .widget-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--red);
}

.sidebar .widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar .widget ul li {
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  padding: 9px 0;
  line-height: 1.4;
}

.sidebar .widget ul li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar .widget ul li a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.sidebar .widget ul li a:hover {
  color: var(--red);
}

/* ================================================
   ARTICOLO SINGOLO
   ================================================ */
.single .content-area {
  max-width: 800px;
}

.single .entry-header {
  margin-bottom: 24px;
}

.single .entry-title {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 35px;
  line-height: 1.25;
  color: var(--text);
  margin: 12px 0 16px;
}

.single .entry-meta {
  font-size: 12px;
  color: var(--muted);
}

.single .entry-meta a {
  color: var(--muted);
}

.single .entry-content {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}

.single .entry-content p {
  margin-bottom: 1.5em;
}

.single .entry-content h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 22px;
  margin: 2em 0 0.8em;
  color: var(--black);
}

.single .entry-content h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 18px;
  margin: 1.8em 0 0.7em;
  color: var(--black);
}

.single .featured-image {
  margin-bottom: 24px;
  border-radius: 8px;
  overflow: hidden;
}

.single .featured-image img {
  border-radius: 8px;
  width: 100%;
  height: auto;
}

/* ================================================
   FOOTER
   ================================================ */
.site-footer {
  background: var(--black);
  color: #bbbbbb;
}

.site-footer a {
  color: #bbbbbb;
  text-decoration: none;
  transition: color 0.15s;
}

.site-footer a:hover {
  color: var(--white);
}

.footer-widgets-container {
  padding: 40px 0;
}

.footer-bar-section {
  background: #0a0a0a;
  color: #555555;
  font-size: 12px;
  padding: 14px 0;
  text-align: center;
  border-top: 1px solid #222222;
}

.footer-bar-section a {
  color: #555555;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 1024px) {
  .gv-hero-wrapper article {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .gv-hero-wrapper .featured-image,
  .gv-hero-wrapper .featured-image a,
  .gv-hero-wrapper .featured-image img {
    height: 260px;
  }
  .gv-hero-wrapper .inside-article {
    padding: 24px;
  }
  .gv-hero-wrapper .entry-header .entry-title {
    font-size: 22px;
  }
}

@media (max-width: 768px) {
  .main-title {
    font-size: 26px;
  }
  .home .site-main,
  .blog .site-main,
  .archive .site-main {
    grid-template-columns: 1fr;
  }
  .gv-hero-wrapper {
    padding: 16px 16px 0;
  }
  .site-content {
    padding-top: 16px;
    padding-bottom: 24px;
  }
}

/* ================================================
   FIX: Nascondi page-header (titolo categoria/archivio)
   ================================================ */
.blog .page-header,
.archive .page-header,
.category .page-header,
.tag .page-header,
.search .page-header {
  display: none;
}

/* ================================================
   FIX: Paginazione — span full width nella griglia
   ================================================ */
.home .site-main .pagination,
.blog .site-main .pagination,
.archive .site-main .pagination,
.category .site-main .pagination,
.tag .site-main .pagination,
.home .site-main .nav-links,
.blog .site-main .nav-links,
.archive .site-main .nav-links,
.category .site-main .nav-links,
.tag .site-main .nav-links {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px 0 8px;
}

.home .site-main .pagination a,
.blog .site-main .pagination a,
.archive .site-main .pagination a,
.category .site-main .pagination a,
.tag .site-main .pagination a {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.home .site-main .pagination a:hover,
.blog .site-main .pagination a:hover,
.archive .site-main .pagination a:hover,
.category .site-main .pagination a:hover,
.tag .site-main .pagination a:hover {
  background: var(--red);
  color: var(--white);
}

.home .site-main .pagination .current,
.blog .site-main .pagination .current,
.archive .site-main .pagination .current,
.category .site-main .pagination .current,
.tag .site-main .pagination .current {
  background: var(--red);
  color: var(--white);
  padding: 6px 10px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
}

/* ================================================
   FIX: Altezza immagine uniforme nelle card
   — il fix va sul container .featured-image,
     non solo sull'img, altrimenti non funziona
   ================================================ */
.home article .featured-image,
.blog article .featured-image,
.archive article .featured-image,
.category article .featured-image,
.tag article .featured-image {
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
}

.home article .featured-image a,
.blog article .featured-image a,
.archive article .featured-image a,
.category article .featured-image a,
.tag article .featured-image a {
  display: block;
  height: 100%;
}

.home article .featured-image img,
.blog article .featured-image img,
.archive article .featured-image img,
.category article .featured-image img,
.tag article .featured-image img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  display: block;
}

/* ================================================
   FIX 1.0.3: Altezza immagine card → 370px
   ================================================ */
.home article .featured-image,
.blog article .featured-image,
.archive article .featured-image,
.category article .featured-image,
.tag article .featured-image {
  height: 370px !important;
}

/* ================================================
   FIX 1.0.3: Titoli card più grandi
   ================================================ */
.home article .entry-title,
.blog article .entry-title,
.archive article .entry-title,
.category article .entry-title,
.tag article .entry-title {
  font-size: 19px;
}

/* FIX 1.0.4: Titoli card 25px */
.home article .entry-title,
.blog article .entry-title,
.archive article .entry-title,
.category article .entry-title,
.tag article .entry-title {
  font-size: 25px;
}

/* ================================================
   FIX 1.0.5: Immagini card — selettore universale
   .site-main esclude il hero, !important batte GP
   ================================================ */
.site-main article .featured-image {
  height: 370px !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
}

.site-main article .featured-image a {
  display: block !important;
  height: 100% !important;
  overflow: hidden !important;
}

.site-main article .featured-image img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  display: block !important;
}

/* FIX 1.0.5: Titoli card 16px */
.site-main article .entry-title {
  font-size: 16px !important;
}

.single .site-main article .entry-title {
  font-size: 30px !important;
}

/* ================================================
   FIX 1.0.6: Paginazione — selettore diretto senza body class
   ================================================ */
.site-main .pagination,
.site-main .nav-links,
.site-main > nav,
.site-main > .page-links {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  text-align: center;
  padding: 24px 0 8px;
  background: transparent;
  border: none;
}

/* FIX 1.0.7: Nav più compatta */
.main-navigation ul li > a {
  padding: 5px 16px !important;
}

/* Colore voci nav — default */
.main-navigation ul li > a {
  color: #333333 !important;
}

/* Hover */
.main-navigation ul li > a:hover {
  color: #111111 !important;
}

/* Voce attiva */
.main-navigation ul li.current-menu-item > a,
.main-navigation ul li.current_page_item > a,
.main-navigation ul li.current-menu-ancestor > a {
  color: #b20000 !important;
  box-shadow: inset 0 -2px 0 #b20000 !important;
}

/* Pitlane Value — hover: bianco su rosso */
.main-navigation ul li > a[href*="pitlane-value"]:hover {
  background: #b20000 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.site-main article:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.entry-content a {
    text-decoration: underline;
    color: var(--red);
}

.entry-summary a,
.read-more a,
a.more-link {
    text-decoration: underline;
    color: var(--red);
}