/* ----------------------------------------------------------------------
 * 1. CORE WRAPPERS: HEADER & FOOTER
 * ---------------------------------------------------------------------- */
.site-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.primary-nav {
    display: none; /* Controlled via app.js state rules on mobile screens */
}

@media (min-width: 768px) {
    .primary-nav {
        display: flex;
        align-items: center;
        gap: 2rem;
    }
    .nav-list {
        display: flex;
        list-style: none;
        gap: 1.5rem;
    }
    .nav-list a {
        font-weight: 500;
        color: var(--text-muted);
    }
    .nav-list a:hover {
        color: var(--primary-color);
    }
}

.site-main {
    flex: 1;
    padding: 2rem 0;
}

.site-footer {
    background-color: #1f2937;
    color: #e5e7eb;
    padding: 3rem 0 1.5rem 0;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-col p {
    color: #9ca3af;
    font-size: 0.925rem;
    margin-top: 1rem;
}

.footer-heading {
    font-size: 1.1rem;
    color: #ffffff;
    margin-bottom: 1.25rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: #9ca3af;
}

.footer-col ul li a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #9ca3af;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ----------------------------------------------------------------------
 * 2. CRITICAL ANTI-CLS ADSENSE SYSTEM LAYER BOUNDING BOXES
 * ---------------------------------------------------------------------- */
.ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f3f4f6;
    border: 1px solid var(--border-color);
    margin: 1.5rem auto;
    overflow: hidden;
    position: relative;
}

.ad-container::before {
    content: "Advertisement";
    position: absolute;
    top: 2px;
    left: 5px;
    font-size: 0.65rem;
    color: #9ca3af;
    text-transform: uppercase;
}

/* Explicit size limits mapping to target slots */
.ad-top-banner, .ad-list-top, .ad-above-meaning {
    min-height: 90px;
    max-height: 280px;
    width: 100%;
}

.ad-sidebar-block, .ad-sidebar-sticky {
    min-height: 250px;
    min-width: 300px;
}

/* ----------------------------------------------------------------------
 * 3. REUSABLE COMPONENTS LAYOUT SYSTEM
 * ---------------------------------------------------------------------- */
/* Breadcrumb UI trail styling */
.breadcrumb-nav {
    margin-bottom: 1.5rem;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    font-size: 0.875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding: 0 0.5rem;
    color: var(--text-muted);
}

.breadcrumb-item.active {
    color: var(--text-muted);
    font-weight: 500;
}

/* Dual Axis Responsive Split Container (Main Area vs Sticky Aside) */
.grid-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .grid-sidebar {
        grid-template-columns: 2.5fr 1fr;
    }
    .sidebar-sticky-element {
        position: sticky;
        top: 90px; /* Aligns comfortably below sticky main header */
    }
}

/* Structured profile info tables mapping name pages data values */
.profile-data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.profile-data-table th, .profile-data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.profile-data-table th {
    font-weight: 600;
    color: var(--text-muted);
    width: 35%;
}