/* ASPappu Blog - public site */
:root {
    --primary: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --primary-soft: #eff6ff;
    --navy: #0b1b3f;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --bg: #f4f6fb;
    --card: #ffffff;
    --radius: 12px;
    --font: 'Inter', 'Hind Siliguri', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 16px; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }

.btn-primary {
    --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-dark); --bs-btn-hover-border-color: var(--primary-dark);
    --bs-btn-active-bg: var(--primary-dark); --bs-btn-active-border-color: var(--primary-dark);
}
.btn-outline-primary {
    --bs-btn-color: var(--primary); --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary); --bs-btn-hover-border-color: var(--primary);
}
.form-control:focus { border-color: #93c5fd; box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .15); }
.text-primary { color: var(--primary) !important; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* ---------- Top bar & header ---------- */
.topbar { background: var(--navy); color: #cbd5e1; font-size: .82rem; padding: .45rem 0; }
.topbar a { color: #cbd5e1; margin-left: .85rem; }
.topbar a:hover { color: #fff; }

.site-header { background: #fff; padding: 1.4rem 0; }
.brand { display: flex; align-items: center; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-logo { height: var(--logo-h, 64px); max-height: none; width: auto; max-width: 100%; object-fit: contain; }
.brand-name { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.brand-name span, .footer-brand span { color: var(--primary); }
.brand-tagline { color: var(--muted); font-size: .88rem; margin-top: .35rem; }
.header-ad { max-width: 728px; overflow: hidden; }

.main-nav { background: var(--primary); padding: 0; box-shadow: 0 4px 14px -6px rgba(15, 23, 42, .35); }
.main-nav .nav-link { color: #fff !important; font-weight: 600; font-size: .95rem; padding: 1rem 1.05rem !important; }
.main-nav .nav-link:hover, .main-nav .nav-link.active { background: rgba(255, 255, 255, .14); }
.main-nav .navbar-toggler { color: #fff; border: 1px solid rgba(255, 255, 255, .4); font-size: 1.4rem; padding: .2rem .6rem; margin: .5rem 0; }
.main-nav .navbar-toggler:focus { box-shadow: none; }
.nav-search { display: flex; margin: .5rem 0; }
.nav-search input { border: 0; border-radius: 999px 0 0 999px; padding: .45rem 1rem; width: 210px; font-size: .9rem; outline: none; }
.nav-search button { border: 0; background: var(--primary-dark); color: #fff; border-radius: 0 999px 999px 0; padding: 0 1rem; }
@media (max-width: 991.98px) {
    .nav-search { padding-bottom: .75rem; }
    .nav-search input { flex: 1; width: auto; }
}

.site-main { padding: 1.75rem 0 0; min-height: 50vh; }

/* ---------- Hero (magazine) ---------- */
.hero-grid { display: grid; gap: 12px; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 225px 225px; margin-bottom: 2rem; }
.hero-grid.n3 { grid-template-columns: 2fr 1fr; }
.hero-grid.n2 { grid-template-columns: 3fr 2fr; grid-template-rows: 400px; }
.hero-grid.n1 { grid-template-columns: 1fr; grid-template-rows: 440px; }
.hero-grid.n5 .hero-item:first-child, .hero-grid.n3 .hero-item:first-child { grid-row: span 2; }
.hero-item { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--primary-dark); }
.hero-item.no-img { background: linear-gradient(135deg, var(--primary-dark), var(--primary-light)); }
.hero-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.hero-item:hover img { transform: scale(1.05); }
.hero-item .overlay {
    position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
    padding: 1.25rem; color: #fff; pointer-events: none;
    background: linear-gradient(to top, rgba(2, 6, 23, .9) 0%, rgba(2, 6, 23, .35) 55%, rgba(2, 6, 23, .05) 100%);
}
.hero-item h2 { font-size: 1.05rem; font-weight: 700; line-height: 1.35; margin: .5rem 0 .35rem; }
.hero-grid .hero-item:first-child h2 { font-size: 1.8rem; }
.hero-grid.n2 .hero-item h2 { font-size: 1.4rem; }
.hero-excerpt { font-size: .95rem; opacity: .9; margin-bottom: .5rem; }
.hero-meta { font-size: .8rem; opacity: .85; }
/* Smaller screens keep the same magazine layout as desktop, just scaled down. */
@media (max-width: 991.98px) {
    .hero-grid { grid-template-rows: repeat(2, minmax(0, 1fr)); aspect-ratio: 16 / 9; }
    .hero-grid.n2, .hero-grid.n1 { grid-template-rows: minmax(0, 1fr); aspect-ratio: 16 / 8; }
    .hero-grid .hero-item:first-child h2 { font-size: 1.35rem; }
    .hero-grid .hero-item h2 { font-size: .95rem; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
    .hero-grid .hero-item:not(:first-child) .hero-meta { display: none; }
}
@media (max-width: 575.98px) {
    .hero-grid { gap: 6px; aspect-ratio: 5 / 4; }
    .hero-grid.n2, .hero-grid.n1 { aspect-ratio: 4 / 3; }
    .hero-grid .hero-item .overlay { padding: .55rem .6rem; }
    .hero-grid .hero-item h2 {
        font-size: .74rem; line-height: 1.3; margin: 0;
        display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
    }
    .hero-grid .hero-item:first-child h2 { font-size: 1rem; margin: .35rem 0 .25rem; -webkit-line-clamp: 4; }
    .hero-grid .hero-item:not(:first-child) .cat-badge,
    .hero-grid .hero-item:not(:first-child) .hero-meta { display: none; }
    .hero-grid .cat-badge { font-size: .58rem; padding: .2rem .42rem; }
    .hero-grid .hero-meta { font-size: .62rem; }
}

/* ---------- Common bits ---------- */
.cat-badge {
    display: inline-block; background: var(--primary); color: #fff !important; font-size: .72rem; font-weight: 700;
    letter-spacing: .03em; text-transform: uppercase; padding: .28rem .6rem; border-radius: 4px; line-height: 1.2;
}
.cat-badge:hover { background: var(--primary-dark); }

.section-title { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.section-title h2 { font-size: 1.05rem; font-weight: 800; margin: 0; padding: .45rem 1rem; background: var(--primary); color: #fff; border-radius: 6px; white-space: nowrap; }
.section-title::after { content: ''; flex: 1; height: 2px; background: var(--border); }

.post-meta { font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: auto; }
.post-meta i { margin-right: .3rem; }

.thumb-placeholder {
    width: 100%; height: 100%; min-height: 100%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #dbeafe, #eff6ff); color: #93c5fd; font-size: 2.5rem;
}
.thumb-placeholder.small { font-size: 1.2rem; }

/* Grid card */
.post-card {
    background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
    height: 100%; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s;
}
.post-card:hover { box-shadow: 0 14px 30px -14px rgba(15, 23, 42, .28); transform: translateY(-3px); }
.post-card .thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #e2e8f0; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-card:hover .thumb img { transform: scale(1.05); }
.post-card .body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 1.08rem; font-weight: 700; line-height: 1.45; margin: 0 0 .5rem; }
.post-card h3 a, .post-list-item h3 a { color: var(--text); }
.post-card h3 a:hover, .post-list-item h3 a:hover { color: var(--primary); }
.post-card p { color: var(--muted); font-size: .92rem; margin-bottom: .85rem; }

/* List card */
.post-list-item {
    display: flex; gap: 1.2rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1rem; margin-bottom: 1.1rem; transition: box-shadow .2s;
}
.post-list-item:hover { box-shadow: 0 14px 30px -16px rgba(15, 23, 42, .25); }
.post-list-item .thumb { flex: 0 0 250px; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: #e2e8f0; }
.post-list-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-list-item .body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.post-list-item h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.4; margin: 0 0 .45rem; }
.post-list-item p { color: var(--muted); font-size: .93rem; margin-bottom: .75rem; }
@media (max-width: 575.98px) {
    .post-list-item { flex-direction: column; }
    .post-list-item .thumb { flex: none; width: 100%; }
}

.archive-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff;
    border-radius: var(--radius); padding: 1.75rem 2rem; margin-bottom: 1.5rem;
}
.archive-header h1 { font-size: 1.8rem; font-weight: 800; margin: .25rem 0 .4rem; word-break: break-word; }
.archive-header p { opacity: .9; margin-bottom: .4rem; }
.archive-header small { opacity: .8; }
.archive-label { text-transform: uppercase; font-size: .75rem; letter-spacing: .1em; opacity: .8; font-weight: 700; }

.empty-state { text-align: center; background: #fff; border: 1px dashed var(--border); border-radius: var(--radius); padding: 3rem 1.5rem; }
.empty-state > i { font-size: 3rem; color: #93c5fd; }
.empty-state h3 { font-weight: 700; margin-top: .75rem; }
.empty-state p { color: var(--muted); }

.pagination .page-link { color: var(--primary); border-radius: 8px !important; margin: 0 3px 6px; border: 1px solid var(--border); }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Sidebar widgets ---------- */
.widget { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.5rem; }
.widget-title { font-size: 1rem; font-weight: 800; margin: 0 0 1rem; padding-bottom: .65rem; border-bottom: 2px solid var(--border); position: relative; }
.widget-title::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 50px; height: 2px; background: var(--primary); }

.search-form { display: flex; position: relative; }
.search-form input { padding-right: 3rem; border-radius: 999px; padding-left: 1rem; }
.search-form button { position: absolute; right: 4px; top: 4px; bottom: 4px; width: 38px; border: 0; border-radius: 50%; background: var(--primary); color: #fff; }

.mini-post { display: flex; gap: .8rem; align-items: center; padding: .65rem 0; border-bottom: 1px dashed var(--border); }
.mini-post:first-child { padding-top: 0; }
.mini-post:last-child { border-bottom: 0; padding-bottom: 0; }
.mini-thumb { flex: 0 0 76px; height: 58px; border-radius: 8px; overflow: hidden; display: block; background: #e2e8f0; }
.mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mini-rank { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.mini-post h4 { font-size: .9rem; font-weight: 600; line-height: 1.4; margin: 0 0 .2rem; }
.mini-post h4 a { color: var(--text); }
.mini-post h4 a:hover { color: var(--primary); }
.mini-date { font-size: .75rem; color: var(--muted); }

.cat-list { list-style: none; padding: 0; margin: 0; }
.cat-list a { display: flex; justify-content: space-between; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--border); color: var(--text); font-weight: 500; }
.cat-list li:last-child a { border-bottom: 0; }
.cat-list a:hover { color: var(--primary); }
.cat-list i { font-size: .7rem; color: var(--primary); }
.cat-list .count { background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: .05rem .6rem; font-size: .75rem; font-weight: 700; }

.tag-cloud a {
    display: inline-block; border: 1px solid var(--border); padding: .3rem .75rem; border-radius: 999px;
    font-size: .82rem; color: var(--text); margin: 0 .35rem .45rem 0; transition: all .15s;
}
.tag-cloud a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

.about-widget { text-align: center; }
.about-widget img { width: 116px; height: 116px; border-radius: 50%; object-fit: cover; border: 4px solid var(--primary-soft); margin-bottom: .75rem; }
.about-widget h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: .4rem; }
.about-widget p { color: var(--muted); font-size: .92rem; }

.social-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.social-grid a { display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem; border-radius: 8px; color: #fff; font-weight: 600; font-size: .86rem; transition: opacity .15s; }
.social-grid a:hover { opacity: .88; color: #fff; }
.s-facebook { background: #1877f2 !important; }
.s-youtube { background: #ff0000 !important; }
.s-twitter { background: #0f172a !important; }
.s-instagram { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af) !important; }
.s-linkedin { background: #0a66c2 !important; }
.s-github { background: #24292f !important; }
.s-whatsapp { background: #25d366 !important; }
.s-copy { background: var(--muted) !important; }

.widget-newsletter { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); border: 0; color: #fff; }
.widget-newsletter .widget-title { border-color: rgba(255, 255, 255, .2); }
.widget-newsletter .widget-title::after { background: #fff; }
.newsletter-text { opacity: .9; font-size: .92rem; }
.newsletter-form .form-control { border: 0; }

/* ---------- Single post ---------- */
.single-post { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; margin-bottom: 1.5rem; }
.single-post .breadcrumb { font-size: .85rem; margin-bottom: 1rem; }
.single-post h1 { font-size: 2.1rem; font-weight: 800; line-height: 1.3; margin: .75rem 0 1rem; letter-spacing: -.01em; word-break: break-word; }
.single-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.25rem; color: var(--muted); font-size: .88rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.single-meta a { color: var(--muted); }
.author-mini { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--text) !important; }
.avatar-sm { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; font-size: .85rem; }
.avatar-lg { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex: 0 0 80px; font-size: 1.8rem; }
.avatar-initial { display: inline-flex; align-items: center; justify-content: center; background: #dbeafe; color: var(--primary); font-weight: 700; border-radius: 50%; }
.featured-img { border-radius: 10px; overflow: hidden; margin: 0 0 1.75rem; }
.featured-img img { width: 100%; }

.post-content { font-size: 1.075rem; line-height: 1.85; word-wrap: break-word; }
.post-content h2, .post-content h3, .post-content h4 { font-weight: 700; margin: 1.8rem 0 .8rem; line-height: 1.35; }
.post-content img { max-width: 100%; height: auto; border-radius: 8px; }
.post-content iframe, .post-content video { max-width: 100%; }
.post-content blockquote { border-left: 4px solid var(--primary); background: var(--primary-soft); padding: 1rem 1.25rem; margin: 1.5rem 0; border-radius: 0 8px 8px 0; font-style: italic; }
.post-content pre { background: #0f172a; color: #e2e8f0; padding: 1rem 1.25rem; border-radius: 8px; overflow-x: auto; font-size: .9rem; }
.post-content code { background: #f1f5f9; color: #be123c; padding: .1rem .35rem; border-radius: 4px; font-size: .9em; }
.post-content pre code { background: none; color: inherit; padding: 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; display: block; overflow-x: auto; }
.post-content th, .post-content td { border: 1px solid var(--border); padding: .6rem .8rem; }
.post-content th { background: #f8fafc; }

.post-tags { margin-top: 1.75rem; }
.share-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.share-bar strong { margin-right: .25rem; }
.share-bar a, .share-bar button { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; border: 0; transition: transform .15s; }
.share-bar a:hover, .share-bar button:hover { transform: translateY(-2px); color: #fff; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.post-nav > div { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.post-nav > div:empty { background: none; border: 0; }
.post-nav small { display: block; color: var(--muted); margin-bottom: .25rem; }
.post-nav a { font-weight: 600; color: var(--text); }
.post-nav a:hover { color: var(--primary); }

.author-box { display: flex; gap: 1.25rem; align-items: flex-start; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.75rem; }
.author-box h4 { font-weight: 700; margin: .1rem 0 .4rem; font-size: 1.15rem; }
.author-box h4 a { color: var(--text); }
.author-box p { color: var(--muted); }

.comments-area { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; margin-bottom: 1.5rem; }
.comments-area h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 1rem; }
.comments-area h4 { font-size: 1.05rem; font-weight: 700; }
.comment { display: flex; gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.comment .avatar-initial { flex: 0 0 44px; height: 44px; }
.comment-head small { color: var(--muted); margin-left: .4rem; }
.comment p { margin: .3rem 0 0; white-space: normal; word-break: break-word; }

.contact-info > div > div { background: var(--primary-soft); border-radius: 10px; padding: 1rem; display: flex; gap: .7rem; align-items: center; height: 100%; }
.contact-info i { font-size: 1.4rem; color: var(--primary); }
.contact-info span { font-size: .92rem; word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #94a3b8; padding: 3rem 0 0; margin-top: 3rem; font-size: .93rem; }
.site-footer h5 { color: #fff; font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.footer-brand { font-size: 1.6rem; font-weight: 800; color: #fff; margin-bottom: .75rem; letter-spacing: -.02em; }
.footer-brand span { color: var(--primary-light) !important; }
.footer-social a { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .08); align-items: center; justify-content: center; margin-right: .35rem; }
.footer-social a:hover { background: var(--primary); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { padding: .3rem 0; }
.footer-links i { font-size: .7rem; }
.site-footer .mini-post { border-color: rgba(255, 255, 255, .08); }
.site-footer .mini-post h4 a { color: #e2e8f0; }
.site-footer .mini-post h4 a:hover { color: #fff; }
.site-footer .mini-thumb { background: rgba(255, 255, 255, .08); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 2.5rem; padding: 1.1rem 0; font-size: .85rem; }

#backToTop {
    position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%; border: 0;
    background: var(--primary); color: #fff; font-size: 1.1rem; box-shadow: 0 8px 20px -6px rgba(29, 78, 216, .6);
    opacity: 0; visibility: hidden; transition: all .25s; z-index: 1000;
}
#backToTop.show { opacity: 1; visibility: visible; }

@media (max-width: 767.98px) {
    .brand-name { font-size: 1.6rem; }
    .single-post { padding: 1.25rem; }
    .single-post h1 { font-size: 1.6rem; }
    .post-content { font-size: 1.02rem; }
    .archive-header { padding: 1.4rem; }
    .post-nav { grid-template-columns: 1fr; }
    .author-box { flex-direction: column; }
}

/* ---------- Ads ---------- */
.ad-slot { text-align: center; margin: 0 0 1.5rem; overflow: hidden; }
.ad-slot img { max-width: 100%; height: auto; border-radius: 8px; display: inline-block; }
.header-ad { margin: 0; max-width: 728px; }
.widget-sidebar_ad { background: none; border: 0; padding: 0; }
.single-post .ad-slot { margin: 0 0 1.5rem; }

/* ---------- Dropdown menu (sub-categories) ---------- */
.main-nav .caret { font-size: .7rem; margin-left: .2rem; }
.main-nav .sub-menu { list-style: none; margin: 0; padding: .4rem 0; }
.main-nav .sub-menu a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .55rem 1.1rem; color: var(--text); font-size: .92rem; font-weight: 500; white-space: nowrap; }
.main-nav .sub-menu a:hover { background: var(--primary-soft); color: var(--primary); }
@media (min-width: 992px) {
    .main-nav .has-sub { position: relative; }
    .main-nav .sub-menu {
        position: absolute; top: 100%; left: 0; min-width: 220px; background: #fff; border-radius: 0 0 10px 10px;
        box-shadow: 0 16px 34px -12px rgba(15, 23, 42, .35); opacity: 0; visibility: hidden; transform: translateY(6px);
        transition: all .18s ease; z-index: 1050;
    }
    .main-nav .sub-menu .sub-menu { top: -.4rem; left: 100%; border-radius: 10px; }
    .main-nav .has-sub:hover > .sub-menu, .main-nav .has-sub:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
}
@media (max-width: 991.98px) {
    .main-nav .sub-menu { padding: 0 0 .25rem 1rem; }
    .main-nav .sub-menu a { color: rgba(255, 255, 255, .88); padding: .45rem 1rem; }
    .main-nav .sub-menu a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
    .main-nav .sub-menu .caret { transform: rotate(90deg); }
}

/* ---------- Sub-categories ---------- */
.cat-sub { list-style: none; margin: 0; padding-left: 1rem; border-left: 2px solid var(--primary-soft); }
.cat-sub a { font-size: .92rem; font-weight: 400 !important; }
.cat-list li li:last-child > a { border-bottom: 1px solid var(--border); }
.archive-breadcrumb { margin-bottom: .5rem; font-size: .82rem; --bs-breadcrumb-divider-color: rgba(255, 255, 255, .6); }
.archive-breadcrumb a { color: rgba(255, 255, 255, .85); }
.archive-breadcrumb a:hover { color: #fff; }
.subcat-chips { margin-top: .9rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .85rem; }
.subcat-chips span { opacity: .85; margin-right: .2rem; }
.subcat-chips a { background: rgba(255, 255, 255, .15); color: #fff; padding: .25rem .75rem; border-radius: 999px; }
.subcat-chips a:hover { background: #fff; color: var(--primary); }

/* ---- Services ---- */
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.services-home { margin-top: 2.5rem; }
.service-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.service-card:hover { box-shadow: 0 10px 30px rgba(15, 23, 42, .1); transform: translateY(-2px); }
.svc-media { display: block; }
.service-card.has-image .svc-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.service-card:not(.has-image) .svc-media { padding: 1.4rem 1.25rem 0; }
.svc-icon { display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 14px; background: var(--primary-soft, #e0e7ff); color: var(--primary); font-size: 1.7rem; flex: 0 0 auto; }
.svc-icon.sm { width: 40px; height: 40px; border-radius: 10px; font-size: 1.15rem; }
.svc-icon.lg { width: 72px; height: 72px; border-radius: 18px; font-size: 2.1rem; }
.svc-body { padding: 1rem 1.25rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.svc-cat { align-self: flex-start; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--primary); text-decoration: none; margin-bottom: .35rem; }
.service-card h3 { font-size: 1.08rem; font-weight: 700; margin: 0 0 .45rem; line-height: 1.35; }
.service-card h3 a { color: inherit; text-decoration: none; }
.service-card h3 a:hover { color: var(--primary); }
.service-card p { font-size: .9rem; color: var(--muted, #64748b); margin: 0 0 .9rem; }
.svc-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; padding-top: .8rem; border-top: 1px solid var(--border); }
.svc-price { display: flex; flex-direction: column; line-height: 1.2; }
.svc-price small { font-size: .72rem; color: var(--muted, #64748b); }
.svc-price strong { font-size: 1.1rem; color: var(--primary); }
.svc-price.on-request { font-size: .85rem; font-weight: 600; color: var(--muted, #64748b); }
.svc-actions { display: flex; gap: .35rem; align-items: center; }
.btn-wa, .btn-wa-icon { background: #25d366; border-color: #25d366; color: #fff; }
.btn-wa:hover, .btn-wa-icon:hover { background: #1ebe5b; border-color: #1ebe5b; color: #fff; }
.btn-call, .btn-call-icon { background: var(--card); border: 1px solid var(--primary); color: var(--primary); }
.btn-call:hover, .btn-call-icon:hover { background: var(--primary); color: #fff; }
.btn-wa-icon, .btn-call-icon { width: 32px; height: 31px; padding: 0; display: inline-grid; place-items: center; }
.services-hero { background: linear-gradient(135deg, var(--primary), #0b1f5c); color: #fff; border-radius: var(--radius); padding: 2.2rem 2rem; margin-bottom: 1.25rem; }
.services-hero h1 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 800; margin: .4rem 0; }
.services-hero p { opacity: .9; margin: 0; max-width: 640px; }
.services-hero .archive-label { background: rgba(255, 255, 255, .16); color: #fff; }
.svc-hero-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.svc-hero-actions .btn-call { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .5); color: #fff; }
.svc-tabs a { flex: 0 0 auto; border: 1px solid var(--border); background: var(--card); color: inherit; border-radius: 999px; padding: .38rem 1rem; font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.svc-tabs a:hover { border-color: var(--primary); color: var(--primary); }
.svc-tabs a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.svc-tabs a small { opacity: .7; font-weight: 500; }
.service-detail .svc-head { display: flex; gap: 1rem; align-items: flex-start; }
.service-detail h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin: .15rem 0 .5rem; }
.service-detail .lead { font-size: 1.05rem; color: var(--muted, #64748b); }
.svc-cover { width: 100%; border-radius: var(--radius-sm, 8px); margin: .75rem 0 .5rem; aspect-ratio: 16 / 9; object-fit: cover; }
.svc-features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .55rem 1.25rem; }
.svc-features li { display: flex; gap: .55rem; align-items: flex-start; }
.svc-features i { color: #16a34a; margin-top: .15rem; }
.svc-contact-box { position: sticky; top: 90px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; }
.svc-contact-price { margin-bottom: 1rem; }
.svc-contact-price .svc-price strong { font-size: 1.6rem; }
.svc-contact-btns { display: grid; gap: .5rem; }
.svc-contact-btns .btn { padding: .6rem; font-weight: 600; }
.svc-widget { list-style: none; padding: 0; margin: 0; }
.svc-widget li + li { border-top: 1px solid var(--border); }
.svc-widget a { display: flex; gap: .7rem; align-items: center; padding: .6rem 0; color: inherit; text-decoration: none; }
.svc-widget a:hover strong { color: var(--primary); }
.svc-widget strong { display: block; font-size: .92rem; line-height: 1.3; }
.svc-widget .svc-price { flex-direction: row; gap: .3rem; align-items: baseline; }
.svc-widget .svc-price strong { font-size: .85rem; display: inline; }
.svc-widget .svc-price.on-request { font-size: .78rem; font-weight: 500; }
.svc-widget-btns { display: flex; gap: .5rem; margin-top: .6rem; }
.svc-widget-btns .btn { flex: 1; font-size: .85rem; }
@media (max-width: 991.98px) { .svc-contact-box { position: static; } }
@media (max-width: 575.98px) { .services-hero { padding: 1.6rem 1.2rem; } .service-grid { grid-template-columns: 1fr; } }

/* Smart sticky sidebar (Appearance → Widgets) */
@media (min-width: 992px) {
    .sidebar-inner[data-sticky] { position: sticky; top: 90px; }
}

/* Logo sizes come from Admin → Settings → Logo */
@media (max-width: 767.98px) { .brand-logo { height: var(--logo-h-m, 44px); max-width: 70vw; } }
.footer-logo { filter: var(--flogo-filter, none); height: var(--flogo-h, 48px); width: auto; max-width: 100%; object-fit: contain; display: inline-block; }

/* =====================================================================
   Phone "app" layout (below 768px): app-bar, drawer, bottom tab bar,
   categories sheet and compact cards. Desktop is not affected.
   ===================================================================== */
.m-appbar, .m-tabbar { display: none; }
@media (max-width: 767.98px) {
    /* The normal header designs step aside on phones */
    .has-m-app .topbar, .has-m-app .topbar-color, .has-m-app .site-header, .has-m-app .main-nav, .has-m-app .header-ad-row { display: none !important; }
    .has-m-app { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
    .has-m-app .site-main { padding-top: .9rem; }

    /* ---- Top app-bar ---- */
    .m-appbar {
        display: flex; align-items: center; gap: .5rem; position: sticky; top: 0; z-index: 1030;
        height: 56px; padding: 0 .75rem 0 1rem;
        background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
        border-bottom: 1px solid transparent; transition: box-shadow .2s, border-color .2s;
    }
    .m-appbar.scrolled { box-shadow: 0 6px 20px -12px rgba(15, 23, 42, .35); border-bottom-color: var(--border); }
    .m-brand { display: flex; align-items: center; min-width: 0; margin-right: auto; }
    .m-logo { height: min(var(--logo-h-m, 44px), 40px); width: auto; max-width: 58vw; object-fit: contain; }
    .m-brand-name { font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; color: var(--text); white-space: nowrap; }
    .m-brand-name span { color: var(--primary); }
    .m-actions { display: flex; align-items: center; gap: .15rem; }
    .m-icon { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--text); font-size: 1.25rem; }
    .m-icon:active { background: var(--primary-soft); }
    .m-icon .cart-badge { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; font-size: .62rem; line-height: 17px; padding: 0 4px; border-radius: 9px; background: #ef4444; color: #fff; text-align: center; font-weight: 700; }
    .m-search { position: absolute; inset: 0; display: flex; align-items: center; gap: .5rem; padding: 0 .6rem 0 1rem; background: var(--card);
        opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .18s; }
    .m-appbar.searching .m-search { opacity: 1; visibility: visible; transform: none; }
    .m-search > i { color: var(--muted); }
    .m-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 1rem; color: var(--text); min-width: 0; }
    .m-search-close { border: 0; background: var(--primary-soft); color: var(--primary); width: 34px; height: 34px; border-radius: 10px; }

    /* ---- Drawer menu ---- */
    .m-drawer { width: min(84vw, 330px) !important; background: var(--card); color: var(--text); border-radius: 0 20px 20px 0; }
    .m-drawer .offcanvas-header { border-bottom: 1px solid var(--border); }
    .m-menu .navbar-nav { list-style: none; padding: 0; margin: 0; display: block; }
    .m-menu .nav-link { display: flex; justify-content: space-between; align-items: center; padding: .72rem .5rem; color: var(--text); font-weight: 600; border-radius: 10px; }
    .m-menu .nav-link.active, .m-menu .nav-link:active { background: var(--primary-soft); color: var(--primary); }
    .m-menu .sub-menu { list-style: none; margin: 0 0 .3rem .8rem; padding: 0 0 0 .6rem; border-left: 2px solid var(--border); display: none; }
    .m-menu li.open > .sub-menu { display: block; animation: mSubIn .18s ease; }
    @keyframes mSubIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
    .m-menu li.has-sub { position: relative; }
    .m-menu li.has-sub > a { padding-right: 3rem; }
    .m-sub-toggle { position: absolute; right: .25rem; top: .3rem; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--muted);
        display: grid; place-items: center; transition: transform .2s, background .15s; }
    .m-sub-toggle:active { background: var(--primary-soft); }
    .m-menu .sub-menu .m-sub-toggle { top: .05rem; width: 32px; height: 32px; }
    .m-menu li.open > .m-sub-toggle { transform: rotate(180deg); color: var(--primary); }
    .m-menu .sub-menu a { display: block; padding: .5rem .5rem; color: var(--muted); font-size: .92rem; }
    .m-menu .caret { display: none; }
    .m-drawer-foot { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
    .m-drawer-foot:empty { display: none; }
    .m-drawer-row { display: flex; justify-content: space-between; align-items: center; padding: .6rem .5rem; color: var(--text); font-weight: 600; }
    .m-drawer-row i { margin-right: .4rem; }
    .m-appbar .m-theme { background: transparent !important; color: var(--text) !important; border-radius: 12px; width: 40px; height: 40px; font-size: 1.1rem; }
    .m-appbar .m-theme:active { background: var(--primary-soft) !important; }
    .m-social { display: flex; gap: .5rem; flex-wrap: wrap; padding: .6rem .5rem; }
    .m-social a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }

    /* ---- Bottom tab bar ---- */
    .m-tabbar {
        display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
        height: calc(62px + env(safe-area-inset-bottom)); padding: 0 .35rem env(safe-area-inset-bottom);
        background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
        border-top: 1px solid var(--border); box-shadow: 0 -8px 24px -16px rgba(15, 23, 42, .35);
    }
    .m-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 62px; border: 0; background: none; padding: 0;
        color: var(--muted); font-size: .66rem; font-weight: 600; text-decoration: none; -webkit-tap-highlight-color: transparent; }
    .m-tab i { font-size: 1.28rem; line-height: 1; transition: transform .15s; }
    .m-tab.active { color: var(--primary); }
    .m-tab.active i { transform: translateY(-1px); }
    .m-tab:active i { transform: scale(.9); }
    .m-home { position: relative; }
    .m-home-btn { width: 54px; height: 54px; margin-top: -26px; margin-bottom: 1px; border-radius: 50%; display: grid; place-items: center; color: #fff;
        background: linear-gradient(145deg, var(--primary-light, #3b82f6), var(--primary-dark, #1e3a8a)); border: 4px solid var(--card);
        box-shadow: 0 10px 22px -8px rgba(var(--primary-rgb, 29, 78, 216), .75); transition: transform .15s; }
    .m-home-btn i { font-size: 1.35rem; }
    .m-home:active .m-home-btn { transform: scale(.94); }
    .m-home.active span:last-child { color: var(--primary); }
    .m-avatar { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; border: 2px solid transparent; }
    .m-tab.active .m-avatar { border-color: var(--primary); }
    .m-avatar .m-avatar-img { width: 100%; height: 100%; font-size: .7rem; object-fit: cover; border-radius: 50%; display: grid; place-items: center; }
    #backToTop { bottom: calc(80px + env(safe-area-inset-bottom)); right: 14px; width: 40px; height: 40px; }

    /* ---- Categories sheet ---- */
    .m-sheet { height: auto !important; max-height: 78vh; border-radius: 22px 22px 0 0; background: var(--card); color: var(--text); padding-bottom: env(safe-area-inset-bottom); }
    .m-sheet-handle { width: 42px; height: 5px; border-radius: 3px; background: var(--border); margin: .55rem auto 0; }
    .m-sheet .offcanvas-header { padding: .7rem 1.1rem .4rem; }
    .m-sheet .offcanvas-title { font-weight: 800; font-size: 1.05rem; }
    .m-sheet .offcanvas-body { padding: .4rem 1.1rem 1.4rem; }
    .m-sheet-search { display: flex; align-items: center; gap: .5rem; background: var(--bg, #f1f5f9); border: 1px solid var(--border); border-radius: 12px; padding: .1rem .8rem; margin-bottom: 1rem; }
    .m-sheet-search input { flex: 1; border: 0; outline: 0; background: transparent; padding: .55rem 0; color: var(--text); }
    .m-sheet-search i { color: var(--muted); }
    .m-cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
    .m-cat { --cc: #2563eb; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .55rem; border: 1px solid var(--border); border-radius: 14px;
        padding: .65rem; background: color-mix(in srgb, var(--cc) 5%, var(--card)); color: var(--text); text-decoration: none; transition: transform .12s; }
    .m-cat:active { transform: scale(.97); }
    .m-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: .9rem; border-radius: 14px; background: var(--bg, #f1f5f9); border: 1px solid var(--border); }
    .m-seg button { border: 0; border-radius: 10px; padding: .55rem .5rem; background: transparent; color: var(--muted); font-weight: 700; font-size: .88rem; display: flex; align-items: center; justify-content: center; gap: .4rem; transition: all .15s; }
    .m-seg button.active { background: var(--card); color: var(--primary); box-shadow: 0 4px 12px -6px rgba(15, 23, 42, .35); }
    .m-sheet-all { display: flex; justify-content: center; align-items: center; gap: .35rem; margin-top: .9rem; font-weight: 700; font-size: .88rem; }
    .m-cat-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--cc); font-size: .95rem; }
    .m-cat-name { font-weight: 700; font-size: .88rem; line-height: 1.2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .m-cat-count { font-size: .7rem; font-weight: 700; color: var(--cc); background: color-mix(in srgb, var(--cc) 14%, var(--card)); border-radius: 999px; padding: .1rem .45rem; }
}

/* ---- Compact, app-like content on phones ---- */
@media (max-width: 575.98px) {
    .site-main .row.g-4 { --bs-gutter-y: .75rem; }
    .section-title { margin-bottom: .8rem; }
    .section-title h2 { font-size: .88rem; padding: .35rem .8rem; }

    /* Post cards become a slim row: small picture left, text right */
    .post-card, .post-list-item { flex-direction: row !important; align-items: stretch; gap: .75rem; padding: .6rem; border-radius: 14px; margin-bottom: 0; }
    .post-list-item { margin-bottom: .75rem; }
    .post-card:hover { transform: none; }
    .post-card .thumb, .post-list-item .thumb { flex: 0 0 104px !important; width: 104px !important; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; align-self: flex-start; }
    .post-card .body, .post-list-item .body { padding: .1rem 0; min-width: 0; }
    .post-card .cat-badge, .post-list-item .cat-badge { font-size: .6rem; padding: .15rem .45rem; margin-bottom: .3rem !important; }
    .post-card h3, .post-list-item h3 { font-size: .95rem; line-height: 1.38; margin-bottom: .3rem;
        display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
    .post-card p, .post-list-item p { display: none; }
    .post-card .post-meta, .post-list-item .post-meta { font-size: .7rem; gap: .2rem .6rem; }
    .post-card .post-meta span:has(.bi-person), .post-list-item .post-meta span:has(.bi-person) { display: none; }

    .widget { padding: 1rem; border-radius: 14px; margin-bottom: 1rem; }
    .pagination { font-size: .85rem; }
    .archive-header { padding: 1.1rem 1.2rem; }
    .archive-header h1 { font-size: 1.35rem; }
}
