/**
 * Marthoma Church Theme - Header & Footer Styles
 * (Fallback styles when not using Elementor Theme Builder)
 *
 * @package MarthomaChurch
 */

/* =====================
   HEADER STYLES
   ===================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    max-width: var(--marthoma-container-width, 1140px);
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* Site Branding */
.site-branding {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-logo img {
    max-height: 60px;
    width: auto;
}

.site-title {
    font-family: var(--marthoma-font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--marthoma-primary, #000000);
    margin: 0;
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

.site-tagline {
    font-size: 12px;
    color: var(--marthoma-secondary, #54595F);
    margin: 0;
}

/* Navigation */
.site-navigation-wrapper {
    display: flex;
    align-items: center;
}

.site-navigation {
    display: flex;
    align-items: center;
}

.primary-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.primary-menu li {
    position: relative;
    margin: 0;
}

.primary-menu a {
    font-family: var(--marthoma-font-nav);
    font-weight: var(--marthoma-font-weight-nav, 500);
    font-size: 15px;
    color: var(--marthoma-primary, #000000);
    text-decoration: none;
    padding: 10px 0;
    display: block;
    transition: color 0.3s ease;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
    color: var(--marthoma-button, #375EFB);
}

/* Dropdown Menu */
.primary-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 15px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.primary-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.primary-menu .sub-menu a {
    padding: 10px 20px;
    font-size: 14px;
}

.primary-menu .sub-menu a:hover {
    background: var(--marthoma-light-gray, #F5F5F5);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--marthoma-primary, #000000);
    position: relative;
    transition: background 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--marthoma-primary, #000000);
    transition: all 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

.mobile-menu-toggle.active .hamburger {
    background: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.mobile-menu-toggle.active .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* =====================
   MENU POPUP SCROLL FIX
   ===================== */

#elementor-popup-modal-1307 .dialog-widget-content {
    max-height: 100vh !important;
    overflow-y: auto !important;
}

#elementor-popup-modal-1307 .dialog-message {
    height: auto !important;
    max-height: 100vh !important;
}

.elementor-1307 .elementor-element.elementor-element-5439a07c {
    --overflow: visible !important;
    --min-height: auto !important;
}

.elementor-1307 .elementor-element.elementor-element-29e7c211,
.elementor-1307 .elementor-element.elementor-element-3c472a50 {
    --overflow: visible !important;
}

/* =====================
   FOOTER STYLES
   ===================== */

.site-footer {
    background-color: var(--marthoma-dark-navy, #072538);
    color: #ffffff;
    padding: 60px 0 30px;
}

.footer-inner {
    max-width: var(--marthoma-container-width, 1140px);
    margin: 0 auto;
    padding: 0 15px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget {
    color: rgba(255, 255, 255, 0.8);
}

.footer-widget-title {
    font-family: var(--marthoma-font-heading);
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 20px;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.footer-widget a:hover {
    color: var(--marthoma-light-blue, #B7D8FB);
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 20px;
}

.footer-menu a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}

.footer-menu a:hover {
    color: #ffffff;
}

/* =====================
   RESPONSIVE STYLES
   ===================== */

@media (max-width: 1024px) {
    .primary-menu {
        gap: 20px;
    }

    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .site-navigation {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #ffffff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1000;
    }

    .site-navigation.active {
        opacity: 1;
        visibility: visible;
    }

    .primary-menu {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .primary-menu a {
        font-size: 20px;
    }

    .primary-menu .sub-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding: 10px 0;
    }

    body.menu-open {
        overflow: hidden;
    }

    /* Footer */
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-menu {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding: 10px 15px;
    }

    .site-logo img {
        max-height: 45px;
    }

    .site-title {
        font-size: 20px;
    }

    .site-footer {
        padding: 40px 0 20px;
    }

    .footer-widget-title {
        font-size: 16px;
    }
}
