/* Root Variables */
:root {
    --primary-color: #A23939;
    --secondary-color: #FAF2EA;
    --accent-color: #C67C6C;
    --text-color: #333333;
    --background-gradient: linear-gradient(to right, rgba(162, 57, 57, 0.85), rgba(198, 124, 108, 0.85));
    --intro-text-color: #FFFFFF;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Typography */
body {
    font-family: 'Lato', sans-serif;
    color: var(--text-color);
    background-color: var(--secondary-color);
    scroll-behavior: smooth;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--secondary-color);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-logo {
    width: 250px;
    height: auto;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(250, 242, 234, 0.95);
    padding: 10px 20px;
    z-index: 9999;
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
    z-index: 10000;
}

@media (max-width: 1024px) {
    .nav-toggle-label {
        display: block;
        position: relative;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        right: -100%;
        background: var(--secondary-color);
        height: calc(100% - 60px);
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 20px;
        transition: right 0.3s;
        z-index: 9999;
    }

    #nav-toggle:checked ~ .nav-menu {
        right: 0;
    }

    .nav-menu li {
        margin: 15px 0;
    }
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 50px;
    width: auto;
}

.countdown-timer {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.countdown-timer .time-segment {
    text-align: center;
    flex: 0 0 auto;
}

.countdown-timer .time-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
}

.countdown-timer .label {
    font-size: 0.8rem;
    margin-top: 3px;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
}

.nav-menu li {
    margin: 0 10px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

#nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
    z-index: 10000;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
    display: block;
    background: var(--primary-color);
    height: 3px;
    width: 25px;
    border-radius: 3px;
    position: relative;
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
    content: '';
    position: absolute;
}

.nav-toggle-label span::before {
    top: -8px;
}

.nav-toggle-label span::after {
    bottom: -8px;
}

/* Responsive Navbar */
@media (max-width: 1024px) {
    .nav-toggle-label {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        right: -100%;
        background: var(--secondary-color);
        height: calc(100% - 60px);
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 20px;
        transition: right 0.3s;
    }

    .nav-menu li {
        margin: 15px 0;
    }

    #nav-toggle:checked + .nav-toggle-label + .nav-menu {
        right: 0;
    }

    .navbar-container {
        flex-wrap: wrap;
    }

    .logo {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }
}

/* Hide or scale down logo on very small screens */
@media (max-width: 520px) {
    .logo img {
        display: none;
    }
    .navbar {
        padding: 5px 10px;
    }
}

/* Header */
.header {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.slider {
    position: absolute;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.slide {
    position: absolute;
    height: 100%;
    width: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: slideAnimation 24s infinite;
}

.slide:nth-child(1) {
    animation-delay: 0s;
}
.slide:nth-child(2) {
    animation-delay: 8s;
}
.slide:nth-child(3) {
    animation-delay: 16s;
}

@keyframes slideAnimation {
    0% { opacity: 0; }
    8% { opacity: 1; }
    25% { opacity: 1; }
    33% { opacity: 0; }
    100% { opacity: 0; }
}

.overlay {
    position: relative;
    height: 100%;
    background: var(--background-gradient);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--intro-text-color);
    text-align: center;
    padding: 0 20px;
    z-index: 1;
}

.title {
    font-size: 3.8rem;
    font-family: 'Playfair Display', serif;
    color: var(--intro-text-color);
    white-space: nowrap;
}

.title span {
    font-size: 4.2rem;
    margin-left: 10px;
}

.date, .welcome-message {
    margin: 15px 0;
    font-size: 1.4rem;
    font-family: 'Lato', sans-serif;
    color: var(--intro-text-color);
}

.cta-button {
    color: var(--intro-text-color);
    background: transparent;
    border: 2px solid var(--intro-text-color);
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: background 0.3s, color 0.3s;
    font-family: 'Montserrat', sans-serif;
    margin: 20px 0;
    font-size: 1.2rem;
}

.cta-button:hover {
    background: var(--intro-text-color);
    color: var(--primary-color);
}

.scroll-down {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-down a {
    color: var(--intro-text-color);
    font-size: 2rem;
    text-decoration: none;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

@media (max-width: 768px) {
    .header {
        height: 80vh;
    }
    .title {
        font-size: 2.2rem;
        white-space: normal;
    }
    .title span {
        font-size: 2.2rem;
        margin-left: 0.2em;
    }
    .date, .welcome-message {
        font-size: 1.1rem;
    }
    .cta-button {
        padding: 10px 20px;
        font-size: 1rem;
    }
}

/* Section Titles */
.section-title {
    margin-bottom: 60px;
    text-align: center;
    padding: 0 20px;
}

.section-title h2 {
    font-size: 2.8rem;
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
}

.section-title p {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-top: 15px;
    font-family: 'Lato', sans-serif;
}

@media (max-width: 1024px) {
    .section-title h2 {
        font-size: 2.2rem;
    }
    .section-title p {
        font-size: 1.1rem;
    }
}

/* Generic Section Spacing */
.couple-area,
.story,
.details-location,
.video-section,
.gallery,
.rsvp {
    padding: 80px 20px;
}

/* Couple Area */
.couple-area {
    background-color: #fff;
    text-align: center;
}

.couple-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.couple-card {
    background: var(--secondary-color);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    width: 300px;
    margin: 20px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.couple-card:hover {
    transform: translateY(-10px);
}

.couple-img {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.couple-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.couple-img:hover img {
    transform: scale(1.05);
}

.couple-info {
    padding: 20px;
}

.couple-info h3 {
    margin-bottom: 10px;
    font-size: 1.8rem;
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
}

.couple-info p {
    font-size: 1rem;
    line-height: 1.6;
    font-family: 'Lato', sans-serif;
    color: var(--text-color);
}

.couple-social-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.couple-social-links a {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Video Section (Phone Frame) */
.video-section {
    text-align: center;
    background-color: var(--secondary-color);
}

.video-container {
    margin: 0 auto;
    position: relative;
}

.phone-frame {
    display: inline-block;
    border: 20px solid #000; 
    border-radius: 40px;
    box-shadow: 0 10px 15px rgba(0,0,0,0.2);
    overflow: hidden;
    max-width: 100%;
    margin: 0 auto;
}

.phone-frame video {
    display: block;
    width: 100%;
    height: auto;
}

.video-description {
    max-width: 800px;
    margin: 20px auto 0 auto;
    font-size: 1.1rem;
    line-height: 1.6;
    font-family: 'Lato', sans-serif;
    color: var(--text-color);
    padding: 0 20px;
}

/* Story (Timeline) */
.story {
    background-color: #fff;
}

.timeline {
    position: relative;
    padding: 40px 0;
}

.timeline-event {
    position: relative;
    width: 80%;
    margin: 0 auto 40px auto;
}

.timeline-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid var(--primary-color);
    text-align: center;
    position: relative;
}

.timeline-img {
    width: 100%;
    margin-bottom: 15px;
}

.timeline-img img {
    width: 100%;
    border-radius: 10px;
}

.timeline-date {
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-family: 'Montserrat', sans-serif;
}

.timeline-content h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 1.6rem;
    font-family: 'Playfair Display', serif;
}

.timeline-content p {
    line-height: 1.6;
    font-size: 1rem;
    font-family: 'Lato', sans-serif;
}

/* Event Details and Location Section */
.details-location {
    background-color: var(--secondary-color);
}

.event-location-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 40px;
}

.event-location {
    display: flex;
    justify-content: center;
    align-items: stretch;
}

.event-card {
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/card-bg.png');
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.05;
    pointer-events: none;
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.event-card h3 {
    margin-bottom: 15px;
    font-size: 1.8rem;
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
}

.event-card p {
    font-size: 1rem;
    margin-bottom: 10px;
    font-family: 'Lato', sans-serif;
    z-index: 1;
}

.event-card i {
    color: var(--accent-color);
    margin-right: 10px;
}

.event-date-time,
.event-location-text {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
}

.map-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    height: 150px;
    margin-top: 15px;
    margin-bottom: 20px;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.qr-instruction {
    font-size: 1rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
}

.qr-instruction i {
    color: var(--accent-color);
    margin-right: 10px;
}

.qr-code {
    margin-top: 5px;
    margin-bottom: 10px;
    width: 100px;
    height: 100px;
    align-self: center;
}

@media (max-width: 768px) {
    .event-location-container {
        grid-template-columns: 1fr;
    }
    .map-wrapper {
        height: 200px;
    }
}

/* Gallery Section */
.gallery {
    background-color: var(--secondary-color);
}

.album-gallery {
    max-width: 1200px;
    margin: 0 auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-gap: 15px;
}

.grid a {
    position: relative;
    overflow: hidden;
}

.grid img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s, filter 0.5s;
}

.grid a:hover img {
    transform: scale(1.1);
    filter: brightness(80%);
}

/* RSVP */
.rsvp {
    background-color: #fff;
}

.rsvp form {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.form-group {
    position: relative;
    margin-bottom: 30px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 10px 10px 0;
    border: none;
    border-bottom: 2px solid #ccc;
    font-size: 1rem;
    background: transparent;
    color: var(--text-color);
    transition: border-color 0.3s;
    font-family: 'Lato', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: var(--primary-color);
}

.form-group label {
    position: absolute;
    top: 10px;
    left: 0;
    font-size: 1rem;
    color: #999;
    pointer-events: none;
    transition: top 0.3s, font-size 0.3s;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -20px;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.rsvp button {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 30px;
    font-size: 1rem;
    transition: background 0.3s;
    margin-top: 20px;
    font-family: 'Montserrat', sans-serif;
}

.rsvp button:hover {
    background-color: var(--accent-color);
}

.thank-you {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-top: 40px;
    text-align: center;
    font-family: 'Lato', sans-serif;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 60px 20px;
    padding-bottom: 100px; /* space above music player */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-social h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 20px;
}

.footer-social-groups {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
}

.footer-social-groups .social-group {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    min-width: 180px;
    margin: 10px;
}

.footer-social-groups .social-group h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #fff;
}

.footer-social-groups .social-group .social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.footer-social-groups .social-group .social-icons a i {
    font-size: 1.6rem;
    color: #fff;
    transition: color 0.3s;
}

.footer-social-groups .social-group .social-icons a:hover i {
    color: var(--accent-color);
}

.thank-you-message {
    font-family: 'Lato', sans-serif;
    font-size: 1.1rem;
}

.final-thank-you {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-top: 20px;
}
