/* ============================================================
   PesaPoll — Homepage redesign (Kalshi-inspired, light & airy)
   Scoped under .pp-home so it never touches the rest of the theme.
   Brand tokens reused: --base (blue), --base-two (green),
   --success, --danger, --white, --heading-color.
   ============================================================ */

.pp-home {
    --pp-bg: 210 20% 98%;
    --pp-card: 0 0% 100%;
    --pp-ink: 222 22% 12%;
    --pp-muted: 220 9% 46%;
    --pp-faint: 220 12% 62%;
    --pp-line: 220 16% 91%;
    --pp-line-soft: 220 16% 95%;
    --pp-yes: var(--base-two);          /* green  */
    --pp-no: 3 84% 60%;                 /* red    */
    --pp-up: 145 63% 42%;
    --pp-down: 3 84% 60%;

    background: hsl(var(--pp-bg));
    color: hsl(var(--pp-ink));
    font-family: var(--body-font, "Inter", sans-serif);
    padding: 32px 0 72px;
    -webkit-font-smoothing: antialiased;
}

.pp-container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- main + sidebar grid ---- */
.pp-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.pp-main { min-width: 0; }

.pp-sidebar {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ============================================================
   HERO — featured market
   ============================================================ */
.pp-hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 8px;
    background: hsl(var(--pp-card));
    border: 1px solid hsl(var(--pp-line));
    border-radius: 18px;
    padding: 26px 28px;
    margin-bottom: 26px;
    overflow: hidden;
}
.pp-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1200px 240px at 100% -40%, hsl(var(--base) / 0.10), transparent 60%),
        radial-gradient(900px 200px at -10% 120%, hsl(var(--base-two) / 0.10), transparent 60%);
    pointer-events: none;
}
.pp-hero__info { position: relative; z-index: 1; display: flex; flex-direction: column; }
.pp-hero__eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: hsl(var(--base));
    margin-bottom: 14px;
}
.pp-hero__eyebrow .dot {
    width: 7px; height: 7px; border-radius: 50%; background: hsl(var(--pp-up));
    box-shadow: 0 0 0 4px hsl(var(--pp-up) / 0.18);
    animation: pp-pulse 1.8s infinite;
}
@keyframes pp-pulse { 0%,100%{opacity:1} 50%{opacity:.35} }
.pp-hero__chip {
    display: inline-flex; align-items: center; gap: 7px; width: fit-content;
    font-size: 12px; font-weight: 600; color: hsl(var(--pp-muted));
    background: hsl(var(--pp-line-soft)); border-radius: 999px; padding: 5px 12px; margin-bottom: 14px;
}
.pp-hero__title {
    font-family: var(--heading-font);
    font-size: clamp(22px, 2.4vw, 30px); line-height: 1.18; font-weight: 700;
    color: hsl(var(--pp-ink)); margin: 0 0 20px;
}
.pp-hero__title a { color: inherit; }
.pp-hero__title a:hover { color: hsl(var(--base)); }
.pp-hero__stats { display: flex; gap: 26px; margin-top: auto; }
.pp-hero__stat .k { font-size: 12px; color: hsl(var(--pp-muted)); font-weight: 600; }
.pp-hero__stat .v { font-size: 18px; font-weight: 700; color: hsl(var(--pp-ink)); }

.pp-hero__viz { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; }
.pp-hero__prob { display: flex; align-items: baseline; gap: 10px; justify-content: flex-end; margin-bottom: 6px; }
.pp-hero__prob b { font-size: 40px; font-weight: 800; color: hsl(var(--pp-yes)); line-height: 1; }
.pp-hero__prob span { font-size: 13px; font-weight: 600; color: hsl(var(--pp-muted)); }
.pp-hero__chart { width: 100%; height: 120px; }
.pp-hero__actions { display: flex; gap: 10px; margin-top: 18px; }

/* ============================================================
   Category filter chips
   ============================================================ */
.pp-chips {
    display: flex; gap: 9px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 22px;
    scrollbar-width: none;
}
.pp-chips::-webkit-scrollbar { display: none; }
.pp-chip {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
    font-size: 13.5px; font-weight: 600; color: hsl(var(--pp-muted));
    background: hsl(var(--pp-card)); border: 1px solid hsl(var(--pp-line));
    border-radius: 999px; padding: 8px 15px; cursor: pointer; transition: .15s ease;
    text-decoration: none;
}
.pp-chip:hover { border-color: hsl(var(--base) / 0.5); color: hsl(var(--base)); }
.pp-chip.active { background: hsl(var(--base)); border-color: hsl(var(--base)); color: #fff; }
.pp-chip .emoji { font-size: 15px; line-height: 1; }

/* ============================================================
   Category section
   ============================================================ */
.pp-cat { margin-bottom: 34px; scroll-margin-top: 90px; }
.pp-cat__head {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;
}
.pp-cat__head .l { display: inline-flex; align-items: center; gap: 10px; }
.pp-cat__badge {
    width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
    font-size: 18px; background: hsl(var(--base) / 0.10);
}
.pp-cat__title { font-family: var(--heading-font); font-size: 18px; font-weight: 700; color: hsl(var(--pp-ink)); margin: 0; }
.pp-cat__count { font-size: 12.5px; color: hsl(var(--pp-faint)); font-weight: 600; }
.pp-seeall {
    display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600;
    color: hsl(var(--base)); text-decoration: none; white-space: nowrap;
}
.pp-seeall:hover { gap: 8px; color: hsl(var(--base)); }

.pp-cards {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
}

/* ============================================================
   Market card
   ============================================================ */
.pp-card {
    display: flex; flex-direction: column;
    background: hsl(var(--pp-card));
    border: 1px solid hsl(var(--pp-line));
    border-radius: 14px;
    padding: 15px 16px 13px;
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.pp-card:hover {
    border-color: hsl(var(--pp-line));
    box-shadow: 0 10px 26px -12px hsl(222 40% 20% / 0.18);
    transform: translateY(-2px);
}
.pp-card__body { text-decoration: none; color: inherit; display: block; }
.pp-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.pp-card__chip {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: hsl(var(--pp-muted));
}
.pp-card__chip .emoji { font-size: 14px; }
.pp-card__prob { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.pp-card__prob b { font-size: 20px; font-weight: 800; color: hsl(var(--pp-yes)); }
.pp-card__prob small { font-size: 10px; font-weight: 600; color: hsl(var(--pp-faint)); text-transform: uppercase; letter-spacing: .05em; margin-top: 3px; }

.pp-card__q {
    font-family: var(--heading-font);
    font-size: 15px; line-height: 1.34; font-weight: 600; color: hsl(var(--pp-ink));
    margin: 0 0 12px; min-height: 40px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pp-card__body:hover .pp-card__q { color: hsl(var(--base)); }

.pp-card__spark { height: 34px; margin: 0 -2px 13px; }

.pp-card__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pp-vote {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    font-size: 13px; font-weight: 700; border-radius: 9px; padding: 9px 8px;
    border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: .15s ease;
}
.pp-vote small { font-weight: 600; opacity: .85; }
.pp-vote--yes { color: hsl(var(--pp-yes)); background: hsl(var(--pp-yes) / 0.10); border-color: hsl(var(--pp-yes) / 0.22); }
.pp-vote--yes:hover { background: hsl(var(--pp-yes)); color: #fff; }
.pp-vote--no  { color: hsl(var(--pp-no));  background: hsl(var(--pp-no) / 0.09);  border-color: hsl(var(--pp-no) / 0.20); }
.pp-vote--no:hover  { background: hsl(var(--pp-no)); color: #fff; }

.pp-card__meta {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 12px; padding-top: 11px; border-top: 1px solid hsl(var(--pp-line-soft));
    font-size: 12px; font-weight: 600; color: hsl(var(--pp-faint));
}
.pp-card__meta .i { display: inline-flex; align-items: center; gap: 5px; }
.pp-card__meta svg { width: 13px; height: 13px; }

/* ============================================================
   Sidebar widgets
   ============================================================ */
.pp-widget {
    background: hsl(var(--pp-card)); border: 1px solid hsl(var(--pp-line));
    border-radius: 16px; padding: 16px 16px 8px;
}
.pp-widget__head {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.pp-widget__title {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--heading-font); font-size: 14.5px; font-weight: 700; color: hsl(var(--pp-ink));
}
.pp-widget__title .emoji { font-size: 15px; }
.pp-widget__more { font-size: 12px; font-weight: 600; color: hsl(var(--base)); text-decoration: none; }

.pp-list { display: flex; flex-direction: column; }
.pp-row {
    display: flex; align-items: center; gap: 11px; padding: 10px 2px;
    border-top: 1px solid hsl(var(--pp-line-soft)); text-decoration: none; color: inherit;
}
.pp-row:first-child { border-top: none; }
.pp-row__rank { width: 18px; font-size: 12px; font-weight: 700; color: hsl(var(--pp-faint)); text-align: center; flex: 0 0 auto; }
.pp-row__main { min-width: 0; flex: 1; }
.pp-row__q {
    font-size: 13px; font-weight: 600; color: hsl(var(--pp-ink)); line-height: 1.3; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pp-row:hover .pp-row__q { color: hsl(var(--base)); }
.pp-row__sub { font-size: 11.5px; color: hsl(var(--pp-faint)); font-weight: 600; margin-top: 2px; }
.pp-row__pct { flex: 0 0 auto; font-size: 14px; font-weight: 800; color: hsl(var(--pp-yes)); text-align: right; }
.pp-chg { flex: 0 0 auto; font-size: 12.5px; font-weight: 700; text-align: right; white-space: nowrap; }
.pp-chg--up { color: hsl(var(--pp-up)); }
.pp-chg--down { color: hsl(var(--pp-down)); }

/* promo card */
.pp-promo {
    position: relative; overflow: hidden; border-radius: 16px; padding: 20px;
    color: #fff; background: linear-gradient(135deg, hsl(var(--base)) 0%, hsl(var(--base-two)) 130%);
}
.pp-promo::after {
    content: ""; position: absolute; right: -30px; top: -40px; width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%);
}
.pp-promo__tag { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .9; }
.pp-promo__title { font-family: var(--heading-font); font-size: 19px; font-weight: 700; margin: 8px 0 6px; position: relative; }
.pp-promo__text { font-size: 13px; line-height: 1.5; opacity: .92; margin-bottom: 14px; position: relative; }
.pp-promo__btn {
    display: inline-flex; align-items: center; gap: 7px; background: #fff; color: hsl(var(--base));
    font-size: 13px; font-weight: 700; border-radius: 9px; padding: 9px 16px; text-decoration: none; position: relative;
}
.pp-promo__btn:hover { color: hsl(var(--base)); transform: translateX(2px); }

/* mini stat strip under hero */
.pp-stripe {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 26px;
}
.pp-stat {
    background: hsl(var(--pp-card)); border: 1px solid hsl(var(--pp-line)); border-radius: 13px;
    padding: 14px 16px; display: flex; flex-direction: column; gap: 3px;
}
.pp-stat .v { font-size: 20px; font-weight: 800; color: hsl(var(--pp-ink)); }
.pp-stat .k { font-size: 12px; font-weight: 600; color: hsl(var(--pp-muted)); display: inline-flex; align-items: center; gap: 6px; }
.pp-stat .emoji { font-size: 14px; }

/* section intro title */
.pp-lead { margin-bottom: 20px; }
.pp-lead h2 { font-family: var(--heading-font); font-size: 22px; font-weight: 800; color: hsl(var(--pp-ink)); margin: 0 0 4px; }
.pp-lead p { font-size: 14px; color: hsl(var(--pp-muted)); margin: 0; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1100px) {
    .pp-grid { grid-template-columns: 1fr; }
    .pp-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
    .pp-sidebar > * { flex: 1 1 300px; }
}
@media (max-width: 991px) {
    .pp-hero { grid-template-columns: 1fr; }
    .pp-hero__viz { margin-top: 20px; }
    .pp-hero__prob { justify-content: flex-start; }
    .pp-stripe { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
    .pp-home { padding-top: 16px; }
    .pp-container { padding: 0 14px; }
    .pp-cards { grid-template-columns: 1fr; }
    .pp-sidebar > * { flex-basis: 100%; }
    .pp-hero { padding: 20px; }
    .pp-hero__prob b { font-size: 32px; }
}

/* ============================================================
   Global chrome overrides (header + footer) — loaded site-wide
   so the new light design is consistent across pages.
   !important is used narrowly to beat the theme's header rules.
   ============================================================ */

/* ---------------- HEADER ---------------- */
.main-header,
.main-header .header-lower,
.main-header .sticky-header {
    background: #fff !important;
    box-shadow: none !important;
}
.main-header .header-lower,
.main-header .sticky-header.animated {
    border-bottom: 1px solid hsl(220 16% 91%) !important;
}
.main-header .large-container { max-width: 1320px; }

/* On the homepage the theme makes this header `position:absolute; top:20px` and a
   floating white rounded card with a shadow (built to overlay a hero banner).
   The redesign uses a flat light section instead, so make it a normal in-flow
   flat bar and strip the floating-card look. */
.main-header.header-style-two { position: relative !important; top: 0 !important; }
.main-header.header-style-two .header-lower .outer-box {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding-inline: 0 !important;
}
.main-header .header-lower .outer-box,
.main-header .sticky-header .outer-box {
    display: flex; align-items: center; justify-content: space-between; gap: 22px;
    padding-top: 12px; padding-bottom: 12px;
}
.main-header .logo-box img,
.main-header .sticky-header .logo-box img { max-height: 34px; width: auto; }

.main-header .main-menu .navigation > li { margin: 0 2px; }
.main-header .main-menu .navigation > li > a {
    color: hsl(220 10% 38%) !important;
    font-family: var(--heading-font, "Plus Jakarta Sans", sans-serif);
    font-weight: 600; font-size: 14.5px; padding: 10px 14px; transition: color .15s ease;
}
.main-header .main-menu .navigation > li:hover > a,
.main-header .main-menu .navigation > li.current > a,
.main-header .main-menu .navigation > li.active > a { color: hsl(var(--base)) !important; }

.main-header .menu-right-content { display: flex; align-items: center; gap: 14px; }
/* NOTE: don't set display here — the markup uses Bootstrap's `d-none d-sm-flex`
   to hide the button box on small screens; overriding display re-shows it and
   crams the mobile header. Only tweak spacing. */
.main-header .btn-box { align-items: center; gap: 12px; }

/* login / dashboard button */
.main-header .theme-btn.btn-one,
.main-header .navbar-btn.theme-btn {
    background: hsl(var(--base)) !important;
    color: #fff !important;
    border-radius: 10px !important;
    padding: 10px 20px !important;
    font-weight: 600; font-size: 14px; line-height: 1;
    box-shadow: 0 6px 16px -8px hsl(var(--base) / 0.7) !important;
    border: none !important;
}
.main-header .theme-btn.btn-one:hover { filter: brightness(1.05); }
.main-header .mobile-nav-toggler { color: hsl(var(--base)); }

/* header search (Kalshi-style) */
.pp-search {
    display: flex; align-items: center; gap: 9px;
    background: hsl(210 20% 96%); border: 1px solid hsl(220 16% 90%);
    border-radius: 11px; padding: 9px 14px; min-width: 260px; max-width: 360px; flex: 1 1 auto;
    transition: border-color .15s ease, background .15s ease;
}
.pp-search:focus-within { background: #fff; border-color: hsl(var(--base) / 0.5); }
.pp-search svg { color: hsl(220 9% 55%); flex: 0 0 auto; }
.pp-search input {
    border: none; background: transparent; outline: none; width: 100%;
    font-size: 14px; color: hsl(222 22% 15%); font-family: var(--body-font, "Inter", sans-serif);
}
.pp-search input::placeholder { color: hsl(220 9% 58%); }
@media (max-width: 991px) { .pp-search { display: none !important; } }

/* ---------------- FOOTER ---------------- */
.main-footer { background: hsl(210 20% 98%) !important; border-top: 1px solid hsl(220 16% 91%); }
.main-footer::before, .main-footer::after { display: none !important; }
.main-footer .widget-section { padding-top: 62px; padding-bottom: 36px; }
.main-footer .footer-logo img { max-height: 34px; width: auto; }
.main-footer .footer-item__desc { color: hsl(220 9% 46%); font-size: 14px; line-height: 1.6; margin-top: 14px; }
.main-footer .footer-item__title {
    color: hsl(222 22% 14%) !important; font-family: var(--heading-font);
    font-size: 15px; font-weight: 700; margin-bottom: 16px;
}
.main-footer .footer-menu__item { margin-bottom: 11px; }
.main-footer .footer-menu__link { color: hsl(220 9% 42%) !important; font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 9px; transition: color .15s ease; }
.main-footer .footer-menu__link:hover { color: hsl(var(--base)) !important; }
.main-footer .footer-menu__link svg { color: hsl(var(--base)); flex: 0 0 auto; }

.main-footer .footer-lower {
    border-top: 1px solid hsl(220 16% 91%); margin-top: 42px; padding-top: 26px;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px;
}
.main-footer .footer-lower h5 { color: hsl(222 22% 14%); font-size: 14px; font-weight: 700; margin: 0; }
.main-footer .social-links { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.main-footer .social-links li a {
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    color: hsl(220 9% 42%); background: #fff; border: 1px solid hsl(220 16% 88%); transition: .15s ease;
}
.main-footer .social-links li a:hover { background: hsl(var(--base)); color: #fff; border-color: transparent; transform: translateY(-2px); }
.main-footer .footer-card { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; align-items: center; }
.main-footer .footer-card img { height: 30px; width: auto; }

.footer-bottom { background: hsl(210 20% 98%) !important; border-top: 1px solid hsl(220 16% 91%); padding: 18px 0; }
.footer-bottom .bottom-inner p { color: hsl(220 9% 46%); font-size: 13.5px; margin: 0; text-align: center; }
.footer-bottom .bottom-inner p a { color: hsl(var(--base)); font-weight: 600; }

/* ---------------- PROMO card text contrast fix ---------------- */
.pp-promo {
    background: linear-gradient(150deg, hsl(var(--base)) 0%, hsl(var(--base-d-300)) 100%) !important;
}
.pp-promo__tag { color: rgba(255,255,255,0.82); }
.pp-promo__title { color: #fff; }
.pp-promo__text { color: rgba(255,255,255,0.94); }
.pp-promo__btn { color: hsl(var(--base)); }

/* ---------------- Mobile header safety ---------------- */
@media (max-width: 991px) {
    .main-header .header-lower .outer-box,
    .main-header .sticky-header .outer-box { gap: 12px; }
    /* the desktop nav is hidden on mobile; don't let its empty box add width */
    .main-header .menu-area { flex: 0 0 auto; }
}
@media (max-width: 575px) {
    .pp-home { overflow-x: hidden; }
    .main-header .header-lower .outer-box { padding-top: 10px; padding-bottom: 10px; }
    .main-header .logo-box img,
    .main-header .sticky-header .logo-box img { max-height: 30px; }
    .main-header .mobile-nav-toggler { font-size: 22px; margin: 0; }
}
