/*===================================
  Base Styles & Variables
====================================*/
:root {
    --background-color: #000000;
    --text-color: #ffffff;
    --accent-color: #a69f96;
    --button-bg-color: #cdc8b9;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Afacad', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    height: 100%;
    width: 100%;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    text-align: center;
}

/*===================================
  Header Section
====================================*/
.header {
    background-image: url('img/head_bg.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    padding-top: 5vh;
}

/* Music Switch */
.music-switch {
    font-size: 0.8em;
    margin-bottom: 9vh;
    cursor: pointer;
}

.music-switch .current {
    font-weight: bold;
}

.music-switch .alternate {
    font-weight: normal;
    text-decoration: underline;
}

/* Names and Date */
.names {
    font-family: 'Afacad', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-color);
    font-weight: 100;
    font-size: 3em;
    margin: 0;
    line-height: 1.2;
}

.and {
    font-family: 'Italianno', 'Brush Script MT', cursive;
    color: var(--text-color);
    font-size: 1em;
    margin: 0 15px;
    text-transform: none;
    letter-spacing: normal;
}

.date {
    font-weight: 300;
    margin-top: 2vh;
    margin-bottom: 11vh;
    font-size: 1.2em;
}

/* Navigation */
.nav {
    margin-top: 5vh;
    margin-bottom: 3vh;
}

.nav a {
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin: 0 10px;
    font-size: 0.8em;
}

.nav a:hover {
    text-decoration: underline;
}

/* Header RSVP Button */
.rsvp-button {
    margin-top: 4vh;
    background-image: url('img/buttonbg.png');
    border: 1px solid var(--text-color);
    color: var(--background-color);
    padding: 10px 20px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9em;
    cursor: pointer;
}

/*===================================
  Footer Section
====================================*/
.site-footer {
   width: 100%;
   height: 50px;
   padding: 0;
   text-align: center;
   margin-top: 40px;
   background-color: #111111;
   border-top: 1px solid var(--accent-color);
   display: flex;
   align-items: center;
   justify-content: center;
}

.copyright {
   font-family: 'Afacad', Arial, sans-serif;
   font-size: 14px;
   color: var(--accent-color);
   letter-spacing: 0.1em;
}

.copyright a {
   color: var(--accent-color);
   text-decoration: none;
}

/*===================================
  Photo Carousel Section
====================================*/
.photo-carousel {
    position: relative;
    width: 100%;
    max-width: 950px;
    height: 500px;
    overflow: hidden;
    margin: 0 auto;
}

.carousel-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-slide {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide img {
    height: 500px;
    width: auto;
    flex: 0 0 auto;
    object-fit: cover;
    margin-right: 15px;
    max-height: 100%;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 24px;
    z-index: 10;
}

.carousel-button.prev { left: 10px; }
.carousel-button.next { right: 10px; }

.carousel-slide img.sepia {
    filter: sepia(100%);
}

.carousel-slide img:hover {
    filter: none;
    cursor: pointer;
}

/*===================================
  Divider Styles
====================================*/
.divider {
    text-align: center;
    margin: 40px auto;
    max-width: 750px;
    padding: 0 20px;
}

.divider img {
    max-width: 90%;
    height: auto;
}

/*===================================
  Welcome Text Section
====================================*/
.welcome-text {
    text-align: left;
    max-width: 850px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.welcome-text p {
    font-family: 'Afacad', Arial, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-color);
    margin: 40px 0;
}

.welcome-text .first-letter {
    font-family: 'Italianno', cursive;
    font-size: 72px;
    color: var(--accent-color);
    float: left;
    margin-right: 10px;
    line-height: 0.8;
}

/*===================================
  Venue Section
====================================*/
.venue-section {
    max-width: 950px;
    margin: 60px auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.venue-title {
    text-align: center;
    margin-bottom: 40px;
}

.venue-title .ceremony {
    font-family: 'Italianno', cursive;
    font-size: 36px;
    color: var(--accent-color);
    font-weight: normal;
}

.venue-title .omni {
    font-family: 'Cormorant Garamond', serif;
    color: var(--text-color);
    font-size: 32px;
    margin: 0 10px;
    font-weight: 300;
}

.venue-title .location {
    font-family: 'Afacad', Arial, sans-serif;
    font-weight: 200;
    color: var(--text-color);
    font-size: 24px;
    letter-spacing: 0.1em;
}

.venue-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    margin-bottom: 40px;
}

.venue-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
}

.venue-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.info-box {
    flex: 1;
    border: 1px solid var(--accent-color);
    border-radius: 10px;
    padding: 20px 30px;
    box-sizing: border-box;
}

.info-box p {
    margin: 0;
    font-family: 'Afacad', Arial, sans-serif;
    font-weight: 200;
    font-size: 16px;
    line-height: 1.4;
}

.info-box p:last-child {
    margin-top: 8px;
    font-weight: 400;
}

.venue-buttons {
    display: flex;
    flex-direction: column;
    gap: 17px;
    width: 300px;
}

.venue-button {
    background-image: url('img/buttonbg.png');
    background-size: 100% 100%;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    padding: 13px 20px;
    text-decoration: none;
    text-align: right;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 1em;
    font-weight: 400;
    width: 100%;
    box-sizing: border-box;
}

/*===================================
  Messages Carousel Section
====================================*/
.messages-carousel {
    width: 100%;
    max-width: 850px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.message-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
}

.message-box {
    width: 100%;
    height: 270px;
    background-color: rgba(166, 159, 150, 0.1);
    border: 1px solid var(--accent-color);
    border-radius: 10px;
    padding: 30px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.message-content {
    width: 100%;
    text-align: left;
    opacity: 0;
    transition: opacity 2s ease;
}

.message-content.active {
    opacity: 1;
}

.message-text {
    font-family: 'Afacad', Arial, sans-serif;
    font-weight: 200;
    font-size: 16px;
    line-height: 1.8;
    letter-spacing: 0.02em;
    margin: 0 0 20px 0;
}

.message-sender {
    font-family: 'Italianno', cursive;
    font-size: 32px;
    color: var(--accent-color);
    margin: 0;
    text-align: right;
}

.message-nav {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/*===================================
  Image Popup Styles
====================================*/
.image-popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.popup-content {
    margin: auto;
    display: block;
    height: 538px;
    max-width: 100%;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.popup-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 20px;
    width: 40px;
    height: 40px;
}

.popup-nav.prev { left: 10px; }
.popup-nav.next { right: 10px; }

/*===================================
  General Form Section Styling
====================================*/
.form-box {
    background-color: rgba(166, 159, 150, 0.1);
    border: 1px solid var(--accent-color);
    border-radius: 10px;
    padding: 25px 30px;
    margin-bottom: 50px;
    max-width: 700px; /* Consistent width for both form containers */
    margin: 40px auto;
}

/* Title Styling */
.form-title {
    font-family: 'Italianno', cursive;
    color: var(--accent-color);
    font-size: 28px;
    margin: 0 0 30px;
    text-align: center;
}

/* Message Form Specific Layout */
.message-form-section .form-box {
    margin: 0 auto;
}

.input-row, .name-email-row, .select-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.name-email-row > div, .select-group, .input-row input {
    width: calc(50% - 7.5px); /* Balances width with the gap for each column */
}

.input-row textarea, .rsvp-form textarea {
    width: 100%;
    min-height: 100px;
    resize: vertical;
}

/* Input and Select Styling */
input, select, textarea {
    background: white;
    border: none;
    padding: 8px 12px;
    font-family: 'Afacad', Arial, sans-serif;
    font-size: 16px;
    border-radius: 5px;
    box-sizing: border-box;
    width: 100%; /* Full width within container */
}

/* Button Styling */
.submit-btn {
    background-color: var(--button-bg-color);
    border: 2px solid var(--text-color);
    color: var(--background-color);
    padding: 8px 30px;
    font-family: 'Afacad', Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

/* Align message form button to the right */
.message-form-section .submit-row {
    display: flex;
    justify-content: flex-end; /* Right-aligns the submit button in the message form */
}

.submit-btn:hover {
    opacity: 0.9;
}

/* Specific RSVP Form Styling */
.rsvp-form .form-content {
    max-width: 700px;
    margin: 0 auto;
}

.rsvp-form .notes-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    margin-top: 10px;
}

.rsvp-form .submit-btn {
    align-self: flex-start; /* Keeps button size and position on mobile */
    padding: 8px 30px; /* Ensures consistent size on mobile */
}

.rehearsal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px; /* Match the gap from other rows */
}

.rehearsal-row label {
    font-family: 'Afacad', Arial, sans-serif;
    font-size: 14px;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: calc(50% - 7.5px); /* Match width of other inputs */
    text-align: left;
}

.rehearsal-row select {
    width: calc(50% - 7.5px); /* Exact same width as other fields */
    margin-left: auto; /* Push to align with fields above */
}

/*===================================
  Itinerary Section
====================================*/
.itinerary-section {
    max-width: 850px;
    margin: 60px auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.itinerary-content {
    text-align: left;
}

.day-block {
    margin-bottom: 30px;
}

.day-block h3 {
    font-family: 'Italianno', cursive;
    color: var(--accent-color);
    font-size: 32px;
    margin: 0 0 15px;
}

.day-block h4 {
    font-family: 'Afacad', Arial, sans-serif;
    font-size: 18px;
    color: var(--text-color);
    margin: 20px 0 10px;
    letter-spacing: 0.1em;
}

.day-block p,
.travel-info p {
    font-family: 'Afacad', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    margin: 10px 0;
}

.golf-times,
.wedding-time {
    margin: 20px 0;
    padding-left: 20px;
}

.travel-info {
    margin-top: 40px;
}

.travel-info h3 {
    font-family: 'Italianno', cursive;
    color: var(--accent-color);
    font-size: 32px;
    margin: 0 0 15px;
}

.travel-info ul,
.golf-times ul {
    list-style: none;
    padding-left: 20px;
    margin: 10px 0;
}

.travel-info li,
.golf-times li {
    font-family: 'Afacad', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    margin: 5px 0;
}


/* Mobile Responsive */
@media (max-width: 768px) {
    /* General Mobile Adjustments */
    
    /* Adds 5px margin on the sides for the message form */
    .message-form-section .form-box {
        margin: 40px 5px; /* Adds top, bottom, and side margins */
    }

    /* Centers the submit button in the message form on mobile */
    .message-form-section .submit-row {
        display: flex;
        justify-content: center;
    }
    
    .form-box {
        padding: 20px;
        margin: 40px 5px; /* Adds a small margin on the sides */
    }

    .name-email-row,
    .select-row,
    .notes-row,
    .input-row {
        flex-direction: column;
        gap: 15px;
    }

    .name-email-row > div,
    .select-group,
    .input-row input,
    .rsvp-form textarea,
    .rsvp-form .submit-btn {
        width: 100%; /* Full width on mobile */
        max-width: 100%;
        margin: 0 auto;
    }

    /* Center the message form submit button on mobile */
    .message-form-section .submit-row {
        justify-content: center;
    }

    /* Prevent RSVP button from resizing */
    .rsvp-form .submit-btn {
        width: auto;
    }
    
    .rehearsal-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .rehearsal-row select {
        width: 100%;
    }
    
    .itinerary-section {
        padding: 0 15px;
    }
    
    .day-block h3,
    .travel-info h3 {
        font-size: 28px;
    }
    
}

@media (max-width: 480px) {
    .form-title {
        font-size: 24px;
    }
    
    input, select, textarea {
        font-size: 14px;
    }
}
