/* ================================================================
   POPEYE THEME — PROFESSIONAL EDITION
   Synced with LicenseShield / TradebyBots brand palette
   Gold: #D4AF37 | Dark BG: #1A110A | Neutral: #495057
   ================================================================ */

/* ---------- GOOGLE FONTS ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ---------- CSS VARIABLES ---------- */
:root {
    --color-gold:        #D4AF37;
    --color-gold-light:  #e8c84a;
    --color-gold-dark:   #9B7D23;
    --color-dark:        #111111;
    --color-dark-2:      #1A110A;
    --color-dark-3:      #1C1C1E;
    --color-text:        #2d2d2d;
    --color-muted:       #6c757d;
    --color-link:        #0a58ca;
    --border-radius-sm:  6px;
    --border-radius:     12px;
    --border-radius-lg:  20px;
    --shadow-sm:         0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow:            0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:         0 10px 40px rgba(0,0,0,.14);
    --transition:        all .22s cubic-bezier(.4,0,.2,1);
}

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', 'Open Sans', sans-serif;
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.7;
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { color: var(--color-gold-dark); }

img { max-width: 100%; height: auto; }

/* ---------- READING PROGRESS BAR ---------- */
#reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-gold-dark), var(--color-gold), var(--color-gold-light));
    z-index: 9999;
    transition: width .1s linear;
    border-radius: 0 3px 3px 0;
}

/* ---------- NAVBAR ---------- */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,.06);
    padding: .75rem 0;
    box-shadow: var(--shadow-sm);
}
.navbar-brand {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -.02em;
    color: var(--color-text) !important;
}
.navbar-brand:hover { color: var(--color-gold-dark) !important; }

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--color-text);
    cursor: pointer;
    padding: 0;
}
.nav-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem 1rem;
    margin: 0;
    padding: 0;
}
.nav-links a {
    color: var(--color-muted);
    font-size: .9rem;
    font-weight: 500;
    padding: .25rem .5rem;
    border-radius: var(--border-radius-sm);
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--color-gold-dark);
    background: rgba(212,175,55,.08);
}
.nav-links .btn-home {
    background: var(--color-gold);
    color: #000 !important;
    font-weight: 700;
    padding: .3rem .85rem;
    border-radius: 999px;
    font-size: .82rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
.nav-links .btn-home:hover {
    background: var(--color-gold-dark);
    color: #fff !important;
}

/* ---------- HERO HEADER (Home page) ---------- */
.blog-hero {
    background: linear-gradient(135deg, #fffbee 0%, #f9f3dc 100%);
    border-bottom: 2px solid rgba(212,175,55,.25);
    padding: 3.5rem 0 2.5rem;
    text-align: center;
}
.blog-hero .site-logo img {
    box-shadow: 0 4px 20px rgba(212,175,55,.3);
    border: 3px solid var(--color-gold) !important;
    border-radius: 50%;
}
.blog-hero .site-title {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -.03em;
    background: linear-gradient(135deg, var(--color-gold-dark), var(--color-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.blog-hero .site-description p {
    color: var(--color-muted);
    font-size: 1.05rem;
    max-width: 520px;
    margin: .5rem auto 0;
}

/* ---------- FILTER BLOCK (Categories + Tags) ---------- */
.filter-block {
    background: #fff;
    border: 1px solid rgba(0,0,0,.07);
    border-radius: var(--border-radius);
    padding: .9rem 1.1rem;
    box-shadow: var(--shadow-sm);
}
.filter-label {
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--color-muted);
    margin-bottom: .6rem;
    display: flex;
    align-items: center;
    gap: .3rem;
}
.filter-label .bi { color: var(--color-gold-dark); }

/* Category pills */
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .85rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    border: 1.5px solid rgba(0,0,0,.1);
    color: var(--color-muted);
    background: transparent;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}
.filter-pill:hover {
    border-color: var(--color-gold);
    color: var(--color-gold-dark);
    background: rgba(212,175,55,.07);
}
.filter-pill.active {
    background: var(--color-gold);
    border-color: var(--color-gold);
    color: #000;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(212,175,55,.3);
}
.filter-pill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: rgba(0,0,0,.08);
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
}
.filter-pill.active .filter-pill-count { background: rgba(0,0,0,.15); }

/* Tags cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}
.tag-cloud-item {
    display: inline-block;
    padding: .25rem .75rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--color-gold-dark);
    background: rgba(212,175,55,.08);
    border: 1px solid rgba(212,175,55,.2);
    text-decoration: none;
    transition: var(--transition);
}
.tag-cloud-item:hover,
.tag-cloud-item.active {
    background: var(--color-gold);
    border-color: var(--color-gold);
    color: #000;
    box-shadow: 0 2px 8px rgba(212,175,55,.3);
    transform: translateY(-1px);
}

/* ---------- POST LIST (Home) ---------- */
.post-card {
    position: relative;
    border-radius: var(--border-radius);
    border: 1px solid rgba(0,0,0,.08);
    padding: 1.6rem 1.6rem 1.3rem;
    margin-bottom: 1.1rem;
    transition: var(--transition);
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.post-card:hover {
    border-color: var(--color-gold);
    box-shadow: 0 6px 24px rgba(212,175,55,.15);
    transform: translateY(-2px);
}

/* Date badge — top right absolute */
.post-card-date {
    position: absolute;
    top: 1.2rem;
    right: 1.4rem;
    font-size: .72rem;
    font-weight: 600;
    color: var(--color-muted);
    display: flex;
    align-items: center;
    gap: .25rem;
    white-space: nowrap;
}
.post-card-date .bi { color: var(--color-gold-dark); }

/* Post Title — H2 large bold, clearly dominant */
h2.post-title {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 .5rem 0;
    padding-right: 6rem; /* avoid overlapping date */
}
.post-title-link {
    color: var(--color-text) !important;
    text-decoration: none;
}
.post-title-link:hover {
    color: var(--color-gold-dark) !important;
}
.post-card:hover .post-title-link {
    color: var(--color-gold-dark) !important;
}

/* Card footer: tags + CTA aligned */
.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .9rem;
    padding-top: .85rem;
    border-top: 1px solid rgba(0,0,0,.06);
}

/* Read More CTA — gold pill button */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .35rem .9rem;
    background: var(--color-gold);
    color: #000 !important;
    font-size: .8rem;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}
.read-more-btn:hover {
    background: var(--color-gold-dark);
    color: #fff !important;
    gap: .5rem;
}

.post-meta-inline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .25rem .85rem;
    font-size: .8rem;
    color: var(--color-muted);
    margin-bottom: .6rem;
}
.post-meta-inline .bi { margin-right: .25rem; color: var(--color-gold-dark); }

.post-excerpt {
    font-size: .93rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: .75rem;
}
.post-tags .badge {
    font-weight: 500;
    font-size: .75rem;
    padding: .3em .7em;
    background: rgba(212,175,55,.12) !important;
    color: var(--color-gold-dark) !important;
    border: 1px solid rgba(212,175,55,.3);
    border-radius: 999px;
    margin-right: .25rem;
    transition: var(--transition);
}
.post-tags .badge:hover {
    background: var(--color-gold) !important;
    color: #000 !important;
}

.read-more-link {
    font-size: .82rem;
    font-weight: 600;
    color: var(--color-gold-dark);
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
.read-more-link:hover { gap: .55rem; color: var(--color-gold-dark); }

/* ---------- ARTICLE PAGE ---------- */
section.page {
    font-size: 1.08rem;
    line-height: 1.85;
}

/* Article header */
.article-header {
    border-bottom: 2px solid rgba(212,175,55,.2);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem 1.2rem;
    font-size: .82rem;
    color: var(--color-muted);
    margin-bottom: 1rem;
    padding: .6rem 1rem;
    background: rgba(212,175,55,.06);
    border-left: 3px solid var(--color-gold);
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}
.article-meta .bi { color: var(--color-gold-dark); margin-right: .2rem; }
.article-meta span { display: inline-flex; align-items: center; }

section.page h1.page-title {
    font-size: clamp(1.7rem, 3.5vw, 2.4rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.02em;
    color: #1a1a1a;
    margin: 0;
}

section.page .page-description {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--color-muted);
    margin-top: .5rem;
    line-height: 1.6;
}

/* Article body typography */
section.page .page-content a { color: var(--color-link); }
section.page .page-content a:hover { color: var(--color-gold-dark); }
section.page .page-content p { margin-bottom: 1.35rem; }

section.page .page-content h2 { font-size: 1.55rem; font-weight: 700; }
section.page .page-content h3 { font-size: 1.3rem;  font-weight: 700; }
section.page .page-content h4 { font-size: 1.1rem;  font-weight: 600; }

section.page .page-content h2,
section.page .page-content h3,
section.page .page-content h4 {
    margin: 2.2rem 0 1rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid rgba(212,175,55,.2);
    color: #1a1a1a;
}

/* Code */
pre, code {
    font-family: 'Fira Code', 'Courier New', monospace;
    color: #f8f8f8;
    background-color: #2d2d2d;
}
code {
    display: inline;
    padding: .18em .45em;
    line-height: 1.4;
    border-radius: 4px;
    font-size: .88em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}
pre {
    overflow-x: auto;
    padding: 1.4rem 1.8rem;
    line-height: 1.6;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
}
section.page .page-content blockquote {
    border-left: 4px solid var(--color-gold);
    padding: .8rem 1.3rem;
    background: rgba(212,175,55,.05);
    color: var(--color-muted);
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    font-style: italic;
    margin-bottom: 1.35rem;
}

/* ---------- SHARE BUTTONS ---------- */
.share-section {
    margin: 2.5rem 0;
    padding: 1.5rem;
    background: #fafafa;
    border: 1px solid rgba(212,175,55,.2);
    border-radius: var(--border-radius);
    text-align: center;
}
.share-section h6 {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--color-muted);
    margin-bottom: 1rem;
}
.share-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: .6rem; }
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem 1.1rem;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.share-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.share-btn.telegram  { background: #229ED9; color: #fff; }
.share-btn.twitter   { background: #000;    color: #fff; }
.share-btn.facebook  { background: #1877F2; color: #fff; }
.share-btn.copy-link { background: rgba(212,175,55,.12); color: var(--color-gold-dark); border: 1px solid rgba(212,175,55,.4); }
.share-btn.copy-link:hover { background: var(--color-gold); color: #000; }
.share-btn.copy-link.copied { background: #198754; color: #fff; border-color: #198754; }

/* ---------- POST NAVIGATION ---------- */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
}
.post-nav-link {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-decoration: none;
    background: #fff;
    box-shadow: var(--shadow-sm);
    min-height: 80px;
}
.post-nav-link:hover {
    border-color: var(--color-gold);
    box-shadow: 0 4px 16px rgba(212,175,55,.15);
    transform: translateY(-2px);
}
.post-nav-link.prev { text-align: left; }
.post-nav-link.next { text-align: right; }
.post-nav-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--color-gold-dark);
    margin-bottom: .35rem;
    display: flex;
    align-items: center;
    gap: .3rem;
}
.post-nav-link.next .post-nav-label { justify-content: flex-end; }
.post-nav-title {
    font-size: .92rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-nav-link:hover .post-nav-title { color: var(--color-gold-dark); }
@media (max-width: 575.98px) {
    .post-navigation { grid-template-columns: 1fr; }
    .post-nav-link.next { text-align: left; }
    .post-nav-link.next .post-nav-label { justify-content: flex-start; }
}

/* ---------- RELATED POSTS CARDS ---------- */
.related-section { margin: 2.5rem 0 1rem; }
.related-section .section-title {
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--color-gold-dark);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.related-section .section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(212,175,55,.25);
}
.related-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .9rem; }
.related-card {
    display: block;
    border: 1px solid rgba(0,0,0,.07);
    border-radius: var(--border-radius);
    padding: 1.1rem;
    transition: var(--transition);
    background: #fff;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}
.related-card:hover {
    border-color: var(--color-gold);
    box-shadow: 0 6px 20px rgba(212,175,55,.15);
    transform: translateY(-3px);
}
.related-card-time {
    font-size: .72rem;
    font-weight: 600;
    color: var(--color-gold-dark);
    margin-bottom: .5rem;
    display: flex;
    align-items: center;
    gap: .25rem;
}
.related-card-title {
    font-size: .92rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.4;
    margin-bottom: .5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.related-card:hover .related-card-title { color: var(--color-gold-dark); }
.related-card-desc {
    font-size: .8rem;
    color: var(--color-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.related-card-arrow {
    margin-top: .75rem;
    font-size: .78rem;
    font-weight: 700;
    color: var(--color-gold-dark);
    display: flex;
    align-items: center;
    gap: .3rem;
    opacity: 0;
    transition: var(--transition);
}
.related-card:hover .related-card-arrow { opacity: 1; gap: .5rem; }

/* ---------- BACK TO TOP ---------- */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--color-gold);
    color: #000;
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(212,175,55,.4);
    transition: var(--transition);
    z-index: 800;
}
#back-to-top.visible { display: flex; }
#back-to-top:hover { background: var(--color-gold-dark); color: #fff; transform: translateY(-3px); }

/* ---------- FOOTER ---------- */
.footer {
    background: #f8f6f0;
    border-top: 2px solid rgba(212,175,55,.2);
    padding: 2.5rem 0 1.5rem;
    margin-top: 3rem;
    font-size: .88rem;
}
.footer-brand {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--color-dark-2);
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .5rem;
}
.footer-brand .gold-dot {
    width: 8px; height: 8px;
    background: var(--color-gold);
    border-radius: 50%;
    display: inline-block;
}

/* Social icons — horizontal row, icon only, hover gold */
.footer-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .1rem;
    margin: .75rem 0;
}
.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.05rem;
    color: var(--color-muted) !important;
    transition: var(--transition);
    text-decoration: none;
}
.footer-social-link:hover {
    color: var(--color-gold) !important;
    background: rgba(212,175,55,.1);
    transform: translateY(-2px);
}
.footer-social-link .bi { margin: 0 !important; }

.footer-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .25rem 1.2rem;
    margin: .5rem 0 .75rem;
    padding: 0;
}
.footer-links a { color: var(--color-muted); font-size: .83rem; }
.footer-links a:hover { color: var(--color-gold-dark); }
.footer-copyright { color: var(--color-muted); font-size: .78rem; margin-top: .5rem; }
.footer-separator {
    width: 40px; height: 2px;
    background: var(--color-gold);
    border-radius: 2px;
    margin: .75rem auto;
}

/* ---------- PAGINATION ---------- */
.pagination .page-link {
    border-color: rgba(0,0,0,.1);
    color: var(--color-text);
    border-radius: var(--border-radius-sm) !important;
    font-size: .85rem;
    padding: .4rem .85rem;
}
.pagination .page-link:hover { color: var(--color-gold-dark); border-color: var(--color-gold); background: rgba(212,175,55,.08); }
.pagination .page-item.active .page-link { background: var(--color-gold); border-color: var(--color-gold); color: #000; }

/* ---------- SEARCH ---------- */
.search-wrapper { position: relative; margin-bottom: 1.5rem; }
.search-wrapper .form-control {
    border-radius: 999px;
    padding: .55rem 1.2rem;
    border: 1.5px solid rgba(0,0,0,.1);
    font-size: .9rem;
}
.search-wrapper .btn {
    border-radius: 999px;
    font-size: .88rem;
    font-weight: 600;
    border-color: var(--color-gold);
    color: var(--color-gold-dark);
    padding: .4rem 1.2rem;
}
.search-wrapper .btn:hover { background: var(--color-gold); color: #000; }

/* ---------- BOOTSTRAP OVERRIDES ---------- */
.list-group-item { background-color: inherit; }
.badge { font-size: .8rem; font-weight: 500; }
.bi { margin-right: .3rem !important; }
.btn:focus, .form-control:focus, .form-select:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .mobile-menu-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-card-bg);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        gap: .5rem;
        border-bottom: 1px solid rgba(0,0,0,.06);
        box-shadow: var(--shadow);
    }
    .nav-links.show { display: flex; }
    .nav-links a { padding: .75rem 1rem; }
}
@media (max-width: 575.98px) {
    section.page { font-size: 1rem; }
    section.page h1.page-title { font-size: 1.7rem; }
    .share-btn { font-size: .8rem; padding: .4rem .9rem; }
    #back-to-top { bottom: 1.2rem; right: 1.2rem; width: 40px; height: 40px; }
    .related-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) {
    .related-cards { grid-template-columns: 1fr; }
}

/* ---------- VIDEO EMBED RESPONSIVE ---------- */
.video-embed { overflow: hidden; padding-bottom: 56.25%; position: relative; height: 0; }
.video-embed iframe { left: 0; top: 0; height: 100%; width: 100%; position: absolute; }
