/* =================================================_
Golden Gates Journal - Common Blog CSS
================================================= */
:root {
    --primary: #e6dbc1;
    --primary-dark: #b8962f;
    --black: #1a1a1a;
    --gray: #6c757d;
    --light-gray: #f4f6f8;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--black);
    background: var(--light-gray);
    line-height: 1.7;
}

h1, h2, h3, h4, h5 {
    font-family: 'El Messiri', sans-serif;
    font-weight: 600;
    color: var(--black);
}

a { text-decoration: none; color: inherit; }

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Blog Header Logo & Search Minimal */
.blog-header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    margin-bottom: 30px;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-logo {
    font-size: 26px;
    font-weight: 700;
    font-family: 'El Messiri', sans-serif;
    color: var(--black);
    text-decoration: none;
}

.blog-logo span { color: var(--primary-dark); }

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
    font-weight: 600;
    font-size: 14px;
}

.nav-links a:hover { color: var(--primary-dark); }

/* Common Layouts & Grid */
.content-sidebar-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 35px;
    margin-bottom: 60px;
}

/* Common Article Card */
.article-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.article-img {
    height: 190px;
    overflow: hidden;
    position: relative;
}

.article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .article-img img {
    transform: scale(1.05);
}

.article-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.category-tag {
    display: inline-block;
    background: var(--primary-dark);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    margin-bottom: 8px;
    align-self: flex-start;
}

.article-body h3 {
    font-size: 17px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-body h3 a {
    color: var(--black);
    text-decoration: none;
    transition: var(--transition);
}

.article-body h3 a:hover { color: var(--primary-dark); }

.article-excerpt {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 15px;
    flex: 1;
}

.article-meta {
    font-size: 12px;
    color: var(--gray);
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

/* Common Sidebar Widgets */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.widget {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================
   STICKY TOPICS CHIPS BAR
========================================== */
.topics-bar {
    position: sticky;
    top: 90px;
    z-index: 990;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,.05);
    padding: 10px 0;
}

.topics-bar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chips-label {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gray);
}

.chips-label i {
    color: var(--primary-dark);
    font-size: 14px;
}

.chips-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 2px;
}

.chips-scroll::-webkit-scrollbar { display: none; }

.topic-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 5px 12px 5px 5px;
    font-size: 13px;
    font-weight: 700;
    color: var(--black);
    text-decoration: none;
    transition: all .25s ease;
}

.topic-chip img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.topic-chip .chip-count {
    background: var(--light-gray);
    color: var(--gray);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    transition: all .25s ease;
}

.topic-chip:hover {
    border-color: var(--primary-dark);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0,0,0,.08);
}

.topic-chip:hover .chip-count {
    background: var(--primary-dark);
    color: #fff;
}

/* ==========================================
   SIDEBAR TOPICS LEADERBOARD
========================================== */
.topics-leaderboard {
    list-style: none;
    margin: 0;
    padding: 0;
}

.topic-row {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.topic-row:last-child {
    border-bottom: none;
    padding-bottom: 4px;
}

.topic-main-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rank-badge {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--light-gray);
    color: var(--gray);
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rank-1 { background: linear-gradient(135deg, #f6d365, #b8962f); color: #fff; box-shadow: 0 3px 8px rgba(184,150,47,.35); }
.rank-2 { background: linear-gradient(135deg, #cfd8dc, #90a4ae); color: #fff; }
.rank-3 { background: linear-gradient(135deg, #d7a86e, #a0714f); color: #fff; }

.topic-link {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: var(--black);
}

.topic-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    transition: transform .3s ease;
    flex-shrink: 0;
}

.topic-link:hover .topic-thumb {
    transform: scale(1.1) rotate(-2deg);
}

.topic-name {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .2s;
}

.topic-link:hover .topic-name { color: var(--primary-dark); }

.topics-leaderboard .count {
    background: var(--light-gray);
    color: var(--gray);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    flex-shrink: 0;
}

.topics-leaderboard .toggle-sub-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray);
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .25s;
    flex-shrink: 0;
}

.topics-leaderboard .toggle-sub-btn:hover {
    background: var(--light-gray);
    color: var(--primary-dark);
}

.topics-leaderboard .toggle-sub-btn i {
    transition: transform .3s ease;
    font-size: 12px;
}

.topics-leaderboard .toggle-sub-btn.active i {
    transform: rotate(180deg);
}

/* Sub topics smooth accordion */
.sub-topics-wrap {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .35s ease;
}

.sub-topics-wrap.open {
    grid-template-rows: 1fr;
}

.sub-topics-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    min-height: 0;
}

.sub-topics-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 0 8px 14px;
    margin: 6px 0 0 13px;
    border-left: 2px solid var(--border-color);
    font-size: 13px;
    color: var(--gray);
    text-decoration: none;
    transition: all .2s;
}

.sub-topics-list li a:hover {
    color: var(--primary-dark);
    border-left-color: var(--primary-dark);
    padding-left: 18px;
}

.sub-topics-list li a i {
    font-size: 10px;
    color: var(--primary-dark);
    margin-right: 5px;
}

.sub-topics-list li a .count {
    background: var(--light-gray);
    color: var(--gray);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

/* ==========================================
   OLD TOPICS LIST (kept for compatibility)
========================================== */
.topics-list { list-style: none; }

.topics-list li {
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
}

.topics-list li:last-child { border-bottom: none; }

.topics-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--black);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.topics-list a:hover {
    color: var(--primary-dark);
    padding-left: 5px;
}

.topics-list span.count {
    background: var(--light-gray);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    color: var(--gray);
}

/* ==========================================
   RESPONSIVE
========================================== */
@media (max-width: 1024px) {
    .content-sidebar-grid { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .topics-bar { top: 98px; }
    .chips-label span { display: none; }
}

