/*PASSWORD GATE -> not really secure LOL*/
html:not(.unlocked) body > *:not(#gate) {
    display: none;
}

html.unlocked #gate {
    display: none;
}

#gate {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f8f5ef;
    color: #5a3b2f;
    font-family: Cormorant Garamond, serif;
    text-align: center;
}

#gate h1 {
    font-size: 55px;
    margin: 0 0 10px;
}

#gate h2 {
    font-size: 30px;
    margin: 0 0 10px;
    font-style: italic;
}

#gate p {
    font-size: 22px;
}

#gate input, #gate button {
    font-family: inherit;
    font-size: 20px;
    padding: 8px 16px;
    border: 1px solid #cdb491;
    margin: 5px;
}

#gate button {
    background-color: #cdb491;
    color: white;
    cursor: pointer;
}

#gate-error {
    color: #a34545;
}

/*=== === === === === === === === === ===*/

html {
    scroll-behavior: smooth;
}

main a {
    color: #5a3b2f;
}

body {
    margin: 0;
    font-family: Cormorant, serif;
}

h1 {
    font-family: Allura, serif;
}

h2:not(.gate-sub), h3 {
    font-family: Cormorant Garamond;
    text-decoration: underline;
}

section h2 {
    text-align: center;
    font-size: 48px;
    font-weight: 500;
    color: #7a5c3e;
    margin: 75px 0 40px;
}

section:not(#home) p {
    font-family: Cormorant Garamond;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.75;
    color: #5a3b2f;
    max-width: 800px;
    margin: 0 auto 1.2em;

}

#home {
    background-image: linear-gradient(
        rgba(25,0,0,0.1),
        rgba(25,0,0,0.25), /*Creating a gradient overlay before the background image, good for readable text*/
        rgba(25,0,0,0.1)
    ), url("../images/landing_pic.jpeg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    min-height: 100vh; /*makes home at least height of screen*/
    display: flex; /*Allows for position control*/
    flex-direction: column; /*Stacks elements in a col (vertically*/
    justify-content: center; /*Centers elements vertically*/
    align-items: center; /*Centers elements horizontally*/
    text-align: center; /*Centers text*/
    color: #cdb491;
    font-weight: bold;
}

#home h1 {
    font-size: 55px;
    margin: 0;
}

#home p {
    font-size: 30px;
    margin: 10px 0;
    font-family: Cormorant Garamond, serif;
}

#story p + p {
    text-indent: 2em;
}

#info {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

#info h2 {
    grid-column: 1 / -1;
}

#info h3 {
    font-size: 30px;
    color: #5a3b2f;
    font-style: italic;
    font-weight: 600;
    text-decoration: underline;
}

#info > div:not(.card) {
    grid-column: 1 / -1;
}

#info > div:not(.card) p {
    text-align: left;
    margin-left: 0;
    max-width: none;
}

#info > div.card {
    background-color: #f8f5ef;
    padding: 40px;
    text-align: center;
    border: 1px solid #cdb491;
}

.church-img {
    display: block;
    max-width: 100%;
    margin: 0 auto 20px;
}

.church2-img {
    display: block;
    max-width: 100%;
    margin: 0 auto 20px;
}

.polish-home-img {
    display: block;
    max-width: 100%;
    margin: 0 auto 20px;
}



.hall-img {
    display: block;
    max-width: 100%;
    margin: 0 auto 20px;
}

strong:not(.dress) {
    font-size: 25px;
    color: #a34545;
    text-decoration:double underline;
}

.mass-guide {
    max-width: 1500px;
    padding-left: 1.2em;
}

.mass-guide li {
    font-family: Cormorant Garamond, serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.75;
    color: #5a3b2f;
    margin-bottom: 0.6em;
}

/* SCHEDULE TIMELINE */
.timeline {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 900px;
    position: relative;
}

/* The vertical line */
.timeline::before {
    content: "";
    position: absolute;
    left: 170px;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #cdb491;
}

.timeline li {
    display: grid;
    grid-template-columns: 150px 1fr;
    column-gap: 40px;
    position: relative;
    margin-bottom: 40px;
}

/* The dot on each event */
.timeline li::before {
    content: "";
    position: absolute;
    left: 170px;
    top: 0.55em;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background-color: #cdb491;
    transform: translateX(-50%);
}

.timeline .time {
    text-align: right;
    font-family: Cormorant Garamond, serif;
    font-size: 26px;
    font-style: italic;
    font-weight: 600;
    color: #a34545;
}

.timeline h4 {
    margin: 0;
    font-family: Cormorant Garamond, serif;
    font-size: 26px;
    font-weight: 600;
    color: #5a3b2f;
}

#info .timeline .event p {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
}

/* Stack on phones */
@media (max-width: 600px) {
    .timeline::before,
    .timeline li::before {
        left: 0;
    }

    .timeline li {
        grid-template-columns: 1fr;
        padding-left: 25px;
    }

    .timeline .time {
        text-align: left;
    }
}

strong.dress {
    color: #a34545;
}

#dress p.no-white {
    margin-top: 50px;
    text-align: center !important;
}


/* FAQ */
#faq details {
    max-width: 900px;
    margin: 0 auto 15px;
    background-color: #f8f5ef;
    border: 1px solid #cdb491;
}

#faq summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 18px 24px;
    cursor: pointer;
    list-style: none;          /* removes the default triangle */
    font-family: Cormorant Garamond, serif;
    font-size: 26px;
    font-weight: 600;
    font-style: italic;
    color: #5a3b2f;
    transition: color 0.3s ease;
}

/* Removes the default triangle in Safari */
#faq summary::-webkit-details-marker {
    display: none;
}

/* The + icon */
#faq summary::after {
    content: "+";
    font-size: 32px;
    font-style: normal;
    color: #cdb491;
    transition: transform 0.3s ease;
}

/* Rotate + into × when open */
#faq details[open] summary::after {
    transform: rotate(45deg);
}

#faq summary:hover {
    color: #a34545;
}

#faq summary:focus-visible {
    outline: 2px solid #cdb491;
    outline-offset: 2px;
}

#faq details[open] summary {
    border-bottom: 1px solid #cdb491;
}

#faq .answer {
    padding: 18px 24px 4px;
    background-color: white;
}

#faq .answer p {
    max-width: none;
    margin-left: 0;
}

#faq {
    background-color: white;
}

#faq strong { text-decoration: none; }

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.25);
    transition: background-color 0.4s ease;
    z-index: 10; 
}

#header-countdown {
    font-family: Cormorant Garamond, serif;
    font-size: 30px;
    font-style: italic;
    color: #cdb491;
    white-space: nowrap;  /* never breaks onto two lines */
    transition: color 0.4s ease;
}

header.scrolled #header-countdown {
    color: #7a5c3e
}

@media (max-width: 1400px) {
    #header-countdown {
        display: none; /* only displays on large enough screens*/
    }
}

header.scrolled {
    background-color: rgba(205, 180, 145, 0.35);
}

nav {
    display: flex;
    justify-content: left;
    gap: 30px;
}

nav a {
    text-decoration: none;
    font-family: Cormorant Garamond, serif;
    color: #cdb491;
    font-size: 30px;
    font-weight: bolder;
    font-style: italic;
    transition: color 0.4s ease, text-shadow 0.4s ease;
}

nav a:hover {
    color: #a34545;
    text-shadow: 1px 1px 2px black; /*h offset, v offset, blur, shadow color*/
}

header.scrolled nav a {
    color: black;
}


header.scrolled nav a:hover {
    color: #a34545;
    text-shadow: none;
}

section {
    padding: 10px 10% 100px;
}

#story {
    background-color: #f8f5ef;
}

#info {
    background-color: white;
}

#countdown {
    background-color: #f8f5ef;
}

#travel {
    background-color: #f8f5ef; 
}

#rsvp {
    background-color: #f8f5ef;
}

.divider {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 60px auto;
    width: 60%;
    color: #cdb491;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: #cdb491;
}

footer {
    text-align: center;
    font-size: 16px;
    color: #7a5c3e;
    margin: 75px 0 40px;
}

footer h3 {
    text-decoration: underline;
}

/* DROPDOWN */
.dropdown {
    position: relative; /* menu positions itself relative to this */
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;          /* starts right below the main link */
    left: 0;
    flex-direction: column;
    background-color: rgb(248, 225, 193);
    border: 1px solid #cdb491;
    min-width: 220px;
    padding: 8px 0;
    z-index: 20;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    display: flex;
}

header nav .dropdown-menu a {
    font-size: 22px;
    color: #5a3b2f;
    padding: 8px 20px;
    white-space: nowrap;
}

header nav .dropdown-menu a:hover {
    color: #a34545;
    text-shadow: none;
    background-color: rgba(205, 180, 145, 0.25);
}

html {
    scroll-padding-top: 90px; /* stops the fixed header from covering jump targets */
}






/* ===== MOBILE ===== */

#menu-toggle {
    display: none;            /* hidden on big screens */
    background: none;
    border: none;
    font-size: 32px;
    color: #cdb491;
    cursor: pointer;
    padding: 0;
}

header.scrolled #menu-toggle {
    color: black;
}

/* --- Nav becomes a hamburger menu --- */
@media (max-width: 1200px) {
    header {
        flex-wrap: wrap;
        padding: 12px 16px;
    }

    #menu-toggle {
        display: block;
    }

    nav {
        display: none;
        flex-direction: column;
        gap: 6px;
        width: 100%;
        padding: 10px 0;
    }

    nav.open {
        display: flex;
    }

    header.menu-open {
        background-color: rgba(248, 245, 239, 0.97);
    }

    header.menu-open #menu-toggle,
    header.menu-open nav a {
        color: #5a3b2f;
    }

    nav a {
        font-size: 22px;
    }

    /* Dropdown links always shown, indented under Wedding Information */
    .dropdown-menu {
        display: flex;
        position: static;
        background: transparent;
        border: none;
        min-width: 0;
        padding: 0 0 0 18px;
    }

    header nav .dropdown-menu a {
        font-size: 18px;
        padding: 4px 0;
    }
}

/* --- Content layout for phones --- */
@media (max-width: 800px) {
    #info {
        grid-template-columns: 1fr;
    }

    section {
        padding: 10px 5% 60px;
    }

    section h2 {
        font-size: 36px;
        margin: 50px 0 25px;
    }

    section:not(#home) p,
    .mass-guide li {
        font-size: 19px;
    }

    strong:not(.dress) {
        font-size: 21px;
    }

    #info > div.card {
        padding: 20px;
    }

    #home h1,
    #gate h1 {
        font-size: 42px;
    }

    #faq summary {
        font-size: 21px;
        padding: 14px 16px;
    }

    .divider {
        margin: 40px auto;
    }
}