/* ==========================================================================
   2. TOP NAVIGATION BAR SYSTEM
   ========================================================================== */
.main-header {
    width: 100%;
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-right { margin-left: auto; }

.nav-links {
    display: flex;
    gap: 1rem;
    list-style: none;
    align-items: center;
}

.nav-links li a {
    display: inline-block;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: background-color 0.15s, color 0.15s;
}

.nav-links li a:hover {
    background-color: #1e1f20;
    color: var(--text-primary);
}

.nav-links li a.active {
    color: var(--google-link-blue);
    background-color: rgba(138, 180, 248, 0.12);
    font-weight: 700;
}

/* ==========================================================================
   3. SHARED POST FOOTER TAGS AREA
   ========================================================================== */
.post-footer-tags-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-top: 3.5rem;
}

.btn-prev-post, .btn-next-post {
    flex: 1;
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.15s ease;
    gap: 0.15rem;
}

.btn-prev-post { justify-content: flex-start; }
.btn-next-post { justify-content: flex-end; }

.btn-prev-post:hover,
.btn-next-post:hover {
    color: var(--google-link-blue);
}

.posted-in-labels {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0 1.5rem;
}

.label-prefix {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-date);
}

.footer-tag-link {
    text-decoration: none;
    font-size: 0.75rem;
    color: var(--google-link-blue);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    background-color: #121212;
}

.footer-tag-link:hover { background-color: #1e1f20; }

/* ==========================================================================
   5. FEATURED HERO CONTAINER
   ========================================================================== */
.featured-clickable-wrapper { text-decoration: none; color: inherit; }

.featured-image-holder {
    width: 100%;
    height: 340px;
    background-color: var(--surface-card-inner);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color);
}

.featured-image-holder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-tags {
    font-size: 0.75rem;
    color: var(--google-link-blue);
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.featured-article-title {
    font-size: 1.6rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.featured-article-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* CAROUSEL ARROWS */
.carousel-arrow-next, .carousel-arrow-prev {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    background-color: #303134;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
    z-index: 10;
}

.carousel-arrow-next { right: -18px; }
.carousel-arrow-prev { left: -18px; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1.5rem;
}

.carousel-dots .dot {
    width: 7px;
    height: 7px;
    background-color: #5f6368;
    border-radius: 50%;
}

.carousel-dots .dot.active { background-color: #ffffff; }

/* ==========================================================================
   6. LATEST CONTAINER
   ========================================================================== */
.latest-blog-item {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
}

.latest-item-date {
    font-size: 0.7rem;
    color: var(--text-date);
    font-weight: 500;
    display: block;
    margin-bottom: 0.4rem;
}

.latest-item-title a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 500;
}

.latest-item-title a:hover { color: var(--google-link-blue); }

.latest-item-excerpt {
    font-size: 0.85rem;
    color: var(--text-date);
    margin-top: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.latest-box-footer-search { margin-top: 1.5rem; }

.box-search-form {
    display: flex;
    align-items: center;
    background-color: #303134;
    border-radius: 4px;
    padding: 0.25rem 0.75rem;
}

.box-input-wrapper {
    display: flex;
    align-items: center;
    flex-grow: 1;
    gap: 0.5rem;
}

.search-icon-placeholder {
    color: #9aa0a6;
    font-size: 0.85rem;
}

.box-search-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    width: 100%;
    padding: 0.4rem 0;
}

.btn-box-search {
    background: transparent;
    border: none;
    color: var(--google-link-blue);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
}

/* ==========================================================================
   7. TOPICS CAROUSEL
   ========================================================================== */
.topics-feed-system {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

.topic-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    align-items: start;
    gap: 2rem;
}

.topic-sidebar {
    position: sticky;
    top: 90px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.topic-sidebar-title {
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.btn-see-posts {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--google-link-blue);
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.45rem 0.9rem;
    border-radius: 4px;
}

.btn-see-posts:hover {
    background-color: rgba(138, 180, 248, 0.08);
}

.topic-carousel-container {
    position: relative;
    width: 100%;
}

.topic-grid-clip {
    overflow: hidden;
    width: 100%;
}

.topic-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    width: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.topic-card {
    flex: 0 0 calc((100% - 40px) / 3);
    box-sizing: border-box;
}

.topic-card-title a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.7rem;
    margin-bottom: 0.5rem;
}

.topic-card-title a:hover { color: var(--google-link-blue); }

.topic-card-image {
    width: 100%;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: var(--surface-card);
}

.topic-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.topic-row-prev, .topic-row-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(32, 33, 36, 0.9);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    z-index: 10;
}

.topic-row-prev:hover,
.topic-row-next:hover {
    background-color: #303134;
}

.topic-row-prev { left: -18px; }
.topic-row-next { right: -18px; }

.topic-row-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1.5rem;
}

.topic-row-dots .sub-dot {
    width: 7px;
    height: 7px;
    background-color: #5f6368;
    border-radius: 50%;
}

.topic-row-dots .sub-dot.active { background-color: #ffffff; }

/* ==========================================================================
   8. PAGINATION
   ========================================================================== */
.chapterPagination {
    margin: 2.5rem 0;
    padding: 1.5rem;
    background-color: var(--surface-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.paginationLabel {
    display: block;
    font-size: 0.8rem;
    color: var(--text-date);
    margin-bottom: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pageNumbersContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.pageNumber {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background-color: #121212;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.pageNumber:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.pageNumber.activePage {
    background-color: rgba(138, 180, 248, 0.15);
    color: var(--google-link-blue);
    border-color: var(--google-link-blue);
    font-weight: 700;
}

.pageNumbersContainer::-webkit-scrollbar {
    width: 6px;
}

.pageNumbersContainer::-webkit-scrollbar-track {
    background: #121212;
    border-radius: 4px;
}

.pageNumbersContainer::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.pageNumbersContainer::-webkit-scrollbar-thumb:hover {
    background: #5f6368;
}

/* ==========================================================================
   9. INLINE CALLOUT IMAGE
   ========================================================================== */
.inline-image-callout {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 2.5rem 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    overflow: visible !important;
}

.inline-image-callout img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    display: block !important;
}
