:root {
    --primary-color: #2c3e50;
    --accent-color: #d4af37;
    --text-main: #333333;
    --text-muted: #666666;
    --bg-main: #ffffff;
    --bg-light: #f9f9f9;
    --bg-accent: #f0f4f8;
    --border-color: #eaeaea;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
    --transition-speed: 0.3s;
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #ecf0f1;
        --accent-color: #e5c158;
        --text-main: #e0e0e0;
        --text-muted: #a0a0a0;
        --bg-main: #1a1a1a;
        --bg-light: #242424;
        --bg-accent: #2a2a2a;
        --border-color: #333333;
    }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-body); color: var(--text-main); background-color: var(--bg-main); line-height: 1.6; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 400; }
a { color: var(--accent-color); text-decoration: none; transition: color var(--transition-speed); }
a:hover { color: var(--primary-color); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.bg-light { background-color: var(--bg-light); }
.bg-accent { background-color: var(--bg-accent); }

/* Navigation */
.navbar { position: fixed; top: 0; width: 100%; background: rgba(var(--bg-main), 0.95); backdrop-filter: blur(10px); display: flex; justify-content: space-between; align-items: center; padding: 15px 40px; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.nav-brand { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 600; letter-spacing: 2px; }
.nav-links { list-style: none; display: flex; gap: 25px; align-items: center; }
.nav-links a { color: var(--text-main); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }
.nav-links .btn-nav { background: var(--accent-color); color: #fff; padding: 8px 20px; border-radius: 20px; }
@media (max-width: 768px) { .nav-links { display: none; } .navbar { justify-content: center; } }

/* Hero */
.hero-section { height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; text-align: center; color: #fff; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; z-index: 1; }
.hero-bg::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); }
.hero-content { position: relative; z-index: 2; padding: 20px; }
.hero-title { font-size: 4rem; font-style: italic; margin-bottom: 10px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.hero-subtitle { font-size: 1.5rem; letter-spacing: 3px; text-transform: uppercase; }
.countdown { margin-top: 30px; font-size: 1.2rem; font-weight: 300; letter-spacing: 2px; }

/* Sections */
.section { padding: 80px 0; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 50px; position: relative; }
.section-title::after { content: ''; display: block; width: 60px; height: 2px; background: var(--accent-color); margin: 15px auto 0; }
.subsection-title { font-size: 1.8rem; margin: 40px 0 20px; text-align: center; }

/* Timeline */
.timeline { max-width: 800px; margin: 0 auto; position: relative; }
.timeline::before { content: ''; position: absolute; left: 50%; transform: translateX(-50%); width: 2px; height: 100%; background: var(--border-color); }
.timeline-card { background: var(--bg-main); padding: 20px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); width: calc(50% - 30px); margin-bottom: 30px; position: relative; }
.timeline-card::after { content: ''; position: absolute; top: 20px; width: 15px; height: 15px; background: var(--accent-color); border-radius: 50%; }
.timeline-card:nth-child(odd) { margin-left: auto; }
.timeline-card:nth-child(odd)::after { left: -38px; }
.timeline-card:nth-child(even)::after { right: -38px; }
.timeline-date { color: var(--accent-color); font-weight: bold; font-size: 0.9rem; }
.timeline-title { font-family: var(--font-heading); font-size: 1.4rem; margin: 10px 0; }
@media (max-width: 768px) { .timeline::before { left: 20px; } .timeline-card { width: calc(100% - 50px); margin-left: 50px !important; } .timeline-card::after { left: -38px !important; } }

/* Grids */
.details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.detail-card { background: var(--bg-main); padding: 30px; border-radius: 8px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.detail-card h3 { margin-bottom: 15px; color: var(--accent-color); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }
.gallery-img { width: 100%; height: 250px; object-fit: cover; border-radius: 8px; cursor: pointer; transition: transform var(--transition-speed); }

/* Schedule */
.schedule-item { display: flex; border-bottom: 1px solid var(--border-color); padding: 20px 0; }
.schedule-time { width: 120px; font-weight: bold; color: var(--accent-color); }
.schedule-info h4 { font-size: 1.2rem; margin-bottom: 5px; }

/* Forms */
.rsvp-wrapper { max-width: 600px; margin: 0 auto; background: var(--bg-main); padding: 40px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-weight: bold; font-size: 0.9rem; }
input[type="text"], input[type="number"], select, textarea { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 4px; background: var(--bg-light); color: var(--text-main); font-family: var(--font-body); }
.btn-primary { padding: 15px; background: var(--accent-color); color: #fff; border: none; border-radius: 4px; font-size: 1.1rem; cursor: pointer; transition: background var(--transition-speed); width: 100%; }
.btn-primary:hover { background: #b8962e; }
.success-message { margin-top: 20px; padding: 15px; background: #d4edda; color: #155724; border-radius: 4px; text-align: center; }

/* Modals */
.modal { display: none; position: fixed; z-index: 2000; padding-top: 60px; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.9); }
.modal-content { margin: auto; display: block; max-width: 90%; max-height: 80vh; object-fit: contain; }
.close-modal { position: absolute; top: 15px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; cursor: pointer; }

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
    .timeline-card, .detail-card, .gallery-img { transition: transform var(--transition-speed); }
    .timeline-card:hover, .detail-card:hover, .gallery-img:hover { transform: translateY(-5px); }
}
