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

:root {
    --primary-blue: #4a90d9;
    --dark-gray: #3a3a3a;
    --light-gray: #f8f8f8;
    --white: #ffffff;
    --text-dark: #333333;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    font-size: 16px;
}

/* Header and Navigation */
header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    color: var(--white);
    font-size: 1.6rem;
    font-weight: 600;
    text-decoration: none;
    max-width: 50%;
}

nav > ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav ul li {
    position: relative;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.95rem;
    transition: opacity 0.3s ease;
}

nav ul li a:hover {
    opacity: 0.8;
}

/* Dropdown Menu Styles */
.has-dropdown {
    position: relative;
}

.has-dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 20px;
    display: none;
}

.has-dropdown:hover::before {
    display: block;
}

.dropdown-toggle {
    cursor: pointer;
    display: inline-block;
}

.dropdown-toggle::after {
    content: ' ▾';
    font-size: 0.8rem;
    margin-left: 0.3rem;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background-color: var(--white);
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    margin-top: 0;
    list-style: none;
    z-index: 1000;
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu li a {
    color: var(--text-dark);
    padding: 0.75rem 1.5rem;
    display: block;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.dropdown-menu li a:hover {
    background-color: var(--light-gray);
    opacity: 1;
}

.has-dropdown:hover .dropdown-menu {
    display: block;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    height: 60vh;
    min-height: 500px;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), 
                url('/static/images/header_church.webp') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.hero-citation {
    color: var(--white);
    font-size: 1rem;
    font-weight: 300;
    margin: 0;
    opacity: 0.95;
    text-align: right;
    padding-right: 2rem;
}

/* Content Sections */
.content-section {
    padding: 5rem 2rem;
    text-align: center;
    background-color: var(--white);
}

.content-section:nth-child(even) {
    background-color: var(--light-gray);
}

.content-section h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.service-times, .pastor-hours {
    max-width: 600px;
    margin: 0 auto;
}

.service-times p, .pastor-hours p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.pastor-hours p:last-child {
    font-size: 0.9rem;
    color: #666;
    margin-top: 1.5rem;
}

/* Footer */
footer {
    background-color: var(--dark-gray);
    color: var(--white);
    text-align: center;
    padding: 3rem 2rem;
}

footer p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

footer .church-name {
    font-weight: 400;
    margin-bottom: 1rem;
}

footer .contact-info {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 1.5rem 2rem;
    }

    .site-title {
        font-size: 1.1rem;
        max-width: 60%;
    }

    nav > ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        padding: 2rem;
        gap: 0;
    }

    nav > ul.active {
        display: flex;
    }

    nav ul li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        position: relative;
    }

    nav ul li:last-child {
        border-bottom: none;
    }

    nav ul li a {
        padding: 1rem 0;
        display: block;
    }

    /* Mobile: Hide dropdown toggle, show all items flat */
    nav > ul {
        z-index: 1000;
    }
    
    .has-dropdown {
        position: relative;
        border-bottom: none !important;
    }

    /* Hide the "Mēs" dropdown toggle on mobile */
    .has-dropdown .dropdown-toggle {
        display: none !important;
    }

    /* Show dropdown menu items as regular list items on mobile */
    .has-dropdown .dropdown-menu {
        display: block !important;
        position: relative;
        background-color: transparent;
        margin: 0;
        padding: 0;
        border-top: none;
        width: 100%;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .dropdown-menu li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        list-style: none;
    }

    .dropdown-menu li:last-child {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .dropdown-menu li a {
        color: var(--white) !important;
        padding: 1rem 0;
        font-size: 1rem;
        display: block;
        width: 100%;
        box-sizing: border-box;
        text-decoration: none;
    }

    .dropdown-menu li a:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .mobile-menu-toggle {
        display: block;
        margin-left: auto;
        padding-left: 1rem;
    }
    
    header {
        justify-content: space-between;
    }

    .hero {
        height: 60vh;
        min-height: 400px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-citation {
        font-size: 0.9rem;
        padding-right: 1rem;
    }

    .content-section {
        padding: 3rem 1.5rem;
    }

    .content-section h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 0.95rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero-citation {
        font-size: 0.85rem;
        padding-right: 0.5rem;
    }
}

/* Enhanced navigation visibility for pages with hero backgrounds */
.page-with-hero header {
    background: #000000 !important;
    padding: 1rem 4rem !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8) !important;
}

.page-with-hero header .site-title {
    color: #ffffff !important;
    text-shadow: none !important;
    font-weight: 700 !important;
}

.page-with-hero header nav {
    background: #000000 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
    border: 3px solid #ffffff !important;
}

.page-with-hero header nav ul {
    background: transparent !important;
}

.page-with-hero header nav ul li {
    background: transparent !important;
}

.page-with-hero header nav ul li a {
    color: #ffffff !important;
    background: #333333 !important;
    border: 2px solid #ffffff !important;
    font-weight: 700 !important;
    padding: 0.8rem 1.2rem !important;
    border-radius: 6px !important;
    margin: 0 0.2rem !important;
    font-size: 1.1rem !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.page-with-hero header nav ul li a:hover {
    color: #ffd700 !important;
    background: #444444 !important;
    border-color: #ffd700 !important;
}

.page-with-hero header .dropdown-menu {
    background: #000000 !important;
    border: 3px solid #ffffff !important;
}

.page-with-hero header .dropdown-menu li {
    background: transparent !important;
}

.page-with-hero header .dropdown-menu li a {
    color: #ffffff !important;
    background: #333333 !important;
    border: 1px solid #ffffff !important;
    font-weight: 600 !important;
}

.page-with-hero header .dropdown-menu li a:hover {
    background: #444444 !important;
    color: #ffd700 !important;
}

