/* Header and footer styles without Tailwind dependency */
.app-site-header {
    position: relative;
    z-index: 50;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.app-site-header-container,
.app-search-form-wrap,
.app-site-footer-container {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.app-site-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 64px;
    position: relative;
}

.app-site-branding {
    display: flex;
    align-items: center;
    flex: 1;
}

.app-site-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
}

.app-site-brand-link img {
    max-height: 42px;
    width: auto;
}

.app-desktop-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-menu,
.main-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: #374151;
    font-weight: 500;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.main-menu a:hover {
    background: #eff6ff;
    color: #2563eb;
}

/* Reset default button styles for submenu arrows */
.submenu-toggle {
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0 0 0 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 999px;
    color: #6b7280;
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.submenu-toggle:hover,
.submenu-toggle:focus-visible {
    background: #e5edff;
    color: #1d4ed8;
    outline: none;
}

.submenu-toggle svg {
    width: 1rem;
    height: 1rem;
    transition: transform 0.3s ease;
}

.app-header-icon-btn {
    border: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: #4b5563;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.app-header-icon-btn:hover {
    background: #eff6ff;
    color: #2563eb;
}

.app-header-search-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.app-header-search-icon-mobile {
    width: 1.75rem;
    height: 1.75rem;
}

.app-header-menu-toggle {
    margin-left: -8px;
}

.app-search-toggle-mobile {
    margin-right: -8px;
}

.hamburger {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    border-radius: 999px;
    background: #374151;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

#search-form-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#search-form-container.open {
    max-height: 200px;
    border-top: 1px solid #e5e7eb;
}

.app-search-form-container {
    background: #f9fafb;
}

.app-search-form-wrap {
    padding: 16px 0;
}

.app-search-form-row {
    display: flex;
    gap: 8px;
}

.app-search-input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.95rem;
    color: #111827;
    background: #ffffff;
}

.app-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.app-search-submit {
    border: 0;
    border-radius: 10px;
    padding: 10px 24px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.app-search-submit:hover {
    background: #1d4ed8;
}

.app-above-footer {
    background: #f9fafb;
    padding: 48px 0;
}

.app-above-footer-container {
    width: min(960px, calc(100% - 32px));
    margin: 0 auto;
}

.app-above-footer-widgets {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    font-size: 0.92rem;
}

.app-site-footer {
    background: #111827;
    color: #ffffff;
    margin-top: 48px;
    padding: 32px 0;
}

.app-site-footer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
}

.app-site-footer-title {
    margin: 0 0 8px;
    font-size: 1.125rem;
    font-weight: 700;
}

.app-site-footer-copy {
    margin: 0;
    color: #9ca3af;
}

.app-site-footer-links-title {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 600;
}

.footer-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-menu-list a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-menu-list a:hover {
    color: #ffffff;
}

@media (max-width: 1023px) {
    .desktop-nav {
        display: none !important;
    }

    #menu-toggle,
    #search-toggle-mobile {
        display: inline-flex !important;
        z-index: 2;
    }

    #mainNav {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    #mainNav.open {
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
    }

    .main-menu {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }

    .main-menu > li {
        background: #f9fafb;
        border-radius: 0.5rem;
        overflow: hidden;
    }

    .main-menu > li > a {
        justify-content: space-between;
    }

    .main-menu .sub-menu {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding-left: 1.5rem;
        margin: 0;
    }

    .main-menu li.submenu-open > .sub-menu {
        max-height: 500px;
        padding-bottom: 0.5rem;
    }

    .main-menu .sub-menu li {
        margin-top: 0.25rem;
    }

    .main-menu .sub-menu a {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .submenu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2rem;
        height: 2rem;
        border: none;
        background: transparent;
        color: #6b7280;
        cursor: pointer;
        transition: transform 0.3s ease;
    }

    .submenu-toggle svg {
        width: 1.25rem;
        height: 1.25rem;
        transition: transform 0.3s ease;
    }

    .submenu-open > a > .submenu-toggle svg {
        transform: rotate(180deg);
    }

    .site-branding {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
    }

    .site-branding a {
        pointer-events: auto;
    }

    .app-site-footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1024px) {
    #menu-toggle,
    #search-toggle-mobile,
    #mainNav {
        display: none !important;
    }

    .desktop-nav {
        display: flex !important;
    }

    .main-menu {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.25rem;
    }

    .main-menu > li {
        position: relative;
    }

    .main-menu .sub-menu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 14rem;
        padding: 0.5rem;
        margin-top: 0.5rem;
        background: #ffffff;
        border: 1px solid #e5e7eb;
        border-radius: 0.75rem;
        box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.2s ease;
        z-index: 1000;
    }

    .main-menu li:hover > .sub-menu,
    .main-menu li:focus-within > .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .submenu-toggle {
        display: inline-flex;
        align-items: center;
        margin-left: 0.25rem;
    }

    .submenu-toggle svg {
        width: 1rem;
        height: 1rem;
    }
}

@media (max-width: 640px) {
    .app-site-header-bar {
        min-height: 54px;
    }

    .app-header-icon-btn {
        padding: 6px;
    }

    .hamburger {
        width: 2rem;
        height: 2rem;
    }

    .app-site-brand-link {
        font-size: 1.05rem;
    }

    .app-site-header-container,
    .app-search-form-wrap,
    .app-site-footer-container,
    .app-above-footer-container {
        width: min(1280px, calc(100% - 22px));
    }

    .app-search-form-row {
        flex-direction: column;
    }

    .app-search-submit {
        width: 100%;
    }
}
