/* ===== GUSTO NOBILE BASILICATA ===== */
/* Elegant wine event aesthetic */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500&family=Lato:wght@300;400;700&display=swap');

:root {
  --bg: #f9f5f0;
  --bg-alt: #d6cab9;
  --text: #742030;
  --text-dark: #270a10;
  --accent: #742030;
  --accent-light: #9a3a4a;
  --gold: #b8924a;
  --gold-light: #d4b06a;
  --cream: #f9f5f0;
  --white: #ffffff;
  --shadow: rgba(39, 10, 16, 0.08);
  --shadow-md: rgba(39, 10, 16, 0.12);
  --radius: 4px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Lato', 'Helvetica Neue', sans-serif;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-dark);
  line-height: 1.7;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 300; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }

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

.section-subtitle {
  font-family: var(--font-body);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-divider {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 1.5rem auto;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 5rem 0;
}

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(249, 245, 240, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(214, 202, 185, 0.5);
  transition: all var(--transition);
}

.nav.scrolled {
  box-shadow: 0 2px 20px var(--shadow);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 1px;
  line-height: 0.9;
}

.nav-brand span {
  color: var(--gold);
  font-weight: 300;
}

.nav-brand .subtitle {
    line-height: 0.4;
    font-size: 1rem;
    color: var(--text);
    font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 400;
  color: var(--text-dark);
  position: relative;
  padding: 0.3rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.lang-switcher {
  display: flex;
  gap: 0.5rem;
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid var(--bg-alt);
}

.lang-btn {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--bg-alt);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  transition: all var(--transition);
  font-weight: 700;
}

.lang-btn.active,
.lang-btn:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: all var(--transition);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background: linear-gradient(165deg, var(--bg) 0%, var(--bg-alt) 50%, var(--bg) 100%);
  overflow: hidden;
  padding-top: 70px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80vw;
  height: 80vw;
  background: radial-gradient(circle, rgba(184, 146, 74, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -20%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(116, 32, 48, 0.05) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
  animation: fadeInUp 1s ease-out;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 6px;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero h1 {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
  font-weight: 300;
}

.hero-location {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-dark);
  font-style: italic;
  margin-bottom: 2rem;
  opacity: 0.8;
}

.hero-dates {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.hero-date {
  text-align: center;
}

.hero-date-day {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}

.hero-date-month {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--gold);
  font-weight: 700;
}

.hero-date-info {
  font-size: 0.85rem;
  color: var(--text-dark);
  opacity: 0.7;
  margin-top: 0.3rem;
}

.btn {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--text);
  color: var(--cream);
}

.btn-primary:hover {
  background: var(--accent-light);
  color: var(--cream);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(116, 32, 48, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
}

.btn-outline:hover {
  background: var(--text);
  color: var(--cream);
}

.btn-gold {
  background: var(--gold);
  color: var(--white);
}

.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(184, 146, 74, 0.3);
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== PROGRAM SECTION ===== */
.program {
  background: var(--white);
}

.program-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

.program-card {
  padding: 2.5rem;
  background: var(--bg);
  border: 1px solid rgba(214, 202, 185, 0.6);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.program-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--gold);
  transform: scaleY(0);
  transition: transform var(--transition);
  transform-origin: top;
}

.program-card:hover::before {
  transform: scaleY(1);
}

.program-card:hover {
  box-shadow: 0 8px 30px var(--shadow);
  transform: translateY(-3px);
}

.program-date {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.program-time {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 1rem;
}

.program-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.program-venue {
  font-style: italic;
  color: var(--text-dark);
  opacity: 0.7;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.program-desc {
  font-size: 0.9rem;
  line-height: 1.8;
}

.program-features {
  list-style: none;
  margin-top: 1rem;
}

.program-features li {
  padding: 0.3rem 0;
  font-size: 0.9rem;
  padding-left: 1.5rem;
  position: relative;
}

.program-features li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gold);
}

/* ===== TICKETS SECTION ===== */
.tickets {
  background: var(--bg);
}

.ticket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.ticket-card {
  background: var(--white);
  padding: 2.5rem 2rem;
  text-align: center;
  border: 1px solid rgba(214, 202, 185, 0.4);
  transition: all var(--transition);
  position: relative;
}

.ticket-card.featured {
  border-color: var(--gold);
  box-shadow: 0 4px 20px rgba(184, 146, 74, 0.15);
}

.ticket-card.featured::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold);
}

.ticket-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px var(--shadow-md);
}

.ticket-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 1rem;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ticket-price {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.ticket-price sup {
  font-size: 1.2rem;
  font-weight: 300;
}

.ticket-info {
  font-size: 0.85rem;
  color: var(--text-dark);
  opacity: 0.7;
  margin-bottom: 1.5rem;
  min-height: 2.5rem;
}

.ticket-capacity {
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

/* ===== ACCREDITATION ===== */
.accreditation {
  background: var(--white);
}

.accred-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

.accred-card {
  padding: 2.5rem;
  background: var(--bg);
  border: 1px solid rgba(214, 202, 185, 0.4);
}

.accred-card h3 {
  margin-bottom: 1rem;
}

.accred-card p {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.accred-card.fade-in.visible {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text);
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--bg-alt);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-dark);
  transition: border-color var(--transition);
  border-radius: 0;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
}

.form-group input::placeholder {
  color: var(--bg-alt);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-message {
  padding: 1rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  display: none;
}

.form-message.success {
  background: rgba(74, 184, 100, 0.1);
  color: #2d7a3e;
  border: 1px solid rgba(74, 184, 100, 0.3);
  display: block;
}

.form-message.error {
  background: rgba(184, 74, 74, 0.1);
  color: #7a2d2d;
  border: 1px solid rgba(184, 74, 74, 0.3);
  display: block;
}

/* ===== TICKET PURCHASE MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(39, 10, 16, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--white);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 3rem;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--transition);
  line-height: 1;
}

.modal-close:hover {
  opacity: 1;
}

.modal h3 {
  margin-bottom: 0.5rem;
}

.modal-subtitle {
  color: var(--text-dark);
  opacity: 0.7;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.price-summary {
  background: var(--bg);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-summary .total-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
}

.price-summary .total-amount {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text);
}

.discount-row {
  margin: 1rem 0;
}

.discount-row .form-group {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.discount-row input {
  flex: 1;
}

.discount-row .btn {
  padding: 0.8rem 1.2rem;
  white-space: nowrap;
  font-size: 0.7rem;
}

.discount-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: rgba(74, 184, 100, 0.1);
  color: #2d7a3e;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

#stripe-card-element {
  padding: 0.9rem 1rem;
  border: 1px solid var(--bg-alt);
  background: var(--white);
  transition: border-color var(--transition);
}

#stripe-card-element.StripeElement--focus {
  border-color: var(--gold);
}

#card-errors {
  color: #7a2d2d;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  min-height: 1.2rem;
}

/* ===== VENUE / INFO ===== */
.info {
  background: var(--bg);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 3rem;
  align-items: start;
}

.info-block h3 {
  margin-bottom: 1rem;
}

.info-block p {
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
  line-height: 1.8;
}

.info-block address {
  font-style: normal;
  font-size: 0.95rem;
  line-height: 2;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--text-dark);
  color: rgba(249, 245, 240, 0.7);
  padding: 3rem 0;
  text-align: center;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.footer p {
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
}

.footer a {
  color: var(--gold);
}

.footer a:hover {
  color: var(--gold-light);
}

/* ===== CONFIRMATION PAGE ===== */
.confirmation {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 100px;
}

.confirmation-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.confirmation h2 {
  margin-bottom: 1rem;
}

.confirmation p {
  font-size: 1rem;
  opacity: 0.8;
  max-width: 500px;
  margin: 0 auto 2rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--bg-alt);
    box-shadow: 0 8px 20px var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .lang-switcher {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid var(--bg-alt);
  }

  .nav-toggle {
    display: block;
  }

  .hero-dates {
    gap: 1.5rem;
  }

  .program-grid,
  .accred-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 2rem;
  }

  section {
    padding: 3.5rem 0;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
  }
}

/* ===== QUANTITY SELECTOR ===== */
.qty-selector {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 auto;
  width: fit-content;
}

.qty-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--bg-alt);
  background: var(--bg);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  color: var(--text);
}

.qty-btn:hover {
  background: var(--text);
  color: var(--cream);
}

.qty-value {
  width: 50px;
  height: 38px;
  border: 1px solid var(--bg-alt);
  border-left: none;
  border-right: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  background: var(--white);
}

/* ===== LOADING SPINNER ===== */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--cream);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== HIDDEN LANGUAGE ELEMENTS ===== */
/* Italian shown by default (before JS loads). JS takes over with .active-lang class. */
[data-lang] {
  display: none;
}

[data-lang="it"] {
  display: block;
}

span[data-lang="it"],
a[data-lang="it"],
button[data-lang="it"] {
  display: inline;
}

.hero-cta [data-lang="it"] {
  display: inline-block;
}

li[data-lang="it"] {
  display: list-item;
}

/* Once JS runs, it adds .active-lang to the correct language and we switch to that */
[data-lang].active-lang {
  display: block;
}

/* Hide Italian defaults once JS has activated a language (even Italian re-gets .active-lang) */
[data-lang="it"]:not(.active-lang) {
  display: none;
}

span[data-lang].active-lang,
a[data-lang].active-lang,
button[data-lang].active-lang {
  display: inline;
}

/* Flex items that need special display */
.hero-date[data-lang].active-lang,
.program-card[data-lang].active-lang {
  display: block;
}

.hero-dates [data-lang].active-lang {
  display: block;
}

.hero-cta [data-lang].active-lang {
  display: inline-block;
}

li[data-lang].active-lang {
  display: list-item;
}