/* css/style.css */
:root {
    --bg-main: #ffffff;
    --bg-alt: #f9fafb;
    --text-dark: #111827;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --brand-color: #db5a42;
    --font-main: 'Inter', sans-serif;
    --site-width: 1200px; 
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-main); background-color: var(--bg-alt); color: var(--text-dark); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; transition: color 0.2s; }

/* Header: Logo Left, Search Right */
.site-header { background-color: var(--bg-main); border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: var(--site-width); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; height: 64px; gap: 20px; }
.logo-left { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; letter-spacing: -0.5px; }
.logo-icon { color: var(--brand-color); }
.nav-right { display: flex; align-items: center; flex-grow: 1; justify-content: flex-end; }

/* Header Search Bar */
.header-search { display: flex; align-items: center; background: var(--bg-alt); border: 1px solid var(--border-color); border-radius: 20px; padding: 8px 16px; width: 350px; max-width: 100%; transition: border-color 0.2s; }
.header-search:focus-within { border-color: var(--brand-color); }
.header-search i { color: var(--text-muted); font-size: 14px; margin-right: 10px; }
.header-search input { border: none; background: transparent; outline: none; font-size: 14px; width: 100%; color: var(--text-dark); font-family: var(--font-main); }

/* Mobile Menu Elements (Hidden on Desktop) */
.mobile-toggle { display: none; background: none; border: none; font-size: 20px; color: var(--text-dark); cursor: pointer; padding: 4px; }
.close-mobile-menu { display: none; background: none; border: none; font-size: 22px; color: var(--text-muted); cursor: pointer; position: absolute; top: 16px; right: 16px; }
.mobile-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 998; opacity: 0; transition: opacity 0.3s; }
.mobile-overlay.active { display: block; opacity: 1; }

/* 3-Column Layout */
.fluid-container { max-width: var(--site-width); margin: 0 auto; display: grid; grid-template-columns: 240px minmax(0, 1fr) 240px; gap: 32px; padding: 40px 20px; min-height: calc(100vh - 64px - 300px); align-items: start; }

/* Sidebars */
.sidebar-title { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 16px; font-weight: 600; }
.sidebar-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sidebar-list a { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 8px; border-radius: 4px; margin-left: -8px; }
.sidebar-list a:hover { background-color: var(--border-color); color: var(--brand-color); }
.sidebar-list i { font-size: 10px; opacity: 0; transition: opacity 0.2s; transform: translateY(4px); }
.sidebar-list a:hover i { opacity: 0.5; }
.sidebar-list a.active { 
    background-color: rgba(219, 90, 66, 0.1); /* Subtle brand color background */
    color: var(--brand-color); 
    font-weight: 600; 
}
.sidebar-list a.active i { 
    opacity: 1; /* Keep the arrow fully visible for the active item */
}

.tags-tight { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-tight-pill { font-size: 12px; padding: 4px 10px; background: var(--bg-main); border: 1px solid var(--border-color); border-radius: 4px; font-weight: 500; }
.tag-tight-pill:hover { border-color: var(--text-dark); color: var(--text-dark); }

/* Middle Column Content */
.content-header { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border-color); text-align: left; }
.pre-title-badge { display: inline-block; background-color: rgba(219, 90, 66, 0.1); color: var(--brand-color); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 6px 12px; border-radius: 20px; margin-bottom: 16px; }
.content-header h1 { font-size: 32px; font-weight: 800; letter-spacing: -1px; margin-bottom: 8px; }
.content-header p { font-size: 15px; color: var(--text-muted); max-width: 600px; margin: 0; }

/* 2-Column Post Grid */
.tight-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.tight-card { background: var(--bg-main); border: 1px solid var(--border-color); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; transition: border-color 0.2s, transform 0.2s; }
.tight-card:hover { border-color: #d1d5db; transform: translateY(-2px); }
.card-img-wrap { position: relative; height: 200px; width: 100%; background: #eaeaea; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.card-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-wrap: wrap; gap: 4px; }
.badge-mini { background: rgba(0,0,0,0.8); color: white; font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 3px; text-transform: uppercase; }

.card-body { padding: 16px; display: flex; flex-direction: column; flex-grow: 1; }
.card-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.card-excerpt { font-size: 13px; color: var(--text-muted); flex-grow: 1; }

/* Inline Promo */
.inline-promo { margin-top: 40px; padding: 32px; background-color: var(--bg-main); border: 1px solid var(--border-color); border-radius: 8px; }
.promo-block:not(:last-child) { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px dashed var(--border-color); }
.promo-block h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--text-dark); letter-spacing: -0.3px; }
.promo-block p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* Footer */
.light-footer { background-color: var(--bg-alt); padding: 60px 20px 0; font-size: 14px; }
.footer-inner { max-width: var(--site-width); margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-bottom: 40px; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dark); margin-bottom: 16px; font-weight: 600; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; color: var(--text-muted); }
.footer-col ul a:hover { color: var(--brand-color); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 24px 0; border-top: 1px solid var(--border-color); color: var(--text-muted); font-size: 13px; }
.footer-links-right { display: flex; gap: 16px; }
.footer-links-right a:hover { color: var(--brand-color); }

/* =========================================
   RESPONSIVE DESIGN 
   ========================================= */

/* Tablet View */
@media (max-width: 1024px) {
    .fluid-container { grid-template-columns: 200px minmax(0, 1fr); }
    .sidebar-right { display: none; }
}

/* Mobile View */
@media (max-width: 768px) {
    .mobile-toggle { display: block; }
    .close-mobile-menu { display: block; }
    
    .header-inner { flex-wrap: wrap; height: auto; padding: 15px 20px; gap: 15px; }
    .nav-right { width: 100%; justify-content: center; }
    .header-search { width: 100%; }

    .fluid-container { grid-template-columns: 1fr; padding: 20px 15px; }

    /* Mobile Category Menu (Off-Canvas) */
    .sidebar-left {
        position: fixed;
        top: 0;
        left: -320px; /* Hidden by default */
        width: 280px;
        height: 100vh;
        background: var(--bg-main);
        z-index: 999;
        padding: 40px 20px;
        box-shadow: 2px 0 15px rgba(0,0,0,0.15);
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    .sidebar-left.active { left: 0; }
    .sidebar-left .sidebar-title { margin-top: 20px; font-size: 14px; }

    .content-header h1 { font-size: 26px; }
    .tight-grid { grid-template-columns: 1fr; }
    .inline-promo { padding: 20px; }
    
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Small Mobile View */
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
}

/* =========================================
   SINGLE ARTICLE & PROMPT STYLES
   ========================================= */
.article-container { padding-bottom: 10px; }
.breadcrumbs { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; font-weight: 500; }
.breadcrumbs a { color: var(--text-dark); transition: color 0.2s; }
.breadcrumbs a:hover { color: var(--brand-color); }
.breadcrumbs span { margin: 0 6px; opacity: 0.5; }

.article-title { font-size: 36px; font-weight: 800; line-height: 1.2; letter-spacing: -1px; margin-bottom: 24px; color: var(--text-dark); }

.article-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border-color); }
.meta-author-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.meta-details { display: flex; flex-direction: column; }
.meta-author-name { font-size: 14px; font-weight: 600; color: var(--text-dark); }
.meta-date { font-size: 13px; color: var(--text-muted); }

.article-featured-image { width: 100%; height: auto; max-height: 500px; object-fit: cover; border-radius: 8px; margin-bottom: 32px; border: 1px solid var(--border-color); }
.article-body { font-size: 16px; line-height: 1.8; color: #374151; margin-bottom: 40px; }
.article-body p { margin-bottom: 24px; }

/* Sleek Prompt Boxes */
.prompt-ui-box { background: var(--bg-main); border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; margin-bottom: 40px; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.prompt-ui-image { width: 100%; height: auto; display: block; border-bottom: 1px solid var(--border-color); }
.prompt-ui-content { padding: 24px; }
.prompt-ui-text { background: var(--bg-alt); padding: 16px; border-radius: 6px; font-family: monospace; font-size: 14px; color: var(--text-dark); margin-bottom: 20px; border: 1px solid var(--border-color); white-space: pre-wrap; word-wrap: break-word; }

.prompt-ui-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-action { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 13px; font-weight: 600; border-radius: 6px; cursor: pointer; transition: 0.2s; border: none; text-decoration: none; }
.btn-copy { background: var(--text-dark); color: white; }
.btn-copy:hover { background: #374151; transform: translateY(-1px); }
.btn-whatsapp { background: #25D366; color: white; }
.btn-whatsapp:hover { background: #1ebc5b; transform: translateY(-1px); }
.btn-telegram { background: #0088cc; color: white; }
.btn-telegram:hover { background: #0077b5; transform: translateY(-1px); }

.article-footer { padding-top: 24px; border-top: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.share-links { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; }
.share-btn { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--bg-alt); border: 1px solid var(--border-color); color: var(--text-dark); transition: 0.2s; }
.share-btn:hover { background: var(--text-dark); color: white; border-color: var(--text-dark); }