/* City Community Portal — core stylesheet. Roboto font only, everywhere. */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #1a3d8f;
    --primary-dark: #12295e;
    --accent: #e63946;
    --bg: #f2f4f8;
    --card-bg: #ffffff;
    --text: #1b2430;
    --text-muted: #5c6470;
    --border: #e6e9f0;
    --radius: 10px;
}

html, body {
    font-family: 'Roboto', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: clip; /* not "hidden" — hidden silently breaks position:sticky in nested elements */
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: 'Roboto', Arial, sans-serif; cursor: pointer; }

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---------- Top bar ---------- */
.topbar {
    background: var(--primary-dark);
    color: #fff;
    font-size: 0.8rem;
}
.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 6px;
    padding-bottom: 6px;
    flex-wrap: wrap;
    gap: 8px;
}
.topbar .contact-info { display: flex; gap: 18px; }
.topbar .top-links { display: flex; align-items: center; gap: 14px; }
.topbar .socials { display: flex; gap: 10px; }

/* User account dropdown */
.user-dropdown { position: relative; }
.user-dropdown-toggle { background: none; border: none; color: #fff; font-family: 'Roboto', sans-serif; font-size: 0.8rem; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.user-dropdown-menu { display: none; position: absolute; top: 100%; right: 0; background: #fff; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,0.15); min-width: 170px; margin-top: 8px; overflow: hidden; z-index: 150; }
.user-dropdown-menu a { display: flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--text); font-size: 0.85rem; }
.user-dropdown-menu a:hover { background: var(--bg); }
.user-dropdown.open .user-dropdown-menu { display: block; }

/* ---------- Header / nav ---------- */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--primary); }
.brand img { height: 40px; width: 40px; }
.brand small { display: block; font-weight: 400; font-size: 0.7rem; color: var(--text-muted); }

.site-nav { display: flex; align-items: center; gap: 22px; flex: 1; justify-content: flex-end; }
.site-nav a { font-size: 0.92rem; font-weight: 500; padding: 6px 2px; }
.site-nav a:hover { color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-actions .search-btn { background: none; border: none; font-size: 1.1rem; color: var(--text); display: inline-flex; align-items: center; }
.btn { display: inline-block; padding: 9px 18px; border-radius: 8px; font-weight: 500; font-size: 0.9rem; border: none; color: #fff !important; }
.btn-primary { background: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary) !important; }

.hamburger { display: none; background: none; border: none; font-size: 1.4rem; color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    color: #fff;
    margin-top: 0;
    aspect-ratio: 2 / 1;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    overflow: hidden;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero .container { position: relative; z-index: 1; max-width: 780px; margin: 0 auto; padding: 0 20px; }
.hero h1 { font-size: 2.4rem; font-weight: 700; line-height: 1.2; text-shadow: 0 2px 10px rgba(0,0,0,0.55); }
.hero h1 .accent { color: #ff8a80; display: block; }
.hero p { margin-top: 14px; font-size: 1rem; color: #f2f4f8; text-shadow: 0 1px 6px rgba(0,0,0,0.55); }
.hero .badges { display: flex; gap: 16px; margin-top: 18px; flex-wrap: wrap; font-size: 0.85rem; text-shadow: 0 1px 4px rgba(0,0,0,0.5); justify-content: center; }
.hero .cta-row { display: flex; gap: 14px; margin-top: 24px; flex-wrap: wrap; justify-content: center; }

/* ---------- Stats bar ---------- */
.stats-bar {
    background: #fff;
    margin-top: -28px;
    position: relative;
    z-index: 2;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(20, 30, 70, 0.08);
    max-width: 1240px;
    margin-left: auto; margin-right: auto;
}
.stats-bar .stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    padding: 20px 10px;
}
.stat-item { text-align: center; padding: 6px; border-right: 1px solid var(--border); }
.stat-item:last-child { border-right: none; }
.stat-item .num { font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.stat-item .label { font-size: 0.78rem; color: var(--text-muted); }

/* ---------- Layout grid ---------- */
.main-layout {
    display: grid;
    grid-template-columns: 240px 1fr 300px;
    gap: 20px;
    padding: 30px 0;
}

/* Sticky side widgets on desktop/tablet — pure CSS sticky (no internal scrollbar), so
   they float down the page along with the scroll and automatically stop exactly where
   the main content column (News + Community Feed) ends, right before Photo Gallery.
   The sticky rule lives on .sticky-inner (a wrapper inside each aside), not on the
   aside itself: the aside is a grid item stretched (default align-items:stretch) to the
   full row height, so it has no room of its own to move — the inner wrapper does. */
.sticky-inner {
    position: sticky;
    top: 84px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 18px;
    margin-bottom: 20px;
}
.card-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 14px;
}
.card-title a { font-size: 0.8rem; font-weight: 500; color: var(--primary); }

/* Shared form styling — used by every public submission/edit form (business, jobs,
   marketplace, register, login, contact, my-profile) as well as the admin panel */
.form-grid label { display: block; font-size: 0.85rem; font-weight: 500; margin: 14px 0 6px; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-family: 'Roboto', sans-serif; font-size: 0.92rem; }
.form-grid textarea { min-height: 120px; }
.form-grid input[type="file"] { padding: 8px 0; border: none; }
.form-grid input[type="checkbox"] { width: auto; }

/* Sidebar menu */
.side-menu { display: flex; flex-direction: column; gap: 3px; }
.side-menu li a {
    display: flex; align-items: center; gap: 12px; padding: 9px 10px 9px 6px; font-size: 0.9rem;
    font-weight: 500; border-radius: 10px; position: relative; transition: background 0.2s ease, transform 0.2s ease;
}
.side-menu li a i {
    width: 26px; height: 14px; min-width: 26px; border-radius: 2px; display: flex; align-items: center;
    justify-content: center; color: #fff; font-size: 0.48rem; box-shadow: 0 2px 6px rgba(20,30,70,0.16);
}
.side-menu li a::after {
    content: '\f105'; font-family: 'Font Awesome 6 Free'; font-weight: 900; margin-left: auto;
    color: var(--border); font-size: 0.78rem; opacity: 0; transform: translateX(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.side-menu li a:hover { background: var(--bg); transform: translateX(2px); }
.side-menu li a:hover::after { opacity: 1; transform: translateX(0); color: var(--primary); }
.side-menu li:nth-child(11n+1) a i { background: linear-gradient(135deg, #5b8def, #2f5fd6); }
.side-menu li:nth-child(11n+2) a i { background: linear-gradient(135deg, #38cf9a, #189b6c); }
.side-menu li:nth-child(11n+3) a i { background: linear-gradient(135deg, #ffa93f, #e77d0e); }
.side-menu li:nth-child(11n+4) a i { background: linear-gradient(135deg, #ac6cf5, #7c3aed); }
.side-menu li:nth-child(11n+5) a i { background: linear-gradient(135deg, #ff7591, #e0405a); }
.side-menu li:nth-child(11n+6) a i { background: linear-gradient(135deg, #29c2c4, #0e8f91); }
.side-menu li:nth-child(11n+7) a i { background: linear-gradient(135deg, #f7c14b, #dc9a1f); }
.side-menu li:nth-child(11n+8) a i { background: linear-gradient(135deg, #4facfe, #0f7fd9); }
.side-menu li:nth-child(11n+9) a i { background: linear-gradient(135deg, #f4589a, #c2185b); }
.side-menu li:nth-child(11n+10) a i { background: linear-gradient(135deg, #4be08f, #0fae5e); }
.side-menu li:nth-child(11n+0) a i { background: linear-gradient(135deg, #ffb84d, #ff7b29); }

/* Weather */
.weather-card { background: linear-gradient(135deg, #2b5cb8, #163f8f); color: #fff; }
.weather-card .temp { font-size: 2rem; font-weight: 700; }
.weather-card .row { display: flex; justify-content: space-between; font-size: 0.8rem; margin-top: 10px; }
.weather-card .forecast { display: flex; justify-content: space-between; margin-top: 14px; font-size: 0.75rem; }

/* Hashtags */
.hashtag-list li { padding: 6px 0; font-size: 0.88rem; color: var(--primary); font-weight: 500; }

/* Promo box */
.promo-box { background: linear-gradient(135deg, #eaf0ff, #dfe8ff); text-align: center; }
.promo-box p { font-size: 0.85rem; color: var(--text-muted); margin: 8px 0 14px; }

/* News cards */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.news-card { border-radius: 8px; overflow: hidden; border: 1px solid var(--border); transition: box-shadow 0.2s, transform 0.2s; }
.news-card:hover { box-shadow: 0 8px 20px rgba(20,30,70,0.1); transform: translateY(-2px); }
.news-card img { height: 160px; object-fit: cover; width: 100%; background: var(--bg); }
.news-card .tag { display: inline-block; background: var(--accent); color: #fff; font-size: 0.65rem; padding: 2px 8px; border-radius: 4px; margin: 8px 8px 0; }
.news-card h4 { font-size: 0.85rem; padding: 6px 8px 4px; line-height: 1.35; }
.news-card .meta { font-size: 0.72rem; color: var(--text-muted); padding: 0 8px 10px; display: flex; gap: 10px; }

/* Feed post */
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.post-head > div { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; min-width: 0; }
.post-head .name { font-weight: 600; font-size: 0.9rem; }
.post-head .time { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; margin-left: auto; }
.feed-post .caption, .feed-post p.caption { margin-bottom: 14px; font-size: 0.92rem; line-height: 1.6; }
.feed-post .photo-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 6px; }
.feed-post .photo-grid img { border-radius: 8px; height: 100%; object-fit: cover; }
.feed-post .photo-grid .side-col { display: grid; grid-template-rows: 1fr 1fr; gap: 6px; }
.feed-post .stats-row { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); margin: 10px 0; }
.feed-post .action-row { display: flex; border-top: 1px solid var(--border); padding-top: 10px; }
.feed-post .action-row span { flex: 1; text-align: center; font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: 6px; }
.feed-post .action-row .comment-link { flex: 1; text-align: center; font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.feed-post .action-row .comment-link:hover { color: var(--primary); }

/* Right widgets */
.deal-widget { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }
.deal-widget p { font-size: 0.82rem; margin: 8px 0 14px; color: #dbe3ff; }
.deal-widget .btn { background: #fff; color: var(--primary) !important; }

/* Upcoming Events — colored card per item (same automatic gradient system as
   the Business Directory / Marketplace / Job Portal listing cards), keyed by
   event id, so every event gets its own consistent, unique color. */
.event-item { display: flex; gap: 12px; padding: 14px; border-radius: 12px; margin-bottom: 10px; color: #fff; transition: box-shadow 0.2s, transform 0.2s; }
.event-item:last-child { margin-bottom: 0; }
.event-item:hover { box-shadow: 0 8px 20px rgba(20,30,70,0.22); transform: translateY(-2px); }
.event-date { background: rgba(255,255,255,0.22); border-radius: 8px; text-align: center; padding: 6px 10px; font-size: 0.7rem; font-weight: 700; color: #fff; min-width: 46px; }
.event-date .day { font-size: 1rem; }
.event-item h5 { font-size: 0.86rem; color: #fff; }
.event-item .meta { font-size: 0.72rem; color: rgba(255,255,255,0.85); }

.business-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.business-item:last-child { border-bottom: none; }
.business-item img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }
.business-item h5 { font-size: 0.85rem; }
.business-item .cat { font-size: 0.72rem; color: var(--text-muted); }
.business-item .rating { margin-left: auto; font-size: 0.8rem; font-weight: 600; color: #f2a900; }

.emergency-card { background: #fdecea; border: 1px solid #f6c4c2; }
.emergency-card .card-title { color: var(--accent); }
.emergency-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.85rem; }

/* Gallery strip — fetches 6 photos, but only the mobile layout (<=640px)
   below shows all 6; desktop/tablet keep the original 5-photo look. */
.gallery-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.gallery-strip img { height: 110px; object-fit: cover; border-radius: 8px; }
.gallery-strip img:nth-child(6) { display: none; }

/* Categories — colored card per item (same gradient system), keyed by category id */
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.category-item { display: flex; align-items: center; gap: 10px; border-radius: 12px; padding: 12px 14px; color: #fff; transition: box-shadow 0.2s, transform 0.2s; min-width: 0; }
.category-item:hover { box-shadow: 0 8px 20px rgba(20,30,70,0.22); transform: translateY(-2px); }
.category-item .icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.22); color: #fff; font-size: 1.1rem; flex-shrink: 0; }
.category-item > div:not(.icon) { min-width: 0; flex: 1; }
.category-item h5 { font-size: 0.88rem; color: #fff; overflow-wrap: break-word; }
.category-item .count { font-size: 0.75rem; color: rgba(255,255,255,0.85); }

/* Desktop/tablet only — smaller, centered category cards, 4 per row.
   Mobile keeps the original horizontal icon+text layout (untouched, see
   the max-width:640 override below which still sets 2 per row there). */
@media (min-width: 641px) {
    .category-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
    .category-item { flex-direction: column; justify-content: center; text-align: center; padding: 20px 14px; gap: 8px; }
}

/* Jobs / Marketplace bottom — colored card per item (same gradient system), keyed by job/listing id */
.bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.job-item, .product-item { border: none; border-radius: 12px; padding: 14px; color: #fff; text-align: center; transition: box-shadow 0.2s, transform 0.2s; }
.job-item:hover, .product-item:hover { box-shadow: 0 8px 20px rgba(20,30,70,0.22); transform: translateY(-2px); }
.job-item h5 { font-size: 0.9rem; color: #fff; }
.job-item .company { font-size: 0.8rem; color: rgba(255,255,255,0.85); margin: 4px 0; }
.job-item .salary { font-size: 0.8rem; font-weight: 700; color: #fff; }
.job-list, .product-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.product-item img { height: 90px; width: 90px; object-fit: cover; border-radius: 50%; margin: 0 auto 8px; }

/* Generic "no image" placeholder box — used wherever an item has no uploaded photo yet */
.img-placeholder { display:flex; align-items:center; justify-content:center; background:var(--bg); color:var(--text-muted); width:100%; }
.product-item .img-placeholder { background: rgba(255,255,255,0.18); color: #fff; border-radius: 50%; width: 90px; height: 90px; margin: 0 auto 8px; }
.product-item h5 { font-size: 0.85rem; color: #fff; }
.product-item .price { font-weight: 700; color: #fff; font-size: 0.85rem; }

/* Newsletter */
.newsletter-bar { background: var(--primary-dark); color: #fff; padding: 26px 0; }
.newsletter-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.newsletter-bar form { display: flex; gap: 10px; flex: 1; max-width: 420px; }
.newsletter-bar input { flex: 1; padding: 10px 14px; border-radius: 8px; border: none; }
.newsletter-bar h4 { font-size: 1rem; }
.newsletter-bar p { font-size: 0.82rem; color: #c6d0ee; margin-top: 4px; }

/* Footer */
.site-footer { background: #0f1c3f; color: #c6d0ee; padding: 40px 0 18px; font-size: 0.86rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.footer-links-row { display: contents; }
.footer-grid h5 { color: #fff; margin-bottom: 12px; font-size: 0.95rem; }
.footer-grid li { padding: 4px 0; }
.footer-socials { display: flex; gap: 10px; margin-top: 14px; }
.footer-socials a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; }
.footer-socials a:hover { background: var(--primary); }
.footer-bottom { text-align: center; border-top: 1px solid rgba(255,255,255,0.1); margin-top: 24px; padding-top: 16px; font-size: 0.8rem; color: #8b97be; }
.footer-bottom div { padding: 3px 0; }
.footer-credit-link { color: #8b97be; text-decoration: none; border-bottom: 1px dotted rgba(139,151,190,0.6); transition: color 0.15s, border-color 0.15s; }
.footer-credit-link:hover { color: #fff; border-color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .main-layout { grid-template-columns: 1fr 300px; }
    .side-menu-col { display: none; }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-strip { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .topbar { display: none; }
    .site-nav { display: none; }
    .hamburger { display: block; }
    .header-actions .btn-primary { display: none; }
    .main-layout { grid-template-columns: 1fr; }
    .side-menu-col { display: block; order: 2; }
    .side-menu-col .sticky-inner, .right-col .sticky-inner { position: static; max-height: none; overflow-y: visible; }
    main { order: 1; }
    .right-col { order: 3; }
    .stats-bar .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .stat-item:nth-child(3) { border-right: none; }
    .bottom-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-links-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
}

@media (max-width: 640px) {
    .container { padding: 0 20px; }
    .card-title { gap: 10px 14px; }
    .card-title a { white-space: nowrap; }
    .hero h1 { font-size: 1.7rem; }
    .hero .container { max-width: 100%; }
    .news-grid { grid-template-columns: 1fr; }
    .gallery-strip { grid-template-columns: repeat(2, 1fr); }
    .gallery-strip img:nth-child(6) { display: block; }
    .category-grid { grid-template-columns: 1fr 1fr; }
    .job-list, .product-list { grid-template-columns: 1fr; }
    .stats-bar .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-item:nth-child(2n) { border-right: none; }
    .footer-grid { grid-template-columns: 1fr; }
    .newsletter-bar form { max-width: 100%; }
}

/* Lightbox — full-screen photo preview (used by homepage Photo Gallery strip) */
.lightbox { position:fixed; inset:0; background:rgba(0,0,0,0.85); display:none; align-items:center; justify-content:center; z-index:300; }
.lightbox.open { display:flex; }
.lightbox img { max-width:90%; max-height:85%; border-radius:8px; }
.lightbox .close { position:absolute; top:20px; right:30px; color:#fff; font-size:2rem; cursor:pointer; background:none; border:none; }

/* Mobile off-canvas nav */
.mobile-nav {
    position: fixed; top: 0; right: -280px; width: 280px; height: 100%;
    background: #fff; box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    z-index: 200; transition: right 0.25s ease; padding: 20px; overflow-y: auto;
}
.mobile-nav.open { right: 0; }
.mobile-nav a { display: block; padding: 12px 4px; border-bottom: 1px solid var(--border); font-weight: 500; }
.mobile-nav .close-btn { background: none; border: none; font-size: 1.3rem; float: right; }
.mobile-nav .mobile-create-post { text-align: center; border: none; border-radius: 8px; margin: 46px 0 18px; padding: 12px; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 199; display: none; }
.overlay.show { display: block; }

@media print {
    .site-header, .topbar, .hamburger, .mobile-nav, .overlay, .newsletter-bar, .site-footer { display: none !important; }
}

/* ================= City Information module ================= */
/* Self-contained styles for city-info.php + the homepage City Information
   section — new class names only, nothing above is touched, so existing
   pages/layouts are unaffected. */

.cms-content { line-height: 1.7; }
.cms-content p { margin-bottom: 10px; }
.cms-content img { max-width: 100%; border-radius: 8px; }
.cms-content table { border-collapse: collapse; width: 100%; margin: 10px 0; }
.cms-content table td, .cms-content table th { border: 1px solid var(--border); padding: 6px 10px; }

.cat-badge { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 4px 12px; border-radius: 20px; background: rgba(255,255,255,0.22); color: #fff; margin-bottom: 8px; }
.cat-badge-light { background: var(--bg); color: var(--text-muted); }

.filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.filter-row a { padding: 6px 14px; border-radius: 20px; background: var(--bg); font-size: 0.85rem; white-space: nowrap; }
.filter-row a.active { background: var(--primary); color: #fff; }

/* Homepage section + main listing page hero */
.ci-hero {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    background-size: cover; background-position: center;
    border-radius: var(--radius); color: #fff; padding: 52px 30px; text-align: center; margin-bottom: 20px;
    box-shadow: 0 14px 34px rgba(20,30,70,0.22);
}
.ci-hero::before, .ci-hero::after {
    content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,0.08); pointer-events: none;
}
.ci-hero::before { width: 260px; height: 260px; top: -120px; right: -60px; }
.ci-hero::after { width: 180px; height: 180px; bottom: -90px; left: -40px; }
.ci-hero-badge {
    position: relative; display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.3); color: #fff; font-size: 0.78rem; font-weight: 600;
    padding: 5px 14px; border-radius: 20px; margin-bottom: 14px;
}
.ci-hero h1 { position: relative; color: #fff; font-size: 2.1rem; margin-bottom: 10px; }
.ci-hero p { position: relative; color: rgba(255,255,255,0.92); font-size: 1.02rem; max-width: 560px; margin: 0 auto; }

.ci-search-row { display: flex; gap: 10px; margin-bottom: 18px; }
.ci-search-row input { flex: 1; padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px; font-family: 'Roboto', sans-serif; font-size: 0.92rem; }
.ci-search-row input:focus { outline: none; border-color: var(--primary); }

.ci-empty { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.ci-empty i { font-size: 2.6rem; color: var(--border); margin-bottom: 14px; display: block; }
.ci-empty h4 { color: var(--text, #1c2440); margin-bottom: 6px; }
.ci-empty p { font-size: 0.9rem; max-width: 380px; margin: 0 auto; }

.ci-featured-tag {
    position: absolute; top: 10px; left: 10px; background: #fff; color: #b8860b; font-size: 0.7rem; font-weight: 700;
    padding: 3px 10px; border-radius: 20px; display: flex; align-items: center; gap: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

/* Card grid (used both on homepage preview + main listing page) */
.ci-grid, .ci-home-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 18px; }
.ci-card {
    display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
    border: 1px solid var(--border); box-shadow: 0 6px 18px rgba(20,30,70,0.08);
    transition: box-shadow 0.25s ease, transform 0.25s ease; color: inherit;
}
.ci-card:hover { box-shadow: 0 18px 36px rgba(20,30,70,0.22); transform: translateY(-6px); }
.ci-card-img { position: relative; height: 160px; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.85); font-size: 1.9rem; }
.ci-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.ci-card-body h4 { font-size: 1.06rem; line-height: 1.35; }
.ci-card-body p { font-size: 0.86rem; color: var(--text-muted); flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; }
.ci-view-link { font-size: 0.83rem; font-weight: 700; color: var(--primary); margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; }
.ci-card:hover .ci-view-link i { transform: translateX(3px); }
.ci-view-link i { transition: transform 0.2s ease; }

/* Details page */
.ci-detail-wrap { display: grid; grid-template-columns: 320px 1fr; border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 30px rgba(20,30,70,0.14); background: #fff; }
.ci-detail-media { min-height: 220px; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; }
.ci-detail-body { padding: 30px 34px; display: flex; flex-direction: column; gap: 12px; }
.ci-detail-body h1 { font-size: 1.5rem; }
.ci-detail-body .ci-short { color: var(--text-muted); }
.ci-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; font-size: 0.9rem; color: var(--text-muted); margin: 6px 0 4px; }
.ci-contact-grid div { display: flex; align-items: center; gap: 8px; }
.ci-contact-grid i { color: var(--primary); width: 16px; text-align: center; }
.ci-map-embed { border-radius: 10px; overflow: hidden; }
.ci-map-embed iframe { width: 100%; min-height: 320px; border: 0; display: block; }

/* Responsive — matches this stylesheet's existing breakpoints (1024 / 860 / 640) */
@media (max-width: 1024px) {
    .ci-grid, .ci-home-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
    .ci-grid, .ci-home-grid { grid-template-columns: repeat(2, 1fr); }
    .ci-detail-wrap { grid-template-columns: 1fr; }
    .ci-contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .ci-grid, .ci-home-grid { grid-template-columns: 1fr; }
    .ci-hero { padding: 28px 18px; }
    .ci-hero h1 { font-size: 1.5rem; }
    .ci-search-row { flex-direction: column; }
    .ci-detail-body { padding: 22px 18px; }
}

/* ================= Community single-post view: reuses the exact same
   .main-layout / .side-menu-col / .right-col / .sticky-inner grid as the
   homepage, so the two sticky side widgets line up and behave identically
   (including the same tablet/mobile collapse rules already defined above
   for .main-layout). Only the small extras below are new. */
.post-view-main { min-width: 0; }
.widget-list-stacked { list-style: none; padding: 0; margin: 0; }
.widget-list-stacked li a { display: block; padding: 8px 6px; line-height: 1.4; font-size: 0.85rem; color: var(--text, #1c2440); }
.widget-list-stacked li a:hover { color: var(--primary); }
.widget-list-stacked li:not(:last-child) a { border-bottom: 1px solid var(--border); }