/* --- 1. Base Styles & Scroll Behavior --- */
html {
    scroll-behavior: smooth;
}

body {
    background-color: #121212;
    color: white;
    font-family: sans-serif;
    margin: 0;
    line-height: 1.5;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

/* --- 2. Navigation Bar --- */
.navbar-sticky {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    height: 80px;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    text-decoration: none;
    color: white;
    user-select: none;
}

.nav-right-group {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-item {
    font-size: 0.875rem;
    font-weight: 600;
    color: #9ca3af;
    transition: all 0.2s;
    text-decoration: none;
    padding: 0.5rem 0;
}

.nav-item:hover,
.nav-item.active {
    color: white;
}

.nav-item.active {
    border-bottom: 2px solid #9d66e5;
}

.request-btn {
    background-color: #9d66e5;
    color: white;
    padding: 0.625rem 1.75rem;
    border-radius: 9999px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px 0 rgba(157, 102, 229, 0.3);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.request-btn:hover {
    background-color: #8a55d4;
    transform: translateY(-1px);
}

/* --- 3. Main Layout (Edge-to-Edge Flex Logic) --- */
.layout-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
}

@media (min-width: 1280px) {
    .layout-grid {
        flex-direction: row;
        justify-content: center;
    }
}

.sidebar-left,
.sidebar-right {
    display: none;
    flex: 1;
    /* These push the main content to the center */
    padding: 1rem;
    box-sizing: border-box;
}

@media (min-width: 1280px) {

    .sidebar-left,
    .sidebar-right {
        display: flex;
    }
}

.sidebar-left {
    justify-content: flex-start;
}

.sidebar-right {
    justify-content: flex-end;
    gap: 1.5rem;
}

.main-content {
    width: 100%;
    max-width: 850px;
    flex-shrink: 0;
    padding: 3rem 0;
    text-align: center;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sticky-element {
    position: sticky;
    top: 100px;
    height: fit-content;
}

/* --- 4. Sidebar Controls (Alphabet & Filter) --- */
.sidebar-controls-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.filter-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.filter-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: #4b5563;
    letter-spacing: 0.05em;
}

.category-select {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    font-size: 12px;
    font-weight: 600;
    padding: 0.5rem;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
}

.alphabet-nav {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    padding: 0.75rem 0.5rem;
    display: flex;
    width: 30px;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    scrollbar-width: none;
}

.alphabet-nav::-webkit-scrollbar {
    display: none;
}

.alpha-link {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.alpha-link:hover,
.alpha-link.active {
    color: white;
}

.alpha-link.active {
    background-color: #9d66e5;
}

/* --- 5. Ad Banners (Wrappers included) --- */
.sidebar-ad-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Pins the ad inside to the far right */
}

.ad-banner,
.ad-banner-small {
    background-color: #d1d1d1;
    width: 160px;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    font-weight: 800;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-ad-wrapper {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
    padding: 4rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 400px;
}

.bottom-billboard {
    width: 100%;
    max-width: 970px;
    height: 250px;
    background-color: #d1d1d1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

/* --- 6. Content Sections --- */
.calc-section {
    scroll-margin-top: 120px;
    margin-bottom: 8rem;
}

.section-title {
    font-size: 3.75rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 16px;
    text-decoration-thickness: 4px;
}

.link-group {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.calc-link {
    font-size: 1.25rem;
    color: #9ca3af;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: #1f2937;
    transition: color 0.2s;
}

.calc-link:hover {
    color: white;
}

/* --- 7. Footer --- */
.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4rem 0;
    text-align: center;
}

/* Utilities for filtering */
.hidden-section,
.calc-link.hidden-link {
    display: none !important;
}