/* ═══════════════════════════════════════════════════════════
   Il Sogno di un Principe – main.css
   ═══════════════════════════════════════════════════════════ */

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

:root {
  --cream:       #f5f0e8;
  --cream-dark:  #ede8dd;
  --gold:        #c09a45;
  --gold-light:  #d4aa55;
  --gold-pale:   #f0e6cc;
  --brown:       #2d1e0f;
  --brown-mid:   #5a3e28;
  --brown-light: #8b6b4a;
  --white:       #ffffff;
  --border:      #ddd3bc;
  --shadow:      rgba(45,30,15,0.08);
  --radius:      14px;
  --radius-lg:   22px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  background: var(--cream);
  color: var(--brown);
  line-height: 1.6;
  font-size: 16px;
}

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

/* ─── NAV ─── */
.sp-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245,240,232,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px; height: 68px;
}

.sp-nav-logo {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
}

.sp-nav-logo-icon {
  width: 44px; height: 44px;
  background: var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 18px; flex-shrink: 0;
}

.sp-nav-logo-icon img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.sp-nav-logo-text strong {
  display: block; font-family: 'Playfair Display', serif;
  font-size: 15px; color: var(--brown); font-weight: 700;
}

.sp-nav-logo-text span { font-size: 11px; color: var(--gold); letter-spacing: 0.5px; }

.sp-nav-links {
  display: flex; align-items: center; gap: 4px; list-style: none;
}

.sp-nav-links a {
  text-decoration: none; color: var(--brown-mid); font-size: 13.5px;
  padding: 6px 13px; border-radius: 20px;
  transition: all 0.2s; display: inline-flex; align-items: center; gap: 5px;
}

.sp-nav-links a:hover { background: var(--gold-pale); color: var(--gold); }

.sp-btn-nav {
  background: var(--gold) !important; color: white !important;
  font-weight: 700 !important; padding: 7px 18px !important;
}

.sp-btn-nav:hover { background: var(--gold-light) !important; }

.sp-nav-burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}

.sp-nav-burger span {
  display: block; width: 24px; height: 2px;
  background: var(--brown); border-radius: 2px; transition: all 0.3s;
}

/* ─── BUTTONS ─── */
.sp-btn-primary {
  background: var(--gold); color: white;
  font-family: 'Lato', sans-serif; font-size: 15px; font-weight: 700;
  border: none; border-radius: 50px; padding: 14px 28px; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.25s; box-shadow: 0 4px 16px rgba(192,154,69,0.35);
}

.sp-btn-primary:hover {
  background: var(--gold-light); transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(192,154,69,0.4); color: white;
}

.sp-btn-outline {
  background: transparent; color: var(--brown);
  font-family: 'Lato', sans-serif; font-size: 15px; font-weight: 700;
  border: 2px solid var(--brown); border-radius: 50px; padding: 12px 26px;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.25s;
}

.sp-btn-outline:hover { background: var(--brown); color: white; }

/* ─── HERO ─── */
.sp-hero {
  position: relative; min-height: 72vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden; padding: 80px 24px;
  background: linear-gradient(160deg, #f0ebe0 0%, #e8dfc9 40%, #d6e8e0 100%);
}

.sp-hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 30% 60%, rgba(192,154,69,0.09) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 75% 30%, rgba(100,180,160,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.sp-hero-inner { position: relative; max-width: 760px; }

.sp-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: white; border: 1px solid var(--border); border-radius: 50px;
  padding: 8px 20px; font-size: 13px; color: var(--brown-mid);
  margin-bottom: 28px; box-shadow: 0 2px 12px var(--shadow);
  animation: spFadeUp 0.5s ease both;
}

.sp-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(40px, 7vw, 76px); font-weight: 700;
  color: var(--brown); line-height: 1.1; margin-bottom: 22px;
  animation: spFadeUp 0.6s 0.1s ease both;
}

.sp-hero p {
  font-size: 18px; color: var(--brown-mid);
  max-width: 560px; margin: 0 auto 38px;
  font-weight: 300; line-height: 1.7;
  animation: spFadeUp 0.6s 0.2s ease both;
}

.sp-hero-ctas {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  animation: spFadeUp 0.6s 0.3s ease both;
}

/* ─── SECTIONS ─── */
.sp-section { padding: 90px 24px; }
.sp-section--white  { background: var(--white); }
.sp-section--cream  { background: var(--cream-dark); }

.sp-section-inner { max-width: 1100px; margin: 0 auto; }

.sp-section-label {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--gold); font-size: 12px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 12px;
}

.sp-section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 4vw, 46px); font-weight: 700;
  color: var(--brown); line-height: 1.15; margin-bottom: 14px;
}

.sp-gold { color: var(--gold); font-style: italic; }

.sp-section-sub {
  font-size: 16px; color: var(--brown-light);
  max-width: 580px; line-height: 1.7; margin-top: 16px;
}

.sp-section-header { margin-bottom: 52px; }

.sp-divider {
  width: 60px; height: 3px;
  background: var(--gold); border-radius: 3px; margin-top: 16px;
}

.sp-section-cta { text-align: center; margin-top: 44px; }

/* ─── DATES ─── */
.sp-dates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px,1fr));
  gap: 24px;
}

.sp-date-card {
  background: var(--cream); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 30px;
  position: relative; overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.sp-date-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px var(--shadow); }

.sp-date-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 4px; height: 100%; background: var(--gold); border-radius: 4px 0 0 4px;
}

.sp-date-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold-pale); color: var(--gold);
  font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 5px 12px; border-radius: 20px; margin-bottom: 14px;
}

.sp-date-card h3 {
  font-family: 'Playfair Display', serif; font-size: 18px;
  font-weight: 700; color: var(--brown); margin-bottom: 8px;
}

.sp-date-loc {
  font-size: 13px; color: var(--gold); font-weight: 700;
  margin-bottom: 10px;
}

.sp-date-card p { font-size: 14px; color: var(--brown-light); line-height: 1.6; }

.sp-date-time {
  margin-top: 14px; font-size: 13px; color: var(--brown-mid); font-weight: 700;
}

/* ─── GALLERY ─── */
.sp-gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.sp-gallery-item {
  border-radius: var(--radius); overflow: hidden;
  background: var(--border); position: relative; cursor: pointer;
}

.sp-gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; transition: transform 0.5s ease;
}

.sp-gallery-item:hover img { transform: scale(1.04); }

.sp-gallery-item--0 { grid-column: span 7; grid-row: span 2; min-height: 360px; }
.sp-gallery-item--1 { grid-column: span 5; min-height: 170px; }
.sp-gallery-item--2 { grid-column: span 5; min-height: 170px; }
.sp-gallery-item--3 { grid-column: span 4; min-height: 220px; }
.sp-gallery-item--4 { grid-column: span 4; min-height: 220px; }
.sp-gallery-item--5 { grid-column: span 4; min-height: 220px; }

.sp-gallery-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(45,30,15,0.55) 0%, transparent 50%);
  opacity: 0; transition: opacity 0.3s;
  display: flex; align-items: flex-end; padding: 18px;
}

.sp-gallery-item:hover .sp-gallery-overlay { opacity: 1; }

.sp-gallery-overlay span {
  color: white; font-size: 13px; font-weight: 700; letter-spacing: 0.5px;
}

.sp-gallery-placeholder { min-height: 200px; }

.sp-gallery-ph-inner {
  width: 100%; height: 100%; min-height: inherit;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px;
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-dark) 100%);
}

.sp-gallery-ph-icon { font-size: 28px; opacity: 0.5; }

.sp-gallery-ph-inner span:last-child { font-size: 13px; color: var(--brown-light); }

/* ─── LIGHTBOX ─── */
.sp-lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.9); z-index: 9999;
  align-items: center; justify-content: center;
}

.sp-lightbox.active { display: flex; }

.sp-lightbox img {
  max-width: 90vw; max-height: 90vh;
  border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.sp-lightbox-close {
  position: absolute; top: 20px; right: 28px;
  color: white; font-size: 42px; cursor: pointer;
  background: none; border: none; line-height: 1; transition: opacity 0.2s;
}

.sp-lightbox-close:hover { opacity: 0.7; }

/* ─── BOOK ─── */
.sp-book-wrapper {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
}

.sp-book-visual {
  background: linear-gradient(145deg, #e8dfc9, #d4c9b0);
  border-radius: var(--radius-lg); padding: 50px 40px;
  display: flex; align-items: center; justify-content: center;
  position: relative; min-height: 420px;
}

.sp-book-badge {
  position: absolute; top: 20px; left: 20px;
  background: var(--gold); color: white;
  font-size: 12px; font-weight: 700; padding: 6px 14px;
  border-radius: 20px;
}

.sp-book-img-wrap {
  width: 220px;
  box-shadow: 24px 24px 60px rgba(45,30,15,0.3), -8px -8px 30px rgba(255,255,255,0.4);
  border-radius: 6px; overflow: hidden;
  transform: rotate(-2deg); transition: transform 0.4s;
}

.sp-book-img-wrap:hover { transform: rotate(0deg) scale(1.03); }

.sp-book-img-wrap img { width: 100%; }

.sp-book-cover-ph {
  width: 220px; height: 300px;
  background: linear-gradient(135deg, #1a3a5c, #0d2a45);
  border-radius: 6px; padding: 28px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
  box-shadow: 24px 24px 60px rgba(45,30,15,0.3);
}

.sp-book-cover-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700; color: white;
  line-height: 1.2; margin-bottom: 12px; display: block;
}

.sp-book-cover-sub {
  font-size: 11px; color: rgba(255,255,255,0.65); display: block;
}

.sp-book-tags { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }

.sp-book-tag {
  border: 1.5px solid var(--brown); color: var(--brown);
  font-size: 12px; font-weight: 700; padding: 5px 14px; border-radius: 20px;
}

.sp-book-tag--gold { border-color: var(--gold); color: var(--gold); }

.sp-book-title {
  font-family: 'Playfair Display', serif; font-size: 34px; font-weight: 700;
  line-height: 1.2; color: var(--brown); margin-bottom: 16px;
}

.sp-book-desc { font-size: 15px; color: var(--brown-light); line-height: 1.7; margin-bottom: 16px; }

.sp-book-author { font-size: 13px; color: var(--brown-mid); margin-bottom: 22px; }

.sp-book-price {
  font-family: 'Playfair Display', serif;
  font-size: 30px; font-weight: 700; color: var(--brown); margin-bottom: 22px;
}

.sp-btn-paypal {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #f0c040; color: #003087;
  font-weight: 700; font-size: 16px;
  border: none; border-radius: 10px; padding: 15px 28px;
  cursor: pointer; width: 100%; text-decoration: none;
  transition: all 0.25s; box-shadow: 0 4px 16px rgba(240,192,64,0.35);
  margin-bottom: 28px;
}

.sp-btn-paypal:hover {
  background: #e8b830; transform: translateY(-2px); color: #003087;
}

.sp-book-features {
  display: flex; gap: 24px; padding-top: 22px;
  border-top: 1px solid var(--border);
}

.sp-book-feat {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; text-align: center; flex: 1;
}

.sp-book-feat span:first-child { font-size: 22px; }

.sp-book-feat span:last-child {
  font-size: 12px; color: var(--brown-light); line-height: 1.4;
}

/* ─── TESTIMONIANZE GRID ─── */
.sp-testi-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr));
  gap: 24px;
}

.sp-testi-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 30px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.sp-testi-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px var(--shadow); }

.sp-testi-quote {
  font-family: 'Playfair Display', serif;
  font-size: 40px; color: var(--gold); line-height: 1; margin-bottom: 14px;
}

.sp-testi-foto {
  width: 100%; border-radius: 10px; margin-bottom: 14px;
  max-height: 200px; object-fit: cover;
}

.sp-testi-text {
  font-size: 15px; color: var(--brown-mid); font-style: italic;
  line-height: 1.75; margin-bottom: 20px;
}

.sp-testi-author { display: flex; align-items: center; gap: 12px; }

.sp-testi-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--gold-pale); display: flex; align-items: center;
  justify-content: center; color: var(--gold); font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}

.sp-testi-name { font-weight: 700; font-size: 14px; color: var(--brown); display: block; }

.sp-testi-date { font-size: 12px; color: var(--brown-light); }

.sp-no-testi { font-size: 15px; color: var(--brown-light); text-align: center; padding: 40px 0; }

/* ─── ARTICLE / PAGE ─── */
.sp-main { min-height: 60vh; }

.sp-article-content {
  font-size: 16px; line-height: 1.8; color: var(--brown-mid);
  max-width: 780px; margin: 0 auto;
}

.sp-article-content p { margin-bottom: 20px; }
.sp-article-content h2 { font-family: 'Playfair Display', serif; font-size: 28px; margin: 36px 0 16px; color: var(--brown); }
.sp-article-content h3 { font-family: 'Playfair Display', serif; font-size: 22px; margin: 28px 0 12px; color: var(--brown); }
.sp-article-content a  { color: var(--gold); text-decoration: underline; }
.sp-article-content ul, .sp-article-content ol { padding-left: 24px; margin-bottom: 20px; }
.sp-article-content li { margin-bottom: 8px; }

/* Gravity Forms reset + stile */
.gform_wrapper .gform_body input[type=text],
.gform_wrapper .gform_body input[type=email],
.gform_wrapper .gform_body textarea,
.gform_wrapper .gform_body select {
  background: var(--cream) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 10px !important;
  padding: 12px 16px !important;
  font-family: 'Lato', sans-serif !important;
  font-size: 14px !important;
  color: var(--brown) !important;
  width: 100% !important;
  transition: border-color 0.2s !important;
}

.gform_wrapper .gform_body input:focus,
.gform_wrapper .gform_body textarea:focus {
  border-color: var(--gold) !important;
  outline: none !important;
}

.gform_wrapper .gform_footer input[type=submit],
.gform_wrapper .gform_page_footer input[type=submit] {
  background: var(--gold) !important;
  color: white !important;
  border: none !important;
  border-radius: 50px !important;
  padding: 14px 32px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: background 0.2s !important;
}

.gform_wrapper .gform_footer input[type=submit]:hover {
  background: var(--gold-light) !important;
}

/* ─── FOOTER ─── */
.sp-footer {
  background: var(--brown); color: rgba(255,255,255,0.65);
  padding: 60px 24px 36px;
}

.sp-footer-inner { max-width: 1100px; margin: 0 auto; }

.sp-footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 48px; padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 32px;
}

.sp-footer-brand h3 {
  font-family: 'Playfair Display', serif;
  font-size: 22px; color: white; margin-bottom: 10px;
}

.sp-footer-brand p { font-size: 14px; line-height: 1.7; }

.sp-footer-col h4 {
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--gold); margin-bottom: 16px;
}

.sp-footer-col ul { list-style: none; }
.sp-footer-col ul li { margin-bottom: 10px; }
.sp-footer-col ul li a {
  color: rgba(255,255,255,0.65); text-decoration: none;
  font-size: 14px; transition: color 0.2s;
}
.sp-footer-col ul li a:hover { color: var(--gold); }

.sp-footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; flex-wrap: wrap; gap: 10px;
}

/* ─── ANIMATIONS ─── */
@keyframes spFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .sp-nav { padding: 0 20px; }
  .sp-nav-links { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--cream); border-bottom: 1px solid var(--border); padding: 16px 24px 24px; gap: 4px; }
  .sp-nav-links.open { display: flex; }
  .sp-nav-burger { display: flex; }

  .sp-book-wrapper { grid-template-columns: 1fr; }
  .sp-book-visual { display: none; }

  .sp-gallery-item--0, .sp-gallery-item--1, .sp-gallery-item--2,
  .sp-gallery-item--3, .sp-gallery-item--4, .sp-gallery-item--5 {
    grid-column: span 12; min-height: 200px;
  }

  .sp-footer-top { grid-template-columns: 1fr; gap: 28px; }
  .sp-footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 600px) {
  .sp-section { padding: 60px 20px; }
  .sp-hero { padding: 60px 20px; min-height: 60vh; }
  .sp-hero-ctas { flex-direction: column; align-items: center; }
}
