/* ============================================
   COLLINA DEGLI ULIVI — SHARED STYLES
   ============================================ */

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

:root {
  --cream: #f7f3ee;
  --warm-white: #fdfaf6;
  --olive: #6b7c5c;
  --olive-light: #8a9e72;
  --olive-dark: #4a5940;
  --terracotta: #c27a5a;
  --sand: #d4b896;
  --peach: #f0d8c4;
  --text-dark: #2d2820;
  --text-mid: #5a5040;
  --text-light: #8c7e6e;
  --border: rgba(180,160,130,0.2);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--warm-white);
  color: var(--text-dark);
  line-height: 1.6;
}

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

/* ── NAV ── */
nav.main-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 48px;
  background: rgba(253,250,246,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); transition: box-shadow 0.3s;
}
nav.main-nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.08); }
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--olive-dark);
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.nav-logo span { color: var(--terracotta); font-style: italic; }
.nav-links {
  display: flex; gap: 28px; list-style: none; align-items: center;
}
.nav-links a {
  text-decoration: none; font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mid);
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--olive-dark); }
.nav-cta {
  background: var(--olive); color: white !important;
  padding: 9px 22px; border-radius: 4px;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--olive-dark) !important; }

.lang-switcher { display: flex; gap: 4px; align-items: center; margin-left: 12px; }
.lang-btn {
  background: none; border: 1px solid transparent; border-radius: 4px;
  font-size: 0.85rem; font-weight: 600; cursor: pointer; padding: 4px 8px;
  transition: all 0.2s; color: var(--text-light); letter-spacing: 0.05em;
}
.lang-btn:hover { color: var(--olive-dark); }
.lang-btn.active {
  color: var(--olive-dark);
  border-color: var(--olive-light);
  background: rgba(107,124,92,0.08);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; color: var(--olive-dark);
}
.nav-toggle svg { width: 24px; height: 24px; }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  background: var(--olive); color: white; text-decoration: none;
  padding: 14px 32px; border-radius: 4px;
  font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  transition: background 0.2s, transform 0.15s;
  border: none; cursor: pointer;
  font-family: inherit;
}
.btn-primary:hover { background: var(--olive-dark); transform: translateY(-1px); }

.btn-secondary {
  display: inline-block;
  border: 1.5px solid var(--olive-dark); color: var(--olive-dark);
  background: transparent; text-decoration: none;
  padding: 13px 30px; border-radius: 4px;
  font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  transition: all 0.2s; cursor: pointer;
  font-family: inherit;
}
.btn-secondary:hover { background: var(--olive-dark); color: white; }

.btn-outline-light {
  border-color: rgba(255,255,255,0.7); color: white;
  background: rgba(255,255,255,0.1); backdrop-filter: blur(4px);
}
.btn-outline-light:hover { background: white; color: var(--olive-dark); }

/* ── SECTION HEADERS ── */
.section-header { text-align: center; margin-bottom: 52px; padding: 0 24px; }
.section-header.left { text-align: left; }
.section-label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--terracotta);
  display: block; margin-bottom: 12px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--text-dark); line-height: 1.2;
  font-weight: 600;
}
.section-title em { font-style: italic; color: var(--olive); }
.section-line {
  width: 48px; height: 2px; background: var(--olive-light);
  margin: 18px auto 0;
}
.section-header.left .section-line { margin-left: 0; }
.section-intro {
  max-width: 680px; margin: 24px auto 0;
  color: var(--text-mid); font-size: 1rem; font-weight: 300; line-height: 1.8;
}

/* ── PHOTO SLOT ── */
.photo-slot {
  width: 100%; height: 100%; position: relative; overflow: hidden;
  background: #ede7df; display: block;
}
.photo-slot img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; transition: transform 0.5s ease;
}
.photo-slot:hover img { transform: scale(1.04); }

/* ── PAGE WRAPPER ── */
.page-wrapper { padding-top: 72px; }

/* ── PAGE HEADER (for sub-pages) ── */
.page-header {
  position: relative;
  padding: 100px 24px 80px;
  text-align: center;
  background: linear-gradient(160deg, var(--cream) 0%, #ede4d8 100%);
  overflow: hidden;
}
.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: var(--text-dark);
  line-height: 1.15;
  font-weight: 600;
  margin-bottom: 14px;
}
.page-header h1 em { font-style: italic; color: var(--olive); }
.page-header .subtitle {
  max-width: 640px; margin: 0 auto;
  color: var(--text-mid); font-size: 1.05rem; font-weight: 300;
}
.page-header .breadcrumb {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--terracotta);
  margin-bottom: 18px;
}

/* ── FOOTER ── */
footer.main-footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.7);
  padding: 60px 24px 32px;
}
.footer-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px;
  margin-bottom: 36px;
}
.footer-brand .footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem; color: var(--sand);
  display: block; margin-bottom: 12px;
}
.footer-brand .footer-logo span {
  color: var(--terracotta); font-style: italic;
}
.footer-brand p {
  font-size: 0.88rem; line-height: 1.7;
  color: rgba(255,255,255,0.6);
  max-width: 380px;
}
.footer-col h4 {
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--sand); margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li {
  margin-bottom: 10px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}
.footer-col a {
  color: rgba(255,255,255,0.6); text-decoration: none;
  font-size: 0.88rem; transition: color 0.2s;
}
.footer-col a:hover { color: var(--sand); }
.footer-bottom {
  max-width: 1100px; margin: 0 auto;
  padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center; font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}

/* ── WHATSAPP FLOATING BUTTON ── */
.whatsapp-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  width: 60px; height: 60px; border-radius: 50%;
  background: #25d366; color: white;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 22px rgba(37,211,102,0.5);
}
.whatsapp-float svg { width: 32px; height: 32px; fill: white; }
.whatsapp-tooltip {
  position: absolute; right: 72px; top: 50%; transform: translateY(-50%);
  background: var(--text-dark); color: white;
  padding: 8px 14px; border-radius: 6px;
  font-size: 0.78rem; font-weight: 500;
  white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.whatsapp-tooltip::after {
  content: ''; position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
  border: 6px solid transparent; border-left-color: var(--text-dark);
}
.whatsapp-float:hover .whatsapp-tooltip { opacity: 1; }

/* ── CONTACT POPUP MODAL ── */
.contact-modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(45,40,32,0.55); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; transition: opacity 0.25s;
}
.contact-modal.active { display: flex; opacity: 1; }
.contact-modal-content {
  background: var(--warm-white);
  border-radius: 12px;
  width: 100%; max-width: 480px;
  padding: 36px 32px;
  position: relative;
  box-shadow: var(--shadow-lg);
  max-height: 90vh; overflow-y: auto;
}
.contact-modal-close {
  position: absolute; top: 14px; right: 14px;
  background: none; border: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light); transition: background 0.2s;
}
.contact-modal-close:hover { background: var(--cream); }
.contact-modal h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem; color: var(--text-dark);
  margin-bottom: 8px;
}
.contact-modal p {
  font-size: 0.92rem; color: var(--text-mid);
  margin-bottom: 24px;
}
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label {
  font-size: 0.78rem; font-weight: 600; color: var(--text-mid);
  letter-spacing: 0.04em;
}
.form-field input, .form-field select, .form-field textarea {
  padding: 11px 14px; border: 1px solid var(--border);
  border-radius: 6px; background: white;
  font-family: inherit; font-size: 0.92rem; color: var(--text-dark);
  transition: border 0.2s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--olive); box-shadow: 0 0 0 3px rgba(107,124,92,0.1);
}
.form-field textarea { resize: vertical; min-height: 90px; }
.form-success {
  padding: 14px; background: rgba(107,124,92,0.1);
  border-radius: 6px; color: var(--olive-dark);
  font-size: 0.92rem; text-align: center;
}
.form-error {
  padding: 14px; background: rgba(194,122,90,0.1);
  border-radius: 6px; color: var(--terracotta);
  font-size: 0.92rem; text-align: center;
}

/* ── ALERT/INFO BOX ── */
.info-box {
  background: var(--cream);
  border-left: 3px solid var(--olive);
  padding: 18px 22px;
  border-radius: 6px;
  margin: 20px 0;
}
.info-box.warning { border-left-color: var(--terracotta); }
.info-box h4 {
  font-size: 0.95rem; color: var(--olive-dark); margin-bottom: 6px;
  font-weight: 600;
}
.info-box p { font-size: 0.9rem; color: var(--text-mid); line-height: 1.6; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav.main-nav { padding: 14px 24px; }
  .nav-links {
    display: none;
    position: fixed; top: 60px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--warm-white);
    border-top: 1px solid var(--border);
    padding: 12px 0;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block; padding: 14px 24px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links li:last-child a { border-bottom: none; }
  .nav-cta { margin: 12px 24px; text-align: center; }
  .nav-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  nav.main-nav { padding: 12px 18px; }
  .nav-logo { font-size: 1rem; }
  .whatsapp-float { width: 54px; height: 54px; bottom: 18px; right: 18px; }
  .whatsapp-float svg { width: 28px; height: 28px; }
  .whatsapp-tooltip { display: none; }
  .contact-modal-content { padding: 28px 22px; }
}
