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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

a {
    color: #185b8f;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #508fae;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.skip-link {
    position: absolute;
    top: -10000em;
    width: 1px;
    height: 1px;
    overflow: hidden;
    margin: -1px;
    background-color: #185b8f;
    color: white;
    padding: 10px;
}

.skip-link:focus {
    position: fixed;
    top: 10px;
    left: 10px;
    width: auto;
    height: auto;
    z-index: 999;
}

/* Icons */
.icon {
    width: 19px;
    height: 19px;
    fill: currentColor;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}

.social-icon {
    width: 24px;
    height: 24px;
    fill: #535353;
    transition: fill 0.3s ease;
}

.social-icon:hover {
    fill: #508fae;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 16px 30px;
    background-color: #f2ede8;
    color: #242424;
    font-weight: 500;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #e8e3de;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-outline {
    background-color: #fff;
    border: 2px solid #242424;
}

.btn-outline:hover {
    background-color: #242424;
    color: #fff;
}

/* Header */
.site-header {
    background-color: #252525;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 100%;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.site-title {
    font-size: 24px;
    color: #fff;
    font-weight: 500;
    margin: 0;
}

.site-title a {
    color: #fff;
}

.site-title strong {
    font-weight: 700;
}

/* Hamburger Menu Button */
.hamburger-menu {
    display: none; /* Hidden by default, shown on mobile */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #fff;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* Navigation */
.main-navigation {
    display: none; /* Hidden by default on all screen sizes */
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-menu li {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 16px;
}

.nav-menu a {
    color: #fff;
    display: flex;
    align-items: center;
}

/* Active navigation state */
.nav-menu a.active {
    color: #508fae;
    font-weight: 600;
}

.has-submenu {
    position: relative;
}

.submenu-toggle {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
}

.chevron-down {
    width: 18px;
    height: 18px;
    fill: #fff;
    transition: transform 0.3s ease;
}

/* Dropdown Menu Styles */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #1a1a1a;
    min-width: 250px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: 0 0 4px 4px;
}

.submenu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0;
}

.submenu li:last-child {
    border-bottom: none;
}

.submenu a {
    color: #fff;
    padding: 8px 20px;
    display: block;
    transition: background-color 0.3s ease;
    font-size: 14px;
}

.submenu a:hover {
    background-color: #508fae;
}

/* Active dropdown state */
.has-submenu.active .submenu {
    display: block;
}

.has-submenu.active .chevron-down {
    transform: rotate(180deg);
}

/* Hero Section */
.hero {
    background-color: #508fae;
    color: #fff;
    padding: 76px 0;
    text-align: center;
}

.hero-title {
    font-size: 66px;
    font-weight: 900;
    margin-bottom: 40px;
}

.service-info h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

.service-details {
    list-style: none;
    font-size: 22px;
}

.service-details li {
    margin-bottom: 10px;
}

.service-details a {
    color: #fff;
    display: inline-flex;
    align-items: center;
}

.service-details .icon {
    fill: #fff;
}

/* Hero Image */
.hero-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Latest Section */
.latest-section {
    background-color: #fff;
    padding: 86px 0 100px;
}

.latest-section h2 {
    font-size: 30px;
    font-weight: 700;
    color: #242424;
    margin-bottom: 40px;
    text-align: center;
}

.latest-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    margin-bottom: 40px;
}

/* Feed and Messages Container */
.feed-and-messages-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
    align-items: flex-start;
}

.instagram-feed {
    min-width: 0;
}

.messages-sidebar {
    min-width: 0;
}

.messages-sidebar .btn {
    width: 100%;
    justify-content: center;
}

/* Messages Section */
.messages-section {
    background-color: #fff;
    padding: 40px 0;
}

.messages-section h2 {
    font-size: 30px;
    font-weight: 700;
    color: #242424;
    margin-bottom: 30px;
    text-align: center;
}

.message-card {
    border: 2px solid #f2efda;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}

.message-card a {
    display: block;
    color: inherit;
}

.message-thumbnail {
    position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background-color: rgba(0,0,0,0.1);
}

.message-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-button {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background-color: #f2efda;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-icon {
    width: 24px;
    height: 24px;
    fill: #333;
}

.message-info {
    padding: 30px 20px 20px;
    border-top: 2px solid rgba(0,0,0,0.1);
}

.message-info h3 {
    font-weight: 700;
    margin-bottom: 5px;
}

.message-info time {
    color: #606060;
    font-size: 12px;
    text-transform: uppercase;
}

/* Location Section */
.location-section {
    background-color: #f2ede8;
    padding: 76px 0;
    text-align: center;
}

.location-section h2 {
    font-size: 40px;
    font-weight: 900;
    color: #242424;
    margin-bottom: 30px;
}

.location-details {
    list-style: none;
    font-size: 20px;
    margin-bottom: 40px;
}

.location-details li {
    display: inline-block;
    margin: 0 8px;
}

.location-details a {
    color: #5a5a5a;
    display: inline-flex;
    align-items: center;
}

.location-details .icon {
    fill: #508fae;
}

.map-container {
    max-width: 1200px;
    margin: 0 auto;
}

.map-container iframe {
    width: 100%;
    height: 583px;
    border: none;
}

/* Welcome Section */
.welcome-section {
    background-color: #f2ede7;
    padding: 76px 20px;
}

.welcome-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-item {
    text-align: center;
    padding: 20px;
}

.welcome-item h2 {
    font-size: 30px;
    font-weight: 800;
    color: #242424;
    margin-bottom: 20px;
}

.welcome-item p {
    font-size: 18px;
    margin-bottom: 30px;
}

.welcome-item img {
    max-width: 530px;
    width: 100%;
    border-radius: 6px;
    margin: 0 auto;
}

/* MHV Section */
.mhv-section,
.jesus-section {
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.image-section {
    height: 400px;
    background-size: cover;
    background-position: center;
}

.content-section {
    background-color: #fff;
    padding: 60px 20px;
    display: flex;
    align-items: center;
}

.content-section h2 {
    font-size: 56px;
    font-weight: 900;
    color: #242424;
    margin-bottom: 30px;
}

.content-section p {
    font-size: 18px;
    margin-bottom: 30px;
}

.jesus-section .content-section {
    text-align: right;
}

/* Footer */
.site-footer {
    background-color: #242424;
    color: #fff;
}

.footer-main {
    padding: 56px 20px 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-branding h2 {
    font-size: 34px;
    font-weight: 500;
    margin-bottom: 20px;
}

.footer-branding strong {
    font-weight: 700;
}

.footer-branding p {
    margin-bottom: 20px;
    max-width: 315px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-column h3 {
    font-size: 20px;
    font-weight: 900;
    color: #c0c0c0;
    margin-bottom: 20px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 14px;
}

.footer-column a {
    color: #fff;
    font-weight: 700;
}

.footer-column a:hover {
    color: #508fae;
}

.footer-bottom {
    background-color: #131313;
    padding: 30px 20px;
    text-align: center;
}


/* Responsive Design */
@media (min-width: 768px) {
    .header-content {
        flex-direction: row;
    }

    .logo-section {
        flex-direction: row;
    }

    .latest-buttons {
        flex-direction: row;
        justify-content: center;
    }

    .welcome-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    /* Desktop dropdown adjustments */
    .has-submenu {
        display: flex;
        align-items: center;
    }
    
    .submenu {
        top: calc(100% + 10px);
        border-radius: 4px;
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    /* Hide hamburger on desktop */
    .hamburger-menu {
        display: none !important;
    }
    
    /* Hide mobile-only elements on desktop */
    .mobile-only {
        display: none !important;
    }

    /* Show navigation normally on desktop */
    .main-navigation {
        display: block !important;
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
        right: auto;
        transition: none;
    }

    .nav-menu {
        padding: 0;
        text-align: left;
        flex-direction: row;
        gap: 10px;
    }

    .nav-menu li {
        border-bottom: none;
        padding: 0.5rem 0.75rem;
        justify-content: flex-start;
    }

    .nav-menu a {
        font-size: 16px;
        justify-content: flex-start;
    }

    .hero-title {
        font-size: 86px;
    }

    .mhv-section,
    .jesus-section {
        flex-direction: row;
    }

    .image-section,
    .content-section {
        flex: 1;
    }

}

/* Mobile specific styles */
@media (max-width: 1023px) {
    /* Show hamburger menu on mobile/tablet */
    .hamburger-menu {
        display: flex;
    }
    
    /* Hide desktop-only elements on mobile */
    .desktop-only {
        display: none !important;
    }
    
    /* Show mobile-only elements */
    .mobile-only {
        display: block !important;
    }

    /* Mobile Navigation Overlay */
    .main-navigation {
        display: block;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background-color: #000;
        transition: right 0.3s ease;
        z-index: 999;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }

    .main-navigation.active {
        right: 0;
    }

    .nav-menu {
        padding: 60px 30px 30px;
        text-align: right;
        flex-direction: column;
        gap: 0;
        min-height: 100%;
        box-sizing: border-box;
    }

    .nav-menu li {
        justify-content: flex-end;
        padding: 15px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu a {
        font-size: 18px;
        font-weight: 500;
        transition: color 0.3s ease;
        justify-content: flex-end;
    }

    .nav-menu a:hover {
        color: #508fae;
    }

    /* Submenu adjustments for mobile */
    .has-submenu {
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        position: relative;
    }

    .submenu-toggle {
        position: relative;
        right: 0;
        top: 0;
        transform: none;
        margin-left: 8px;
    }

    .submenu {
        position: static;
        display: none;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.05);
        box-shadow: none;
        margin-top: 5px;
        border-radius: 0;
    }

    .has-submenu.active .submenu {
        display: block;
    }

    .submenu a {
        text-align: right;
        padding: 8px 20px 8px 0;
    }
}

@media (max-width: 767px) {

    .hero-title {
        font-size: 48px;
    }

    .content-section h2 {
        font-size: 36px;
    }

    .map-container iframe {
        height: 300px;
    }

    /* Stack feed and messages on mobile */
    .feed-and-messages-container {
        grid-template-columns: 1fr;
    }

    /* Center text in Who is Jesus section on mobile */
    .jesus-section .content-section {
        text-align: center;
    }
}