/* Font ospitati sul sito: i visitatori non si collegano a Google */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/manrope-normal-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/manrope-normal-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url(fonts/playfair-display-italic-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url(fonts/playfair-display-italic-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(fonts/playfair-display-normal-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(fonts/playfair-display-normal-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Contact and about sections */
.section {
  padding: 80px 24px;
}

.section-header {
  max-width: 720px;
  margin: 0 auto 32px;
  text-align: center;
}

.section-header h2 {
  font-size: 32px;
  margin-bottom: 8px;
}

.section-header p {
  color: #666;
}

.contact-section {
  background: transparent;
}

.contact-form {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: #222;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid #222;
  border-color: #222;
}

.contact-form button {
  align-self: flex-start;
}

.form-status {
  margin: 0;
  font-weight: 600;
}

.form-status.success {
  color: #1a7f37;
}

.form-status.error {
  color: #c0392b;
}

.about-section {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.about-hero {
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(260px, 0.9fr);
  gap: 42px;
  align-items: center;
  padding: 42px 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.about-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 42px;
  align-items: center;
}

.about-row.reverse .about-media {
  order: -1;
}

.about-text h2,
.about-text h3 {
  margin-bottom: 12px;
}

.about-text p {
  margin-bottom: 12px;
  color: #444;
  line-height: 1.7;
}

.about-media img {
  width: 100%;
  max-width: 520px;
  border-radius: 0;
  object-fit: cover;
  box-shadow: none;
}

.about-media.portrait img {
  max-width: 420px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 13px;
  margin-bottom: 12px;
}

.about-meta {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  gap: 8px;
}

.about-meta li {
  color: #2b2b2b;
  padding-left: 14px;
  position: relative;
}

.about-meta li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #111;
}

/* New About Page Layout */
.about-intro-section {
  padding: 60px 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.about-intro-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.about-intro-text {
  background: #e8e8e8;
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-intro-text h2 {
  font-size: 36px;
  margin-bottom: 24px;
  color: #111;
}

.about-intro-text p {
  color: #333;
  line-height: 1.8;
  margin-bottom: 16px;
  font-size: 15px;
}

.about-intro-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  overflow: hidden;
}

.about-intro-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Skills Section */
.skills-section {
  padding: 80px 0;
  width: 100%;
  margin: 0;
  background: #ffffff;
}

.skills-title {
  text-align: center;
  font-size: 38px;
  margin-bottom: 60px;
  color: #111;
}

.skills-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: center;
  width: 100vw;
  margin: 0;
  padding: 0;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 24px;
  padding: 20px;
}

.skill-item {
  text-align: center;
  padding: 16px 12px;
  background: transparent;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.skill-item:hover {
  transform: translateY(-5px);
}

.skill-icon {
  font-size: 48px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
}

.skill-icon img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.skill-icon svg {
  color: #111;
}

.skill-item h3 {
  font-size: 14px;
  color: #222;
  margin: 0;
  line-height: 1.4;
}

.skill-item small {
  font-size: 13px;
  color: #666;
  font-weight: 400;
}

.skills-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 100%;
}

.skills-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  border-radius: 0;
  box-shadow: none;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .about-intro-box {
    grid-template-columns: 1fr;
  }

  .about-intro-text {
    padding: 40px 30px;
  }

  .about-intro-photo {
    min-height: 400px;
  }

  .skills-container {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .skills-grid {
    order: 2;
  }

  .skills-photo {
    order: 1;
  }
}

@media (max-width: 640px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .about-intro-text {
    padding: 30px 20px;
  }

  .about-intro-text h2 {
    font-size: 28px;
  }

  .skills-title {
    font-size: 28px;
    margin-bottom: 40px;
  }
}

/* Perché scegliere me section */
.why-choose-section {
  padding: 80px 0;
  background: #ffffff;
  width: 100%;
  margin: 0;
}

.section-title-centered {
  text-align: center;
  font-size: 38px;
  margin-bottom: 60px;
  color: #111;
  padding: 0 24px;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.why-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 20px;
}

.why-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: white;
  border: 4px solid #C5A47E;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(197, 164, 126, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.why-icon img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: brightness(0);
}

.why-item:hover .why-icon {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.35);
  border-color: #f4d03f;
}

.why-item h3 {
  font-size: 18px;
  color: #222;
  margin: 0;
  line-height: 1.4;
}

/* Il mio stile post-editing section */
.editing-style-section {
  padding: 80px 24px;
  background: #fff;
}

.editing-comparisons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.comparison-container {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.comparison-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
}

.comparison-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.comparison-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f2f2f2;
  display: block;
}

.comparison-image.after {
  clip-path: inset(0 50% 0 0);
}

.comparison-handle {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.comparison-line {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: white;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.comparison-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  pointer-events: all;
  cursor: ew-resize;
}

/* Responsive adjustments for new sections */
@media (max-width: 1024px) {
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 35px;
  }

  .editing-comparisons {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .editing-comparisons {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .section-title-centered {
    font-size: 32px;
    margin-bottom: 40px;
  }
}

@media (max-width: 640px) {
  .why-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .why-icon {
    width: 80px;
    height: 80px;
    font-size: 32px;
  }

  .why-item h3 {
    font-size: 16px;
  }

  .section-title-centered {
    font-size: 26px;
  }
}

/* Reviews grid */
.reviews-section {
  background: transparent;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.review-card {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.review-photo {
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
  display: block;
}

.review-card--no-photo {
  border-top: 2px solid var(--accent);
  padding-top: 8px;
}

.review-card--no-photo .review-body::before {
  content: '\201C';
  font-family: var(--font-heading);
  font-size: 56px;
  line-height: 0.8;
  color: var(--accent);
}

.review-body {
  padding: 12px 0;
  display: grid;
  gap: 6px;
}

.review-text {
  margin: 0;
  color: #333;
  line-height: 1.5;
  font-size: 14px;
}

.review-name {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 15px;
}

.review-name:hover {
  color: #333;
  text-decoration: underline;
}

.review-category {
  font-size: 13px;
  color: #666;
  font-weight: 400;
}

@media (max-width: 840px) {
  .about-hero {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .about-hero .about-media {
    order: -1;
    justify-self: center;
  }

  .about-media img {
    max-width: 100%;
  }
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --text: #111111;
  --muted: #4d4d4d;
  --accent: #111111;
  --bg: #ffffff;
  --panel: rgba(0, 0, 0, 0.04);
  --stroke: rgba(0, 0, 0, 0.12);
  --highlight: #c7a87a;
  --overlay: linear-gradient(120deg, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.12));
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Manrope', sans-serif;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow: hidden;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.home .topbar {
  background: transparent;
  border: none;
  backdrop-filter: none;
}

.home .menu a {
  color: #ffffff;
}

.home .menu a::after {
  background: #ffffff;
}

.home .menu a:hover,
.home .menu a:focus {
  color: #ffffff;
}

.logo {
  display: inline-flex;
  align-items: center;
}

.logo img {
  display: block;
  height: 42px;
}

.menu {
  display: flex;
  gap: 24px;
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 9;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--stroke);
  background: #ffffff;
  color: var(--text);
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-direction: column;
  cursor: pointer;
  padding: 8px;
  z-index: 11;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.menu-toggle span {
  width: 100%;
  height: 2px;
  background: var(--text);
  display: block;
}

.home .menu-toggle {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.25);
  color: #ffffff;
  box-shadow: none;
}

.home .menu-toggle span {
  background: #ffffff;
}

.menu a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
  position: relative;
  padding-bottom: 8px;
  transition: color 0.2s ease;
}

.menu a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu a:hover,
.menu a:focus {
  color: var(--text);
}

.menu a:hover::after,
.menu a:focus::after {
  transform: scaleX(1);
  opacity: 1;
}

.socials {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9;
}

.socials a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.18em;
  writing-mode: vertical-rl;
  text-transform: uppercase;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.home .socials a {
  color: rgba(255, 255, 255, 0.7);
}

.socials a:hover,
.socials a:focus {
  color: var(--accent);
  opacity: 1;
}

.socials-legal {
  position: relative;
}

.socials-legal .legal-short {
  display: inline;
}

.socials-legal .legal-full {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  display: block;
  padding: 7px 10px;
  border: 1px solid var(--stroke);
  color: #222;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
  writing-mode: horizontal-tb;
}

.socials-legal:hover .legal-full,
.socials-legal:focus-visible .legal-full {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.slides {
  display: flex;
  height: 100%;
  width: auto;
  transition: transform 0.9s ease-in-out;
}

.slide {
  position: relative;
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 80px 80px 120px;
  background-size: cover;
  background-position: center;
  background-image: var(--bg);
  isolation: isolate;
}

.slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--overlay);
  z-index: 1;
}

.slide .caption {
  position: relative;
  z-index: 2;
  max-width: 520px;
}

.slide .caption p {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  color: #ffffff;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.slide .caption a {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  color: #ffffff;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  text-decoration: none;
}

.controls {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 3;
}

  .arrow {
    width: 54px;
    height: 54px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.35);
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
  }

  .arrow:hover,
  .arrow:focus {
    background: rgba(0, 0, 0, 0.55);
    border-color: #ffffff;
  }

  .dots {
    position: absolute;
    bottom: 36px;
    right: 80px;
    display: flex;
    gap: 8px;
    z-index: 3;
  }

  .dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--muted);
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  }

  .dots button.active {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.15);
  }


  @media (max-width: 960px) {
    .topbar {
      padding: 18px 24px;
    }

    .menu {
      gap: 16px;
    }

    .socials {
      left: 12px;
    }

    .slide {
      padding: 80px 32px 120px;
    }

    .dots {
      right: 32px;
    }
  }

  @media (max-width: 640px) {
    body {
      overflow: auto;
    }

    .topbar {
      backdrop-filter: blur(10px);
      background: rgba(255, 255, 255, 0.96);
      border-bottom: 1px solid var(--stroke);
    }

    .home .topbar {
      background: rgba(0, 0, 0, 0.25);
      border: none;
      backdrop-filter: blur(8px);
    }

    .menu {
      position: fixed;
      top: 0;
      right: 0;
      height: 100vh;
      width: 260px;
      background: #0f0f0f;
      border-left: 1px solid rgba(255, 255, 255, 0.08);
      box-shadow: -12px 0 30px rgba(0, 0, 0, 0.45);
      padding: 80px 24px;
      flex-direction: column;
      gap: 18px;
      transform: translateX(100%);
      transition: transform 0.25s ease;
      z-index: 12;
    }

    .menu a {
      font-size: 14px;
    }

    .menu a {
      color: #ffffff;
    }

    .menu a::after {
      background: #ffffff;
    }

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

    .menu-toggle {
      display: inline-flex;
    }

    .menu-backdrop[hidden] {
      display: none !important;
    }

    .menu-backdrop {
      z-index: 10;
    }

    .socials {
      display: none;
    }

    .controls {
      top: 50%;
      bottom: auto;
      left: 0;
      right: 0;
      width: 100%;
      padding: 0 18px;
      justify-content: space-between;
      transform: translateY(-50%);
    }


    .arrow {
      background: transparent;
      border: none;
      width: auto;
      height: auto;
      font-size: 28px;
      padding: 6px 4px;
      color: #ffffff;
    }
  }

  /* Cookie banner */
  /* Policy pages */
  .page {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    min-height: 100vh;
    padding: 120px 24px 80px;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

.page-content {
  line-height: 1.7;
    display: grid;
    gap: 18px;
    width: 100%;
    max-width: 1180px;
}

/* Gallery grid */

@media (min-width: 641px) {
  .gallery-with-sidebar {
    padding-left: 88px;
  }
}

/* Gallery listing (masonry tiles) */
.gallery-listing {
  padding: 48px 24px;
  margin: 0 auto;
}

.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  border-radius: 0;
  overflow: hidden;
  text-decoration: none;
  box-shadow: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.gallery-tile:hover,
.gallery-tile:focus {
  transform: translateY(-6px);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.25);
}

.gallery-tile .tile-title,
.gallery-tile .tile-count {
  position: absolute;
  left: 14px;
  color: #ffffff;
  z-index: 2;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.gallery-tile .tile-title {
  bottom: 34px;
  font-family: var(--font-heading);
  font-size: 22px;
}

.gallery-tile .tile-count {
  bottom: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 12px;
}

.tile-adv {
  grid-column: auto;
  grid-row: auto;
}

@media (max-width: 768px) {
  .gallery-masonry {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .gallery-masonry {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Gallery detail masonry */
.gallery-detail .page-content {
  gap: 24px;
}

/*
 * Colonne, spaziatura e larghezza foto arrivano dalle impostazioni della
 * galleria (admin). static/masonry.js dispone le foto da sinistra a destra;
 * senza JS resta il layout CSS a colonne qui sotto.
 */
.masonry {
  min-width: 0; /* .page-content è una griglia: evita che le foto la allarghino */
  column-count: var(--masonry-cols, 3);
  column-gap: var(--masonry-gap, 12px);
}

.masonry-item {
  break-inside: avoid;
  width: calc(var(--scale, 1) * 100%);
  margin: 0 auto var(--masonry-gap, 12px);
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: block;
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--stroke);
  background: #ffffff;
}

.masonry.is-js {
  display: flex;
  align-items: flex-start;
  gap: var(--masonry-gap, 12px);
  columns: auto;
}

.masonry-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--masonry-gap, 12px);
}

.masonry.is-js .masonry-item {
  margin: 0;
  align-self: center;
}

.masonry.is-js .masonry-item[data-align="left"] { align-self: flex-start; }
.masonry.is-js .masonry-item[data-align="right"] { align-self: flex-end; }

/* Su smartphone le foto occupano sempre tutta la colonna */
.masonry[data-device="mobile"] .masonry-item { width: 100%; }

@media (max-width: 960px) {
  .masonry {
    column-count: var(--masonry-cols-tablet, 2);
  }
}

@media (max-width: 640px) {
  .masonry {
    column-count: var(--masonry-cols-mobile, 1);
  }

  .masonry-item { width: 100%; }
}

/* Photo viewer page */
.photo-view {
  padding-top: 160px;
}

.photo-viewer {
  display: grid;
  gap: 18px;
  justify-items: center;
}

.photo-view {
  padding: 0;
  overflow: hidden;
}

.photo-viewer {
  min-height: calc(100vh - 80px);
  padding: 42px 24px 24px;
  align-content: center;
}

.photo-stage {
  width: min(100%, 1080px);
  max-height: 75vh;
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.photo-stage img {
  width: 100%;
  height: 100%;
  max-height: 75vh;
  display: block;
  object-fit: contain;
}

.zoomable-photo {
  cursor: zoom-in;
}

body.zoom-open {
  overflow: hidden;
}

.zoom-viewer {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(8, 8, 8, 0.96);
  touch-action: none;
}

.zoom-viewer img {
  width: auto;
  height: auto;
  max-width: 94vw;
  max-height: 90vh;
  cursor: zoom-in;
  object-fit: contain;
  transform-origin: center;
  transition: transform 0.08s linear;
  user-select: none;
  -webkit-user-drag: none;
}

.zoom-viewer.is-zoomed img {
  cursor: grab;
}

.zoom-viewer.is-zoomed img:active {
  cursor: grabbing;
}

.zoom-close {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.zoom-help {
  position: fixed;
  bottom: 18px;
  left: 50%;
  z-index: 2;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-align: center;
  transform: translateX(-50%);
}

@media (max-width: 640px) {
  .zoom-help {
    width: calc(100% - 40px);
  }
}

.photo-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 22px;
}

.photo-nav .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  padding: 10px 16px;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  color: #222;
  background: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.photo-nav .btn:hover {
  background: #222;
  border-color: #222;
  color: #fff;
  transform: translateY(-1px);
}

.photo-counter {
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.08em;
}

@media (max-width: 640px) {
  .photo-viewer {
    padding: 16px;
    min-height: calc(100vh - 70px);
  }

  .photo-stage {
    max-height: 65vh;
    padding: 8px;
  }

  .photo-stage img {
    max-height: 65vh;
  }
}

.page-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3vw, 38px);
}

.page-content h2 {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.2vw, 26px);
  margin-top: 12px;
}

.page-content ul {
  list-style: disc;
  margin-left: 20px;
  display: grid;
  gap: 8px;
}

.page-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

body.consent-required {
  overflow: hidden;
}

body.consent-required > *:not(.consent-gate) {
  filter: blur(9px);
  pointer-events: none;
  user-select: none;
}

.consent-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 12, 12, 0.48);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.consent-card {
  width: min(100%, 540px);
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.consent-eyebrow {
  margin: 0 0 12px;
  color: #777;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.consent-card h2 {
  margin: 0 0 18px;
  color: #161616;
  font-family: var(--font-heading);
  font-size: clamp(30px, 5vw, 44px);
}

.consent-card p {
  margin: 0;
  color: #444;
  line-height: 1.7;
}

.consent-card a {
  color: #111;
  font-weight: 600;
  text-underline-offset: 3px;
}

.consent-accept {
  margin-top: 28px;
  padding: 13px 24px;
  border: 1px solid #171717;
  border-radius: 999px;
  color: #fff;
  background: #171717;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.consent-accept:hover,
.consent-accept:focus-visible {
  color: #171717;
  background: #fff;
  transform: translateY(-1px);
}

/* Su schermi medi resta compatta e non si espande sopra le immagini. */
@media (max-width: 1100px) {
  .socials-legal .legal-short {
    display: inline;
  }

  .socials-legal .legal-full {
    display: none !important;
  }
}

/* ------------------------------------------------------------------
 * Editorial: pubblicazioni su carta e online
 * ------------------------------------------------------------------ */
.editorial {
  gap: 0;
  padding-bottom: 80px;
}

.editorial h1,
.editorial h2,
.editorial h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  margin: 0;
}

.editorial p { margin: 0; }

.editorial-eyebrow,
.editorial-label,
.editorial-aside {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.editorial-eyebrow {
  color: var(--muted);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--stroke);
  margin-bottom: 28px !important;
}

.editorial-label { color: var(--highlight); }
.editorial-label.muted { color: var(--muted); }

.editorial-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: 24px 0 72px;
}

.editorial-intro-text { display: grid; gap: 16px; color: var(--muted); }
.editorial-intro-text h1 { font-size: clamp(44px, 6vw, 72px); color: var(--text); line-height: 1; }
.editorial-tagline { font-family: var(--font-heading); font-style: italic; font-size: 20px; color: var(--highlight); }

.editorial-intro-media { position: relative; margin: 0; }
.editorial-intro-media img,
.editorial-intro-media video {
  display: block;
  width: 100%;
  aspect-ratio: 11 / 10;
  object-fit: cover;
  background: #111;
}
/* Video verticale: si vede intero, senza tagli */
.editorial-intro-media.is-video { justify-self: center; width: fit-content; }
.editorial-intro-media.is-video video {
  width: auto;
  height: min(640px, 80vh);
  aspect-ratio: 9 / 16;
}
.editorial-intro-media figcaption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: #fff;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 14px;
}

.editorial-section {
  border-top: 1px solid var(--stroke);
  padding: 28px 0 56px;
  display: grid;
  gap: 24px;
}

.editorial-section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
}
.editorial-section-head h2 { font-size: clamp(26px, 3vw, 34px); }
.editorial-num { color: var(--highlight); font-size: 13px; font-weight: 600; }
.editorial-aside { margin-left: auto; color: var(--muted); }

.editorial-lead { color: var(--muted); max-width: 820px; }

.editorial-print-list { display: grid; gap: 16px; }

.editorial-print {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  background: #f7f6f2;
  padding: 24px 32px;
}

.editorial-cover { display: block; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.editorial-cover[href]:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18); }
.editorial-cover img { display: block; width: 100%; border: 1px solid var(--stroke); }

.editorial-print-body { display: grid; gap: 12px; padding-top: 12px; color: var(--muted); }
.editorial-print-body h3 { font-size: 26px; color: var(--text); }
.editorial-meta {
  color: var(--highlight);
  font-size: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--stroke);
}

.page-content a.editorial-link {
  justify-self: start;
  margin-top: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--highlight);
  padding-bottom: 4px;
}
.page-content a.editorial-link:hover { color: var(--highlight); }

.editorial-online {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin-top: 16px;
}
.editorial-online.no-image { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
.editorial-online-image { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

.editorial-online-body { display: grid; gap: 12px; color: var(--muted); }
.editorial-online-body h3 { font-size: 30px; color: var(--text); }

.editorial-pubs { border-top: 1px solid var(--stroke); padding-top: 20px; margin-top: 16px; display: grid; gap: 14px; }
.editorial-pubs ul { list-style: none; margin: 0; display: grid; gap: 16px; }
.editorial-pubs li { display: grid; gap: 2px; }
.editorial-pubs li strong,
.page-content .editorial-pubs a { color: var(--text); font-weight: 700; }
.page-content .editorial-pubs a { text-decoration-color: var(--highlight); }
.editorial-pubs li span { font-size: 13px; }

.editorial-closing {
  border-top: 1px solid var(--stroke);
  padding-top: 32px;
  display: grid;
  gap: 12px;
  color: var(--muted);
}
.editorial-closing h2 { font-size: clamp(24px, 3vw, 32px); color: var(--text); }

.editorial-banner {
  margin-top: 56px;
  padding: 40px 28px;
  color: #fff;
  background-color: #1a1a1a;
  background-size: cover;
  background-position: center;
  position: relative;
  isolation: isolate;
}
.editorial-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.72);
  z-index: -1;
}
.editorial-banner .editorial-label { color: #fff; }
.editorial-banner-quote { font-family: var(--font-heading); font-style: italic; font-size: clamp(20px, 2.4vw, 26px); margin-top: 8px !important; }

@media (max-width: 860px) {
  .editorial-intro { grid-template-columns: 1fr; gap: 32px; padding-bottom: 48px; }
  .editorial-online { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .editorial-print { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
  .editorial-cover { max-width: 220px; }
  .editorial-aside { display: none; }
}
