/* ======================================================
   HARD SCOPE RESET (DESTROYS THEME OVERRIDES SAFELY)
====================================================== */
body .demo-library,
body .demo-library * {
    box-sizing: border-box;
}

body .demo-library {
    all: initial;
    display: block;
}

/* Restore required defaults */
body .demo-library a { text-decoration: none; color: inherit; }
body .demo-library ul { list-style: none; padding: 0; margin: 0; }
body .demo-library img { max-width: 100%; height: auto; }

/* ======================================================
   ROOT VARIABLES
====================================================== */
body .demo-library {
    --accent: #00aeef;
    --accent-dark: #0095cc;
    --bg-main: #f8fafc;
    --bg-panel: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --shadow-soft: 0 10px 30px rgba(0,0,0,.08);
    --shadow-strong: 0 30px 80px rgba(0,0,0,.15);
}

/* ======================================================
   PAGE WRAPPER
====================================================== */
body .demo-library {
    background: var(--bg-main);
    padding: clamp(32px, 5vw, 72px);
    font-family:Manrope, sans-serif;
}

/* ======================================================
   HEADER
====================================================== */
body .demo-library .demo-header {
    text-align: center;
    margin-bottom: clamp(40px, 5vw, 70px);
}

body .demo-library .demo-count {
    font-size: clamp(48px, 6vw, 84px);
    font-weight: 800;
    color: #000;
    line-height: 1;
}

body .demo-library .demo-header h1 {
    margin-top: 12px;
    font-size: clamp(26px, 3vw, 40px);
    font-weight: 600;
    color: #000;
}

body .demo-library .demo-benefits {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

body .demo-library .demo-benefits li {
    background: #000;
    color: #ffffff;
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

body .demo-library .demo-benefits li.active {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(0,174,239,.35);
}

body .demo-library .demo-benefits li.active::before {
    content: "âœ“";
    font-weight: 700;
    font-size: 12px;
    
}

body .demo-library .demo-benefits li .emoji {
    display: none;
}

body .demo-library .demo-benefits li::before {
    content: "✔";
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    margin-right: 6px;
    display: inline-flex;
    align-items: center;
}

/* ======================================================
   MAIN LAYOUT
====================================================== */
body .demo-library .demo-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: clamp(20px, 3vw, 40px);
    align-items: flex-start;
}

/* ======================================================
   SIDEBAR
====================================================== */
body .demo-library .demo-sidebar {
    background: var(--bg-panel);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 24px;
}

body .demo-library .demo-search {
    background: #0A1A3D;
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
}

body .demo-library .demo-filters {
    margin-top: 16px;
}

body .demo-library .demo-filters li {
    position: relative;
    display: flex;
    justify-content: space-between;
    border: 2px solid rgba(0, 0, 0, 0.25);
    align-items: center;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background .2s ease, color .2s ease;
}

body .demo-library .demo-filters li:hover {
    background: #eef2ff;
    color: #4338ca;
}

/* ======================================================
   SIDEBAR ACTIVE ICON (SQUARE BOX AT START)
====================================================== */

body .demo-library .demo-filters li {
    position: relative;
    padding-left: 44px; /* space for icon */
    margin-bottom: 5px;
}

/* Active state */
body .demo-library .demo-filters li.active {
    /*background: #00aeef;*/
    background: #0A1A3D;
    color: #fff;
    font-weight: 600;
}
body .demo-library .demo-filters li.active::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 12px;                 /* ðŸ‘ˆ TOP alignment */
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,174,239,.45);
}


/* ======================================================
   GRID
====================================================== */
body .demo-library .demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: clamp(20px, 3vw, 32px);
}

/* ======================================================
   CARD
====================================================== */
body .demo-library .demo-card {
    position: relative;
    background: var(--accent);
    border-radius: 22px;
    overflow: hidden;
    min-height: 220px;
    padding: 22px;
    display: flex;
    align-items: flex-end;
    box-shadow: var(--shadow-strong);
    transition: transform .3s ease, box-shadow .3s ease;
}

body .demo-library .demo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 40px 90px rgba(0,0,0,.25);
}

/* Background image */
body .demo-library .demo-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(.75);
    z-index: 0;
}

/* Overlay */
body .demo-library .demo-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,.6));
    z-index: 1;
}

/* Card content */
body .demo-library .demo-info {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

body .demo-library .card-title {
    font-size: clamp(16px, 1.2vw, 18px);
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

body .demo-library .card-cta {
    font-size: 14px;
    font-weight: 500;
    color: #e0f2fe;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .25s ease, transform .25s ease;
}

body .demo-library .demo-card:hover .card-cta {
    opacity: 1;
    transform: translateY(0);
}

/* ======================================================
   CARD BACKGROUND IMAGES
====================================================== */
body .demo-library #datasheet::before {
    background-image: url('/wp-content/uploads/2026/01/bg-datasheet.png');
}
body .demo-library #brochure::before {
    background-image: url('/wp-content/uploads/2026/01/bg-brochure.png');
}
body .demo-library #whitepaper::before {
    background-image: url('/wp-content/uploads/2026/01/bg-whitepaper.png');
}
body .demo-library #case-study::before {
    background-image: url('/wp-content/uploads/2026/01/bg-case-study.png');
}

/* ======================================================
   POPUP
====================================================== */
body .demo-library #resource-lead-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
}

body .demo-library #resource-lead-popup.open {
    display: block;
}

/* ======================================================
   RESPONSIVE
====================================================== */
@media (max-width: 1024px) {
    body .demo-library .demo-layout {
        grid-template-columns: 1fr;
    }
}

/* ======================================================
   ANIMATIONS
====================================================== */
@keyframes checkIn {
    from { transform: scale(.8); opacity: 0 }
    to   { transform: scale(1); opacity: 1 }
}
