/* Base Styles */
:root {
    --primary: #fffaf0;
    --accent: #d4af37;
    --secondary: #b8975b;
    --text: #1f2527;
    --light-text: #64748b;
    --light-gray: #f8f8f8;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Cormorant Garamond', serif;
    color: var(--text);
    line-height: 1.7;
    background-color: var(--primary);
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    letter-spacing: 2px;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

h2:after {
    content: "";
    position: absolute;
    height: 1px;
    width: 60%;
    background-color: var(--accent);
    bottom: -10px;
    left: 20%;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 0;
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.btn {
    display: inline-block;
    padding: 14px 30px;
    background-color: var(--accent);
    color: white;
    border: none;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: var(--transition);
    margin-top: 1.5rem;
    border-radius: 3px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.4);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

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

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

.hero .btn {
    animation: pulse 2s infinite;
}

#rsvp .btn {
    padding: 16px 36px;
    font-size: 1rem;
    margin-top: 2rem;
}

/* Header & Navigation */
header {
    position: fixed;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 250, 240, 0.9);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    padding: 1rem 0;
}

header.scrolled {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 0.7rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 300;
}

.mea-culpa-regular {
    font-family: "Mea Culpa", cursive;
    font-weight: 400;
    font-style: normal;
    font-size: 7rem;
    margin-top: 5rem;
}

#getting-married {
    font-size: 1.5rem;
}

.menu {
    display: flex;
    list-style: none;
}

.menu li {
    margin-left: 2rem;
}

.menu a {
    text-decoration: none;
    color: var(--text);
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 1px;
    position: relative;
    transition: var(--transition);
}

.menu a.active {
    color: var(--accent);
}

.menu a.active:after {
    content: "";
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent);
}

.menu a:hover:after {
    content: "";
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent);
}

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

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    color: white;
    background: url('../images/hero.webp') no-repeat center center;
    background-size: cover;
}

.hero-content {
    max-width: 800px;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.countdown {
    margin-top: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    border-radius: 8px;
    color: white;
}

.countdown span {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    min-width: 80px;
    text-align: center;
}

.date-location {
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.scroll-down {
    position: absolute;
    bottom: 5rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-20px) translateX(-50%); }
    60% { transform: translateY(-10px) translateX(-50%); }
}

/* Our Story */
.our-story {
    background-color: white;
}

.story-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.story-image {
    max-width: 400px;
    margin: 2rem 0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Timeline */
.timeline {
    background-color: var(--light-gray);
}

.timeline-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline-container::after {
    content: '';
    position: absolute;
    width: 1px;
    background-color: var(--accent);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -0.5px;
}

.timeline-item {
    padding: 2rem 0;
    position: relative;
    width: 50%;
    text-align: right;
    padding-right: 3rem;
}

.timeline-item:nth-child(even) {
    margin-left: 50%;
    text-align: left;
    padding-right: 0;
    padding-left: 3rem;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    right: -7.5px;
    background-color: var(--accent);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.timeline-item:nth-child(even)::after {
    left: -7.5px;
    right: auto;
}

.timeline-time {
    font-family: 'Montserrat', sans-serif;
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* Video Section */
.video-section {
    background-color: white;
}

.video-container {
    max-width: 800px;
    margin: 2rem auto;
    aspect-ratio: 16/9;
}

.video-container video {
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 3rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 4px;
    position: relative;
    aspect-ratio: 1/1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

/* Entourage */
.entourage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

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

.entourage-item img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 2px solid var(--accent);
}

.entourage-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

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

/* Dress Code */
.dress-code {
    background-color: var(--light-gray);
}

.dress-code-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.dress-code-item {
    text-align: center;
}

.dress-code-item img {
    max-width: 200px;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.color-palette {
    margin-top: 2rem;
    text-align: center;
}

.palette-swatches {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.swatch {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid #ccc;
    transition: transform 0.3s;
    cursor: pointer;
}

.swatch:hover {
    transform: scale(1.1);
    border-color: #999;
}

/* Gift Registry */
.gift-registry {
    background-color: white;
}

.registry-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.registry-item {
    text-align: center;
    padding: 1rem;
    border: 1px solid var(--accent);
    border-radius: 4px;
}

/* Guest Book */
.guest-book {
    background-color: var(--light-gray);
}

.guest-book-entries {
    max-width: 800px;
    margin: 2rem auto;
}

.guest-book-entry {
    border-bottom: 1px solid var(--accent);
    padding: 1rem 0;
}

.guestbook-response {
    color: var(--accent);
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
}

/* RSVP */
.rsvp {
    background-color: white;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

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

.form-container {
    max-width: 600px;
    margin: 0 auto;
}

.response-message.loading {
    color: #666;
    font-style: italic;
    font-family: 'Montserrat', sans-serif;
}

.response-message.success {
    color: green;
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
}

.response-message.error {
    color: red;
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
}

/* Map */
.map-section {
    background-color: var(--light-gray);
}

.map-container {
    max-width: 800px;
    margin: 2rem auto;
    height: 400px;
    border-radius: 4px;
    overflow: hidden;
}

/* Footer */
footer {
    background-color: var(--light-gray);
    padding: 3rem 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    list-style: none;
    margin-bottom: 2rem;
}

.footer-links li {
    margin: 0 1rem;
}

.footer-links a {
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.attribution {
    font-size: 0.8rem;
    color: var(--light-text);
    margin-top: 1rem;
}

.attribution a {
    color: var(--light-text);
    text-decoration: none;
}

.attribution a:hover {
    color: var(--accent);
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 1rem;
    border-radius: 10px;
    position: relative;
    width: 95%;
    max-width: 320px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
    box-sizing: border-box;
}

.close-btn {
    position: absolute;
    right: 1rem;
    top: 0.5rem;
    font-size: 1.5rem;
    cursor: pointer;
}

#wishlist-modal {
    overflow-x: hidden;
}

#wishlist-modal * {
    max-width: 100%;
    word-wrap: break-word;
    white-space: normal;
    box-sizing: border-box;
}

#wishlist-modal li {
    margin-left: 1.5rem;
    font-size: 0.85rem;
}

#wishlist-modal p {
    font-size: 0.9rem;
}

/* Guest Reminder Section */
.guest-reminder {
    background-color: var(--light-gray);
    padding: 5rem 0;
    text-align: center;
}

.guideline-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.guideline-card {
    background-color: white;
    border: 1px solid var(--accent);
    border-radius: 4px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.1);
    transition: var(--transition);
}

.guideline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.2);
}

.guideline-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    margin: 1rem 0 0.5rem;
    color: var(--text);
}

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

.guideline-svg {
    margin: 0 auto;
    display: block;
}

/* Media Queries */
@media (max-width: 992px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2rem; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .entourage-grid { grid-template-columns: repeat(2, 1fr); }
    .dress-code-grid { grid-template-columns: 1fr; }
    .registry-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .mobile-toggle { display: block; }
    .menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        transform: translateY(-150%);
        transition: var(--transition);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    .menu.active { transform: translateY(0); }
    .menu li { margin: 1rem 0; }
    .timeline-container::after { left: 40px; }
    .timeline-item {
        width: 100%;
        text-align: left;
        padding-left: 80px;
        padding-right: 0;
    }
    .timeline-item:nth-child(even) {
        margin-left: 0;
        padding-left: 80px;
    }
    .timeline-item::after,
    .timeline-item:nth-child(even)::after {
        left: 40px;
    }
    .form-grid { grid-template-columns: 1fr; }
    .entourage-grid { grid-template-columns: 1fr; }
    .mea-culpa-regular {
        font-family: "Mea Culpa", cursive;
        font-weight: 400;
        font-style: normal;
        font-size: 3rem;
        margin-top: 5rem;
    }
    #getting-married {
        font-size: 1.2rem;
    }
    .countdown {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        font-size: 1rem;
    }
    .guideline-grid {
        grid-template-columns: 1fr;
    }
    .modal-content {
        max-width: 325px;
    }
}

@media (max-width: 576px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.8rem; }
    .section { padding: 3rem 0; }
    .gallery-grid { grid-template-columns: 1fr; }
    .countdown {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        font-size: 1rem;
    }
    .swatch {
        width: 40px;
        height: 40px;
    }
    .guest-reminder {
        padding: 3rem 0;
    }
    .guideline-card {
        padding: 1rem;
    }
    .guideline-card h3 {
        font-size: 1.1rem;
    }
    .guideline-card p {
        font-size: 0.9rem;
    }
    .guideline-svg {
        width: 32px;
        height: 32px;
    }
    .modal-content {
        width: 95%;
        max-width: 320px;
        padding: 1rem;
        margin: 5% auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    #wishlist-modal h2 {
        font-size: 1.5rem;
    }

    #wishlist-modal h3 {
        font-size: 1.2rem;
    }

    #wishlist-modal p {
        font-size: 0.9rem;
    }

    #wishlist-modal li {
        font-size: 0.85rem;
    }

    .close-btn {
        font-size: 1.5rem;
        right: 1rem;
        top: 0.5rem;
    }

    #our-story-image {
        max-width: 100%;
        height: auto;
        display: block;
        margin: 0 auto;
        box-sizing: border-box;
    }
}