/* Gotham font local setup */
@font-face {
    font-family: 'Gotham';
    src: url('/fonts/gotham/Gotham-Book.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Gotham';
    src: url('/fonts/gotham/Gotham-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}

/* Global reset */
* {
    box-sizing: border-box;
    max-width: 100vw;
    overflow-x: hidden;
}
html, body {
    margin: 0;
    padding: 0;
    max-width: 100vw;
    overflow-x: hidden;
    font-family: 'Gotham', Arial, sans-serif;
}
body {
    position: relative;
    z-index: 0;
}
.container {
    max-width: 1280px;
    margin: 0 auto;
}
main {
    z-index: -1;
    position: relative;
}

/* Utility classes */
.bg-white { background-color: #ffffff; }
.mx-auto { margin-left: auto; margin-right: auto; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.font-sans { font-family: 'Gotham', Arial, sans-serif; }
.font-normal { font-weight: 400; }
.text-gray-600 { color: #4B5563; }
.text-gray-800 { color: #1F2937; }
.hover\:text-blue-600:hover { color: #2563EB; }
.h-4 { height: 1.4375rem; }

/* Header styles */
header {
    position: relative;
    z-index: 5000;
}
.nav-menu {
    display: flex;
    align-items: center;
    flex-grow: 1;
    gap: 1rem;
    max-width: 100%;
}
.main-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-grow: 1;
    max-width: 100%;
}
.main-menu a {
    text-decoration: none;
    padding: 0.375rem 0;
    line-height: 1.4375rem;
    font-size: 14px;
}
.right-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}
.apps-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    margin-top: 8px;
    right: 1rem;
    width: auto;
    min-width: 360px;
    max-width: 400px;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    z-index: 10000;
    padding: 1rem;
    overflow-x: hidden;
    max-height: 480px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.desktop-apps-dropdown:hover .apps-dropdown-menu,
.desktop-apps-dropdown.active .apps-dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
.apps-dropdown-content {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    max-height: 432px;
    overflow-y: auto;
    box-sizing: border-box;
    max-width: 100%;
}
.app-item {
    flex: 0 0 calc(33.33% - 0.67rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
    padding: 0.5rem;
    text-decoration: none;
    color: #4B5563;
    box-sizing: border-box;
}
.app-item:hover { color: #2563EB; }
.app-item img {
    width: 37px;
    height: 37px;
    object-fit: contain;
}
.app-item span { font-size: 0.875rem; }
.apps-divider {
    border: none;
    border-top: 1px solid #E5E7EB;
    margin: 0.5rem 0;
}
.explore-all {
    font-size: 0.875rem;
    color: #2563EB;
    text-decoration: none;
}
.explore-all:hover { text-decoration: underline; }
.apps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.apps-header h4 {
    font-size: 1rem;
    margin: 0;
}
.sign-in-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4B5563;
    text-decoration: none;
    font-size: 14px;
}
.sign-in-link:hover { color: #2563EB; }
.sign-in-link i { font-size: 1.25rem; }
.apps-toggle {
    display: flex;
    align-items: center;
    z-index: 15000;
    cursor: pointer;
    user-select: none;
}
.apps-toggle i {
    font-size: 1rem;
    vertical-align: middle;
}
.hamburger {
    display: none;
    font-size: 1.5rem;
    color: #4B5563;
    z-index: 15000;
    cursor: pointer;
    user-select: none;
}
@media (min-width: 769px) {
    .mobile-apps-dropdown { display: none; }
    .desktop-apps-dropdown {
        order: -1;
    }
}
@media (max-width: 768px) {
    .hamburger {
        display: block;
        margin-left: 1rem;
        line-height: 1.4375rem;
    }
    .desktop-apps-dropdown { display: none; }
    .mobile-apps-dropdown { display: block; }
    .mobile-apps-dropdown .apps-toggle {
        position: fixed;
        right: 3rem;
        top: 1.5rem;
        z-index: 15000;
        cursor: pointer;
    }
    .mobile-apps-dropdown .apps-toggle i {
        font-size: 1.1rem;
        vertical-align: middle;
    }
    .mobile-apps-dropdown.active .apps-dropdown-menu {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }
    .apps-dropdown-menu {
        position: fixed;
        top: 4rem;
        left: 1rem;
        right: 1rem;
        width: calc(100% - 2rem);
        min-width: auto;
        max-width: 100vw;
        z-index: 10000;
        max-height: 360px;
        overflow-y: auto;
    }
    .nav-menu {
        flex-direction: column;
        position: fixed;
        top: 4rem;
        left: 1rem;
        right: 1rem;
        width: calc(100% - 2rem);
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
        background: white;
        padding: 1rem;
        display: none;
        z-index: 5100;
    }
    .nav-menu.active { display: flex; }
    .main-menu {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0.5rem;
    }
    .right-menu {
        flex-direction: column;
        align-items: flex-start;
        margin-left: 0;
        width: 100%;
    }
    .apps-dropdown-content {
        flex-direction: column;
        max-height: 312px;
        overflow-y: auto;
    }
    .app-item {
        flex: 0 0 100%;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .app-item img {
        width: 32px;
        height: 32px;
    }
    .sign-in-link { font-size: 13px; }
    .sign-in-link i { font-size: 1.1rem; }
    .main-menu a, .sign-in-link {
        padding: 0.375rem 0;
        line-height: 1.5;
        font-size: 13px;
    }
}