:root {
    --dark-brown: #4b2e1f;
    --medium-brown: #7a4f2a;
    --warm-brown: #9c6b35;
    --gold: #d6a84f;
    --light-gold: #f3d98b;
    --cream: #fff4d6;
    --text-dark: #2f2118;
    --white: #ffffff;
}

/* Universal Aspects */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-size: 1.2rem;
    line-height: 1.6;
    background-image: url('HUMCExterior.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: var(--text-dark);
    position: relative;
    font-family: 'Lora', serif;
    min-height: 100vh;
}
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(156, 107, 53, 0.82), rgba(255, 244, 214, 0.86));
    z-index: -1;
}
body h2 {
    font-family: 'Fraunces', serif;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
    color: var(--dark-brown);
}

/* Header */
header {
    background: var(--dark-brown);
    color: var(--white);
    padding: 1.5rem;
    text-align: center;
}
header h1 {
    font-family: 'Cinzel', serif;
    letter-spacing: 2px;
    margin: 0;
    font-size: clamp(2.5rem, 6vw, 4rem);
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
}
header p {
    margin: 0.2rem 0 0;
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-style: italic;
}

/* Navigation */
nav {
    background: var(--medium-brown);
    padding: 0.5rem;
}
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
nav ul li {
    margin: 0.5rem 1rem;
    position: relative;
}
nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: bold;
    font-size: clamp(1rem, 2vw, 1.4rem);
    padding: 0.5rem;
    display: block;
}
nav ul li a:hover {
    color: var(--light-gold);
}

/* Main content sections */
section {
    padding: 1rem;
}
#top {
    padding: 1rem;
}

.posters-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: flex-start;
    margin: 2rem auto;
    max-width: 1400px;
    padding: 0 1rem;
    gap: 1.5rem;
}

/* Individual Poster Banner */
.poster-banner {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    text-align: center;
    margin: 1rem 0;
}
.poster-banner img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 3px solid var(--gold);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
.poster-banner figcaption {
    padding: 1rem 0;
    font-style: italic;
    font-size: 1.1rem;
    font-family: 'Lora', serif;
    background: transparent;
    color: var(--text-dark);
    text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
}

/* Posters section - fixed layout */
.posters-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
    padding: 0 1rem;
}
.poster-card {
    background: transparent;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.poster-card figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    text-align: center;
}
.poster-card img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.poster-card figcaption {
    padding: 1rem 0;
    font-size: 1.1rem;
    font-family: 'Lora', serif;
    color: var(--text-dark);
    background: transparent;
    font-style: italic;
    max-width: 400px;
}

/* Announcements Dropdown */
#announcements {
    width: 100%;
    max-width: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}
#announcement-container {
    padding: 1rem 0;
    max-height: none;
    overflow: visible;
    font-family: 'Lora', serif;
}
#announcement-container p {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px dashed var(--warm-brown);
    text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
    padding-left: 1rem;
    position: relative;
}
#announcement-container p::before {
    content: "✝";
    position: absolute;
    left: 0;
    color: var(--dark-brown);
}

/* Gallery */
.gallery-container {
    width: 100%;
    max-width: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.gallery-content {
    padding: 1rem 0;
    overflow: visible;
}

.gallery {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.gallery .image-wrapper {
    display: none;
    position: relative;
    text-align: center;
}
.gallery .image-wrapper.active {
    display: block;
    animation: fade 1s ease-in-out;
}
@keyframes fade {
    from {opacity: 0.4}
    to {opacity: 1}
}
.gallery img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    border: 3px solid var(--gold);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.gallery figcaption {
    padding: 1rem 0;
    font-style: italic;
    font-size: 1.1rem;
    font-family: 'Lora', serif;
    background: transparent;
    color: var(--text-dark);
    text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
}
.slideshow-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}
.prev, .next {
    cursor: pointer;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.3s;
    user-select: none;
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    margin: 0 10px;
}
.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
}

/* Divider lines */
.dashes-design {
    margin: 20px auto;
    display: flex;
    justify-content: center;
    gap: 15px;
}
.dash {
    width: 10%;
    height: 4px;
    background-color: var(--gold);
    border-radius: 2px;
}

/* Welcome and services */
#basic-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
    padding: 0 1rem;
}
#welcome, #services {
    padding: 1.5rem;
    border-radius: 10px;
}
#welcome p {
    font-family: 'Lora', serif;
    margin-top: 1rem;
    text-align: center;
}
.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem;
}
.service-item {
    border: 2px solid var(--warm-brown);
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Lora', serif;
    text-align: center;
}
.service-title {
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-brown);
}

/* Bible quote */
#bible-quote {
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem auto;
    text-align: center;
    max-width: 1200px;
}
#quote {
    font-family: 'Charm', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: bold;
    font-style: italic;
    margin-top: 1rem;
    color: var(--dark-brown);
}

/* Social links */
#links {
    text-align: center;
    padding: 1rem 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 1rem 0;
}
.social-logo {
    height: 50px;
    transition: transform 0.3s ease;
    filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.3));
}
.social-logo:hover {
    transform: scale(1.2);
}

/* Footer */
footer {
    background: var(--dark-brown);
    color: var(--white);
    font-style: italic;
    padding: 1rem;
    text-align: center;
    margin-top: 2rem;
}
footer p {
    font-size: 1.2rem;
    margin: 0;
}

/* Livestream section */
#livestream {
    text-align: center;
    font-family: 'Lora', serif;
    margin: 2rem 0;
}
.button-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}
.stream-button {
    display: inline-block;
    text-decoration: none;
    color: var(--dark-brown);
    background-color: var(--gold);
    font-family: 'Fraunces', serif;
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: bold;
    padding: 12px 20px;
    text-align: center;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    white-space: normal;
    flex: 1 1 250px;
    max-width: 350px;
}
.stream-button:hover {
    background-color: var(--warm-brown);
    color: var(--white);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* Dropdown menu */
.dropdown-menu {
    display: none;
    position: absolute;
    background-color: var(--medium-brown);
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 5px;
    overflow: hidden;
}
.dropdown-menu li {
    display: block;
    margin: 0;
}
.dropdown-menu li a {
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-size: 1.1rem;
}
.dropdown:hover .dropdown-menu {
    display: block;
}

.history-pdfs {
    margin-top: 2rem;
    text-align: center;
}

.history-pdfs h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.history-pdfs a {
    display: block;
    margin: 0.75rem auto;
    padding: 0.85rem 1.2rem;
    max-width: 420px;
    text-decoration: none;
    font-family: 'Lora', serif;
    font-weight: bold;
    border: 2px solid #6b4f2a;
    border-radius: 8px;
    color: #3b2a17;
    background-color: #f7f0e3;
}

.history-pdfs a:hover {
    background-color: #e7d5b5;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .posters-container,
    .content-container,
    #basic-info {
        grid-template-columns: 1fr;
    }
    #services {
        border-left: none;
        border-top: 3px dashed var(--warm-brown);
        margin-top: 2rem;
        padding-top: 2rem;
    }
    .button-container {
        flex-direction: column;
        align-items: center;
    }
    .stream-button {
        width: 100%;
        max-width: 100%;
    }
    nav ul {
        flex-direction: column;
    }
    .prev, .next {
        padding: 10px;
        font-size: 20px;
    }
    .spaghetti-banner img {
        max-width: 100%;
    }
}

.content-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem auto;
    max-width: 1400px;
    padding: 0 1rem;
    align-items: start;
}

.sunday-worship-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.sunday-worship-sign {
    display: block;
    width: min(100%, 150px);
    height: 150px;
    margin-top: 0.5rem;
    object-fit: cover;
    object-position: center;
    border: 2px solid var(--gold);
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
}
