/*
Theme Name: Juve Style Theme
Author: Vincenzo De Vivo
Description: A minimal dark WordPress theme inspired by Juventus.com
Version: 2.1
License: GNU General Public License v2 or later
*/

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;600;700&family=Inter:wght@300;400;500&display=swap');

/* ─── Custom Properties ───────────────────────────────── */
:root {
  --black:       #000;
  --white:       #fff;
  --grey-dark:   #111;
  --grey-mid:    #1a1a1a;
  --grey-border: #2a2a2a;
  --grey-light:  #666;
  --highlight:   #f8c3d2;
  --easing:      cubic-bezier(0.77, 0, 0.18, 1);
  --duration:    0.4s;
}

/* ─── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html  { scroll-behavior: smooth; }
body  {
  background: var(--black);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  margin: 0; padding: 0;
  font-size: 14px;
  line-height: 1.5;
}
a    { color: inherit; text-decoration: none; }
img  { display: block; max-width: 100%; }
ul   { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; }
button { cursor: pointer; }

/* ─── TICKER ──────────────────────────────────────────── */
.ticker-bar {
  background: var(--white);
  color: var(--black);
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 9px 0;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-inner {
  display: inline-block;
  animation: ticker 40s linear infinite;
}
.ticker-inner span    { padding: 0 8px; }
.ticker-sep           { color: var(--highlight); opacity: 0.8; }
@keyframes ticker {
  from { transform: translateX(100vw); }
  to   { transform: translateX(-100%); }
}

/* ─── HEADER ──────────────────────────────────────────── */
.site-header {
  background: var(--black);
  border-bottom: 1px solid var(--grey-border);
  position: sticky;
  top: 0;
  z-index: 900;
  transition: transform 0.35s var(--easing);
}
.site-header.header--hidden {
  transform: translateY(-100%);
}
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 68px;
}
.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 22px;
}
.header-icon {
  color: var(--white);
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  line-height: 1;
  transition: opacity 0.2s;
}
.header-icon:hover,
.header-icon:focus-visible { opacity: 0.55; outline: none; }

.site-logo {
  font-family: 'Oswald', sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1;
  display: block;
}

/* ─── NAV DESKTOP ─────────────────────────────────────── */
.header-nav {
  border-top: 1px solid var(--grey-border);
  overflow-x: auto;
  scrollbar-width: none;
}
.header-nav::-webkit-scrollbar { display: none; }
.header-nav ul { display: flex; padding: 0 20px; }
.header-nav ul li a {
  display: block;
  padding: 14px 18px;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.5;
  transition: opacity 0.2s;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.header-nav ul li a:hover,
.header-nav ul li a.active {
  opacity: 1;
  border-bottom-color: var(--highlight);
}

/* ─── NAV OVERLAY (mobile / hamburger) ───────────────── */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform var(--duration) var(--easing);
  display: flex;
  flex-direction: column;
  padding: 36px 40px 48px;
  overflow-y: auto;
}
.nav-overlay.is-open {
  transform: translateX(0);
}
.nav-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 56px;
}
.nav-overlay-close {
  background: none;
  border: none;
  color: var(--white);
  padding: 4px;
  display: flex;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.nav-overlay-close:hover { opacity: 1; }
.nav-overlay-items {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.nav-overlay-items a {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--white);
  padding: 18px 0;
  border-bottom: 1px solid var(--grey-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: opacity 0.2s, padding-left 0.2s;
}
.nav-overlay-items a:hover {
  opacity: 0.5;
  padding-left: 8px;
}
.nav-overlay-footer {
  margin-top: 48px;
  display: flex;
  gap: 12px;
}

/* ─── SEARCH OVERLAY ──────────────────────────────────── */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.97);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.search-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}
.search-overlay-close {
  position: absolute;
  top: 32px;
  right: 32px;
  background: none;
  border: none;
  color: var(--white);
  padding: 4px;
  opacity: 0.5;
  transition: opacity 0.2s;
  display: flex;
}
.search-overlay-close:hover { opacity: 1; }
.search-overlay-inner {
  width: 100%;
  max-width: 680px;
  padding: 0 40px;
}
.search-overlay-label {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.35;
  margin-bottom: 20px;
}
/* Override stili WP search form */
.search-overlay .search-form {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 16px;
}
.search-overlay .search-field,
.search-overlay input[type="search"],
.search-overlay .js-search-input {
  flex: 1;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  font-family: 'Oswald', sans-serif;
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 300;
  color: var(--white) !important;
  letter-spacing: 0.5px;
  caret-color: var(--white);
  padding: 0 !important;
}
.search-overlay .search-field::placeholder,
.search-overlay input[type="search"]::placeholder { opacity: 0.25; }
.search-overlay .search-submit,
.search-overlay button[type="submit"] {
  background: none !important;
  border: none !important;
  color: var(--white) !important;
  padding: 0 !important;
  opacity: 0.4;
  transition: opacity 0.2s;
  display: flex;
}
.search-overlay .search-submit:hover { opacity: 1; }

/* ─── HERO ────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 90vh;
  min-height: 540px;
  background: var(--grey-dark);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.55;
}
.hero-bg--empty {
  background: linear-gradient(135deg, var(--grey-dark) 0%, var(--grey-mid) 100%);
}
.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.94) 0%,
    rgba(0,0,0,0.4)  50%,
    rgba(0,0,0,0.1)  100%
  );
}
.hero-content {
  position: relative;
  padding: 64px 48px;
  max-width: 820px;
}
.hero-tag {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.5;
  margin-bottom: 16px;
}
.hero-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(40px, 6.5vw, 84px);
  font-weight: 700;
  line-height: 0.95;
  text-transform: uppercase;
  margin-bottom: 30px;
}
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--white);
  padding: 14px 28px;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--white);
  transition: background 0.2s, color 0.2s;
}
.btn-cta:hover { background: var(--highlight); border-color: var(--highlight); color: var(--black); }

/* ─── SECTION HEADER ──────────────────────────────────── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 52px 28px 22px;
}
.section-title {
  font-family: 'Oswald', sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}
.section-link {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.45;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-bottom: 2px;
  transition: opacity 0.2s;
}
.section-link:hover { opacity: 1; color: var(--highlight); border-bottom-color: var(--highlight); }

/* ─── NEWS GRID ───────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--grey-border);
}
.news-card {
  background: var(--black);
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
}
.news-card a {
  display: block;
  width: 100%;
  height: 100%;
}
.news-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.6;
  transition: transform 0.55s ease, opacity 0.4s ease;
}
.news-card:hover .news-card-img {
  transform: scale(1.06);
  opacity: 0.82;
}
.news-card-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--grey-dark) 0%, var(--grey-mid) 100%);
}
.news-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.90) 0%,
    rgba(0,0,0,0.15) 55%,
    transparent 100%
  );
  pointer-events: none;
}
.news-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  pointer-events: none;
}
.news-card-tag {
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.45;
  margin-bottom: 10px;
}
.news-card-title {
  font-family: 'Oswald', sans-serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.15;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.news-card-cta {
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--highlight);
  padding-bottom: 2px;
  display: inline-block;
  color: var(--highlight);
}

/* ─── SINGLE POST ─────────────────────────────────────── */

/* Hero */
.single-hero {
  position: relative;
  height: 88vh;
  min-height: 520px;
  background: var(--grey-dark);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.single-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.55;
}
.single-hero-bg--empty {
  background: linear-gradient(135deg, var(--grey-dark) 0%, var(--grey-mid) 100%);
}
.single-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.95) 0%,
    rgba(0,0,0,0.45) 45%,
    rgba(0,0,0,0.1)  100%
  );
}
.single-hero-content {
  position: relative;
  padding: 56px 52px;
  max-width: 900px;
}
.single-hero-tag {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.5;
  margin-bottom: 18px;
}
.single-hero-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(48px, 7.5vw, 96px);
  font-weight: 700;
  line-height: 0.92;
  text-transform: uppercase;
  margin: 0;
  letter-spacing: -1px;
}

/* Breadcrumb */
.breadcrumb {
  padding: 20px 52px;
  border-bottom: 1px solid var(--grey-border);
}
.breadcrumb ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.breadcrumb ol li {
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--grey-light);
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb ol li::after {
  content: '/';
  color: var(--grey-border);
  font-size: 10px;
}
.breadcrumb ol li:last-child::after { display: none; }
.breadcrumb ol li:last-child { color: var(--white); opacity: 0.55; }
.breadcrumb ol li a {
  color: var(--grey-light);
  transition: color 0.2s;
}
.breadcrumb ol li a:hover { color: var(--white); }

/* Corpo */
.single-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 40px 100px;
}
.single-meta {
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--grey-light);
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.single-meta-sep { color: var(--grey-border); }
.single-meta a { color: var(--grey-light); transition: color 0.2s; }
.single-meta a:hover { color: var(--white); }
.single-content {
  font-size: 17px;
  line-height: 1.85;
  color: #bbb;
}
.single-content p { margin: 0 0 1.7em; }
.single-content h2,
.single-content h3 {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--white);
  letter-spacing: 1px;
  margin: 56px 0 20px;
  line-height: 1.1;
}
.single-content h2:first-child,
.single-content h3:first-child { margin-top: 0; }
.single-content img {
  width: 100%;
  margin: 40px 0;
  opacity: 0.85;
}
.single-content a {
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,0.3);
  transition: border-color 0.2s;
}
.single-content a:hover { border-bottom-color: var(--white); }
.single-content blockquote {
  border-left: 3px solid var(--white);
  margin: 40px 0;
  padding: 16px 0 16px 28px;
  font-family: 'Oswald', sans-serif;
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 300;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.7;
}

/* Responsive single */
@media (max-width: 768px) {
  .single-hero { height: 75vh; }
  .single-hero-content { padding: 36px 24px; }
  .single-hero-title { letter-spacing: 0; }
  .breadcrumb { padding: 16px 24px; }
  .single-wrap { padding: 40px 24px 72px; }
}

/* ─── FOOTER ──────────────────────────────────────────── */
.site-footer {
  background: var(--black);
  border-top: 1px solid var(--grey-border);
  margin-top: 80px;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding: 72px 48px;
}
.footer-logo {
  font-size: 28px;
  letter-spacing: 5px;
  margin-bottom: 16px;
}
.footer-brand p {
  font-size: 13px;
  color: var(--grey-light);
  line-height: 1.8;
  max-width: 240px;
  margin-bottom: 28px;
}
.footer-social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.social-icon {
  width: 38px;
  height: 38px;
  border: 1px solid var(--grey-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey-light);
  transition: border-color 0.2s, color 0.2s;
}
.social-icon:hover {
  border-color: var(--highlight);
  color: var(--highlight);
}
.footer-col h4 {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 22px;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.footer-col ul li a {
  font-size: 13px;
  color: var(--grey-light);
  transition: color 0.2s;
  letter-spacing: 0.2px;
}
.footer-col ul li a:hover { color: var(--highlight); }
.footer-bottom {
  border-top: 1px solid var(--grey-border);
  padding: 22px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-bottom p {
  font-size: 11px;
  color: var(--grey-light);
  letter-spacing: 0.4px;
  margin: 0;
}
.footer-bottom-links {
  display: flex;
  gap: 28px;
}
.footer-bottom-links a {
  font-size: 11px;
  color: var(--grey-light);
  letter-spacing: 0.4px;
  transition: color 0.2s;
}
.footer-bottom-links a:hover { color: var(--highlight); }

/* ─── FOCUS VISIBLE (accessibilità) ──────────────────── */
:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

/* ─── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 1200px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 900px) {
  .news-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .header-main { padding: 0 20px; }
  .hero-content { padding: 40px 24px; }
  .hero-title   { font-size: clamp(34px, 8vw, 56px); }
  .section-header { padding: 40px 20px 16px; }
  .news-grid { grid-template-columns: 1fr 1fr; }
  .footer-top    { grid-template-columns: 1fr; gap: 36px; padding: 48px 28px; }
  .footer-bottom { flex-direction: column; text-align: center; padding: 20px 24px; }
  .footer-bottom-links { flex-wrap: wrap; justify-content: center; gap: 16px; }
  .post-content-wrap { margin: 0; padding: 36px 24px 64px; }
  .nav-overlay { padding: 28px 28px 40px; }
  .search-overlay-inner { padding: 0 24px; }
}
@media (max-width: 480px) {
  .news-grid { grid-template-columns: 1fr; }
  .hero       { height: 80vh; }
  .site-logo  { font-size: 20px; letter-spacing: 4px; }
}
