/* ============================================
   style.css — Complete Blog Styles
   PHP 7.4+ Compatible
   ============================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'DM Sans', 'Segoe UI', sans-serif;
    background: #f4f4f7;
    color: #333;
    line-height: 1.6;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    background: linear-gradient(135deg, #800080, #5c0060);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    height: 64px;
    box-shadow: 0 2px 12px rgba(128,0,128,0.3);
    position: sticky;
    top: 0;
    z-index: 200;
    gap: .8rem;
    flex-wrap: nowrap;
}
.navbar .brand {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.navbar .brand img {
    height: 42px;
    width: auto;
    display: block;
}

/* Right side controls group — dark toggle + hamburger always together on right */
.navbar-controls {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-shrink: 0;
    order: 99;
}

/* Nav Search Box */
.nav-search {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 320px;
    min-width: 0;
    margin: 0 auto;
}
.nav-search input {
    flex: 1;
    padding: 0.42rem 1rem;
    border: none;
    border-radius: 20px 0 0 20px;
    font-size: 0.88rem;
    outline: none;
    background: rgba(255,255,255,0.92);
    color: #333;
}
.nav-search-btn {
    padding: 0.42rem 0.9rem;
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: none;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    font-size: 0.82rem;
    border-left: 1px solid rgba(255,255,255,0.25);
    white-space: nowrap;
}
.nav-search-btn:hover { background: rgba(255,255,255,0.3); }
.search-btn-icon { display: none; }
.search-btn-text { display: inline; }

/* Nav links — push to right */
.navbar ul { list-style: none; display: flex; gap: 0.2rem; align-items: center; flex-shrink: 0; margin-left: auto; }
.navbar ul li a {
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    font-size: 0.87rem;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}
.navbar ul li a:hover { color: #fff; background: rgba(255,255,255,0.15); }
.navbar ul li a.nav-cta {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
}
.navbar ul li a.nav-cta:hover { background: rgba(255,255,255,0.3); }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
    background: none;
    border: none;
    flex-shrink: 0;
}
.hamburger span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: all 0.3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   CONTAINER
   ============================================ */
.container { max-width: 1140px; margin: 1.8rem auto; padding: 0 1.2rem; }

/* ============================================
   ALERTS
   ============================================ */
.alert { padding: 0.8rem 1.2rem; margin: 0.8rem 0; border-radius: 8px; font-size: 0.93rem; }
.alert-success { background: #d4edda; color: #155724; border-left: 4px solid #28a745; }
.alert-error   { background: #f8d7da; color: #721c24; border-left: 4px solid #dc3545; }
.alert-info    { background: #d1ecf1; color: #0c5460; border-left: 4px solid #17a2b8; }

/* ============================================
   FORMS
   ============================================ */
.form-card {
    background: #fff;
    padding: 2rem;
    border-radius: 14px;
    max-width: 460px;
    margin: 2rem auto;
    box-shadow: 0 4px 24px rgba(128,0,128,0.1);
    border-top: 4px solid #800080;
}
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-weight: 600; font-size: 0.9rem; color: #444; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.93rem;
    transition: border 0.2s;
    background: #fafafa;
    font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: #800080; outline: none; background: #fff; }
.form-group textarea { resize: vertical; min-height: 120px; }
.error-text { color: #e74c3c; font-size: 0.82rem; display: block; margin-top: 0.3rem; }

/* ============================================
   BUTTONS
   ============================================ */
.btn { display: inline-block; padding: 0.55rem 1.3rem; border: none; border-radius: 8px; cursor: pointer; font-size: 0.9rem; text-decoration: none; transition: all 0.2s; font-family: inherit; font-weight: 500; }
.btn-primary   { background: #800080; color: #fff; }
.btn-primary:hover  { background: #5c0060; }
.btn-danger    { background: #e74c3c; color: #fff; }
.btn-danger:hover   { background: #c0392b; }
.btn-secondary { background: #ecf0f1; color: #555; }
.btn-secondary:hover { background: #dde1e2; }
.btn-sm { padding: 0.32rem 0.75rem; font-size: 0.82rem; }

/* ============================================
   HOME LAYOUT — 2 column
   ============================================ */
#home-layout {
    display: grid;
    grid-template-columns: 1fr 268px;
    gap: 1.8rem;
    align-items: start;
}

/* ---- Post List (left side) ---- */
.post-list { display: flex; flex-direction: column; gap: 1rem; }

.post-row {
    cursor: pointer;
    background: #fff;
    border-radius: 12px;
    display: grid;
    grid-template-columns: 200px 1fr;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s, transform 0.2s;
    min-height: 148px;
}
.post-row:hover { box-shadow: 0 6px 24px rgba(128,0,128,0.12); transform: translateY(-2px); }

.post-row-img { display: block; overflow: hidden; background: #f0e8ff; flex-shrink: 0; }
.post-row-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.post-row:hover .post-row-img img { transform: scale(1.04); }
.post-row-img-placeholder {
    width: 100%; height: 100%; min-height: 148px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; background: linear-gradient(135deg, #f3e8ff, #ede9fe);
}

.post-row-body { padding: 1.1rem 1.3rem; display: flex; flex-direction: column; justify-content: space-between; }
.post-row-title { font-size: 1.05rem; margin-bottom: 0.4rem; line-height: 1.4; }
.post-row-title a { color: #2c3e50; text-decoration: none; font-weight: 700; }
.post-row-title a:hover { color: #800080; }
.post-row-meta { font-size: 0.8rem; color: #999; margin-bottom: 0.5rem; }
.post-row-excerpt { color: #666; font-size: 0.88rem; line-height: 1.55; margin-bottom: 0.7rem; flex: 1; }

.read-more-btn {
    display: inline-block;
    background: linear-gradient(135deg, #800080, #5c0060);
    color: #fff;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.82rem;
    text-decoration: none;
    font-weight: 600;
    align-self: flex-start;
    transition: opacity 0.2s;
}
.read-more-btn:hover { opacity: 0.88; }

/* ============================================
   AD SLOTS
   ============================================ */




/* ============================================
   PAGINATION
   ============================================ */
.pagination { display: flex; justify-content: center; gap: 0.4rem; margin-top: 1.8rem; flex-wrap: wrap; }
.page-btn {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.88rem;
    background: #fff;
    color: #555;
    border: 1.5px solid #e0e0e0;
    transition: all 0.2s;
    font-weight: 500;
}
.page-btn:hover { border-color: #800080; color: #800080; }
.page-btn.active { background: #800080; color: #fff; border-color: #800080; }
.page-dots { padding: 0.4rem 0.3rem; color: #aaa; font-size: 0.88rem; }

/* ============================================
   SIDEBAR
   ============================================ */
#home-sidebar { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 72px; }

.sidebar-write-btn {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #800080, #5c0060);
    color: #fff;
    padding: 0.7rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    transition: opacity 0.2s;
}
.sidebar-write-btn:hover { opacity: 0.88; }

.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.widget-title {
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #800080;
    margin-bottom: 0.9rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid #f3e8ff;
    font-weight: 700;
}

/* Recent posts */
.recent-post-link {
    display: block;
    color: #444;
    text-decoration: none;
    font-size: 0.86rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid #f5f5f5;
    line-height: 1.4;
    transition: color 0.2s;
}
.recent-post-link:last-child { border-bottom: none; }
.recent-post-link:hover { color: #800080; }

/* Category links — name only */
.cat-link {
    display: block;
    padding: 0.38rem 0.7rem;
    text-decoration: none;
    color: #555;
    font-size: 0.88rem;
    border-radius: 6px;
    transition: all 0.2s;
    margin-bottom: 0.2rem;
}
.cat-link:hover, .cat-link.active { background: #f3e8ff; color: #800080; font-weight: 600; }

/* ============================================
   SINGLE POST VIEW
   ============================================ */
/* #post-layout handled by post-layout-wrap grid below */

.post-single { background: transparent; padding: 0; border-radius: 0; box-shadow: none; margin-bottom: 1.5rem; }
.post-title { font-size: 2rem; color: #2c3e50; line-height: 1.3; margin-bottom: 0.8rem; }

.post-author-bar {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    color: #666;
}
.author-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #800080, #a855f7);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.95rem; flex-shrink: 0;
}

.post-hero-img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 10px; margin-bottom: 1.5rem; display: block; }

.post-content {
    line-height: 1.9;
    font-size: 1.03rem;
    color: #333;
}
.post-content h2 { font-size: 1.5rem; margin: 1.5rem 0 0.7rem; color: #2c3e50; }
.post-content h3 { font-size: 1.25rem; margin: 1.3rem 0 0.6rem; color: #2c3e50; }
.post-content p  { margin-bottom: 1rem; }
.post-content ul, .post-content ol { margin: 0.8rem 0 0.8rem 1.5rem; }
.post-content li  { margin-bottom: 0.4rem; }
.post-content blockquote { border-left: 4px solid #800080; padding: 0.8rem 1.2rem; background: #f9f0ff; border-radius: 0 8px 8px 0; margin: 1rem 0; color: #555; }
.post-content a   { color: #800080; }
.post-content img { max-width: 100%; border-radius: 8px; margin: 0.8rem 0; }

/* ============================================
   COMMENTS
   ============================================ */
.comments-section { background: #fff; border-radius: 14px; padding: 1.8rem; box-shadow: 0 2px 12px rgba(0,0,0,.07); margin-bottom: 1.5rem; }
.comments-section h3 { color: #2c3e50; margin-bottom: 1.2rem; font-size: 1.1rem; }

.comment-form-wrap { background: #f9f0ff; border-radius: 10px; padding: 1.2rem; margin-bottom: 1.5rem; border: 1px solid #ede9fe; }
.comment-form-wrap h4 { color: #800080; margin-bottom: 0.8rem; font-size: 0.95rem; }

.comment-item { display: flex; gap: 0.9rem; margin-bottom: 1.2rem; padding-bottom: 1.2rem; border-bottom: 1px solid #f5f5f5; }
.comment-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.comment-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #800080, #a855f7); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; font-size: 0.9rem; }
.comment-body { flex: 1; }
.comment-meta { font-size: 0.82rem; color: #aaa; margin-bottom: 0.3rem; }
.comment-meta strong { color: #333; font-size: 0.9rem; margin-right: 0.5rem; }
.comment-body p { font-size: 0.92rem; color: #444; line-height: 1.55; margin-bottom: 0.4rem; }
.reply-btn { background: none; border: none; color: #800080; font-size: 0.8rem; cursor: pointer; padding: 0; font-weight: 600; }
.reply-btn:hover { text-decoration: underline; }

/* ============================================
   ADMIN TABLE
   ============================================ */
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
.table th { background: #2c3e50; color: #fff; padding: 0.8rem 1rem; text-align: left; font-size: 0.88rem; }
.table td { padding: 0.7rem 1rem; border-bottom: 1px solid #f0f0f0; font-size: 0.9rem; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafafa; }
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; }

/* ============================================
   FOOTER — Thin version
   ============================================ */
.footer {
    background: linear-gradient(135deg, #800080, #5c0060);
    color: rgba(255,255,255,0.8);
    margin-top: 3rem;
}
.footer-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 1rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1.5rem;
}
.footer-brand { font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: 0.3rem; }
.footer-desc  { font-size: 0.82rem; opacity: 0.7; line-height: 1.5; }
.footer-col h5 { color: #fff; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.6rem; }
.footer-col a  { display: block; color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.84rem; margin-bottom: 0.3rem; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 0.7rem 1.5rem;
    text-align: center;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    max-width: 1140px; margin: 0 auto;
}
.footer-bottom a { color: rgba(255,255,255,0.7); text-decoration: none; }

/* ============================================
   ABOUT / CONTACT / DEV PAGES  (kept minimal)
   ============================================ */
.mission-block { background: #f9f0ff; border-left: 5px solid #800080; border-radius: 0 12px 12px 0; padding: 1.5rem 2rem; margin: 2rem 0; }
.mission-block h2 { color: #800080; margin-bottom: 0.7rem; }
.mission-block p  { color: #555; line-height: 1.8; margin-bottom: 0.6rem; }

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

/* Tablet 768–1024 */
@media (max-width: 1024px) {
    #home-layout { grid-template-columns: 1fr 240px; gap: 1.2rem; }
    .post-row { grid-template-columns: 160px 1fr; }
}

/* Desktop only elements — hidden on tablet/mobile */
.nav-desktop-only { display: flex; }

/* Tablet — iPad, iPad Air etc (900px and below) */
@media (max-width: 900px) {
    .navbar { gap: .5rem; padding: 0 1rem; height: 58px; }
    .navbar .brand img { height: 34px; }
    .nav-desktop-only { display: none !important; }
    .navbar ul { gap: 0; }
    .navbar ul li a { padding: .4rem .55rem; font-size: .83rem; }
    .nav-search { max-width: 220px; }
    .hamburger { display: flex; }
}

/* Mobile — phones (768px and below) */
@media (max-width: 768px) {
    .navbar { 
        height: 54px;
        padding: 0 .8rem;
        gap: .4rem; 
        flex-wrap: nowrap;
        align-items: center;
    }
    .navbar .brand { flex-shrink: 0; }
    .navbar .brand img { height: 26px; }

    /* Hide desktop-only on mobile too */
    .nav-desktop-only { display: none !important; }

    /* Search */
    .nav-search { flex: 1; min-width: 0; max-width: none; }
    .nav-search input {
        display: block;
        width: 100%;
        padding: .32rem .4rem;
        font-size: .78rem;
        border-radius: 20px 0 0 20px;
    }
    .search-btn-text { display: none; }
    .search-btn-icon { display: inline; font-size: .9rem; }
    .nav-search-btn { padding: .32rem .5rem; border-radius: 0 20px 20px 0; }

    .navbar-controls { margin-left: 0; gap: .2rem; flex-shrink: 0; }
    .hamburger { display: flex; }

    /* Right-side slide-in drawer */
    .navbar ul {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0; right: -280px; bottom: 0;
        width: 265px;
        background: linear-gradient(180deg, #4a0050, #800080);
        z-index: 9999;
        gap: 0;
        padding: 0;
        overflow-y: auto;
        transition: right 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -6px 0 30px rgba(0,0,0,0.3);
    }
    .navbar ul.nav-open { right: 0; }

    /* Dark overlay behind drawer */
    .navbar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 9998;
        backdrop-filter: blur(2px);
    }
    .navbar-overlay.show { display: block; }

    /* Close header inside drawer */
    .nav-close-btn {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 1.2rem;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        background: rgba(0,0,0,0.2);
        flex-shrink: 0;
    }
    .nav-close-btn span { color: #fff; font-weight: 700; font-size: 1rem; }
    .nav-close-btn button {
        background: rgba(255,255,255,0.15);
        border: none; color: #fff;
        width: 30px; height: 30px;
        border-radius: 50%; cursor: pointer;
        font-size: 1rem; display: flex;
        align-items: center; justify-content: center;
        transition: background 0.2s;
    }
    .nav-close-btn button:hover { background: rgba(255,255,255,0.3); }

    .navbar ul li { width: 100%; }
    .navbar ul li a {
        display: block;
        padding: 0.8rem 1.4rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(255,255,255,.08);
        font-size: 0.95rem;
        color: rgba(255,255,255,0.9);
        transition: background 0.15s, padding-left 0.15s;
    }
    .navbar ul li a:hover {
        background: rgba(255,255,255,0.12);
        padding-left: 1.8rem;
        color: #fff;
    }

    /* Dark mode toggle inside drawer */
    .nav-dark-li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }
    .nav-dark-li button {
        width: 100%;
        background: none;
        border: none;
        color: rgba(255,255,255,0.9);
        font-size: 0.95rem;
        padding: 0.8rem 1.4rem;
        text-align: left;
        cursor: pointer;
        transition: background 0.15s, padding-left 0.15s;
    }
    .nav-dark-li button:hover {
        background: rgba(255,255,255,0.12);
        padding-left: 1.8rem;
    }

    #home-layout { grid-template-columns: 1fr; }
    #home-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

    .post-row { grid-template-columns: 130px 1fr; min-height: 120px; }
    .post-row-img-placeholder { min-height: 120px; }

    .footer-inner { grid-template-columns: 1fr 1fr; padding: 1.2rem 1rem 0.8rem; gap: 1rem; }
    .post-title { font-size: 1.5rem; }
}

/* Mobile <576 */
@media (max-width: 576px) {
    .container { padding: 0 0.8rem; margin: 1rem auto; }

    .post-row { grid-template-columns: 1fr; min-height: auto; }
    .post-row-img { height: 180px; }
    .post-row-img img { height: 180px; }
    .post-row-img-placeholder { min-height: 180px; }
    .post-row-body { padding: 0.9rem; }
    .post-row-title { font-size: 0.97rem; }

    #home-sidebar { grid-template-columns: 1fr; }

    .footer-inner { grid-template-columns: 1fr; padding: 1rem 1rem 0.5rem; gap: 0.8rem; }
    .footer-bottom { padding: 0.5rem 1rem; }

    .post-title { font-size: 1.3rem; }
    .post-single { padding: 1rem; }

    .form-card { margin: 0.8rem; padding: 1.3rem; }

    .pagination { gap: 0.3rem; }
    .page-btn { padding: 0.35rem 0.65rem; font-size: 0.82rem; }
}

/* Small <400 */
@media (max-width: 400px) {
    .navbar .brand { font-size: 1.1rem; }
    .container { padding: 0 0.6rem; }
}

/* Large 1200+ */
@media (min-width: 1200px) {
    .container { max-width: 1200px; }
    #home-layout { grid-template-columns: 1fr 280px; }
}

/* ============================================
   COMMENTS — Scrollable Box
   ============================================ */
.comments-section {
    background: #fff;
    border-radius: 14px;
    padding: 1.8rem;
    margin-top: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.comment-form-wrap {
    background: #faf7ff;
    border-radius: 10px;
    padding: 1.4rem;
    margin-bottom: 1.5rem;
    border: 1px solid #ede9fe;
}
.comment-form-wrap h4 {
    color: #800080;
    margin-bottom: 1rem;
    font-size: 1rem;
}
.comments-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .8rem;
}
.comments-box-header h3 {
    font-size: 1rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

/* THE SCROLLABLE BOX */
.comments-scroll-box {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #ede9fe;
    border-radius: 10px;
    padding: 0.5rem;
    background: #fdfbff;
    scrollbar-width: thin;
    scrollbar-color: #800080 #f0e6ff;
}
.comments-scroll-box::-webkit-scrollbar       { width: 6px; }
.comments-scroll-box::-webkit-scrollbar-track { background: #f0e6ff; border-radius: 10px; }
.comments-scroll-box::-webkit-scrollbar-thumb { background: #800080; border-radius: 10px; }

.comment-item {
    display: flex;
    gap: .9rem;
    padding: .9rem;
    border-bottom: 1px solid #f3f0ff;
    transition: background .15s;
}
.comment-item:last-child { border-bottom: none; }
.comment-item:hover      { background: #faf7ff; border-radius: 8px; }

.comment-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #800080, #a855f7);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .9rem;
    flex-shrink: 0;
}
.comment-body { flex: 1; min-width: 0; }
.comment-meta {
    display: flex; align-items: center;
    gap: .4rem; flex-wrap: wrap;
    margin-bottom: .3rem;
    font-size: .85rem;
}
.comment-meta strong { color: #2c3e50; }
.reply-btn {
    background: none; border: none; cursor: pointer;
    color: #800080; font-size: .78rem; padding: 0;
    text-decoration: underline;
}
.reply-btn:hover { color: #5c0060; }

@media (max-width: 576px) {
    .comments-scroll-box { max-height: 380px; }
    .comment-form-wrap div[style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}
/* ============================================
   AD SLOTS — Clean, no placeholder text
   ============================================ */

/* Homepage: between posts (har 3rd post ke baad) */
.ad-slot-between {
    width: 100%;
    min-height: 0;
    margin: 0.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
}
/* Jab AdSense code hoga toh height auto ho jaayegi */
.ad-slot-between:empty { display: none; }

/* Post page: content ke neeche */
.ad-slot-post-bottom {
    margin: 1.5rem 0 0;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
}
.ad-slot-post-bottom:empty { display: none; }

/* Sidebar */
.ad-slot-sidebar {
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    margin-top: 1rem;
}
.ad-slot-sidebar:empty { display: none; }

/* Nav close button - only on mobile */
#nav-close-li { display: none; }
@media (max-width: 768px) {
    #nav-close-li { display: flex !important; }
}

/* ============================================
   POST CARD — No hover effect (plain)
   ============================================ */
.post-row:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.06) !important;
    transform: none !important;
}
.post-row:hover .post-row-img img {
    transform: none !important;
}
.post-row {
    cursor: pointer;
}

/* ============================================
   AUTHOR INFO — Bottom of post, small
   ============================================ */
.post-author-bottom {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-top: 1.2rem;
    padding: .3rem 0;
}
.post-author-avatar-sm {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #800080, #a855f7);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem;
    flex-shrink: 0;
}
.post-author-info-sm {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.post-author-name-sm {
    font-size: .82rem;
    font-weight: 600;
    color: #2c3e50;
}
.post-author-date-sm {
    font-size: .75rem;
    color: #999;
    line-height: 1.5;
}
@media (max-width: 576px) {
    .post-author-date-sm { font-size: .7rem; }
}

/* ============================================
   SIDEBAR — Categories only + ad slot
   ============================================ */
.sidebar-widget-ad {
    margin-top: .5rem;
    border-radius: 10px;
    overflow: hidden;
    min-height: 0;
}
.sidebar-widget-ad:empty { display: none; }

/* ============================================
   AD SLOT BETWEEN POSTS — every post
   ============================================ */
.ad-slot-between {
    width: 100%;
    margin: .3rem 0;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
}
.ad-slot-between:empty,
.ad-slot-between-placeholder { display: none; }

/* ============================================
   PAGES (Contact/Developer) — make sure
   container wraps content properly
   ============================================ */
.page-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding-bottom: 3rem;
}

/* ============================================
   CATEGORY PAGE — Responsive Grid Cards
   ============================================ */
.category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* Desktop: 3 column = 6 cards */
    gap: .9rem;
}

.cat-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    cursor: pointer;
    transition: box-shadow .2s;
}
.cat-card:hover {
    box-shadow: 0 4px 16px rgba(128,0,128,.13);
}

.cat-card-img {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f0e8ff;
}
.cat-card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.cat-card:hover .cat-card-img img { transform: scale(1.04); }

.cat-card-img-placeholder {
    width: 100%; height: 100%;
    min-height: 110px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    background: linear-gradient(135deg,#f3e8ff,#ede9fe);
}

.cat-card-body {
    padding: .7rem .85rem .85rem;
}
.cat-card-title {
    font-size: .88rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.4;
    margin-bottom: .35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cat-card-meta {
    font-size: .73rem;
    color: #aaa;
}
.cat-card-excerpt {
    font-size: .78rem;
    color: #777;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: .2rem;
}

/* Mobile: 2 cards side by side bhi */
@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: 1fr 1fr;
        gap: .7rem;
    }
}
@media (max-width: 576px) {
    .category-grid {
        grid-template-columns: 1fr 1fr;
        gap: .6rem;
    }
    .cat-card-title { font-size: .8rem; }
    .cat-card-body  { padding: .55rem .65rem .7rem; }
}

/* Navbar active laptop highlight */
.navbar ul li a.nav-active-laptop {
    background: rgba(255,255,255,0.25) !important;
    color: #fff !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #fff;
}

/* ============================================
   POST PAGE — Layout with Sticky Sidebar
   ============================================ */
#post-layout-wrap {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    align-items: start;
}
#post-layout {
    max-width: 100%;
    margin: 0;
    min-width: 0;
}
#post-sidebar {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-self: start;
}

@media (max-width: 900px) {
    #post-layout-wrap {
        grid-template-columns: 1fr;
    }
    #post-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}
@media (max-width: 576px) {
    #post-sidebar {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   DARK MODE TOGGLE BUTTON
   ============================================ */
.dark-toggle {
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, transform .2s;
    flex-shrink: 0;
}
.dark-toggle:hover { background: rgba(255,255,255,0.28); transform: scale(1.1); }

.nav-login-icon {
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
    transition: background .2s, transform .2s;
}
.nav-login-icon:hover { background: rgba(255,255,255,0.28); transform: scale(1.1); }
body.dark-mode .nav-login-icon { background: rgba(255,255,255,0.1); }

/* ============================================
   DARK MODE STYLES
   ============================================ */
body.dark-mode {
    background: #0f0f0f;
    color: #e0e0e0;
}

/* Navbar */
body.dark-mode .navbar { background: #1a0a1a; box-shadow: 0 2px 12px rgba(0,0,0,.5); }
body.dark-mode .nav-search input { background: #2a1a2a; border-color: #4a2a4a; color: #e0e0e0; }
body.dark-mode .nav-search button { background: #800080; }

/* Cards & Widgets */
body.dark-mode .post-row,
body.dark-mode .cat-card,
body.dark-mode .sidebar-widget,
body.dark-mode .laptop-card,
body.dark-mode .comments-section,
body.dark-mode .comment-form-wrap,
body.dark-mode .laptops-page .privacy-card,
body.dark-mode .contact-form-card,
body.dark-mode .contact-info-card,
body.dark-mode .team-card,
body.dark-mode .value-card,
body.dark-mode .about-hero { background: #1e1e2e; }

body.dark-mode .post-row { box-shadow: 0 2px 8px rgba(0,0,0,.4); }
body.dark-mode .cat-card { border-color: #2a1a2a; box-shadow: 0 2px 8px rgba(0,0,0,.4); }

/* Text colors */
body.dark-mode .post-row-title a,
body.dark-mode .cat-card-title,
body.dark-mode .post-title,
body.dark-mode h1, body.dark-mode h2,
body.dark-mode h3, body.dark-mode h4 { color: #f0f0f0; }

body.dark-mode .post-row-excerpt,
body.dark-mode .post-content,
body.dark-mode p { color: #c0c0c0; }

body.dark-mode .post-row-meta,
body.dark-mode .cat-card-meta { color: #888; }

/* Sidebar */
body.dark-mode .widget-title { color: #d0a0d0; border-bottom-color: #3a1a3a; }
body.dark-mode .cat-link { color: #c0c0c0; }
body.dark-mode .cat-link:hover,
body.dark-mode .cat-link.active { background: #800080; color: #fff; }

/* Post content */
body.dark-mode .post-content { color: #d0d0d0; }
body.dark-mode .post-content h2,
body.dark-mode .post-content h3 { color: #f0f0f0; }
body.dark-mode .post-content blockquote { background: #2a1a2a; border-left-color: #a855f7; }
body.dark-mode .post-content a { color: #c084fc; }

/* Comments */
body.dark-mode .comments-section { background: #1e1e2e; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
body.dark-mode .comment-form-wrap { background: #2a1a2a; border-color: #3a1a3a; }
body.dark-mode .comment-form-wrap textarea,
body.dark-mode .comment-form-wrap input[type="text"],
body.dark-mode .comment-form-wrap input[type="email"] {
    background: #1a0a1a; border-color: #4a2a4a; color: #e0e0e0;
}
body.dark-mode .comment-item { border-bottom-color: #2a2a2a; }

/* Footer */
body.dark-mode .footer { background: #0a0a0a; }
body.dark-mode .footer-bottom { border-top-color: #2a1a2a; color: #888; }
body.dark-mode .footer-col a { color: #b0b0b0; }
body.dark-mode .footer-col h5 { color: #d0a0d0; }

/* Forms */
body.dark-mode input[type="text"],
body.dark-mode input[type="email"],
body.dark-mode input[type="password"],
body.dark-mode textarea,
body.dark-mode select {
    background: #1e1e2e;
    border-color: #3a2a3a;
    color: #e0e0e0;
}

/* Pagination */
body.dark-mode .page-btn { background: #1e1e2e; color: #c0c0c0; border-color: #3a2a3a; }
body.dark-mode .page-btn.active { background: #800080; color: #fff; }
body.dark-mode .page-btn:hover { background: #2a1a2a; }

/* Privacy & About pages */
body.dark-mode .privacy-card,
body.dark-mode .mission-block { background: #1e1e2e; }
body.dark-mode .privacy-card h2 { color: #c084fc; border-bottom-color: #2a1a2a; }
body.dark-mode .privacy-card p,
body.dark-mode .privacy-card li { color: #b0b0b0; }

/* No posts / empty state */
body.dark-mode .post-row-img-placeholder,
body.dark-mode .cat-card-img-placeholder { background: linear-gradient(135deg, #1a0a2a, #2a1a3a); }

/* Laptop page */
body.dark-mode .laptop-card { border-color: #2a1a2a; }
body.dark-mode .laptop-card-title { color: #f0f0f0; }
body.dark-mode .laptop-card-img-placeholder { background: linear-gradient(135deg,#1a0a2a,#2a1a3a); }

/* Smooth transition on all elements */
body, .navbar, .post-row, .cat-card, .sidebar-widget,
.comments-section, .comment-form-wrap, .footer,
.page-btn, input, textarea, select, .laptop-card {
    transition: background-color .3s, color .3s, border-color .3s, box-shadow .3s;
}
