/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #D4B08C;
    --secondary-color: #F3E9E3;
    --text-color: #333;
    --light-text: #fff;
}

body {
    font-family: 'Nunito', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
    background-color: #d4c8baa3;
    background-image: url("https://www.transparenttextures.com/patterns/fresh-snow.png");
}

/* Header Styles */
.header {
    height: 100vh;
    background: linear-gradient(rgba(5, 5, 5, 0.6), rgba(5, 5, 5, 0.6)),
        url('header.jpg') center/cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--light-text);
}

.couple-name {
    font-family: 'Parisienne', cursive;
    font-size: 4.5rem;
    margin-bottom: 1rem;
    animation: fadeIn 2s ease;
}

.wedding-date {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

/* Countdown Styles */
.countdown {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    min-width: 100px;
    backdrop-filter: blur(5px);
}

.countdown-number {
    font-size: 2.5rem;
    font-weight: 600;
}

.countdown-label {
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Animation Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .couple-name {
        font-size: 3rem;
    }

    .countdown {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .countdown-item {
        min-width: 80px;
    }
}

/* Additional CSS for RSVP and Map sections */
.section {


    text-align: center;
}

.section-title {
    font-family: 'Parisienne', cursive;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.venue-section {
    font-size: 1.1rem;
    color: white;
    font-weight: bolder;
    background: rgb(164, 110, 56);
    background-image: url("https://www.transparenttextures.com/patterns/fresh-snow.png");
    border-radius: 5px;
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem;
    backdrop-filter: blur(10px);
}

/* RSVP Form Styles */
.rsvp-form {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.4);
    padding: 3rem;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 2rem;
    text-align: left;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid rgba(212, 176, 140, 0.2);
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(212, 176, 140, 0.1);
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    padding: 0.5rem 0;
}

.form-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.form-checkbox input[type="checkbox"]:checked {
    background-color: var(--primary-color);
}

.form-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    padding: 1.2rem 3rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(212, 176, 140, 0.3);
}

.submit-btn:hover {
    background: #C4A07C;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 176, 140, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Add these new styles for select element */
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23D4B08C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2em;
    padding-right: 2.5rem;
}

/* Add hover effects */
.form-input:hover {
    border-color: rgba(212, 176, 140, 0.5);
}

/* Add focus styles for better accessibility */
.form-input:focus-visible {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(212, 176, 140, 0.1);
}

/* Add this animation for smooth transitions */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Add responsive adjustments */
@media (max-width: 768px) {
    .rsvp-form {
        padding: 1.3rem;
        margin: 10px;
    }

    .venue-section {
        margin-left: 10px;
        margin-right: 10px;
    }

    .submit-btn {
        width: 100%;
    }
}

/* Map Section Styles */
.map-container {
    height: 400px;
    margin-top: 2rem;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.direction-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px dashed #00caeb;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.direction-btn:hover {
    background: #2bb3e0;
    border: 2px solid #2bb3e0;
}

/* Language Toggle */

.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.lang-select {
    padding: 5px 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lang-select:hover {
    background: var(--primary-color);
    color: white;
}

/* Alternative: You can use this class and toggle it based on scroll position */
.lang-select.scrolled {
    background: rgba(255, 255, 255, 0.2);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.bus-choice-buttons {
    display: flex;
    gap: 1rem;
}

.choice-btn {
    padding: 0.5rem 2rem;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.choice-btn:hover {
    background: var(--primary-color);
    color: white;
}

.choice-btn.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

#formError {
    color: red;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 1rem;
}

.timeline {
    max-width: 300px;
    margin: 20px auto;
    padding: 20px;
    direction: ltr;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    position: relative;
    padding-bottom: 20px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    background-color: var(--primary-color);
    border-radius: 50%;
    margin: 4px 0;
    flex-shrink: 0;
    z-index: 2;
}

.timeline-content {
    padding-inline-start: 20px;
    flex-grow: 1;
}

.timeline-time {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 4px;
    font-family: 'Parisienne', cursive;
}

.timeline-text {
    margin: 0;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Vertical line - Updated styles */
.timeline-line {
    position: absolute;
    top: 10px;
    /* Adjust to align with dot */
    inset-inline-start: 5px;
    width: 2px;
    height: calc(100% - 10px);
    /* Subtract top offset */
    background-color: var(--primary-color);
    opacity: 0.3;
    z-index: 1;
}

/* RTL support */
[dir="rtl"] .timeline {
    direction: rtl;
}

/* Add this after the submit-btn styles (around line 196) */
.submit-btn.loading {
    position: relative;
    color: transparent;
    cursor: wait;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: button-loading-spinner 1s linear infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }

    to {
        transform: rotate(1turn);
    }
}

.family-section {
    font-family: 'Parisienne', cursive;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    text-align: center;
    color: #555;
    margin-top: 3rem;
    margin-bottom: 4rem;
    border: 1px solid #D4B08C;
    border-radius: 3px;
}

.family-tree {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1rem;
}

.family-column {
    flex: 1;
}

.family-name {
    font-family: 'Parisienne', cursive;
    font-size: 1.7rem;
    color: rgb(187 142 98);
    margin-bottom: 0.75rem;
    padding-top: 0.75rem;
    opacity: 0.85;
}

.parents {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.parent-name {
    margin: 0.25rem 0;
}

.grandparents {
    font-size: 0.85rem;
    color: #666;
    opacity: 0.9;
}

/* Screen: 600px means mobile */
@media (max-width: 600px) {
    #grandparents-left {
        margin-left: 5px;
        text-align: left;
    }

    #parents-left {
        margin-left: 5px;
        text-align: left;
    }

    #parents-right {
        margin-right: 5px;
        text-align: right;
    }
}


.ampersand {
    font-family: 'Parisienne', cursive;
    font-size: 1.4rem;
    color: rgb(164, 110, 56);
    opacity: 0.7;
}

.memory-note {
    font-family: 'Parisienne', cursive;
    max-width: 600px;
    margin: 1.5rem auto;
    padding: 1rem 0;
    font-size: 1.2rem;
    color: #666;
    border-top: 1px solid rgba(139, 69, 19, 0.1);
    border-bottom: 1px solid rgba(139, 69, 19, 0.1);
}

.announcement {
    font-family: 'Parisienne', cursive;
    font-size: 1.4rem;
    color: rgb(187 142 98);
    opacity: 0.85;
    margin-top: 1.5rem;
    padding: 0 5px;
}

/* work on mobile */
@media (max-width: 600px) {
    /*.family-tree {
        flex-direction: column;
        gap: 1rem;
    }*/

    .family-section {
        margin-top: 1rem;
        margin-left: 10px;
        margin-right: 10px;
    }

    .memory-note {
        padding: 0.75rem 0;
        margin: 1rem auto;
    }
}

/* New Animations */
/* Wedding-themed Slide in from top */
@keyframes slideInDown {
    0% {
        transform: translateY(-50%) rotate(-10deg);
        opacity: 0;
    }
    100% {
        transform: translateY(0) rotate(0);
        opacity: 1;
    }
}

/* Romantic Fade In */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Wedding-themed Slide in from bottom */
@keyframes slideInUp {
    0% {
        transform: translateY(50%) rotate(10deg);
        opacity: 0;
    }
    100% {
        transform: translateY(0) rotate(0);
        opacity: 1;
    }
}

/* Wedding-themed Slide in from left */
@keyframes slideInLeft {
    0% {
        transform: translateX(-50%) rotate(-10deg);
        opacity: 0;
    }
    100% {
        transform: translateX(0) rotate(0);
        opacity: 1;
    }
}

/* Wedding-themed Slide in from right */
@keyframes slideInRight {
    0% {
        transform: translateX(50%) rotate(10deg);
        opacity: 0;
    }
    100% {
        transform: translateX(0) rotate(0);
        opacity: 1;
    }
}

/* Wedding-themed Zoom in with a slight bounce */
@keyframes zoomIn {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }
    60% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Animation utility classes */
.animate-slideInDown {
    animation: slideInDown 1.5s ease-in-out forwards;
}

.animate-fadeIn {
    animation: fadeIn 1.5s ease-in-out forwards;
}

.animate-fadeInUp {
    animation: slideInUp 1.5s ease-in-out forwards;
}

.animate-slideInLeft {
    animation: slideInLeft 1.5s ease-in-out forwards;
}

.animate-slideInRight {
    animation: slideInRight 1.5s ease-in-out forwards;
}

.animate-zoomIn {
    animation: zoomIn 1.2s ease-in-out forwards;
}