/* ============================================================
   ui.css  —  Smacy News UI overrides
   Safe to delete/revert without touching app.css
   ============================================================ */

/* ── HEADER ─────────────────────────────────────────────── */
.site-header {
    background-color: #f33b64;
    min-height: 64px;
    padding: 0 1.5rem;
    position: relative;   /* needed for absolute-centered nav */
    line-height: 1.2;
    margin: 0;
    color: #fff;
    border-bottom: 3px solid rgba(0,0,0,0.10);
}

/* Logo wrapper */
.logo-wrap { margin: 0; }

.logo-link {
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Logo image — 3 rem */
.logo-img {
    width: 3rem !important;
    height: 3rem !important;
    object-fit: contain;
    border-radius: 6px;
}

/* Logo text — white, scaled to match image */
.logo-text {
    font-size: 1.4rem;
    color: #fff;
    letter-spacing: 3px;
    font-family: 'Oswald', sans-serif;
}

/* ── CENTER NAV (desktop only) ───────────────────────────── */
.header-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: none;          /* hidden on mobile */
    align-items: center;
    gap: 1.8rem;
}

@media (min-width: 768px) {
    .header-nav {
        display: flex !important;
    }
}

.header-nav a,
.header-nav button {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    transition: opacity 0.15s;
}

.header-nav a:hover,
.header-nav button:hover {
    opacity: 0.75;
}

/* ── RIGHT ACTIONS (loc + login) ─────────────────────────── */
.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Login button — theme-colored pill */
.login-btn {
    background-color: #fff !important;
    color: #f33b64 !important;
    border-radius: 18px !important;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.5px;
    padding: 0.4rem 1.1rem !important;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    margin-left: 0;
    transition: background-color 0.15s, color 0.15s;
}

.login-btn:hover {
    background-color: #f33b64 !important;
    color: #fff !important;
    outline: 2px solid #fff;
}

/* ── LOCATION BOX — highlighted pill in center nav ───────── */
loc-box {
    background-color: #fff3f6 !important;
    color: #f33b64 !important;
    border: 2px solid #fff !important;
    border-radius: 18px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.45);
}

loc-box loc-current {
    color: #f33b64 !important;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.35rem 2rem 0.35rem 1rem !important;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* arrow chevron */
loc-box loc-current::after {
    border-top-color: #f33b64 !important;
    border-left-color: #f33b64 !important;
    right: 10px !important;
}

/* ── LIVE TICKER BAR ─────────────────────────────────────── */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f33b64;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 4px 12px;
    white-space: nowrap;
    align-self: stretch;
    flex-shrink: 0;
    margin-right: 8px;
    margin-left: 10px;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    animation: liveblink 1s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes liveblink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.2; transform: scale(0.7); }
}

/* ── MAIN CONTENT AREA — scrolls with footer ─────────────── */
#ROOT {
    display: block !important;
    padding: 16px 0 0 !important;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Ads card image overflow fix */
.ads-categories .catlink {
    overflow: hidden !important;
}
.ads-categories .catlink img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* ── HOME CATEGORY CARDS ─────────────────────────────────── */

/* Section headings — left accent bar style */
.news-categories > h5,
.ads-categories  > h5 {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0 0 8px 12px !important;
    margin: 12px 8px 10px !important;
    border-left: 4px solid #f33b64;
    line-height: 1;
}

.news-categories > h5 { color: #f33b64; }
.ads-categories  > h5 {
    color: #333;
    border-left-color: #555;
}

/* Gap between sections — no border */
.news-categories {
    padding-bottom: 12px !important;
}

.ads-categories {
    margin-top: 20px;
    padding-bottom: 24px !important;
}

/* Card grid spacing */
.news-categories .df.fw,
.ads-categories  .df.fw {
    gap: 0;
}

/* Card wrapper */
.news-categories [class*='c-4'],
.ads-categories  [class*='c-4'] {
    padding: 6px !important;
}

/* Card link */
.catlink {
    background-color: #fff !important;
    padding: 0 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    display: block !important;
    text-decoration: none;
    position: relative;
}

.catlink:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.16);
}

/* Image — full bleed */
.catlink img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    object-fit: cover !important;
    display: block !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

/* Title — below image */
.catlink h5 {
    font-size: 14px !important;
    font-weight: 700;
    color: #222 !important;
    padding: 9px 8px !important;
    margin: 0;
    text-align: center;
    background: #fff !important;
    letter-spacing: 0.2px;
}

/* ── LISTING PAGE ────────────────────────────────────────── */

/* Page heading */
.listing-heading {
    font-size: 1rem;
    font-weight: 800;
    text-transform: capitalize;
    color: #f33b64;
    border-left: 4px solid #f33b64;
    padding-left: 10px !important;
}

/* Pagination bar */
page-nav {
    display: flex !important;
    justify-content: center !important;
    align-items: center;
    padding: 16px 0 24px !important;
    height: auto !important;
    width: 100%;
}
page-nav .pagination { gap: 4px; margin: 0; }
page-nav .page-link {
    border-radius: 6px !important;
    border: 1.5px solid #eee !important;
    color: #f33b64 !important;
    font-size: 13px;
    padding: 4px 10px;
}
page-nav .page-item.active .page-link {
    background-color: #f33b64 !important;
    border-color: #f33b64 !important;
    color: #fff !important;
}

/* Container padding — all sides */
#CATPAGE {
    padding: 12px 12px 8px !important;
}

/* Card wrapper — row + column gap */
#newsList .c-md-4 > div,
#newsList .mobsec > div {
    padding: 0 6px !important;
    margin-bottom: 14px !important;
}

/* News card */
.news-btn {
    display: flex !important;
    flex-direction: column !important;
    height: 255px !important;
    background: #fff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.09) !important;
    border: none !important;
    margin-bottom: 0;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.news-btn:hover {
    box-shadow: 0 6px 22px rgba(0,0,0,0.13) !important;
    transform: translateY(-2px);
}

/* Image — padded inside card */
.news-btn .img {
    width: 100% !important;
    height: 155px !important;
    padding-top: 8px !important;
    padding-right: 8px !important;
    padding-bottom: 8px !important;
    padding-left: 8px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    position: relative;
    box-sizing: border-box;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
}

/* Anchor inside image block must fill full container */
.news-btn .img a {
    display: block !important;
    height: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
    border-radius: 8px !important;
}

.news-btn .img img,
.news-btn .img a img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 8px !important;
}

/* Category badge — overlaid top-left on image */
.nb-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(243,59,100,0.88);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: capitalize;
    padding: 3px 9px;
    border-radius: 20px;
    z-index: 2;
    pointer-events: none;
}

.nb-badge-ad {
    background: rgba(80,80,80,0.80);
}

/* Content area */
.news-btn .ctn {
    flex: 1 !important;
    padding: 10px 12px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    min-height: 0;
}

.news-btn h6 {
    flex: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}

/* Clamp title to 2 lines */
.news-btn h6 a {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    line-height: 1.45 !important;
    text-decoration: none !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-btn h6 a:hover { color: #f33b64 !important; }

/* Footer row — pushed to bottom by h6 flex:1 */
.nb-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-shrink: 0;
    padding-top: 6px;
}

.news-btn p {
    font-size: 11px !important;
    color: #aaa !important;
    margin: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-btn .readbtn {
    background-color: #f33b64 !important;
    color: #fff !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    padding: 6px 18px !important;
    font-weight: 700 !important;
    white-space: nowrap;
    text-decoration: none;
    flex-shrink: 0;
}

.news-btn .readbtn-ad {
    background-color: #555 !important;
}

/* ── NEWS DETAIL PAGE ────────────────────────────────────── */

.news-detail {
    max-width: 760px;
    margin: 0 auto;
    padding-bottom: 40px;
}

/* Hero image — full bleed, 16:9 */
.nd-hero {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f0f0f0;
}

.nd-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Body padding */
.nd-body {
    padding: 20px 16px 0;
}

/* Title */
.nd-title {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.35;
    color: #111;
    margin: 0 0 12px;
}

/* Meta row — source + time */
.nd-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.82rem;
    color: #888;
}

.nd-meta i { margin-right: 4px; }

.nd-source {
    font-weight: 700;
    color: #f33b64;
}

/* Divider */
.nd-divider {
    border: none;
    border-top: 1.5px solid #eee;
    margin: 14px 0 18px;
}

/* Article body */
.nd-content {
    font-size: 1rem;
    line-height: 1.75;
    color: #222;
}

.nd-content p    { margin: 0 0 1em; }
.nd-content h2,
.nd-content h3   { font-weight: 800; margin: 1.4em 0 0.5em; color: #111; }
.nd-content img  { width: 100%; height: auto; border-radius: 10px; margin: 12px 0; display: block; }
.nd-content ul,
.nd-content ol   { padding-left: 1.4em; margin: 0 0 1em; }
.nd-content li   { margin-bottom: 4px; }

/* YouTube embed — responsive */
.nd-content .mratio.ytube {
    position: relative;
    width: 100%;
    margin: 14px 0;
}
.nd-content .mratio.ytube svg   { display: block; width: 100%; }
.nd-content .mratio.ytube .child {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* ── MENU MODAL ──────────────────────────────────────────── */

/* Slide up from bottom, full-width on mobile */
es-modal es-mbody {
    border-radius: 20px 20px 0 0 !important;
    align-self: flex-end !important;
    max-width: 480px !important;
    width: 100% !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
}

/* Close button row → brand-coloured header bar */
es-modal es-mbody > div.tar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #f33b64 !important;
    padding: 14px 18px !important;
    text-align: left !important;
}

es-modal es-mbody > div.tar::before {
    content: 'Menu';
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Close button — white pill */
.btn-close {
    background: rgba(255,255,255,0.22) !important;
    color: #fff !important;
    border: 1.5px solid rgba(255,255,255,0.55) !important;
    border-radius: 20px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    padding: 5px 16px !important;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-close:hover {
    background: rgba(255,255,255,0.38) !important;
}

/* Menu list — no inner padding conflict */
.menu.px1.py1 {
    padding: 8px 0 16px !important;
    margin: 0 !important;
}

/* Each item */
.menu li {
    border-bottom: 1px solid #f5f5f5 !important;
    border-radius: 0 !important;
    list-style: none;
}

.menu li:last-child { border-bottom: none !important; }

/* Link — full row tap target */
.menu a {
    display: flex !important;
    align-items: center !important;
    color: #1a1a1a !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    padding: 13px 20px !important;
    transition: background 0.12s, color 0.12s;
    position: relative;
}

.menu a::after {
    content: '›';
    position: absolute;
    right: 20px;
    font-size: 1.3rem;
    color: #ccc;
    line-height: 1;
}

.menu a:hover {
    background: #fff5f7 !important;
    color: #f33b64 !important;
}

.menu a:hover::after { color: #f33b64; }

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer {
    margin-top: 24px;
    background-color: #fbebd2;
    min-height: 64px;
    padding: 0;
    margin: 0;
    line-height: 1.4;
    width: 100%;
}

.site-footer > div {
    min-height: 64px;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    align-items: center;
}