@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg: #faf8f5;
  --card: #ffffff;
  --primary: #2d5016;
  --primary-light: #4a7c28;
  --accent: #c8956c;
  --accent-light: #e8c9a8;
  --text: #2c2c2c;
  --text-light: #6b6b6b;
  --border: #e8e4df;
  --success: #4a7c28;
  --shadow: 0 2px 20px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== NAVIGATION ===== */
nav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

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

nav .logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

nav .nav-links {
  display: flex;
  gap: 0.5rem;
  list-style: none;
}

nav .nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s;
}

nav .nav-links a:hover,
nav .nav-links a.active {
  background: var(--primary);
  color: white;
}

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

/* ===== HERO ===== */
.hero {
  text-align: center;
  padding: 5rem 2rem 4rem;
  background: linear-gradient(180deg, #f0ebe4 0%, var(--bg) 100%);
}

.hero .label {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.4rem 1.2rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 1rem;
  line-height: 1.15;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-light);
  max-width: 550px;
  margin: 0 auto 2.5rem;
}

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

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 2px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-accent {
  background: var(--accent);
  color: white;
}
.btn-accent:hover {
  background: #b5824e;
}

.btn-sm {
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

.btn-danger {
  background: #dc3545;
  color: white;
}
.btn-danger:hover {
  background: #c82333;
}

/* ===== SECTIONS ===== */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-light);
  font-size: 1rem;
}

/* ===== CARDS ===== */
.card {
  background: var(--card);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* ===== FEATURES GRID (HOME) ===== */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.feature-card {
  text-align: center;
  padding: 2.5rem 2rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1.2rem;
  background: var(--accent-light);
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ===== STATS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  text-align: center;
  padding: 1.5rem;
}

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* ===== FORMS ===== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
}

input[type="text"],
input[type="email"],
textarea,
select {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  background: var(--card);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* Toggle switches */
.toggle-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: 12px;
  cursor: pointer;
}

.toggle-group:hover {
  background: #f0ebe4;
}

.toggle {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 26px;
  transition: 0.3s;
  cursor: pointer;
}

.toggle-slider:before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.toggle-info h4 {
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.toggle-info p {
  font-size: 0.8rem;
  color: var(--text-light);
}

.children-count {
  display: none;
  margin-top: 0.5rem;
  padding-left: 3.5rem;
}

.children-count.show {
  display: block;
}

/* ===== DATE VOTING ===== */
.date-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.date-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.date-option:hover {
  border-color: var(--accent-light);
}

.date-option.selected {
  border-color: var(--primary);
  background: #f0f7ea;
}

.date-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}

.date-text {
  flex: 1;
  font-weight: 500;
}

.vote-count {
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 40px;
  text-align: center;
}

.vote-bar-bg {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  min-width: 40px;
}

.vote-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* ===== PHOTO GALLERY ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

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

.gallery-item .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
  opacity: 0;
  transition: opacity 0.3s;
}

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

.gallery-item .overlay .caption {
  font-size: 0.9rem;
  font-weight: 500;
}

.gallery-item .overlay .by {
  font-size: 0.75rem;
  opacity: 0.8;
}

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 2rem;
  background: var(--card);
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
  background: #f0f7ea;
}

.upload-zone .upload-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.upload-zone p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ===== OVERVIEW TABLE ===== */
.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th {
  background: var(--primary);
  color: white;
  padding: 0.8rem 1rem;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

tr:nth-child(even) {
  background: var(--bg);
}

tr:hover {
  background: #f0f7ea;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-yes {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge-no {
  background: #fce4ec;
  color: #c62828;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
  z-index: 999;
  font-weight: 500;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.error {
  background: #dc3545;
}

/* ===== COUNTDOWN ===== */
.countdown {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin: 2rem 0;
}

.countdown-item {
  text-align: center;
}

.countdown-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.countdown-label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hamburger { display: block; }

  nav .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--card);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

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

  .hero h1 { font-size: 2.2rem; }
  .hero { padding: 3rem 1.5rem 2.5rem; }

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

  .section { padding: 2rem 1rem; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

  .countdown { gap: 0.75rem; }
  .countdown-number { font-size: 1.8rem; }
}
