/* =========================================================
   Amici di Paese — modern.css
   Single, self-contained stylesheet (no Bootstrap dependency).
   Structure:
     1. Tokens
     2. Reset & base
     3. Layout helpers
     4. Navigation
     5. Hero
     6. About
     7. Iniziative (card grid)
     8. Eventi (alternating timeline)
     9. Footer
     10. Scroll-reveal / motion
     11. Responsive
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  /* color: white / light-gray / near-black base, orange as the only accent */
  --ink: #15140f;
  --ink-soft: #57534a;
  --line: #e7e3da;
  --paper: #ffffff;
  --paper-alt: #f6f4ee;
  --orange: #f76100;
  --orange-dark: #c94e00;
  --orange-soft: #fff0e3;

  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --radius-s: 14px;
  --radius-m: 20px;
  --radius-l: 28px;

  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 6.5rem;

  --container: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- 2. Reset & base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

a {
  color: var(--orange);
  text-decoration: none;
}
a:hover { color: var(--orange-dark); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 999;
}
.skip-link:focus { left: 0; }

/* ---------- 3. Layout helpers ---------- */
.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section { padding: var(--space-9) 0; }
.section-alt { background: var(--paper-alt); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orange-dark);
  margin: 0 0 var(--space-3);
  display: block;
}
.eyebrow-light { color: #ffd8ad; }

.section-head { max-width: 640px; margin: 0 0 var(--space-7); }
.section-title { font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 30px;
  border-radius: 999px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 10px 24px rgba(247, 97, 0, 0.28);
}
.btn-primary:hover {
  background: var(--orange-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(247, 97, 0, 0.34);
}

/* ---------- 4. Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: var(--space-4) 0;
  background: transparent;
  transition: background 0.3s var(--ease), backdrop-filter 0.3s var(--ease), padding 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.nav.is-scrolled {
  background: rgba(21, 20, 15, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  padding: var(--space-3) 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}
.nav-brand img { border-radius: 50%; }
.nav-brand:hover { color: #fff; }

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 500;
  font-size: 0.92rem;
  position: relative;
  padding: 6px 0;
}
.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s var(--ease);
}
.nav-menu a:hover { color: #fff; }
.nav-menu a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: calc(-1 * (var(--space-4) * 2 + 40px));
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
  transition: transform 0.6s var(--ease);
}

.hero:hover .hero-bg {
  transform: scale(1.08);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 14, 10, 0.55) 0%, rgba(15, 14, 10, 0.72) 60%, rgba(15, 14, 10, 0.85) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 var(--space-6);
  max-width: 720px;
}

.hero-title {
  font-size: clamp(2.6rem, 2rem + 4vw, 4.6rem);
  color: #fff;
  margin-bottom: var(--space-4);
}
.hero-title .accent { color: var(--orange); }

.hero-sub {
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.2rem);
  color: rgba(255, 255, 255, 0.85);
  max-width: 480px;
  margin: 0 auto var(--space-6);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: var(--space-6);
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  z-index: 1;
}
.scroll-cue span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  background: #fff;
  border-radius: 2px;
  animation: scrollcue 1.8s ease infinite;
}
@keyframes scrollcue {
  0% { opacity: 1; transform: translateY(0); }
  70% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 0; transform: translateY(0); }
}

/* ---------- 6. About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-8);
  align-items: center;
}

.about-mark { max-width: 220px; margin: var(--space-4) auto var(--space-5);}

.lede {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--ink-soft);
  text-align: justify;
  font-weight: 500;
  max-width: 46ch;
}

.about-media { position: relative; }
.about-img {
  width: 100%;
  aspect-ratio: 4 / 3.2;
  object-fit: cover;
  border-radius: var(--radius-l);
  box-shadow: 0 30px 60px -20px rgba(21, 20, 15, 0.25);
}

.about-badge {
  position: absolute;
  left: -24px;
  bottom: -24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: var(--space-4) var(--space-5);
  box-shadow: 0 18px 34px -14px rgba(21, 20, 15, 0.22);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.about-badge strong {
  font-family: var(--font-display);
  color: var(--orange);
  font-size: 1.2rem;
}
.about-badge span { font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- 6.5 SWIPER ------------------------- */
.about-swiper {
    width: 100%;
    height: 400px;
    border-radius: var(--radius-l);
    overflow: hidden;
    box-shadow: 0 30px 60px -20px rgba(21, 20, 15, 0.25);
}

.about-swiper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* ---------- 7. Iniziative (card grid) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: visible;
  position: relative;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 48px -20px rgba(21, 20, 15, 0.2);
  border-color: transparent;
}

.card-media {
  position: relative;
  height: 220px;
  border-radius: var(--radius-l) var(--radius-l) 0 0;
  z-index: 1;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
  border-radius: var(--radius-l) var(--radius-l) 0 0;
}

.card:hover .card-media img {
  transform: scale(1.06);
}

/* Icona sovrapposta tra immagine e contenuto */
.card-icon {
  position: absolute;

  left: 50%;
  bottom: -30px;

  transform: translateX(-50%);

  width: 60px;
  height: 60px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--ink);
  color: var(--orange);

  border-radius: 50%;

  font-size: 1.25rem;

  border: 2px solid var(--paper);

  box-shadow: 0 8px 20px rgba(21, 20, 15, 0.35);

  z-index: 999;
}

.card:hover .card-icon {
  transform: translateX(-50%) translateY(-4px);
  box-shadow: 0 14px 30px rgba(21, 20, 15, 0.4);
}

.card-body {
  position: relative;
  text-align: justify;
  z-index: 0;

  padding: 48px var(--space-5) var(--space-5);
}

.card-body h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-3);
}

.card-body p {
  font-size: 0.96rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* ---------- 8. Eventi (alternating timeline) ---------- */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-9);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
  transform: translateX(-50%);
}

.event {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}

.event::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 12px; height: 12px;
  background: var(--orange);
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 1px var(--line);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.photo-media img {
  height: 140px;
}

.event-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-l);
  transition: transform 0.5s var(--ease);
}
.event-media { overflow: hidden; border-radius: var(--radius-l); }
.event:hover .event-media img { transform: scale(1.04); }

.event-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orange-dark);
  background: var(--orange-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: var(--space-3);
}

.event-content h3 { font-size: 1.4rem; margin-bottom: var(--space-3); }
.event-content p { color: var(--ink-soft); text-align:justify; line-height: 1.75; max-width: 44ch; }

.photo-content h3 { font-size: 1.1rem; margin-bottom: var(--space-3); text-align: center}
.photo-content p { color: var(--ink-soft); text-align:justify; line-height: 1.75; max-width: 44ch; text-align: center}
.photo-content {
    text-align: center;
}

.photo-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orange-dark);
  background: var(--orange-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: var(--space-3);
}

.event:nth-child(even) .event-media { order: 2; }
.event:nth-child(even) .event-content { order: 1; }

/* ---------- 9. Footer ---------- */
.footer {
  background: var(--ink);
  color: #cfc9bd;
  padding: 24px 0;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  color: #fff;
  font-weight: 600;
  gap: 12px; /* spazio tra logo e scritta */
}
.footer-brand img { border-radius: 50%; }

.footer-contact {
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1.8;
  color: #b6afa1;
  text-align: center;
}
.footer-contact a {
	font-style: normal;
	font-size: 0.9rem;
	line-height: 1.8;
	color: #b6afa1;
}
.footer-contact a:hover { color: var(--orange); }

.footer-social { display: flex; gap: var(--space-3); }
.footer-social a {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(247, 97, 0, 0.14);
  color: var(--orange);
  font-size: 1.05rem;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.footer-social a:hover {
  background: var(--orange);
  color: #fff;
  transform: translateY(-2px);
}

.footer-easter-egg {
	color: var(--ink); /* eredita il colore di sfondo del footer, se il footer usa "background" e il testo ha lo stesso colore */
	user-select: text; /* assicura che sia selezionabile */
	cursor: default;
	font-size: 0.9rem;
}

/* ---------- 10. Scroll-reveal / motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 11. Responsive ---------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-badge { position: static; margin-top: var(--space-5); display: inline-flex; flex-direction: row; gap: var(--space-3); align-items: baseline; }
  .card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(21, 20, 15, 0.96);
    backdrop-filter: blur(14px);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease);
  }
  .nav-menu.is-open { max-height: 320px; }
  .nav-menu li { width: 100%; }
  .nav-menu a { display: block; padding: var(--space-4) var(--space-6); width: 100%; }
  .nav-menu a::after { display: none; }

  .section { padding: var(--space-8) 0; }
  .wrap { padding: 0 var(--space-5); }

  .timeline::before { display: none; }
  .event::after { display: none; }
  .event {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
  .event:nth-child(even) .event-media,
  .event:nth-child(even) .event-content { order: initial; }

  .footer-grid { flex-direction: column; text-align: center; }
}

/* ---------- 12. Page hero (subpages, shorter than homepage hero) ---------- */
.hero-page {
  min-height: 56vh;
}

.hero-page .hero-content { max-width: 640px; }

/* ---------- 13. Simple photo gallery (subpage support imagery) ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-7);
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-l);
  box-shadow: 0 22px 44px -20px rgba(21, 20, 15, 0.22);
  transition: transform 0.4s var(--ease);
}

.gallery-grid img:hover { transform: translateY(-4px); }

/* ---------- 14. Booking panel & form ---------- */
.booking-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: var(--space-7);
  box-shadow: 0 26px 60px -26px rgba(21, 20, 15, 0.2);
  max-width: 760px;
  margin: var(--space-8) auto 0;
}

.booking-intro { max-width: 620px; margin: 0 auto var(--space-7); text-align: center; }
.booking-intro .lede { margin: 0 auto; text-align: center; max-width: 52ch; }

.cancel-note {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: var(--space-4);
}

.cancel-link {
  color: var(--orange-dark);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}
.cancel-link:hover { color: var(--orange); }

.cancel-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
  justify-content: center;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.form-group { margin-bottom: var(--space-5); }

.form-label {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  font-family: var(--font-body);
  font-size: 0.96rem;
  color: var(--ink);
  background: var(--paper-alt);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.form-control:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
  background: var(--paper);
}

.calendar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  max-width: 480px;
  margin: 10px auto 0;
}

.day {
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-align: center;
  cursor: pointer;
  color: var(--ink-soft);
  background: var(--paper-alt);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
  user-select: none;
}

.day:hover { border-color: var(--orange); color: var(--orange-dark); }

.day.selected,
.day.active {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

.form-btn {
  margin-top: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

/* ---------- 15. Responsive additions ---------- */
@media (max-width: 760px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .booking-panel { padding: var(--space-5); }
  .calendar { grid-template-columns: repeat(4, 1fr); max-width: 340px; }
}

@media (max-width: 380px) {
  .calendar { grid-template-columns: repeat(3, 1fr); max-width: 260px; }
}

/* ---------- 16. Week tabs (Jerago Beach programme switcher) ---------- */
.week-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.week-tab {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1.4;
  text-align: center;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

.week-tab .week-dates {
  display: block;
  font-family: var(--font-body);
  text-transform: none;
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--ink-soft);
  opacity: 0.75;
  margin-top: 2px;
}

.week-tab:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
  transform: translateY(-2px);
}

.week-tab.is-active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  box-shadow: 0 10px 24px rgba(247, 97, 0, 0.28);
}

.week-tab.is-active .week-dates { color: #fff; opacity: 0.85; }

.week-panel[hidden] { display: none; }

.timeline {
  animation: timeline-in 0.4s var(--ease);
}

@keyframes timeline-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .timeline { animation: none; }
}

@media (max-width: 600px) {
  .week-tabs { gap: 8px; }
  .week-tab { padding: 10px 16px; font-size: 0.76rem; }
}

/* ---------- 17. Notice chip (small friendly inline notes) ---------- */
.notice-chip-wrap {
  text-align: center;
  margin: 0 0 var(--space-7);
}

.notice-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 9px 20px;
  border-radius: 999px;
}

.notice-chip i { font-size: 0.95rem; }

/* ---------- 18. Weekend highlights grid — concert ticket style ---------- */
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5) var(--space-4);
  padding: var(--space-4) 0;
}

.h-secret {
	color: var(--paper-alt); /* punto di partenza, poi sovrascritto sotto */
}

.highlight-card .h-secret {
	color: var(--paper-alt); /* deve combaciare ESATTAMENTE con lo sfondo del bottone */
	user-select: text;
	cursor: default;
}

.highlight-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  background: var(--paper-alt);
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 16px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: var(--space-5) var(--space-5) var(--space-4);
  cursor: pointer;
  font-family: var(--font-body);
  transform: rotate(0deg);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.gallery-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: #f0f0f0;
}

.photo-content {
    padding: var(--space-3);
    text-align:center;
}

.highlight-grid .highlight-card:nth-child(3n+1) { transform: rotate(-1.6deg); }
.highlight-grid .highlight-card:nth-child(3n+2) { transform: rotate(1deg); }
.highlight-grid .highlight-card:nth-child(3n+3) { transform: rotate(-0.6deg); }

.highlight-card:hover {
  transform: rotate(0deg) translateY(-6px) scale(1.03);
  box-shadow: 0 20px 40px -16px rgba(247, 97, 0, 0.32);
  border-color: var(--orange);
  z-index: 2;
}

.h-emoji {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 1.35rem;
  transform: rotate(10deg);
  filter: drop-shadow(0 2px 3px rgba(21, 20, 15, 0.18));
}

.highlight-card .h-date {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--orange-dark);
  background: var(--orange-soft);
  padding: 5px 12px;
  border-radius: 999px;
}

.highlight-card .h-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.3;
  padding-top: 10px;
  border-top: 2px dashed var(--line);
  width: 100%;
}

.highlight-card.featured {
  background: var(--ink);
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(247, 97, 0, 0.18), 0 18px 34px -16px rgba(0, 0, 0, 0.5);
}

.highlight-card.featured:hover {
  box-shadow: 0 0 0 3px rgba(247, 97, 0, 0.35), 0 24px 44px -16px rgba(0, 0, 0, 0.55);
}

.highlight-card.featured .h-date { color: #ffb877; background: rgba(255, 184, 119, 0.16); }
.highlight-card.featured .h-name { color: #fff; border-top-color: rgba(255, 255, 255, 0.22); }

@media (max-width: 900px) {
  .highlight-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .highlight-grid { grid-template-columns: 1fr; }
  .highlight-grid .highlight-card { transform: rotate(0deg); }
  .highlight-card:hover { transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  .highlight-card,
  .highlight-grid .highlight-card:nth-child(3n+1),
  .highlight-grid .highlight-card:nth-child(3n+2),
  .highlight-grid .highlight-card:nth-child(3n+3) {
    transform: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
  }
}

/* ---------- 19. Event flash (highlight-card jump target) ---------- */
.event-flash .event-media img {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}

.event-flash {
  animation: event-pulse 1.4s var(--ease);
}

@keyframes event-pulse {
  0% { box-shadow: 0 0 0 0 rgba(247, 97, 0, 0.35); }
  30% { box-shadow: 0 0 0 12px rgba(247, 97, 0, 0.12); }
  100% { box-shadow: 0 0 0 0 rgba(247, 97, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .event-flash { animation: none; }
}

/* ---------- 20. Galleria foto — card grid & lightbox (foto.html) ---------- */
.gallery-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.gallery-card {
  background: var(--paper);
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(21, 20, 15, 0.08);
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.gallery-card:hover,
.gallery-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(21, 20, 15, 0.14);
  border-color: var(--orange);
  outline: none;
}

.photo-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--orange-dark);
  background: var(--orange-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.photo-content h3 {
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.3;
}

.photo-count {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--orange-dark);
  font-weight: 600;
}

/* Lightbox overlay */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 14, 10, 0.92);
  z-index: 999;
  display: none;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
  padding: var(--space-4);
}

.lightbox-overlay.is-open { display: flex; }

.lightbox-container {
  position: relative;
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  background: var(--ink);
  border-radius: var(--radius-l);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-header h2 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
}

.lightbox-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: var(--radius-s);
  transition: background 0.2s var(--ease);
}
.lightbox-close:hover,
.lightbox-close:focus-visible { background: rgba(255, 255, 255, 0.12); }

.lightbox-slider {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  background: #0d0d1a;
}

.lightbox-slider img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  display: none;
  border-radius: 8px;
}

.lightbox-slider img.is-active {
  display: block;
  animation: lightboxFade 0.3s var(--ease);
}

@keyframes lightboxFade {
  from { opacity: 0.4; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  padding: 12px 18px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s var(--ease);
  backdrop-filter: blur(4px);
}
.lightbox-nav:hover,
.lightbox-nav:focus-visible { background: rgba(255, 255, 255, 0.3); }
.lightbox-nav.prev { left: 16px; }
.lightbox-nav.next { right: 16px; }

.lightbox-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-counter {
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.lightbox-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 9px 20px;
  border-radius: var(--radius-s);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.lightbox-download:hover { background: var(--orange-dark); }
.lightbox-download:disabled { opacity: 0.6; cursor: not-allowed; }

.lightbox-thumbnails {
  display: flex;
  gap: 8px;
  padding: var(--space-3) var(--space-5);
  background: rgba(0, 0, 0, 0.2);
  overflow-x: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.lightbox-thumbnails img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-s);
  cursor: pointer;
  opacity: 0.5;
  border: 2px solid transparent;
  transition: opacity 0.2s var(--ease), border-color 0.2s var(--ease);
  flex-shrink: 0;
}
.lightbox-thumbnails img:hover { opacity: 0.8; }
.lightbox-thumbnails img.is-active-thumb {
  opacity: 1;
  border-color: var(--orange);
}

@media (max-width: 640px) {
  .gallery-grid-cards {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }
  .gallery-card-img { height: 140px; }

  .lightbox-container { max-height: 96vh; }
  .lightbox-slider { min-height: 260px; }
  .lightbox-slider img { max-height: 48vh; }
  .lightbox-nav { font-size: 1.2rem; padding: 8px 12px; }
  .lightbox-nav.prev { left: 8px; }
  .lightbox-nav.next { right: 8px; }
  .lightbox-header h2 { font-size: 0.95rem; }
  .lightbox-download { padding: 7px 14px; font-size: 0.8rem; }
  .lightbox-thumbnails img { width: 46px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox-slider img.is-active { animation: none; }
}
