/* ============================================================
   LUPIAE CHESS CLUB — Main Stylesheet
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* --- Custom Properties --- */
:root {
  --color-black:      #111111;
  --color-white:      #FFFFFF;
  --color-gold:       #C9A84C;
  --color-gold-light: #E8C97A;
  --color-dark:       #2D2D2D;
  --color-gray:       #6B6B6B;
  --color-gray-light: #F5F5F5;
  --color-border:     #E0E0E0;
  --color-accent-bg:  #1A1A1A;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --radius:    6px;
  --radius-lg: 12px;
  --shadow:    0 2px 12px rgba(0,0,0,.08);
  --shadow-md: 0 4px 24px rgba(0,0,0,.12);

  --container: 1200px;
  --gap:       2rem;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-dark);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--color-gold-light); }

ul, ol { padding-left: 1.5rem; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--color-black);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 600; }
h4 { font-size: 1.15rem; font-weight: 600; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 4rem 0; }
.section--dark { background: var(--color-accent-bg); color: var(--color-white); }
.section--gray { background: var(--color-gray-light); }

.section__header {
  text-align: center;
  margin-bottom: 3rem;
}

.section__header h2 { margin-bottom: .5rem; }

.section__header .subtitle {
  color: var(--color-gold);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .9rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  display: block;
  margin-bottom: .75rem;
}

/* --- Grid --- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-black);
  border-bottom: 3px solid var(--color-gold);
  box-shadow: 0 2px 16px rgba(0,0,0,.35);
  transition: transform .3s ease;
}

.site-header.header--hidden {
  transform: translateY(-100%);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: var(--container);
  margin: 0 auto;
  gap: 1.5rem;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: .85rem;
  flex-shrink: 0;
}

.site-logo__icon {
  font-size: 2.2rem;
  line-height: 1;
  color: var(--color-gold);
}

.site-logo__text { color: var(--color-white); }

.site-logo__name {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .01em;
}

.site-logo__tagline {
  display: block;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-top: 2px;
}

/* Navigation */
.site-nav { flex: 1; display: flex; justify-content: center; }

.site-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: .25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.site-nav a {
  display: block;
  padding: .55rem .9rem;
  color: #CCCCCC;
  font-size: .88rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: color .2s, background .2s;
}

.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current-menu-ancestor > a {
  color: var(--color-gold);
  background: rgba(201,168,76,.1);
}

/* Dropdown */
.site-nav .menu-item-has-children { position: relative; }

.site-nav .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: #1E1E1E;
  border: 1px solid rgba(201,168,76,.25);
  border-radius: var(--radius);
  padding: .5rem 0;
  min-width: 200px;
  box-shadow: var(--shadow-md);
  z-index: 200;
}

.site-nav .menu-item-has-children:hover > .sub-menu { display: block; }

.site-nav .sub-menu a {
  padding: .5rem 1.25rem;
  color: #BBBBBB;
  border-radius: 0;
  font-size: .85rem;
}

.site-nav .sub-menu a:hover { color: var(--color-gold); background: rgba(201,168,76,.08); }

/* Header CTA */
.header-cta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: .75rem;
}

/* Pulsante chiudi menu mobile — nascosto di default, mostrato via JS */
.nav-close {
  display: none;
  position: fixed;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1000;
  padding: .25rem .5rem;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius);
  padding: .5rem;
  cursor: pointer;
  color: var(--color-white);
  font-size: 1.4rem;
  line-height: 1;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .22s;
  text-decoration: none;
  line-height: 1;
}

.btn--primary {
  background: var(--color-gold);
  color: var(--color-black);
  border-color: var(--color-gold);
}
.btn--primary:hover { background: var(--color-gold-light); border-color: var(--color-gold-light); color: var(--color-black); }

.btn--outline {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,.5);
}
.btn--outline:hover { border-color: var(--color-gold); color: var(--color-gold); }

.btn--outline-dark {
  background: transparent;
  color: var(--color-black);
  border-color: var(--color-black);
}
.btn--outline-dark:hover { background: var(--color-black); color: var(--color-white); }

.btn--sm { padding: .5rem 1rem; font-size: .82rem; }
.btn--lg { padding: 1rem 2rem; font-size: 1rem; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  background: var(--color-black);
  min-height: 540px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(201,168,76,.08) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='0' width='60' height='60' fill='rgba(255,255,255,0.055)'/%3E%3Crect x='60' y='60' width='60' height='60' fill='rgba(255,255,255,0.055)'/%3E%3C/svg%3E");
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: 5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  gap: 3rem;
}
.hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(201,168,76,.15);
  border: 1px solid rgba(201,168,76,.4);
  color: var(--color-gold);
  padding: .35rem .85rem;
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero__title {
  color: var(--color-white);
  margin-bottom: 1.25rem;
}

.hero__title span { color: var(--color-gold); }

.hero__desc {
  color: #AAAAAA;
  font-size: 1.05rem;
  max-width: 520px;
  margin-bottom: 2rem;
}

.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero__chess-piece {
  font-size: clamp(14rem, 20vw, 22rem);
  color: rgba(201,168,76,.45);
  line-height: 1;
  user-select: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* ============================================================
   CARDS — TORNEI / APPUNTAMENTI
   ============================================================ */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}

.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.card__image { aspect-ratio: 16/9; overflow: hidden; background: var(--color-gray-light); }
.card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card__image img { transform: scale(1.04); }

.card__body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }

.card__meta {
  display: flex;
  gap: .75rem;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 100px;
  font-size: .73rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.badge--gold    { background: rgba(201,168,76,.15); color: #8B6914; }
.badge--green   { background: rgba(34,197,94,.1);  color: #166534; }
.badge--blue    { background: rgba(59,130,246,.1); color: #1D4ED8; }
.badge--gray    { background: var(--color-gray-light); color: var(--color-gray); }
.badge--red     { background: rgba(239,68,68,.1);  color: #B91C1C; }

.card__date {
  font-size: .82rem;
  color: var(--color-gray);
  display: flex;
  align-items: center;
  gap: .3rem;
}

.card__title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--color-black);
  margin-bottom: .5rem;
  line-height: 1.3;
}

.card__title a { color: inherit; }
.card__title a:hover { color: var(--color-gold); }

.card__excerpt {
  color: var(--color-gray);
  font-size: .88rem;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}

.card__info {
  list-style: none;
  padding: 0;
  margin: .75rem 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.card__info li {
  font-size: .83rem;
  color: var(--color-gray);
  display: flex;
  align-items: flex-start;
  gap: .4rem;
}

.card__info li strong { color: var(--color-dark); min-width: 70px; }

.card__footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

/* Card torneo stato */
.stato-in-corso    { border-top: 3px solid #22C55E; }
.stato-iscrizioni  { border-top: 3px solid var(--color-gold); }
.stato-concluso    { border-top: 3px solid var(--color-border); }
.stato-prossimamente { border-top: 3px solid #3B82F6; }

/* ============================================================
   UPCOMING EVENTS — Homepage strip
   ============================================================ */
.upcoming {
  background: var(--color-black);
  color: var(--color-white);
  padding: 3rem 0;
}

.upcoming__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.upcoming__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.upcoming__header h2 { color: var(--color-white); }

.upcoming-event {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(201,168,76,.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  transition: border-color .2s, background .2s;
}

.upcoming-event:hover { border-color: var(--color-gold); background: rgba(201,168,76,.05); }

.upcoming-event__date {
  text-align: center;
  background: var(--color-gold);
  color: var(--color-black);
  border-radius: var(--radius);
  padding: .5rem .75rem;
  min-width: 60px;
  font-family: var(--font-heading);
}

.upcoming-event__date .day   { display: block; font-size: 1.8rem; font-weight: 700; line-height: 1; }
.upcoming-event__date .month { display: block; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

.upcoming-event__body h3 {
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: .25rem;
}

.upcoming-event__body p {
  color: #999;
  font-size: .82rem;
  margin: 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.upcoming-events-list { display: flex; flex-direction: column; gap: 1rem; }

/* ============================================================
   NEWS SECTION
   ============================================================ */
.news-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--gap); }

/* ============================================================
   RESULTS — ultimi vincitori
   ============================================================ */
.results-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.results-list__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.results-list__trophy { font-size: 1.5rem; flex-shrink: 0; }

.results-list__info h4 { font-size: .95rem; margin-bottom: .1rem; }
.results-list__info p  { font-size: .8rem; color: var(--color-gray); margin: 0; }

/* ============================================================
   ABOUT / CIRCOLO section
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about__stat-row {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.about__stat {
  text-align: center;
  padding: 1.25rem;
  background: var(--color-gray-light);
  border-radius: var(--radius);
  border-top: 3px solid var(--color-gold);
}

.about__stat .num {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-gold);
  line-height: 1;
}

.about__stat .label { font-size: .78rem; color: var(--color-gray); margin-top: .25rem; font-weight: 500; }

.about__orari {
  background: var(--color-black);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
}

.about__orari h4 { color: var(--color-gold); margin-bottom: 1rem; }

.orari-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .6rem 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: .9rem;
}

.orari-row:last-child { border-bottom: none; }
.orari-row .giorno { color: #AAA; }
.orari-row .orario { color: var(--color-gold); font-weight: 600; }

/* ============================================================
   DIDATTICA
   ============================================================ */
.didattica-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.didattica-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.didattica-card::before {
  content: attr(data-piece);
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 7rem;
  opacity: .05;
  line-height: 1;
  pointer-events: none;
}

.didattica-card__icon { font-size: 2.5rem; margin-bottom: 1.25rem; }
.didattica-card h3   { margin-bottom: .75rem; }
.didattica-card p    { color: var(--color-gray); font-size: .9rem; margin-bottom: 1.25rem; }

.didattica-card ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

.didattica-card ul li {
  font-size: .85rem;
  color: var(--color-dark);
  padding: .3rem 0;
  display: flex;
  gap: .5rem;
}

.didattica-card ul li::before { content: '♟'; color: var(--color-gold); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #0A0A0A;
  color: #AAA;
  border-top: 3px solid var(--color-gold);
}

.site-footer__main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-col h4 {
  color: var(--color-white);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid rgba(201,168,76,.3);
}

.footer-col p { font-size: .85rem; line-height: 1.7; }

.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: .4rem; }
.footer-col ul a {
  color: #999;
  font-size: .85rem;
  transition: color .2s;
}
.footer-col ul a:hover { color: var(--color-gold); }

.footer-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.footer-logo {
  width: 260px;
  height: auto;
  display: block;
  transition: opacity .2s;
}
.footer-logo:hover { opacity: .75; }

.footer-contact-item {
  display: flex;
  gap: .6rem;
  margin-bottom: .6rem;
  font-size: .85rem;
  align-items: flex-start;
}

.footer-contact-item .icon { color: var(--color-gold); flex-shrink: 0; margin-top: 2px; }

.footer-affiliations {
  display: flex;
  gap: .75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.affiliation-badge {
  background: rgba(201,168,76,.1);
  border: 1px solid rgba(201,168,76,.25);
  color: var(--color-gold);
  padding: .3rem .75rem;
  border-radius: var(--radius);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer__bottom p { font-size: .78rem; margin: 0; }

.footer-legal-links { display: flex; gap: 1.25rem; }
.footer-legal-links a { color: #777; font-size: .78rem; }
.footer-legal-links a:hover { color: var(--color-gold); }

/* ============================================================
   INNER PAGE LAYOUT
   ============================================================ */
.page-hero {
  background: var(--color-black);
  padding: 3.5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='0' width='20' height='20' fill='rgba(255,255,255,0.015)'/%3E%3Crect x='20' y='20' width='20' height='20' fill='rgba(255,255,255,0.015)'/%3E%3C/svg%3E");
}

.page-hero__inner { position: relative; z-index: 1; max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.page-hero h1 { color: var(--color-white); margin-bottom: .5rem; }
.page-hero .breadcrumb { color: #777; font-size: .82rem; }
.page-hero .breadcrumb a { color: var(--color-gold); }

.content-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  max-width: var(--container);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.main-content { min-width: 0; }
.sidebar { min-width: 0; }

/* Entry content typography */
.entry-content h2 { margin: 2rem 0 1rem; }
.entry-content h3 { margin: 1.75rem 0 .75rem; }
.entry-content p  { margin-bottom: 1.1rem; }
.entry-content ul, .entry-content ol { margin-bottom: 1.1rem; }
.entry-content li { margin-bottom: .35rem; }
.entry-content blockquote {
  border-left: 4px solid var(--color-gold);
  padding: 1rem 1.5rem;
  background: var(--color-gray-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  margin: 1.5rem 0;
}

/* ============================================================
   TORNEO SINGLE
   ============================================================ */
.torneo-header {
  background: var(--color-black);
  color: var(--color-white);
  padding: 3rem 0;
}

.torneo-header__inner { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.torneo-header h1 { color: var(--color-white); margin-bottom: 1rem; }

.torneo-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
  gap: 1rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(201,168,76,.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.torneo-meta-item { text-align: center; }
.torneo-meta-item .meta-icon { font-size: 1.5rem; margin-bottom: .35rem; color: var(--color-gold); }
.torneo-meta-item .meta-label { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #777; margin-bottom: .2rem; }
.torneo-meta-item .meta-value { display: block; font-weight: 600; color: var(--color-white); font-size: .95rem; }

/* ============================================================
   ARCHIVIO TORNEI
   ============================================================ */
.filters-bar {
  background: var(--color-gray-light);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.filters-bar label { font-size: .85rem; font-weight: 600; color: var(--color-dark); }

.filters-bar select {
  padding: .45rem .85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .85rem;
  background: var(--color-white);
  color: var(--color-dark);
  cursor: pointer;
}

/* ============================================================
   SIDEBAR WIDGETS
   ============================================================ */
.widget {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.widget__title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--color-black);
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--color-gold);
}

.widget--contact { border-top: 3px solid var(--color-gold); }

.contact-info { list-style: none; padding: 0; }
.contact-info li { display: flex; gap: .5rem; margin-bottom: .6rem; font-size: .88rem; align-items: flex-start; }
.contact-info .icon { color: var(--color-gold); flex-shrink: 0; margin-top: 2px; }

/* SVG icon alignment */
.icon svg, .meta-icon svg, .results-list__trophy svg, .btn svg, h4 svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.torneo-meta-item .meta-icon { display: flex; justify-content: center; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.pagination a, .pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 .75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 500;
  color: var(--color-dark);
  transition: all .2s;
}

.pagination a:hover      { border-color: var(--color-gold); color: var(--color-gold); }
.pagination .current     { background: var(--color-gold); border-color: var(--color-gold); color: var(--color-black); }

/* ============================================================
   NOTICE / ALERT BOXES
   ============================================================ */
.notice {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: .9rem;
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.notice--info    { background: rgba(59,130,246,.08);  border-left: 4px solid #3B82F6; color: #1E40AF; }
.notice--success { background: rgba(34,197,94,.08);   border-left: 4px solid #22C55E; color: #166534; }
.notice--warning { background: rgba(234,179,8,.08);   border-left: 4px solid #EAB308; color: #854D0E; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .site-footer__main { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .about-grid { gap: 2.5rem; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__chess-piece { display: none; }
}

@media (max-width: 768px) {
  .section { padding: 3rem 0; }

  .site-nav  { display: none; }
  .nav-toggle { display: block; }

  .site-nav.is-open {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,.96);
    z-index: 999;
    overflow-y: auto;
    padding: 5rem 2rem 2rem;
  }

  .site-nav.is-open ul {
    flex-direction: column;
    gap: .25rem;
  }

  .site-nav.is-open a {
    font-size: 1.2rem;
    padding: .85rem 1rem;
  }

  .site-nav.is-open .sub-menu {
    display: block;
    position: static;
    transform: none;
    background: rgba(255,255,255,.04);
    border: none;
    padding-left: 1rem;
    box-shadow: none;
    margin-top: .25rem;
  }

  /* .nav-close mostrato/nascosto via JS in main.js */

  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .didattica-cards { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about__stat-row { grid-template-columns: repeat(3,1fr); }
  .content-layout { grid-template-columns: 1fr; }
  .site-footer__main { grid-template-columns: 1fr; gap: 2rem; }
  .upcoming-event { grid-template-columns: auto 1fr; }
  .upcoming-event:last-child .btn { display: none; }
  .torneo-meta-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 480px) {
  .hero { min-height: auto; }
  .hero__inner { padding: 3rem 1rem; }
  .hero__actions { flex-direction: column; }
  .about__stat-row { grid-template-columns: 1fr 1fr; }
  .site-footer__bottom { flex-direction: column; text-align: center; }
}

/* ============================================================
   TABELLE (usate nelle pagine statiche: Sede, Statuto, CIS)
   ============================================================ */
.entry-content table,
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .9rem;
}

.entry-content th,
.entry-content td,
th, td {
  padding: .7rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.entry-content thead th,
thead th {
  background: var(--color-black);
  color: var(--color-white);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.entry-content tbody tr:hover,
tbody tr:hover {
  background: rgba(201,168,76,.05);
}

.entry-content tbody tr:nth-child(even),
tbody tr:nth-child(even) {
  background: var(--color-gray-light);
}

.entry-content tbody tr:nth-child(even):hover,
tbody tr:nth-child(even):hover {
  background: rgba(201,168,76,.08);
}

/* ============================================================
   ACCESSIBILITÀ — focus ring visibile
   ============================================================ */
:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 2px;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-gold   { color: var(--color-gold); }
.text-center { text-align: center; }
.text-gray   { color: var(--color-gray); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ============================================================
   VEGA RESULTS — Sezione risultati torneo con navigazione rapida
   ============================================================ */
.vega-results {
  margin-top: 2.5rem;
  padding: 1.75rem 2rem;
  background: var(--color-gray-light);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--color-gold);
}

.vega-results__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: .4rem;
}

.vega-results__intro {
  font-size: .87rem;
  color: var(--color-gray);
  margin-bottom: 1.25rem;
}

.vega-results__nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.vega-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 15px;
  border: 1.5px solid var(--color-border);
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-dark);
  background: var(--color-white);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s;
}

.vega-btn:hover {
  border-color: var(--color-gold);
  color: #7a5c1a;
  background: #fefce8;
}

.vega-btn--primary {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-black);
  font-weight: 700;
}

.vega-btn--primary:hover {
  background: #b8923a;
  border-color: #b8923a;
  color: var(--color-white);
}

.vega-results--pending {
  border-left-color: #9ca3af;
  background: #f9fafb;
}

.vega-results--pending .vega-results__title {
  color: var(--color-gray);
}

/* ============================================================
   IL CIRCOLO — Landing page card grid
   ============================================================ */
.circolo-intro {
  max-width: 660px;
  margin: 0 auto 3rem;
  text-align: center;
}

.circolo-intro .subtitle {
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .9rem;
  font-weight: 600;
  display: block;
  margin-bottom: .6rem;
}

.circolo-intro h2 { margin-bottom: 1rem; }

.circolo-intro p {
  color: var(--color-gray);
  font-size: 1.05rem;
  line-height: 1.75;
}

.circolo-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.circolo-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .75rem;
  padding: 2rem 1.75rem;
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  color: var(--color-dark);
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.circolo-card:hover {
  border-color: var(--color-gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  color: var(--color-dark);
}

.circolo-card__icon {
  font-size: 2.2rem;
  line-height: 1;
  color: var(--color-gold);
}

.circolo-card__title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-black);
  margin: 0;
}

.circolo-card__desc {
  font-size: .9rem;
  color: var(--color-gray);
  line-height: 1.65;
  flex: 1;
  margin: 0;
}

.circolo-card__cta {
  font-size: .82rem;
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: .04em;
  margin-top: auto;
  transition: letter-spacing .15s;
}

.circolo-card:hover .circolo-card__cta { letter-spacing: .08em; }

@media (max-width: 900px) {
  .circolo-cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .circolo-cards { grid-template-columns: 1fr; }
}

/* ============================================================
   ANIMAZIONI
   ============================================================ */

/* Keyframes */
@keyframes lupiae-fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

@keyframes lupiae-float {
  0%, 100% { transform: translateY(0); }
  42%       { transform: translateY(-20px) rotate(-1.2deg); }
  72%       { transform: translateY(-10px) rotate(.6deg); }
}

@keyframes lupiae-badge-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,0); }
  50%       { box-shadow: 0 0 0 10px rgba(201,168,76,.09); }
}

/* Hero entrance */
.hero__badge {
  animation: lupiae-fade-up .5s ease both,
             lupiae-badge-glow 4s 2.5s ease-in-out infinite;
}
.hero__title   { animation: lupiae-fade-up .55s .12s ease both; }
.hero__desc    { animation: lupiae-fade-up .55s .24s ease both; }
.hero__actions { animation: lupiae-fade-up .55s .38s ease both; }
.hero__chess-piece { animation: lupiae-float 9s ease-in-out infinite; }

/* Page-hero (archivio, single, pagine interne) */
.page-hero h1          { animation: lupiae-fade-up .45s ease both; }
.page-hero .breadcrumb { animation: lupiae-fade-up .45s .1s ease both; }
.torneo-header__inner  { animation: lupiae-fade-up .45s ease both; }
.vega-results          { animation: lupiae-fade-up .5s .1s ease both; }

/* Scroll reveal (classe aggiunta via JS) */
.lupiae-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s cubic-bezier(.25,.46,.45,.94),
              transform .5s cubic-bezier(.25,.46,.45,.94);
  transition-delay: var(--reveal-delay, 0ms);
}
.lupiae-reveal.lupiae-visible {
  opacity: 1;
  transform: none;
}

/* Button primary — sweep luminoso al hover */
.btn--primary { position: relative; overflow: hidden; }
.btn--primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 55%;
  height: 200%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.2), transparent);
  transform: skewX(-18deg);
  transition: left .45s ease;
  pointer-events: none;
}
.btn--primary:hover::after { left: 160%; }

/* Card hover — bordo oro sottile */
.card:hover { border-color: rgba(201,168,76,.25); }

/* Didattica card — lift al hover */
.didattica-card { transition: transform .28s ease, box-shadow .28s ease; }
.didattica-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

/* Circolo landing card — lift + bordo oro */
.circolo-card { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.circolo-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: rgba(201,168,76,.35); }

/* About stat — lift al hover */
.about__stat { transition: transform .22s ease; }
.about__stat:hover { transform: translateY(-4px); }

/* Upcoming event — slide laterale + transizione su transform */
.upcoming-event { transition: border-color .2s, background .2s, transform .2s; }
.upcoming-event:hover { transform: translateX(5px); }

/* Results list — slide laterale, trophy oro */
.results-list__trophy { transition: color .2s ease; }
.results-list__item   { transition: transform .2s ease; }
.results-list__item:hover { transform: translateX(5px); }
.results-list__item:hover .results-list__trophy { color: var(--color-gold); }

/* Torneo meta — lift al hover */
.torneo-meta-item { transition: transform .2s ease; }
.torneo-meta-item:hover { transform: translateY(-3px); }

/* Subtitle — sottolineatura che si espande al reveal */
.subtitle { position: relative; display: inline-block; }
.subtitle::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--color-gold);
  border-radius: 2px;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform .65s cubic-bezier(.25,.46,.45,.94) .25s;
}
.section__header.lupiae-visible .subtitle::after {
  transform: translateX(-50%) scaleX(1);
}

/* Accessibilità: riduce le animazioni se l'utente lo preferisce */
@media (prefers-reduced-motion: reduce) {
  .hero__badge, .hero__title, .hero__desc, .hero__actions,
  .hero__chess-piece, .page-hero h1, .page-hero .breadcrumb,
  .torneo-header__inner, .vega-results {
    animation: none;
  }
  .lupiae-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .subtitle::after { transition: none; }
  .btn--primary::after { display: none; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .site-header, .site-footer, .sidebar, .filters-bar { display: none; }
  .content-layout { grid-template-columns: 1fr; }
  a::after { content: ' (' attr(href) ')'; font-size: .75rem; }
}
