/* Nozze d'Incanto - Wedding Portal CSS */
:root {
  --primary: #b78a60;
  --primary-dark: #966f4a;
  --primary-light: #fbf5ee;
  --gold: #d4af37;
  --secondary: #272320;
  --bg-cream: #faf7f2;
  --card-bg: #ffffff;
  --text-main: #332d29;
  --text-muted: #78716c;
  --border: #eedecf;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 30px rgba(183, 138, 96, 0.12);
  --shadow-hover: 0 18px 45px rgba(183, 138, 96, 0.22);
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-cursive: 'Great Vibes', cursive, 'Brush Script MT';
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-cream);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand-logo img {
  height: 48px;
  max-width: 140px;
  object-fit: contain;
}
.brand-title {
  display: flex;
  flex-direction: column;
}
.brand-title h1 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary);
  line-height: 1.1;
  letter-spacing: 0.5px;
}
.brand-title span {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.main-nav a {
  text-decoration: none;
  color: var(--secondary);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}
.main-nav a:hover {
  color: var(--primary);
}

.header-cta-group {
  display: flex;
  gap: 10px;
}
.btn-nav-login {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-nav-login:hover {
  background: var(--primary);
  color: #fff;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--secondary);
}

.container {
  width: 92%;
  max-width: 1380px;
  margin: 0 auto;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background-size: cover;
  background-position: center center;
  padding: 80px 20px;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(39, 35, 32, 0.45) 0%, rgba(39, 35, 32, 0.75) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}
.hero-date-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 6px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-couple {
  font-family: var(--font-cursive);
  font-size: 2.2rem;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 12px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.hero-subtitle {
  font-size: 1.25rem;
  font-family: var(--font-serif);
  font-style: italic;
  max-width: 650px;
  margin: 0 auto 36px;
  color: #f7ede2;
  line-height: 1.6;
}

/* Countdown */
.countdown-box {
  display: inline-flex;
  gap: 20px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  padding: 16px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.3);
  margin-bottom: 36px;
}
.count-col {
  min-width: 60px;
}
.count-num {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}
.count-lbl {
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fce7d2;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(183, 138, 96, 0.4);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}
.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.8);
}
.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
}

/* Access Cards Section */
.section {
  padding: 80px 0;
}
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 50px;
}
.section-tag {
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: block;
  margin-bottom: 8px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--secondary);
  line-height: 1.2;
  margin-bottom: 14px;
}
.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
}

.access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}
.access-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
}
.access-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.access-img {
  height: 240px;
  overflow: hidden;
  position: relative;
}
.access-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.access-card:hover .access-img img {
  transform: scale(1.05);
}
.access-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(39, 35, 32, 0.85);
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.access-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.access-body h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--secondary);
  margin-bottom: 10px;
}
.access-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 22px;
  flex-grow: 1;
}

/* Timeline */
.timeline-section {
  background: #ffffff;
}
.timeline-list {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  padding: 20px 0;
}
.timeline-list::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 28px;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding-left: 70px;
  margin-bottom: 36px;
}
.timeline-dot {
  position: absolute;
  left: 17px;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  border: 4px solid #fff;
  box-shadow: 0 0 0 2px var(--primary);
}
.timeline-time {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.timeline-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--secondary);
  margin-bottom: 4px;
}
.timeline-place {
  font-weight: 600;
  font-size: 0.9rem;
  color: #57534e;
  margin-bottom: 6px;
}
.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Gift Registry */
.gifts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}
.gift-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.gift-img-wrap {
  height: 210px;
  position: relative;
}
.gift-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gift-status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #10b981;
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}
.gift-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.gift-body h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--secondary);
  margin-bottom: 8px;
}
.gift-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
  flex-grow: 1;
}

/* Progress bar */
.progress-wrap {
  margin-bottom: 16px;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.progress-bar-bg {
  height: 8px;
  background: #f1ede7;
  border-radius: 10px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #d4af37 100%);
  border-radius: 10px;
}

/* Guestbook */
.guestbook-section {
  background: #f7f3ec;
}
.guestbook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}
.guestbook-card {
  background: #fff;
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.guestbook-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--secondary);
  margin-bottom: 14px;
  line-height: 1.6;
}
.guestbook-author {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.92rem;
}
.guestbook-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background: var(--secondary);
  color: #d6d3d1;
  padding: 60px 0 30px;
  text-align: center;
}
.footer-logo {
  font-family: var(--font-cursive);
  font-size: 2.2rem;
  color: #fff;
  margin-bottom: 8px;
}
.footer-meta {
  font-size: 0.9rem;
  color: #a8a29e;
  margin-bottom: 24px;
}
.footer-links a {
  color: #f7ede2;
  text-decoration: none;
  margin: 0 14px;
  font-size: 0.9rem;
}
.footer-links a:hover {
  color: var(--primary);
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  margin-top: 30px;
  font-size: 0.82rem;
  color: #78716c;
}

/* Modals */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active {
  display: flex;
}
.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 36px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: #f5f5f4;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
}
.modal-box h3 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--secondary);
  margin-bottom: 8px;
}
.modal-box p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 20px;
}
.form-group {
  margin-bottom: 16px;
  text-align: left;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 6px;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
}

/* Floating WhatsApp */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #25d366;
  color: #fff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  z-index: 999;
  text-decoration: none;
  transition: transform 0.2s;
}
.whatsapp-float:hover {
  transform: scale(1.1);
}

/* Responsive */
@media (max-width: 900px) {
  .access-grid {
    grid-template-columns: 1fr;
  }
  .hero-couple {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-md);
  }
  .main-nav.active {
    display: flex;
  }
  .menu-toggle {
    display: block;
  }
  .countdown-box {
    gap: 12px;
    padding: 12px 20px;
  }
  .count-num {
    font-size: 1.6rem;
  }
}


@media (min-width: 1440px) {
  .container {
    max-width: 1440px !important;
    padding-left: 32px;
    padding-right: 32px;
  }
}

/* Mobile Safeguard Rules */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

img, video, iframe {
  max-width: 100%;
  height: auto;
}


/* Comprehensive Mobile Polish (360px - 768px) */
@media (max-width: 768px) {
  .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  
  button, .btn, .nav-link, a.btn {
    min-height: 42px;
  }
  
  h1, .hero-title, .page-hero-title {
    font-size: clamp(1.6rem, 5vw, 2.4rem) !important;
    line-height: 1.25 !important;
  }
  h2, .section-title, .shelf-title {
    font-size: clamp(1.3rem, 4vw, 1.8rem) !important;
    line-height: 1.3 !important;
  }
  
  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  .grid-2col-responsive,
  .grid-3col-responsive,
  .grid-4col-responsive,
  .grid-split-responsive,
  .grid-split-rev-responsive {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px !important;
    width: 100% !important;
    box-sizing: border-box;
  }
}
