/* ============================================================
   MYOLDSLAVE.XXX — Main Stylesheet
   Dark, elegant, BDSM-themed design
   ============================================================ */

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #000000;
  --surface:      #0a0a0a;
  --surface2:     #111111;
  --border:       #222222;
  --accent:       #aa0015;
  --accent-light: #e8001c;
  --accent-glow:  rgba(232, 0, 28, 0.3);
  --text:         #d4d4d4;
  --text-muted:   #777;
  --text-bright:  #f0f0f0;
  --header-h:     145px;
  --sidebar-w:    220px;
  --radius:       4px;
  --transition:   0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Lato', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; }

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

/* === AGE GATE === */
#age-gate {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.age-gate-box {
  text-align: center;
  max-width: 480px;
  padding: 48px 40px;
  border: 1px solid var(--accent);
  background: var(--surface);
  border-radius: 8px;
  box-shadow: 0 0 60px var(--accent-glow);
}

.age-gate-logo {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 2px;
  margin-bottom: 24px;
}

.age-gate-warning {
  font-size: 1.1rem;
  color: var(--accent-light);
  font-weight: 700;
  margin-bottom: 16px;
}

.age-gate-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
  line-height: 1.7;
}

.age-gate-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.age-gate-disclaimer {
  margin-top: 28px;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.28);
  line-height: 1.6;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  letter-spacing: 0.02em;
}

#btn-enter {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px 32px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background var(--transition), box-shadow var(--transition);
}

#btn-enter:hover {
  background: var(--accent-light);
  box-shadow: 0 0 20px var(--accent-glow);
}

#btn-leave {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 14px 24px;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all var(--transition);
}

#btn-leave:hover { border-color: var(--text-muted); color: var(--text); }

/* === HEADER === */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: #000;
  border-bottom: 3px solid var(--accent-light);
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.6);
}

.header-inner {
  max-width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 0 0 24px;
  gap: 16px;
}

/* Colonna sinistra header — contiene logo + contact pill */
.header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
}

/* Logo — angolo in alto a sinistra */
.logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}

/* Avatar rettangolare verticale (mezzo busto) */
.header-avatar-wrap {
  width: 56px;
  height: 80px;
  border-radius: 4px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--surface2);
}

.header-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-main {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-light);
  letter-spacing: 1px;
}

.logo-sub {
  font-size: 0.62rem;
  color: #ffffff;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.logo:hover .logo-main { color: #fff; }

/* Foto decorativa centrale nell'header */
.header-center-photo-wrap {
  height: calc(var(--header-h) - 10px);
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.header-center-photo {
  height: 100%;
  width: 100%;
  max-width: 600px;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius);
}

/* Colonna destra: nav + ricerca impilati */
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  padding-bottom: 6px;
}

/* La barra di ricerca scende un po' rispetto alla nav */
.header-right .header-search-wrap {
  margin-top: 4px;
}

/* Top Nav — allineata al margine destro */
.top-nav {
  display: flex;
  gap: 4px;
  justify-self: end;
  padding-right: 16px;
}

.top-nav-link {
  color: var(--accent-light);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all var(--transition);
}

/* Highlights — oro scuro, senza bordo */
.top-nav-highlights {
  color: #8a6400 !important;
  border-color: transparent;
}
.top-nav-highlights:hover,
.top-nav-highlights.active {
  color: #b8860b !important;
  border-color: transparent;
  background: transparent;
}

.top-nav-link:hover,
.top-nav-link.active {
  color: #fff;
  border-color: var(--accent);
  background: rgba(232,0,28,0.15);
}

/* Search bar */
.header-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-self: end;
}

#site-search {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 6px 32px 6px 12px;
  width: 160px;
  transition: width 0.3s, border-color 0.2s, background 0.2s;
  outline: none;
}

#site-search:focus {
  width: 220px;
  border-color: var(--accent);
  background: rgba(255,255,255,0.08);
}

#site-search::placeholder { color: var(--text-muted); }

.search-icon {
  position: absolute;
  right: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

/* Search results */
.search-results { display: flex; flex-direction: column; gap: 10px; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  transition: border-color 0.2s;
  text-decoration: none;
}

.search-result-item:hover { border-color: var(--accent); }

.search-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.search-thumb-empty {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 2px;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.search-result-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--text-bright);
  margin-bottom: 4px;
}

.search-result-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  margin-left: auto;
}

/* === LAYOUT === */
.layout {
  display: flex;
  padding-top: var(--header-h);
  min-height: 100vh;
}

/* === SIDEBAR TOGGLE BUTTON === */
.sidebar-toggle-btn {
  position: fixed;
  top: calc(var(--header-h) + 22px);
  left: 16px;
  z-index: 200;
  background: rgba(10,10,10,0.9);
  border: 1px solid #444;
  color: #ffffff;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  backdrop-filter: blur(6px);
}

.sidebar-toggle-btn:hover { color: #fff; border-color: var(--accent-light); background: rgba(232,0,28,0.15); }

/* === SIDEBAR === */
.sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--header-h));
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 28px 0 20px;
  overflow-y: auto;
  z-index: 100;
  transition: transform var(--transition), opacity var(--transition), background var(--transition);
}

/* Sidebar collassata */
.sidebar.collapsed {
  transform: translateX(calc(-1 * var(--sidebar-w)));
}

/* Sidebar trasparente (home page) — nascosta di default */
.sidebar.transparent {
  background: transparent;
  border-right-color: transparent;
  transform: translateX(calc(-1 * var(--sidebar-w)));
}

/* Sidebar overlay sulla home: scivola sopra la foto */
.sidebar.transparent.overlay-open {
  transform: translateX(0);
  background: rgba(10,10,10,0.92);
  border-right-color: var(--border);
  backdrop-filter: blur(8px);
  z-index: 500;
}

/* Content senza sidebar */
.content.sidebar-hidden {
  margin-left: 0 !important;
}

.sidebar-title {
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  color: var(--accent-light);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-left: 3px solid transparent;
  transition: all var(--transition);
}

.sidebar-link:hover,
.sidebar-link.active {
  color: var(--text-bright);
  background: rgba(232,0,28,0.12);
  border-left-color: var(--accent-light);
}

.sidebar-icon { font-size: 1rem; width: 20px; text-align: center; }

.sidebar-divider {
  margin: auto 0 0;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.sidebar-footer {
  padding: 12px 20px 0;
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* === MAIN CONTENT === */
.content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 40px 48px;
  max-width: 100%;
}

/* Home: niente padding, foto tocca i bordi */
.content:has(.home-fullscreen) {
  padding: 0;
}

/* === HOME PAGE — foto a tutto schermo === */
.home-fullscreen {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--header-h));
  min-height: 400px;
  max-height: 800px;
  flex-shrink: 0;
  overflow: hidden;
}

/* Sezione contenuto sotto la foto */
.home-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 40px 80px;
}

/* Ogni blocco immagine è una riga: foto sx, testo dx */
.home-blog-row {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  margin-bottom: 52px;
}

.home-blog-left {
  flex: 0 0 44%;
  max-width: 44%;
}

.home-blog-right {
  flex: 1;
  min-height: 120px;
  font-size: 1.05rem;
  line-height: 1.95;
  color: var(--text);
}

.home-blog-right p {
  margin-bottom: 1.1em;
}

.home-block-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.7em 0;
  line-height: 1.1;
}

/* Blocco testo autonomo (full-width) */
.home-block-text {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.95;
  margin-bottom: 40px;
  white-space: pre-wrap;
}

.home-block-image {
  margin-bottom: 0;
}

/* Immagini blog: senza cornice, oggetto intero visibile */
.home-block-image img,
.home-blog-left img {
  width: 100%;
  max-height: 580px;
  object-fit: contain;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  display: block;
}

.home-block-image .photo-caption {
  margin-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}

/* Edit mode: blocchi home */
.home-block-edit {
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 16px;
  background: rgba(232,0,28,0.05);
}

.home-block-edit .edit-label {
  font-size: 0.7rem;
  color: var(--accent-light);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.home-add-block {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.home-add-block button {
  background: transparent;
  border: 1px dashed var(--accent);
  color: var(--accent-light);
  padding: 10px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.82rem;
  transition: all var(--transition);
}

.home-add-block button:hover {
  background: rgba(232,0,28,0.15);
  color: #fff;
}

/* Home block textarea and inputs */
.home-block-textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
}

.home-block-src {
  width: 100%;
  margin-bottom: 8px;
  font-size: 0.8rem;
  padding: 7px 10px;
}

.home-block-caption-input {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  font-size: 0.82rem;
}

.home-block-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}

.home-block-move {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.75rem;
  transition: all var(--transition);
}

.home-block-move:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.home-block-delete {
  background: transparent;
  border: 1px solid #550000;
  color: #aa3333;
  padding: 4px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.75rem;
  margin-left: auto;
  transition: all var(--transition);
}

.home-block-delete:hover {
  background: rgba(232,0,28,0.2);
  color: #ff4444;
}

.home-block-img-wrap {
  margin-bottom: 10px;
}

.home-block-img-wrap img {
  width: 100%;
  max-height: 600px;
  object-fit: contain;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
}

.home-block-img-placeholder {
  background: var(--surface2);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  color: var(--text-muted);
  font-size: 2rem;
}

.home-block-caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  padding: 8px;
  font-style: italic;
}

.home-block-view p {
  margin-bottom: 1.1em;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.9;
}

.home-fullphoto {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  background: #000;
}

.home-fullphoto-placeholder {
  width: 100%;
  height: 100%;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  color: var(--text-muted);
  font-size: 1rem;
}

.home-fullphoto-placeholder .ph-icon { font-size: 4rem; }

/* Freccia "scorri verso il basso" */
.home-scroll-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 1.8rem;
  animation: bounce 2s infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* Sezione contenuto sotto la foto */
.home-below {
  padding: 48px 48px 40px;
}

/* Bio sovrapposta in basso con gradiente */
.home-bio-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  padding: 48px 40px 32px;
}

.home-bio-text {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.8;
  max-width: 640px;
}

.home-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 32px;
}

.stat {
  text-align: center;
}

.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-light);
  display: block;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.home-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--text-bright);
  margin-bottom: 6px;
}

.section-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  letter-spacing: 0.5px;
}

/* === CATEGORY PAGE === */
.page-header {
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  color: var(--text-bright);
  margin-bottom: 4px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.accent-line {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin: 12px 0;
  border-radius: 2px;
}

/* Session Grid */
.session-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* === SESSION CARD — hover con overlay cinematografico === */
.session-card {
  position: relative;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  display: block;
}

.session-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 24px var(--accent-glow);
}

/* Contenitore visual con la foto */
.session-card-visual {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.session-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
  transition: transform 0.5s ease;
}

.session-card:hover .session-thumb { transform: scale(1.07); }

.session-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--border);
}

/* Overlay gradiente sul visual */
.session-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 25%, rgba(0,0,0,0.88) 100%);
  transition: background 0.4s ease;
  pointer-events: none;
}

.session-card:hover .session-overlay {
  background: linear-gradient(to bottom, rgba(232,0,28,0.07) 0%, rgba(0,0,0,0.65) 45%, rgba(0,0,0,0.97) 100%);
}

/* Info sovrapposta alla foto, in basso */
.session-hover-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 18px 16px 14px;
  z-index: 2;
}

.session-hover-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 5px;
}

.session-hover-info .session-meta {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  display: flex;
  gap: 12px;
}

.session-meta span { display: flex; align-items: center; gap: 4px; }

/* Descrizione: appare sull'hover con slide-up */
.session-card-desc {
  font-size: 0.83rem;
  color: rgba(255,255,255,0.78);
  line-height: 1.55;
  margin-top: 8px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.45s ease, opacity 0.38s ease;
}

.session-card:hover .session-card-desc {
  max-height: 150px;
  opacity: 1;
}

/* Footer visibile solo in Edit Mode */
.session-card-footer {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* === SESSION PAGE (Photos + Videos) === */
.session-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 24px;
  cursor: pointer;
  transition: color var(--transition);
}

.session-back:hover { color: var(--text-bright); }

.session-page-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--text-bright);
  margin-bottom: 6px;
}

.session-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 36px;
  max-width: 600px;
}

/* Tags sessione */
.session-tags-wrap {
  margin: 8px 0 24px 0;
}

.session-tags-view {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.session-tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 3px 9px;
  transition: color 0.2s, border-color 0.2s;
}

.session-tag:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.session-tags-input {
  width: 100%;
  max-width: 680px;
  font-size: 0.85rem;
}

/* Video Section */
.video-section { margin-bottom: 48px; }

.video-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--text-bright);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.video-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.video-wrap video {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  object-fit: contain;
  background: #000;
}

.video-title {
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Photo Gallery */
.photo-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--text-bright);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.photo-item {
  display: flex;
  flex-direction: column;
}

.photo-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #000;
  border-radius: var(--radius) var(--radius) 0 0;
  cursor: zoom-in;
  transition: transform var(--transition), opacity var(--transition);
  border: 1px solid var(--border);
  border-bottom: none;
}

.photo-item img:hover { transform: scale(1.03); opacity: 0.85; }

.photo-caption {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 8px 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Descrizione nella card sessione */
.session-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Lightbox */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 5000;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

#lightbox.open { display: flex; }

#lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

#lightbox-close {
  position: fixed;
  top: 24px; right: 24px;
  font-size: 2rem;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  transition: color var(--transition);
  z-index: 5001;
}
#lightbox-close:hover { color: #fff; }

#lightbox-prev,
#lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3.5rem;
  line-height: 1;
  color: rgba(255,255,255,0.45);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 18px;
  transition: color 0.2s;
  z-index: 5001;
  user-select: none;
}
#lightbox-prev { left: 12px; }
#lightbox-next { right: 12px; }
#lightbox-prev:hover,
#lightbox-next:hover { color: var(--accent); }

#lightbox-counter {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.1em;
  pointer-events: none;
  z-index: 5001;
}

/* === STORIES PAGE === */
.stories-list { display: flex; flex-direction: column; gap: 24px; }

.story-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: border-color var(--transition);
  cursor: pointer;
}

.story-card:hover { border-color: var(--accent); }

.story-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.story-card .story-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.story-card .story-excerpt {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.story-card .read-more {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--accent-light);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
}

/* Story Full Page */
.story-full {
  max-width: 720px;
}

.story-full h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.story-full .story-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.story-full .story-body {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text);
}

.story-full .story-body p { margin-bottom: 20px; }

/* === HIGHLIGHTS PAGE === */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.highlight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}

.highlight-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

.highlight-card img,
.highlight-card video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.highlight-card-info {
  padding: 14px 16px;
}

.highlight-card-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--text-bright);
}

/* === EXTERNAL LINKS === */
.link-edit-row { display: flex; flex-direction: column; gap: 6px; padding: 8px 0 4px; border-top: 1px solid var(--border); margin-top: 4px; }
.links-list { display: flex; flex-direction: column; gap: 16px; }

.link-item {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-decoration: none;
  transition: all var(--transition);
}

.link-item:hover { border-color: var(--accent); background: var(--surface2); }

.link-icon { font-size: 1.8rem; }

.link-info h3 { color: var(--text-bright); font-size: 1rem; margin-bottom: 4px; }
.link-info p { color: var(--text-muted); font-size: 0.85rem; }

/* === PAGINA SCELTA FOTO / VIDEO === */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
  max-width: 700px;
}

.choice-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
}

.choice-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 20px var(--accent-glow);
}

.choice-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.choice-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  transition: transform 0.4s ease;
}

.choice-card:hover .choice-thumb img { transform: scale(1.05); }

.choice-icon { font-size: 4rem; }

.choice-label {
  padding: 16px 20px;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 8px;
}

.choice-label span {
  font-family: 'Lato', sans-serif;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 80px 40px;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 0.9rem; line-height: 1.6; }

/* === EDIT MODE === */
#edit-bar {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  align-items: center;
  gap: 10px;
}

.btn-edit {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-edit:hover { background: var(--accent-light); transform: scale(1.05); }

/* Nasconde/mostra sezioni in base alla modalità */
.edit-only { display: none; }
body.edit-mode .edit-only { display: block; }
body.edit-mode .view-mode { display: none; }

/* Campi di testo editabili */
.edit-field {
  width: 100%;
  background: rgba(232,0,28,0.1);
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Lato', sans-serif;
  font-size: 0.82rem;
  line-height: 1.5;
  padding: 8px 10px;
  resize: vertical;
  margin-top: 6px;
  min-height: 60px;
  outline: none;
  transition: border-color var(--transition);
}

.edit-field:focus { border-color: var(--accent-light); border-style: solid; }
.edit-field::placeholder { color: var(--text-muted); font-style: italic; }

.edit-field-caption { min-height: 44px; }

/* Toast notifica */
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9000;
  pointer-events: none;
}

#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* === MUSICA DI SOTTOFONDO === */
#music-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 800;
  background: rgba(0,0,0,0.75);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  backdrop-filter: blur(6px);
}
#music-btn:hover { border-color: var(--accent-light); color: var(--accent-light); }
#music-btn.muted { opacity: 0.45; }

/* === SLIDESHOW FULLSCREEN === */
#slideshow-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9500;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#slideshow-overlay.open { display: flex; }

#slideshow-img {
  max-width: 100vw;
  max-height: calc(100vh - 80px);
  object-fit: contain;
  opacity: 1;
  transition: opacity 0.6s ease;
}
#slideshow-img.fade { opacity: 0; }

#slideshow-controls {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  backdrop-filter: blur(8px);
}

#slideshow-counter {
  color: var(--text-muted);
  font-size: 0.8rem;
  min-width: 80px;
  text-align: center;
}

.ss-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition);
}
.ss-btn:hover { border-color: var(--accent-light); color: var(--accent-light); }
.ss-btn.ss-close { border-color: #333; color: var(--text-muted); margin-left: 24px; }

#slideshow-speed {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius);
  padding: 4px 8px;
  font-size: 0.78rem;
  cursor: pointer;
}

#slideshow-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--accent-light);
  transition: width linear;
  z-index: 9501;
}

.gallery-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.btn-slideshow {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent-light);
  padding: 8px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: all var(--transition);
}
.btn-slideshow:hover { background: rgba(232,0,28,0.12); color: #fff; }

/* ═══════════════════════════════════════════════════════════
   MIGLIORIE ESTETICHE
   ═══════════════════════════════════════════════════════════ */

/* 1. FILM GRAIN — grana fotografica sul fondo */
body::after {
  content: '';
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* 2. VIGNETTE ROSSA sulla foto home */
.home-fullscreen::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,0.65) 100%),
    linear-gradient(to bottom, transparent 55%, rgba(100,0,10,0.18) 100%);
  pointer-events: none;
  z-index: 1;
}

/* 3. FONT Cormorant Garamond per i titoli principali */
h1, h2, h3,
.page-header h1,
.session-page-title,
.story-full h1,
.story-card h2,
.section-title,
.age-gate-logo {
  font-family: 'Cormorant Garamond', 'Playfair Display', serif;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.page-header h1    { font-size: 2.6rem; }
.session-page-title { font-size: 2rem; font-family: 'Cormorant Garamond', serif; }

/* 4. ANIMAZIONE TITOLO — compare con dissolvenza all'ingresso */
@keyframes fadeInLogo {
  from { opacity: 0; letter-spacing: 4px; }
  to   { opacity: 1; letter-spacing: 1px; }
}
.logo-main {
  animation: fadeInLogo 1.4s ease forwards;
}

/* 5. SEPARATORI stilizzati con simbolo centrale */
.accent-line {
  display: flex !important;
  align-items: center;
  gap: 10px;
  width: auto;
  height: auto !important;
  background: none !important;
  border-radius: 0 !important;
  margin: 14px 0 !important;
}
.accent-line::before,
.accent-line::after {
  content: '';
  display: block;
  height: 1px;
  width: 40px;
  background: var(--accent-light);
  flex-shrink: 0;
}
.accent-line::before { width: 32px; }
.accent-line::after  { flex: 1; max-width: 60px; }

/* Simbolo centrale nell'accent-line — inserito via attr content */
.accent-line {
  color: var(--accent-light);
  font-size: 0.65rem;
  letter-spacing: 2px;
}
.accent-line::before { content: ''; }

/* 6. NERO ASSOLUTO sotto le miniature */
.session-card      { background: #000; }
.choice-card       { background: #000; }
.session-thumb     { background: #000; }
.choice-thumb      { background: #000; }

/* 7. PULSANTE CONTACT ME — pillola rossa sotto il logo */
.contact-pill {
  display: inline-block;
  margin-top: 5px;
  padding: 3px 12px;
  border: 1px solid var(--accent-light);
  border-radius: 999px;
  color: var(--accent-light) !important;
  font-size: 0.62rem;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  transition: all var(--transition);
  width: fit-content;
}
.contact-pill:hover {
  background: var(--accent-light);
  color: #fff !important;
}

/* Pulsante Commenti nell'header */
.comments-header-btn {
  color: #8a6400;
  text-decoration: none;
  font-size: 0.62rem;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color var(--transition);
}
.comments-header-btn:hover { color: #b8860b; }

/* Riga Contact Me + Comments sotto il nav di destra */
.header-pills-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 16px;
  margin-top: 2px;
}

/* === PAGINA CONTATTI === */
.contact-page { max-width: 520px; }

.contact-intro {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 32px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
}

.contact-links { display: flex; flex-direction: column; gap: 16px; }

.contact-link-btn {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  transition: all var(--transition);
}
.contact-link-btn:hover {
  border-color: var(--accent-light);
  background: rgba(232,0,28,0.05);
  transform: translateX(4px);
}
.contact-link-icon {
  font-size: 1.6rem;
  color: var(--accent-light);
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}
.contact-link-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.contact-link-val {
  color: var(--text-bright);
  font-size: 0.95rem;
}

/* Story editor — visibile SOLO in modalità edit */
body.edit-mode .story-edit-panel { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.story-body-edit  { font-family: 'Lato', sans-serif; line-height: 1.7; min-height: 320px; }
.edit-label {
  font-size: 0.68rem;
  color: var(--accent-light);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 8px;
}

/* Highlight edit */
.highlight-edit { flex-direction: column; gap: 6px; padding: 8px 0; }
body.edit-mode .highlight-edit { display: flex; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-light); }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .home-hero { grid-template-columns: 1fr; }
  .home-photo-wrap { max-width: 300px; }
  .content { padding: 28px 24px; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  /* Home blog: colonna singola su mobile */
  .home-content {
    padding: 32px 16px 60px;
  }
  .home-blog-row {
    flex-direction: column;
    gap: 20px;
  }
  .home-blog-left {
    flex: unset;
    max-width: 100%;
    width: 100%;
  }

  .sidebar {
    transform: translateX(-220px);
    width: 220px;
  }

  .sidebar.open { transform: translateX(0); }

  .content { margin-left: 0; padding: 20px 16px; }

  /* top-nav e menu-toggle gestiti dal blocco FIX MOBILE in fondo */

  .session-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
}

/* === HOME STATS — counter animato === */
.home-stats {
  display: flex;
  justify-content: center;
  gap: 0;
  background: rgba(0,0,0,0.6);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}

.home-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 48px;
  border-right: 1px solid var(--border);
}

.home-stat:last-child { border-right: none; }

.stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent-light);
  line-height: 1;
  letter-spacing: 0.02em;
}

.stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 4px;
}

/* === PAGE FADE TRANSITION === */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-fade {
  animation: pageFadeIn 0.32s ease forwards;
}

/* === VIDEO DESCRIPTION === */
.video-desc {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.75;
  margin-top: 8px;
  padding: 0 4px;
}

.video-desc p { margin-bottom: 0.7em; }

.video-title-edit {
  width: 100%;
  margin-top: 8px;
  margin-bottom: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 10px;
}

.video-desc-edit {
  width: 100%;
  min-height: 80px;
  margin-top: 4px;
  font-size: 0.88rem;
  resize: vertical;
}

/* === PHOTO CAPTION (galleria) === */
.photo-caption {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.7;
  padding: 10px 4px 4px;
  font-style: italic;
}

/* === FILM GRAIN TEXTURE === */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 250px 250px;
  animation: grain 0.6s steps(1) infinite;
}

@keyframes grain {
  0%   { background-position:   0%   0%; }
  14%  { background-position: -20%  10%; }
  28%  { background-position:  15% -20%; }
  42%  { background-position:  -5%  25%; }
  57%  { background-position:  20%   5%; }
  71%  { background-position: -15% -15%; }
  85%  { background-position:   8%  20%; }
  100% { background-position:   0%   0%; }
}

/* === SCROLL-TO-TOP BUTTON === */
#scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 1.6rem;
  z-index: 900;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.85);
  color: var(--text-muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s, background 0.2s;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
#scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#scroll-top-btn:hover {
  color: var(--accent-light);
  border-color: var(--accent);
  background: rgba(20, 0, 0, 0.9);
}


/* === SLIDESHOW WATERMARK === */
#slideshow-watermark {
  position: absolute;
  bottom: 72px;
  right: 20px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.28);
  letter-spacing: 2px;
  text-transform: lowercase;
  pointer-events: none;
  user-select: none;
  z-index: 5;
}

/* === PULSANTE RICERCA MOBILE (nascosto su desktop) === */
.mobile-search-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

/* Barra ricerca mobile — appare sotto l'header come overlay fisso */
.mobile-search-bar {
  display: none; /* mostrata solo con .open */
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 500;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  gap: 10px;
  align-items: center;
  backdrop-filter: blur(6px);
}
.mobile-search-bar.open {
  display: flex;
}
.mobile-search-bar input {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text);
  font-size: 0.92rem;
  padding: 8px 12px;
  outline: none;
  font-family: 'Lato', sans-serif;
}
.mobile-search-bar input:focus {
  border-color: var(--accent);
}
.mobile-search-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 6px;
  flex-shrink: 0;
}
.mobile-search-close:hover { color: var(--text-bright); }

/* ============================================================
   FIX MOBILE — Aprile 2026
   ============================================================ */

@media (max-width: 768px) {

  /* ── Header: switch da grid 3 colonne a flex 2 colonne ── */
  .header-inner {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    gap: 8px;
    height: var(--header-h);
  }

  /* Nascondi la foto centrale (occupa troppo spazio) */
  .header-center-photo-wrap {
    display: none !important;
  }

  /* Nascondi il vecchio ☰ nell'header (non serve più) */
  .menu-toggle {
    display: none !important;
  }

  /* Logo: avatar + testo su mobile */
  .logo {
    gap: 10px;
  }
  .header-avatar-wrap {
    width: 42px;
    height: 60px;
  }
  .logo-main {
    font-size: 1.1rem;
  }
  .logo-sub {
    font-size: 0.5rem;
    letter-spacing: 1.5px;
  }

  /* Contact Me + Comments: più piccoli */
  .contact-pill {
    font-size: 0.55rem !important;
    padding: 3px 8px !important;
    letter-spacing: 1px;
  }

  /* Colonna destra: nav + pulsanti */
  .header-right {
    display: flex !important;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
  }

  /* Nav: 2 righe, 2 voci per riga */
  .top-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-end;
    gap: 2px;
    padding-right: 0;
    max-width: 180px;
  }

  .top-nav-link {
    white-space: nowrap;
    font-size: 0.52rem;
    padding: 4px 7px;
    letter-spacing: 0.6px;
  }

  /* Nascondi search su mobile per risparmiare spazio */
  .header-search-wrap {
    display: none !important;
  }

  /* Mostra il pulsante 🔍 solo su mobile */
  .mobile-search-btn {
    display: inline-flex;
  }

  /* Pills row su mobile: compatta, leggermente più in basso */
  .header-pills-row {
    padding-right: 0;
    gap: 8px;
    margin-top: 6px;
  }

  /* contact-pill e comments-btn più piccoli su mobile */
  .contact-pill {
    font-size: 0.5rem !important;
    padding: 2px 6px !important;
    letter-spacing: 0.8px;
    margin-top: 0;
  }

  .comments-header-btn {
    font-size: 0.5rem;
    letter-spacing: 0.8px;
  }

  /* ── Sidebar: fix su home (transparent) ── */
  .sidebar.transparent {
    transform: translateX(-220px) !important;
  }
  .sidebar.transparent.overlay-open {
    transform: translateX(0) !important;
  }

}
