/*
Theme Name: Problem Solve WP
Theme URI: https://example.com/
Author: NECI / Problem Solve
Description: WordPress conversion of the supplied Problem Solve computer, CSC and online tools portal.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: problem-solve
*/

:root{
    --bg:#f7f5ff;
    --card:#ffffff;
    --text:#182230;
    --muted:#667085;
    --primary:#5146e5;
    --primary2:#7c3aed;
    --green:#12b76a;
    --orange:#f79009;
    --blue:#155eef;
    --red:#d92d20;
    --yellow:#facc15;
    --border:#e5e7eb;
    --soft:#f4f1ff;
    --shadow:0 8px 30px rgba(31,41,55,.08);
}

body.dark{
    --bg:#0f172a;
    --card:#172033;
    --text:#f8fafc;
    --muted:#a8b1c1;
    --border:#334155;
    --soft:#202b44;
    --shadow:0 8px 30px rgba(0,0,0,.35);
}

*{
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;
    font-family:
        Arial,
        "Noto Sans Devanagari",
        "Mangal",
        sans-serif;
    background:var(--bg);
    color:var(--text);
    transition:.3s;
}

a{
    color:inherit;
}

button,
input,
select{
    font-family:inherit;
}

/* ================= HEADER ================= */

header{
    background:
        radial-gradient(circle at 15% 20%,rgba(255,255,255,.55),transparent 25%),
        linear-gradient(135deg,#f0e5ff,#fbf7ff 45%,#eeeaff);
    padding:30px 16px 22px;
}

body.dark header{
    background:
        radial-gradient(circle at 15% 20%,rgba(124,58,237,.25),transparent 25%),
        linear-gradient(135deg,#172554,#111827);
}

.header-inner{
    max-width:1250px;
    margin:auto;
}

.header-grid{
    display:grid;
    grid-template-columns:1.05fr .95fr;
    gap:30px;
    align-items:center;
}

.small-tag{
    display:inline-block;
    padding:7px 13px;
    border-radius:30px;
    background:#eee9ff;
    color:#5946d8;
    font-size:12px;
    font-weight:bold;
    margin-bottom:12px;
}

body.dark .small-tag{
    background:#30255c;
    color:#c4b5fd;
}

.hero-title{
    font-size:42px;
    line-height:1.12;
    margin:0 0 15px;
    color:#34358d;
}

body.dark .hero-title{
    color:#c4b5fd;
}

.hero-title span{
    color:#5146e5;
}

.hero-text{
    max-width:650px;
    color:var(--muted);
    line-height:1.7;
    font-size:15px;
}

.hero-buttons{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:18px;
}

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    border:0;
    cursor:pointer;
    padding:12px 18px;
    border-radius:9px;
    font-weight:bold;
    font-size:14px;
}

.btn-primary{
    background:linear-gradient(135deg,#5146e5,#7c3aed);
    color:#fff;
    box-shadow:0 8px 18px rgba(81,70,229,.22);
}

.btn-outline{
    background:var(--card);
    color:var(--primary);
    border:1px solid var(--primary);
}

.trust{
    display:inline-block;
    margin-top:16px;
    padding:8px 13px;
    background:var(--card);
    border-left:3px solid #facc15;
    border-radius:8px;
    box-shadow:var(--shadow);
    font-size:12px;
}

.hero-visual{
    min-height:245px;
    border-radius:22px;
    background:linear-gradient(135deg,#ffffff,#eee9ff);
    position:relative;
    overflow:hidden;
    box-shadow:var(--shadow);
    display:flex;
    align-items:center;
    justify-content:center;
}

body.dark .hero-visual{
    background:linear-gradient(135deg,#1e293b,#292052);
}

.hero-icon{
    font-size:100px;
    opacity:.9;
}

.floating-badge{
    position:absolute;
    background:#fff;
    color:#4b5563;
    padding:11px 15px;
    border-radius:12px;
    box-shadow:0 8px 25px rgba(0,0,0,.12);
    font-size:12px;
    font-weight:bold;
}

.floating-one{
    left:15px;
    bottom:15px;
}

.floating-two{
    right:15px;
    top:15px;
}

/* ================= MARQUEE ================= */

.marquee-wrap{
    background:linear-gradient(90deg,#4338ca,#7c3aed,#4338ca);
    color:white;
    overflow:hidden;
    white-space:nowrap;
    padding:10px 0;
    border-bottom:3px solid #facc15;
}

.marquee{
    display:inline-block;
    padding-left:100%;
    animation:marquee 32s linear infinite;
    font-weight:bold;
}

@keyframes marquee{
    0%{transform:translateX(0);}
    100%{transform:translateX(-100%);}
}

/* ================= NAV ================= */

.topbar{
    position:sticky;
    top:0;
    z-index:1000;
    background:rgba(255,255,255,.95);
    border-bottom:1px solid var(--border);
    box-shadow:var(--shadow);
    backdrop-filter:blur(12px);
}

body.dark .topbar{
    background:rgba(15,23,42,.95);
}

.nav{
    max-width:1250px;
    margin:auto;
    padding:10px 12px;
    display:flex;
    gap:7px;
    flex-wrap:wrap;
    justify-content:center;
}

.nav a{
    text-decoration:none;
    background:var(--bg);
    color:var(--text);
    border:1px solid var(--border);
    padding:8px 12px;
    border-radius:25px;
    font-size:12px;
    font-weight:bold;
    transition:.2s;
}

.nav a:hover{
    background:var(--primary);
    color:white;
    transform:translateY(-2px);
}

/* ================= SEARCH ================= */

.search-area{
    max-width:1100px;
    margin:25px auto 10px;
    padding:0 15px;
}

.search-row{
    display:flex;
    gap:10px;
}

.search-box{
    width:100%;
    padding:16px 19px;
    border:2px solid var(--border);
    border-radius:15px;
    background:var(--card);
    color:var(--text);
    outline:none;
    font-size:16px;
    box-shadow:var(--shadow);
}

.search-box:focus{
    border-color:var(--primary);
}

.search-actions{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:8px;
    margin-top:10px;
}

.control-btn{
    border:1px solid var(--border);
    background:var(--card);
    color:var(--text);
    padding:9px 14px;
    border-radius:9px;
    cursor:pointer;
    font-weight:bold;
}

/* ================= MAIN ================= */

.container{
    max-width:1250px;
    margin:auto;
    padding:0 15px 60px;
}

.section{
    margin-top:35px;
    scroll-margin-top:100px;
}

.section-title{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    margin-bottom:17px;
    border-left:5px solid var(--primary);
    padding-left:12px;
}

.section-title h2{
    margin:0;
    font-size:24px;
}

.section-title p{
    margin:3px 0 0;
    color:var(--muted);
    font-size:13px;
}

.count{
    color:var(--muted);
    font-size:13px;
}

/* ================= CATEGORY CARDS ================= */

.category-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:15px;
}

.category-card{
    background:var(--card);
    border:1px solid var(--border);
    border-radius:16px;
    padding:20px;
    min-height:155px;
    box-shadow:var(--shadow);
    text-decoration:none;
    transition:.25s;
    position:relative;
    overflow:hidden;
}

.category-card:before{
    content:"";
    position:absolute;
    width:80px;
    height:80px;
    border-radius:50%;
    right:-25px;
    top:-25px;
    background:rgba(124,58,237,.08);
}

.category-card:hover{
    transform:translateY(-5px);
    border-color:#a78bfa;
}

.category-icon{
    width:43px;
    height:43px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:#f0ecff;
    margin-bottom:12px;
    font-size:20px;
}

body.dark .category-icon{
    background:#2b2451;
}

.category-card h3{
    margin:0 0 7px;
    font-size:17px;
}

.category-card p{
    color:var(--muted);
    font-size:12px;
    line-height:1.5;
    margin:0;
}

.category-open{
    display:inline-block;
    margin-top:10px;
    color:var(--primary);
    font-weight:bold;
    font-size:12px;
}

/* ================= RECENT ================= */

.recent-grid{
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:12px;
}

.recent-card{
    background:var(--card);
    border:1px solid var(--border);
    padding:14px;
    border-radius:12px;
    box-shadow:var(--shadow);
}

.recent-card strong{
    display:block;
    font-size:13px;
}

.recent-card span{
    color:var(--muted);
    font-size:11px;
}

/* ================= CARDS ================= */

.grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(230px,1fr));
    gap:15px;
}

.card{
    background:var(--card);
    border:1px solid var(--border);
    border-radius:15px;
    padding:17px;
    box-shadow:var(--shadow);
    transition:.2s;
}

.card:hover{
    transform:translateY(-3px);
}

.card h3{
    margin:0 0 7px;
    font-size:17px;
}

.card p{
    margin:6px 0 13px;
    color:var(--muted);
    font-size:13px;
    line-height:1.55;
}

.badge{
    display:inline-block;
    background:#eeeaff;
    color:#5546cf;
    padding:5px 9px;
    border-radius:20px;
    font-size:10px;
    font-weight:bold;
    margin-bottom:9px;
}

body.dark .badge{
    background:#302653;
    color:#c4b5fd;
}

.course-letter{
    width:39px;
    height:39px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:linear-gradient(135deg,#5146e5,#9333ea);
    color:#fff;
    font-weight:bold;
    margin-bottom:9px;
}

.actions{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
}

.actions a{
    text-decoration:none;
    padding:8px 10px;
    border-radius:8px;
    font-size:11px;
    font-weight:bold;
}

.open{
    background:var(--primary);
    color:#fff;
}

.read{
    background:#12b76a;
    color:#fff;
}

.download{
    background:#f79009;
    color:#fff;
}

.find{
    background:#667085;
    color:#fff;
}

/* ================= PROJECT FILES ================= */

.project-card{
    background:var(--card);
    border:1px solid var(--border);
    border-radius:17px;
    padding:20px;
    box-shadow:var(--shadow);
    transition:.25s;
    position:relative;
    overflow:hidden;
}

.project-card:hover{
    transform:translateY(-4px);
    border-color:#a78bfa;
}

.project-number{
    position:absolute;
    top:12px;
    right:12px;
    min-width:34px;
    height:34px;
    padding:0 8px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:linear-gradient(135deg,#5146e5,#9333ea);
    color:#fff;
    font-size:12px;
    font-weight:bold;
}

.project-icon{
    width:48px;
    height:48px;
    border-radius:13px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#f0ecff;
    font-size:24px;
    margin-bottom:12px;
}

body.dark .project-icon{
    background:#302653;
}

.project-card h3{
    margin:0 40px 12px 0;
    color:var(--primary);
    font-size:18px;
}

.project-list{
    margin:0;
    padding-left:20px;
}

.project-list li{
    color:var(--muted);
    font-size:13px;
    line-height:1.6;
    margin:6px 0;
}

.project-count{
    display:inline-block;
    margin-top:13px;
    padding:5px 9px;
    border-radius:20px;
    background:#ecfdf3;
    color:#027a48;
    font-size:10px;
    font-weight:bold;
}

body.dark .project-count{
    background:#123b2b;
    color:#6ee7b7;
}

/* ================= JOB ================= */

.job-tool{
    background:var(--card);
    border:1px solid var(--border);
    padding:22px;
    border-radius:17px;
    box-shadow:var(--shadow);
}

.job-search{
    display:grid;
    grid-template-columns:1fr 1fr auto;
    gap:10px;
}

.job-search input,
.job-search select{
    width:100%;
    padding:12px;
    border:1px solid var(--border);
    background:var(--bg);
    color:var(--text);
    border-radius:9px;
    outline:none;
}

.job-card{
    border:1px solid var(--border);
    background:var(--bg);
    border-radius:12px;
    padding:16px;
    margin-top:12px;
}

.job-card h3{
    color:var(--primary);
    margin:0 0 10px;
}

.apply{
    display:inline-block;
    background:#16a34a;
    color:white;
    padding:9px 15px;
    border-radius:8px;
    text-decoration:none;
    font-weight:bold;
    font-size:13px;
}

/* ================= PRACTICAL ================= */

.practical-card{
    background:var(--card);
    border:1px solid var(--border);
    border-radius:15px;
    padding:18px;
    box-shadow:var(--shadow);
}

.practical-card h3{
    margin:0 0 10px;
    color:var(--primary);
}

.practical-card ul{
    margin:0;
    padding-left:20px;
}

.practical-card li{
    margin:7px 0;
    color:var(--muted);
    font-size:13px;
}

.practical-card a{
    color:var(--primary);
    text-decoration:none;
    font-weight:bold;
}

/* ================= CATEGORY PAGE ================= */

#categoryPage{
    display:none;
}

.page-head{
    margin-top:30px;
    background:linear-gradient(135deg,#ede9fe,#faf5ff);
    border:1px solid #ddd6fe;
    border-radius:18px;
    padding:25px;
}

body.dark .page-head{
    background:linear-gradient(135deg,#21183e,#172033);
    border-color:#43336c;
}

.back-btn{
    border:0;
    background:var(--primary);
    color:#fff;
    padding:10px 15px;
    border-radius:9px;
    cursor:pointer;
    font-weight:bold;
    margin-bottom:15px;
}

/* ================= A-Z ================= */

.az-nav{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin:15px 0 20px;
}

.az-nav button{
    width:33px;
    height:33px;
    border:1px solid var(--border);
    background:var(--card);
    color:var(--text);
    border-radius:8px;
    cursor:pointer;
    font-weight:bold;
}

.az-nav button:hover{
    background:var(--primary);
    color:white;
}

/* ================= NO RESULT ================= */

.no-result{
    display:none;
    text-align:center;
    padding:35px;
    color:var(--muted);
    background:var(--card);
    border:1px solid var(--border);
    border-radius:15px;
    margin-top:20px;
}

/* ================= FOOTER ================= */

footer{
    background:#101828;
    color:#fff;
    text-align:center;
    padding:35px 15px;
}

footer p{
    margin:7px;
    font-size:13px;
}

.footer-links{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:12px;
    margin:15px 0;
}

.footer-links a{
    color:#d0d5dd;
    text-decoration:none;
    font-size:12px;
}

/* ================= RESPONSIVE ================= */

@media(max-width:1000px){

    .category-grid{
        grid-template-columns:repeat(3,1fr);
    }

    .recent-grid{
        grid-template-columns:repeat(3,1fr);
    }

    .header-grid{
        grid-template-columns:1fr;
    }
}

@media(max-width:700px){

    .hero-title{
        font-size:30px;
    }

    .category-grid{
        grid-template-columns:repeat(2,1fr);
    }

    .recent-grid{
        grid-template-columns:repeat(2,1fr);
    }

    .job-search{
        grid-template-columns:1fr;
    }

    .search-row{
        flex-direction:column;
    }

    .nav{
        justify-content:flex-start;
        overflow-x:auto;
        flex-wrap:nowrap;
    }

    .nav a{
        flex-shrink:0;
    }
}

@media(max-width:500px){

    .category-grid,
    .recent-grid{
        grid-template-columns:1fr;
    }

    .grid{
        grid-template-columns:1fr;
    }

    .hero-title{
        font-size:27px;
    }

    .section-title h2{
        font-size:20px;
    }

    header{
        padding-top:20px;
    }
}

/* ================= WORDPRESS INTEGRATION ================= */
.wp-posts-section .wp-post-card h3 a,
.wp-post-card h3 a{color:inherit;text-decoration:none}
.wp-post-thumb{display:block;margin:-17px -17px 14px;overflow:hidden;border-radius:15px 15px 0 0}
.wp-post-thumb img{display:block;width:100%;height:155px;object-fit:cover}
.wp-post-card .actions,.wp-tool-card .actions{margin-top:10px}
.wp-post-card p,.wp-tool-card p{min-height:42px}
.single-wrap,.archive-wrap{max-width:1000px;margin:35px auto;padding:0 15px 60px}
.single-card{background:var(--card);border:1px solid var(--border);border-radius:18px;padding:25px;box-shadow:var(--shadow)}
.single-title{font-size:34px;line-height:1.2;margin:0 0 12px}
.single-meta{color:var(--muted);font-size:13px;margin-bottom:20px}
.single-featured img{width:100%;max-height:520px;object-fit:cover;border-radius:14px;margin-bottom:22px}
.single-content{font-size:16px;line-height:1.8}
.single-content img{max-width:100%;height:auto}
.single-content h2,.single-content h3{margin-top:28px}
.single-content a{color:var(--primary)}
.post-nav{display:flex;justify-content:space-between;gap:15px;margin-top:25px}
.post-nav a{display:block;background:var(--soft);padding:12px 15px;border-radius:10px;text-decoration:none;font-weight:bold}
.archive-head{margin-bottom:20px}
.archive-head h1{margin:0 0 8px}
.archive-head p{color:var(--muted)}
.pagination{margin-top:25px;display:flex;gap:8px;flex-wrap:wrap}
.pagination a,.pagination span{padding:8px 12px;border:1px solid var(--border);border-radius:8px;text-decoration:none;background:var(--card)}
.admin-note{padding:12px 15px;background:var(--soft);border-left:4px solid var(--primary);border-radius:8px;margin-bottom:20px}
@media(max-width:700px){.single-title{font-size:27px}.single-card{padding:18px}.post-nav{flex-direction:column}}
