/* ============================================================
   CENTRO SPECIALISTICO SUCCESSIONI — Main CSS
   Design: Avorio · Blu Notte · Oro sublimato
   ============================================================ */

/* ---- VARIABLES ---- */
:root {
  --ivory:        #FAF7F2;
  --beige:        #F0EBE0;
  --stone:        #8C8882;
  --anthracite:   #3A3A3A;
  --night:        #1B2A4A;
  --night-light:  #243558;
  --gold:         #C9A84C;
  --gold-muted:   rgba(201,168,76,.18);
  --gold-border:  rgba(201,168,76,.38);
  --white:        #FFFFFF;

  --font-h:  'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-b:  'Lato', 'Helvetica Neue', Arial, sans-serif;

  --radius: 2px;
  --shadow: 0 4px 24px rgba(27,42,74,.08);
  --shadow-card: 0 2px 12px rgba(27,42,74,.07);
  --transition: .25s ease;

  --container: 1200px;
  --container-narrow: 780px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-b);
  color: var(--anthracite);
  background: var(--ivory);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-h);
  font-weight: 500;
  line-height: 1.2;
  color: var(--night);
}

/* ---- CONTAINER ---- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
}
.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: .9rem 0;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

.site-header.scrolled {
  background: rgba(250,247,242,.97);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--gold-border);
  padding: .6rem 0;
}

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

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.logo-main {
  font-family: var(--font-h);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: .03em;
  transition: color var(--transition);
}
.logo-sub {
  font-size: .7rem;
  color: var(--gold);
  letter-spacing: .15em;
  text-transform: uppercase;
}
.site-header.scrolled .logo-main { color: var(--night); }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: .2rem;
}
.main-nav ul li a {
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.88);
  padding: .45rem .75rem;
  border-radius: var(--radius);
  transition: color var(--transition);
}
.main-nav ul li a:hover { color: var(--gold); }
.site-header.scrolled .main-nav ul li a { color: var(--anthracite); }
.site-header.scrolled .main-nav ul li a:hover { color: var(--gold); }

.nav-cta {
  background: var(--gold) !important;
  color: var(--night) !important;
  font-weight: 700 !important;
  padding: .5rem 1.1rem !important;
  border-radius: var(--radius) !important;
}
.nav-cta:hover { background: #b8963e !important; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}
.site-header.scrolled .nav-toggle span { background: var(--night); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-gold {
  display: inline-block;
  padding: .75rem 2rem;
  background: var(--gold);
  color: var(--night);
  font-family: var(--font-b);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  text-align: center;
}
.btn-gold:hover {
  background: #b8963e;
  border-color: #b8963e;
  color: var(--white);
}
.btn-gold.btn-sm { padding: .5rem 1.2rem; font-size: .78rem; }
.btn-gold.btn-full { width: 100%; }

.btn-outline-gold {
  display: inline-block;
  padding: .75rem 2rem;
  background: transparent;
  color: var(--gold);
  font-family: var(--font-b);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 2px solid var(--gold-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-outline-gold:hover {
  border-color: var(--gold);
  background: var(--gold-muted);
  color: var(--gold);
}

/* ============================================================
   FLASH
   ============================================================ */
.flash {
  position: fixed;
  top: 5rem;
  right: 1.5rem;
  z-index: 9999;
  max-width: 380px;
  padding: 1rem 1.4rem;
  border-radius: var(--radius);
  font-size: .9rem;
  box-shadow: var(--shadow);
  animation: slideIn .3s ease;
}
.flash-success { background: #f0fdf4; border-left: 4px solid #22c55e; color: #15803d; }
.flash-error   { background: #fef2f2; border-left: 4px solid #ef4444; color: #b91c1c; }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--night);
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(27,42,74,.97) 0%, rgba(27,42,74,.85) 100%);
}

/* Subtle texture pattern */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 60px,
    rgba(201,168,76,.03) 60px,
    rgba(201,168,76,.03) 61px
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: 0 2rem;
}

.hero-ornament {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 2rem;
}
.hero-ornament::before,
.hero-ornament::after {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  margin: -3.5px auto 0;
}

.hero-title {
  font-family: var(--font-h);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 1.2rem;
  letter-spacing: .02em;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,.72);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
  letter-spacing: .02em;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-scroll span {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0%, 100% { opacity: 1; transform: scaleY(1); transform-origin: top; }
  50% { opacity: .4; transform: scaleY(.6); transform-origin: top; }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding: 6rem 0;
}
.section-ivory { background: var(--ivory); }
.section-beige  { background: var(--beige); }
.section-night  { background: var(--night); }

.section-intro {
  text-align: center;
  margin-bottom: 4rem;
}
.section-intro-light { }

.section-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  margin-bottom: 1.2rem;
}
.section-ornament::before,
.section-ornament::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--gold-border);
}
.section-ornament::before { background: var(--gold-border); }
.section-ornament-gold::before,
.section-ornament-gold::after { background: var(--gold-border); }
.section-ornament-gold {
  /* visible on dark */
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 500;
  color: var(--night);
  margin-bottom: .6rem;
  letter-spacing: .01em;
}
.section-title.text-light { color: var(--white); }

.section-subtitle {
  font-size: 1rem;
  color: var(--stone);
  max-width: 540px;
  margin: 0 auto;
}
.section-subtitle.text-light-muted { color: rgba(255,255,255,.55); }

.section-empty {
  text-align: center;
  color: var(--stone);
  font-style: italic;
}
.section-empty.text-light { color: rgba(255,255,255,.45); }

.section-cta {
  text-align: center;
  margin-top: 3rem;
}

/* ---- GOLD SEPARATOR LINE ---- */
.gold-line {
  width: 100%;
  height: 1px;
  background: var(--gold-border);
  margin: 0;
}

/* ============================================================
   CHI SIAMO
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-text {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--anthracite);
}
.about-text p { margin-bottom: 1.2rem; }
.about-text p:last-child { margin-bottom: 0; }

.image-frame {
  position: relative;
  border: 1px solid var(--gold-border);
  padding: .75rem;
}
.image-frame::before {
  content: '';
  position: absolute;
  top: -.5rem; left: -.5rem;
  right: .5rem; bottom: .5rem;
  border: 1px solid var(--gold-muted);
  z-index: 0;
}
.image-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
}
.image-frame-gold { border-color: var(--gold); }
.image-frame-gold::before { border-color: rgba(201,168,76,.3); }

/* ============================================================
   TEAM
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.team-card {
  background: var(--white);
  border: 1px solid var(--gold-border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.team-photo {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--beige);
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--stone);
}
.team-photo-placeholder svg { width: 60px; height: 60px; }

.team-info {
  padding: 1.5rem;
  border-top: 2px solid var(--gold);
}
.team-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--night);
  margin-bottom: .25rem;
}
.team-role {
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .75rem;
}
.team-bio {
  font-size: .9rem;
  color: var(--stone);
  line-height: 1.65;
}

/* ============================================================
   FOUNDER
   ============================================================ */
.founder-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 5rem;
  align-items: start;
}

.founder-name {
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: .4rem;
}
.founder-title {
  font-size: .85rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.8rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--gold-border);
}
.founder-bio {
  color: rgba(255,255,255,.78);
  font-size: 1.02rem;
  line-height: 1.9;
}
.founder-bio p { margin-bottom: 1.1rem; }
.founder-bio p:last-child { margin-bottom: 0; }

/* ============================================================
   COMPETENZE
   ============================================================ */
.competenze-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.competenza-card {
  padding: 2.2rem 1.8rem;
  border: 1px solid var(--gold-border);
  background: var(--white);
  position: relative;
  transition: box-shadow var(--transition), transform var(--transition);
}
.competenza-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.competenza-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.competenza-card:hover::after { transform: scaleX(1); }

.competenza-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold-border);
  border-radius: 50%;
  margin-bottom: 1.4rem;
  color: var(--gold);
}
.competenza-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--night);
  margin-bottom: .75rem;
}
.competenza-desc {
  font-size: .92rem;
  color: var(--stone);
  line-height: 1.7;
}

/* ============================================================
   PARTNER
   ============================================================ */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.partner-card {
  padding: 1.8rem 1.4rem;
  border: 1px solid rgba(0,0,0,.08);
  text-align: center;
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.partner-card:hover {
  border-color: var(--gold-border);
  box-shadow: var(--shadow-card);
}
.partner-logo {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.partner-logo img { max-height: 60px; max-width: 100%; object-fit: contain; }
.partner-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--night);
  margin-bottom: .5rem;
}
.partner-desc { font-size: .88rem; color: var(--stone); margin-bottom: .8rem; }
.partner-link {
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--gold-border);
  padding-bottom: 1px;
  transition: border-color var(--transition);
}
.partner-link:hover { border-color: var(--gold); }

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.gallery-item:hover img { transform: scale(1.06); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(27,42,74,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10,16,30,.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-img-wrap { max-width: 90vw; max-height: 90vh; }
.lightbox-img-wrap img { max-width: 90vw; max-height: 90vh; object-fit: contain; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  padding: 1rem;
  transition: color var(--transition);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { color: var(--gold); }
.lightbox-close { top: 1rem; right: 1.5rem; font-size: 2.5rem; }
.lightbox-prev  { left: 1.5rem; top: 50%; transform: translateY(-50%); font-size: 3rem; }
.lightbox-next  { right: 1.5rem; top: 50%; transform: translateY(-50%); font-size: 3rem; }

/* ============================================================
   BLOG
   ============================================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--gold-border);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.blog-card-image {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.blog-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.blog-card:hover .blog-card-image img { transform: scale(1.04); }

.blog-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }

.blog-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.blog-tag {
  font-size: .73rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-border);
  padding: .2rem .6rem;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.blog-tag:hover { background: var(--gold-muted); }

.blog-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: .75rem;
  line-height: 1.35;
  flex: 1;
}
.blog-card-title a:hover { color: var(--gold); }

.blog-card-excerpt {
  font-size: .9rem;
  color: var(--stone);
  margin-bottom: .75rem;
  line-height: 1.65;
}

.blog-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  color: var(--stone);
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(0,0,0,.07);
}
.blog-read-more { color: var(--gold); font-weight: 700; }
.blog-read-more:hover { text-decoration: underline; }

.blog-tags-hero { justify-content: center; margin-bottom: 1rem; }

/* Tag filter */
.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 3rem;
  justify-content: center;
}
.tag-filter-item {
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .4rem 1rem;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 999px;
  color: var(--stone);
  transition: all var(--transition);
}
.tag-filter-item:hover,
.tag-filter-item.active {
  background: var(--night);
  border-color: var(--night);
  color: var(--white);
}
.tag-count { opacity: .6; font-size: .7rem; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid rgba(0,0,0,.1);
  font-size: .88rem;
  transition: all var(--transition);
}
.page-link:hover, .page-link.active {
  background: var(--night);
  border-color: var(--night);
  color: var(--white);
}

/* Blog post prose */
.post-cover {
  margin-bottom: 3rem;
  border: 1px solid var(--gold-border);
  padding: .5rem;
}
.post-cover img { width: 100%; aspect-ratio: 16/6; object-fit: cover; }

.prose {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--anthracite);
}
.prose h2, .prose h3 { font-family: var(--font-h); color: var(--night); margin: 2rem 0 .8rem; }
.prose h2 { font-size: 1.7rem; }
.prose h3 { font-size: 1.35rem; }
.prose p  { margin-bottom: 1.25rem; }
.prose ul, .prose ol { margin: 1rem 0 1.25rem 1.5rem; }
.prose li { margin-bottom: .5rem; }
.prose blockquote {
  border-left: 3px solid var(--gold);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--beige);
  font-style: italic;
  font-family: var(--font-h);
  font-size: 1.1rem;
}
.prose a { color: var(--gold); text-decoration: underline; }
.prose strong { font-weight: 700; color: var(--night); }
.prose img { margin: 1.5rem 0; border: 1px solid var(--gold-border); padding: .4rem; }

.post-footer { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--gold-border); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 5rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 1rem;
}
.contact-info > p {
  color: rgba(255,255,255,.65);
  font-size: .95rem;
  margin-bottom: 2rem;
}

.contact-details { display: flex; flex-direction: column; gap: 1rem; }
.contact-details li {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  color: rgba(255,255,255,.75);
  font-size: .95rem;
}
.contact-details li svg { flex-shrink: 0; color: var(--gold); margin-top: .15rem; }
.contact-details li a:hover { color: var(--gold); }

.contact-form-wrap {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--gold-border);
  padding: 2.5rem;
}

.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.contact-form .form-group { display: flex; flex-direction: column; margin-bottom: 1.2rem; }
.contact-form label {
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  margin-bottom: .45rem;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--gold-border);
  color: var(--white);
  padding: .75rem 1rem;
  font-family: var(--font-b);
  font-size: .95rem;
  border-radius: var(--radius);
  transition: border-color var(--transition);
  outline: none;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(255,255,255,.3); }
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--gold); }
.contact-form textarea { resize: vertical; min-height: 120px; }

/* ============================================================
   PAGE HERO (blog, etc.)
   ============================================================ */
.page-hero {
  background: var(--night);
  padding: 7rem 2rem 4rem;
  text-align: center;
}
.page-hero-small { padding: 6rem 2rem 3.5rem; }
.page-hero-title {
  font-family: var(--font-h);
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--white);
  margin-bottom: .75rem;
}
.page-hero-subtitle {
  color: rgba(255,255,255,.6);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
}
.page-hero-meta { color: rgba(255,255,255,.5); font-size: .88rem; margin-top: .6rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #111827;
  padding: 4rem 0 0;
  color: rgba(255,255,255,.7);
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem 3rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: 3rem;
}
.footer-logo {
  display: block;
  font-family: var(--font-h);
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: .5rem;
}
.footer-tagline { font-size: .82rem; color: var(--gold); letter-spacing: .1em; text-transform: uppercase; }
.footer-social {
  display: flex;
  gap: .8rem;
  margin-top: 1.4rem;
}
.footer-social-link {
  width: 34px;
  height: 34px;
  display: inline-flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold-border);
  color: var(--gold);
  background: rgba(255,255,255,.03);
  line-height: 0;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.footer-social-link:hover {
  background: var(--gold);
  color: var(--night);
  border-color: var(--gold);
  transform: translateY(-2px);
}
.footer-social-link svg {
  width: 14px;
  height: 14px;
  display: block;
}
.footer-links h4, .footer-contact h4 {
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
  font-family: var(--font-b);
  font-weight: 700;
}
.footer-links ul { display: flex; flex-direction: column; gap: .6rem; }
.footer-links a:hover, .footer-contact a:hover { color: var(--gold); }
.footer-contact p { margin-bottom: .5rem; font-size: .9rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: .8rem;
  color: rgba(255,255,255,.35);
  max-width: var(--container);
  margin: 0 auto;
}

/* ============================================================
   ERROR PAGE
   ============================================================ */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 0;
}
.error-content { text-align: center; }
.error-code {
  font-family: var(--font-h);
  font-size: 8rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  margin-bottom: .5rem;
}
.error-title { font-size: 1.8rem; margin-bottom: 1rem; }
.error-text  { color: var(--stone); margin-bottom: 2rem; }

/* Empty state */
.empty-state { text-align: center; padding: 4rem 0; color: var(--stone); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .team-grid         { grid-template-columns: repeat(2, 1fr); }
  .competenze-grid   { grid-template-columns: repeat(2, 1fr); }
  .partner-grid      { grid-template-columns: repeat(3, 1fr); }
  .founder-grid      { grid-template-columns: 300px 1fr; gap: 3rem; }
  .about-grid        { gap: 3rem; }
}

@media (max-width: 768px) {
  .section { padding: 4rem 0; }

  /* Header sempre visibile su mobile — sfondo solido, nessun blur */
  .site-header,
  .site-header.scrolled {
    background: #1B2A4A !important;
    backdrop-filter: none !important;
  }
  .logo-main { color: var(--white) !important; }

  /* Nav overlay mobile — sopra tutto */
  .main-nav {
    position: fixed;
    inset: 0;
    background: #1B2A4A;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(-100%);
    transition: transform .32s cubic-bezier(.4,0,.2,1);
    z-index: 9998;
    opacity: 1;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: center; gap: 1.8rem; }
  .main-nav ul li a {
    font-size: 1.15rem;
    color: var(--white) !important;
    padding: .5rem 1rem;
  }
  .nav-toggle { display: flex; z-index: 9999; position: relative; }
  .nav-toggle span { background: var(--white) !important; }
  .nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .about-grid        { grid-template-columns: 1fr; }
  .team-grid         { grid-template-columns: 1fr; }
  .founder-grid      { grid-template-columns: 1fr; }
  .competenze-grid   { grid-template-columns: 1fr; }
  .partner-grid      { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid      { grid-template-columns: repeat(2, 1fr); }
  .blog-grid         { grid-template-columns: 1fr; }
  .contact-grid      { grid-template-columns: 1fr; gap: 3rem; }
  .contact-form .form-row { grid-template-columns: 1fr; }
  .footer-inner      { grid-template-columns: 1fr; gap: 2rem; }

  .hero-title { font-size: 2.2rem; }
  .hero-actions { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .partner-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 3rem 0; }
  .hero-title { font-size: 1.9rem; }
  .section-title { font-size: 1.6rem; }
  .hero-actions .btn-gold,
  .hero-actions .btn-outline-gold { width: 100%; text-align: center; }
  .contact-form-wrap { padding: 1.4rem; }
  .footer-inner { padding: 0 1rem 2rem; }
  .founder-grid { gap: 2rem; }
  .blog-card-meta { flex-direction: column; align-items: flex-start; gap: .3rem; }
}

/* ============================================================
   HERO WITH BACKGROUND IMAGE
   ============================================================ */
.hero-with-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-with-bg .hero-overlay {
  background: linear-gradient(135deg, rgba(27,42,74,.88) 0%, rgba(27,42,74,.72) 100%);
}

/* ============================================================
   COOKIE CONSENT BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9996;
  background: var(--night);
  border-top: 1px solid var(--gold-border);
  padding: 1.1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  transform: translateY(110%);
  transition: transform .4s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 -4px 20px rgba(0,0,0,.25);
}
.cookie-banner.visible { transform: translateY(0); }

.cookie-banner-text {
  font-size: .85rem;
  color: rgba(255,255,255,.78);
  line-height: 1.5;
}
.cookie-banner-text strong { color: var(--white); }
.cookie-banner-text a { color: var(--gold); text-decoration: underline; margin-left: .3rem; }

.cookie-banner-actions {
  display: flex;
  gap: .6rem;
  flex-shrink: 0;
}

.cookie-btn {
  padding: .5rem 1.2rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all .2s;
  white-space: nowrap;
}
.cookie-accept { background: var(--gold); color: var(--night); }
.cookie-accept:hover { background: #b8963e; }
.cookie-reject {
  background: transparent;
  color: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.2);
}
.cookie-reject:hover { color: var(--white); border-color: rgba(255,255,255,.4); }

@media (max-width: 600px) {
  .cookie-banner { flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.2rem; }
  .cookie-banner-actions { width: 100%; }
  .cookie-btn { flex: 1; text-align: center; }
}

/* ============================================================
   MOBILE IMPROVEMENTS
   ============================================================ */

/* Migliore padding hero su mobile */
@media (max-width: 768px) {
  .hero-content { padding: 0 1.2rem; }
  .hero-subtitle { font-size: .95rem; }

  /* Team card più compatta */
  .team-info { padding: 1.1rem; }
  .team-bio { display: none; } /* nasconde bio su mobile, troppo affollato */

  /* Founder: immagine sopra testo */
  .founder-grid { text-align: center; }
  .founder-title { text-align: left; }
  .founder-bio { text-align: left; }

  /* Competenze su mobile: icona e testo inline */
  .competenza-card { padding: 1.5rem 1.2rem; }

  /* Gallery: mantieni 2 colonne */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: .3rem; }

  /* Blog: mostra estratto più corto */
  .blog-card-excerpt { -webkit-line-clamp: 3; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }

  /* Footer più leggibile */
  .footer-bottom { padding: 1.2rem; }

  /* Paginazione */
  .page-link { width: 36px; height: 36px; font-size: .82rem; }

  /* Section padding */
  .section { padding: 3.5rem 0; }
  .section-intro { margin-bottom: 2.5rem; }
}

/* Migliore tap target per nav links su mobile */
@media (max-width: 768px) {
  .main-nav ul li a {
    padding: .8rem 1.2rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .nav-cta {
    padding: .8rem 1.6rem !important;
    margin-top: .5rem;
  }
}

/* ---- LOGO IMAGE ---- */
.logo-img {
  max-height: 58px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* ---- PARTNERSHIP INTRO ---- */
.partnership-intro {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 3.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--gold-border);
}
.partnership-intro-img .image-frame {
  aspect-ratio: 4/3;
  overflow: hidden;
}
.partnership-intro-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.partnership-intro-text p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--anthracite);
}
@media (max-width: 768px) {
  .partnership-intro {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ---- CONTACT FORM - PRIVACY ---- */
.form-privacy {
  margin-top: 1rem;
}
.privacy-label {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  cursor: pointer;
  font-size: .9rem;
  color: rgba(255,255,255,.8);
  line-height: 1.5;
}
.privacy-label input[type="checkbox"] {
  margin-top: .15rem;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
  cursor: pointer;
}
.privacy-label a {
  color: var(--gold);
  text-decoration: underline;
}

/* ---- LEGAL PAGES (privacy / cookie) ---- */
.legal-page {
  min-height: 60vh;
}
.legal-content {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 2rem 0 4rem;
}
.legal-title {
  font-family: var(--font-h);
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--night);
  margin-bottom: .5rem;
}
.legal-update {
  color: var(--stone);
  font-size: .9rem;
  margin-bottom: 2.5rem;
}
.legal-content h2 {
  font-family: var(--font-h);
  font-size: 1.35rem;
  color: var(--night);
  margin: 2rem 0 .75rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--gold-border);
}
.legal-content p,
.legal-content li {
  font-size: .97rem;
  line-height: 1.8;
  color: var(--anthracite);
}
.legal-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.legal-content a {
  color: var(--gold);
  text-decoration: underline;
}
.legal-content .btn-gold,
.legal-back .btn-gold {
  color: var(--night) !important;
  text-decoration: none !important;
}
.legal-back {
  margin-top: 3rem;
}
.cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .9rem;
}
.cookie-table th,
.cookie-table td {
  padding: .75rem 1rem;
  border: 1px solid var(--beige);
  text-align: left;
  color: var(--anthracite);
}
.cookie-table th {
  background: var(--beige);
  font-weight: 700;
  color: var(--night);
}
.cookie-table code {
  background: var(--beige);
  padding: .15rem .4rem;
  border-radius: 3px;
  font-size: .85rem;
}

/* ---- FOOTER LEGAL LINKS ---- */
.footer-legal-links {
  font-size: .82rem;
  color: rgba(255,255,255,.45);
  margin-top: .35rem;
}
.footer-legal-links a {
  color: rgba(255,255,255,.55);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-legal-links a:hover {
  color: var(--gold);
}
.footer-sep {
  margin: 0 .5rem;
}

/* ============================================================
   FAQ WIDGET / CHATBOT
   ============================================================ */
.whatsapp-fab {
  position: fixed;
  right: 5.75rem;
  bottom: 1.5rem;
  z-index: 9997;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #25D366;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.16);
  box-shadow: 0 4px 18px rgba(37,211,102,.32);
  line-height: 0;
  transition: transform var(--transition), background var(--transition), opacity var(--transition);
}
.whatsapp-fab:hover {
  background: #1fb759;
  transform: scale(1.07);
}
.whatsapp-fab svg {
  width: 24px;
  height: 24px;
  display: block;
  pointer-events: none;
}
body.faq-open .whatsapp-fab {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

#faq-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9997;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .75rem;
  pointer-events: none;
}
#faq-btn,
#faq-panel {
  pointer-events: auto;
}
#faq-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--night);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(27,42,74,.25);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), transform var(--transition);
  flex-shrink: 0;
}
#faq-btn:hover { background: #b8963e; transform: scale(1.07); }

#faq-panel {
  width: 320px;
  max-height: 480px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(27,42,74,.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(.97);
  transition: opacity .22s ease, transform .22s ease;
}
#faq-panel.open {
  opacity: 1;
  pointer-events: all;
  transform: none;
}
.faq-panel-head {
  background: var(--night);
  color: var(--white);
  padding: .85rem 1rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.faq-panel-title { font-family: var(--font-h); font-size: 1.05rem; letter-spacing: .04em; }
.faq-panel-close {
  background: none; border: none; color: rgba(255,255,255,.7);
  font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 0 .2rem;
  transition: color var(--transition);
}
.faq-panel-close:hover { color: var(--white); }
.faq-panel-greeting {
  padding: .75rem 1rem;
  font-size: .88rem;
  color: var(--stone);
  border-bottom: 1px solid var(--beige);
  flex-shrink: 0;
}
.faq-search-wrap {
  padding: .6rem .75rem;
  border-bottom: 1px solid var(--beige);
  flex-shrink: 0;
}
#faq-search {
  width: 100%;
  border: 1px solid var(--beige);
  border-radius: var(--radius);
  padding: .4rem .7rem;
  font-size: .85rem;
  font-family: var(--font-b);
  color: var(--anthracite);
  outline: none;
}
#faq-search:focus { border-color: var(--gold); }
.faq-list {
  overflow-y: auto;
  flex: 1;
}
.faq-loading {
  padding: 1rem; font-size: .88rem; color: var(--stone); text-align: center;
}
.faq-item {
  border-bottom: 1px solid var(--beige);
}
.faq-q {
  padding: .7rem 1rem;
  display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  cursor: pointer;
  font-size: .88rem; font-weight: 600; color: var(--night);
  transition: background var(--transition);
}
.faq-q:hover { background: var(--ivory); }
.faq-arrow {
  color: var(--gold); font-size: 1.1rem; transition: transform var(--transition);
  flex-shrink: 0;
}
.faq-item.open .faq-arrow { transform: rotate(90deg); }
.faq-a {
  padding: .5rem 1rem .75rem;
  font-size: .85rem; color: var(--anthracite); line-height: 1.6;
  background: var(--ivory);
}
.faq-panel-footer {
  padding: .65rem 1rem;
  border-top: 1px solid var(--beige);
  text-align: center;
  flex-shrink: 0;
}
.faq-panel-footer a {
  font-size: .82rem; color: var(--gold); font-weight: 700;
  letter-spacing: .05em; text-decoration: none;
}
.faq-panel-footer a:hover { text-decoration: underline; }
@media (max-width: 480px) {
  .whatsapp-fab { bottom: 1rem; right: 4.75rem; }
  #faq-widget { bottom: 1rem; right: 1rem; }
  #faq-panel { width: calc(100vw - 2rem); }
}
