/* ========================================== */
/* LAYOUT & STRUCTURE STYLES */
/* ========================================== */

/* ========================================== */
/* NAVBAR */
/* ========================================== */

.navbar {
    background: rgba(15, 23, 42, 0.92) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-lg);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1050;
}

.navbar-brand {
    letter-spacing: -0.3px;
    text-shadow: none;
    color: #fff !important;
    font-weight: var(--font-weight-bold);
    font-size: 1.4rem;
}

.nav-link {
    color: #e2e8f0 !important;
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    padding: 0.55rem 0.95rem !important;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.nav-link:hover,
.nav-link:focus {
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
    transform: translateY(-1px);
}

.nav-utility .nav-link,
.nav-utility .dropdown-toggle {
    padding: 0.45rem 0.75rem !important;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.06);
    margin-right: 0.5rem;
}

.nav-utility .nav-link:hover,
.nav-utility .dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}

.nav-utility .dropdown-toggle::after {
    display: none;
}

.user-chip {
    padding: 0.45rem 0.75rem !important;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #e2e8f0 !important;
    font-weight: var(--font-weight-bold);
}

.user-chip:hover,
.user-chip:focus {
    background: rgba(255, 255, 255, 0.12);
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.16);
}

.nav-utility .dropdown-menu {
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
}

.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 0.35rem 0.55rem;
    border-radius: 10px;
}

.navbar .dropdown-menu {
    top: calc(100% + 0.4rem);
    z-index: 1200;
    box-shadow: var(--shadow-lg);
}

/* Logo Styles */
.navbar-brand-logo {
    height: 50px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    padding: 4px 8px;
    background-color: white;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.navbar-brand-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
}

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

footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    margin-top: 4rem;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
}

.site-footer {
    background: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

.footer-brand {
    font-size: 1.75rem;
    font-weight: var(--font-weight-bold);
    color: #fff;
    letter-spacing: -0.5px;
}

.footer-tagline {
    font-size: 0.95rem;
    color: #94a3b8;
}

.footer-heading {
    font-size: 1rem;
    font-weight: var(--font-weight-bold);
    color: #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.footer-links li {
    margin-bottom: 0.65rem;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: var(--font-weight-semibold);
}

.footer-links a:hover {
    color: #fff;
    padding-left: 4px;
}

.social-icons a {
    color: #cbd5e1;
    font-size: 1.2rem;
    margin-right: 0.85rem;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.social-icons a:hover {
    color: var(--secondary-color);
    transform: translateY(-2px);
}

.footer-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
    background-color: rgba(255, 255, 255, 0.05);
    padding: 8px;
    transition: all var(--transition-normal);
}

.footer-logo:hover {
    background-color: rgba(255, 255, 255, 0.08);
    transform: rotate(-5deg) scale(1.05);
}

/* ========================================== */
/* PAGE HEADERS */
/* ========================================== */

.page-header {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 1.75rem 1.75rem;
    margin-bottom: var(--spacing-xl);
}

.page-header h1, .page-header h2 {
    color: var(--dark-color);
    font-weight: var(--font-weight-bold);
    margin: 0;
}

.forum-hero {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    padding: 1.75rem;
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    align-items: center;
}

.forum-hero h1 {
    margin: 0;
    font-weight: var(--font-weight-extrabold);
}

.forum-hero .hero-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ========================================== */
/* FORUM LAYOUT */
/* ========================================== */

.category-section {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
}

.category-header {
    background: linear-gradient(90deg, rgba(31, 59, 115, 0.08) 0%, rgba(14, 165, 233, 0.07) 100%);
    color: var(--dark-color);
    padding: 1.25rem 1.5rem;
    font-size: 1.35rem;
    font-weight: var(--font-weight-bold);
}

.category-description {
    color: #475569;
    font-size: 0.95rem;
    margin-top: 0.35rem;
}

.subforum-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    margin: 12px 16px;
    padding: 1.25rem 1.5rem;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.subforum-item:hover {
    background: #f8fafc;
    border-color: transparent;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.subforum-meta {
    gap: 1.25rem;
    color: var(--muted-color);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.subforum-title {
    color: var(--dark-color);
    font-size: 1.1rem;
}

.subforum-title:hover {
    color: var(--primary-color);
}

/* ========================================== */
/* TOPIC LAYOUT */
/* ========================================== */

.topic-table {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.topic-row {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
    transition: all 0.25s ease;
    border-left: 4px solid transparent;
}

.topic-row:hover {
    background: #f8fafc;
    transform: translateY(-1px);
    border-left-color: var(--primary-color);
}

.topic-title {
    color: var(--dark-color);
    font-size: 1.05rem;
}

.topic-meta {
    color: var(--muted-color);
    gap: 1.25rem;
    flex-wrap: wrap;
}

/* ========================================== */
/* AUTH LAYOUT */
/* ========================================== */

.auth-layout {
    max-width: 520px;
    margin: 0 auto;
}

/* ========================================== */
/* ADVERTISEMENT LAYOUT */
/* ========================================== */

.ad-container {
    margin: 1.5rem 0;
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.ad-container:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.ad-link {
    display: block;
    text-decoration: none;
}

.ad-image {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.ad-label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Ad Position-specific styles */
.ad-header {
    margin-bottom: var(--spacing-xl);
}

.ad-sidebar_top,
.ad-sidebar_bottom {
    margin: var(--spacing-md) 0;
}

.ad-content_top {
    margin-bottom: var(--spacing-xl);
}

.ad-content_bottom {
    margin-top: var(--spacing-xl);
}

.ad-footer {
    margin: var(--spacing-xl) 0;
}

.ad-between_posts {
    margin: var(--spacing-xl) 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

/* ========================================== */
/* RESPONSIVE LAYOUT */
/* ========================================== */

@media (max-width: 576px) {
    .navbar-brand-logo {
        height: 40px;
        max-width: 140px;
    }

    .footer-logo {
        width: 50px;
        height: 50px;
    }

    .forum-hero {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        justify-content: flex-start;
    }
}
