/*
Theme Name: 99Students
Theme URI: https://99students.com/
Author: 99Students
Description: A lightweight, modern education platform theme for 99Students.
Version: 1.0.0
Text Domain: 99students
*/

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #f59e0b;

    --text: #111827;
    --muted: #6b7280;

    --bg: #f8fafc;
    --surface: #ffffff;
    --border: #e5e7eb;

    --radius: 14px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: min(
        calc(100% - 40px),
        var(--container)
    );

    margin-inline: auto;
}


/* =========================
   HEADER
========================= */

.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    min-height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}

.site-logo {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.7px;
}

.site-logo span {
    color: var(--primary);
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 26px;
}

.main-navigation a {
    color: #374151;
    font-size: 15px;
    font-weight: 500;
}

.main-navigation a:hover {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-login {
    padding: 9px 15px;
    border-radius: 9px;
    color: var(--primary);
    font-weight: 600;
}

.header-register {
    padding: 10px 16px;
    border-radius: 9px;

    background: var(--primary);
    color: #ffffff;

    font-weight: 600;
}

.header-register:hover {
    background: var(--primary-dark);
}


/* =========================
   HERO
========================= */

.hero {
    padding: 80px 0 70px;

    background:
        radial-gradient(
            circle at top right,
            rgba(37, 99, 235, 0.10),
            transparent 35%
        ),
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f8fafc 100%
        );
}

.hero-content {
    max-width: 800px;
    margin: auto;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;

    padding: 7px 13px;

    background: #eff6ff;
    color: var(--primary);

    border: 1px solid #dbeafe;
    border-radius: 999px;

    font-size: 13px;
    font-weight: 700;

    margin-bottom: 20px;
}

.hero h1 {
    margin: 0;

    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -2.5px;
}

.hero h1 span {
    color: var(--primary);
}

.hero-description {
    max-width: 680px;

    margin: 22px auto 30px;

    color: var(--muted);

    font-size: 18px;
}


/* =========================
   SEARCH
========================= */

.hero-search {
    max-width: 720px;
    margin: auto;
}

.search-box {
    display: flex;

    background: #ffffff;

    border: 1px solid #dbe2ea;

    border-radius: 13px;

    padding: 6px;

    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.08);
}

.search-box input {
    flex: 1;

    border: 0;
    outline: 0;

    padding: 14px 15px;

    font-size: 16px;

    min-width: 0;
}

.search-box button {
    border: 0;

    padding: 0 24px;

    border-radius: 9px;

    background: var(--primary);
    color: #ffffff;

    font-weight: 700;

    cursor: pointer;
}


/* =========================
   SECTIONS
========================= */

.section {
    padding: 70px 0;
}

.section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 28px;
}

.section-title {
    margin: 0;

    font-size: 30px;

    letter-spacing: -0.7px;
}

.section-description {
    margin: 5px 0 0;

    color: var(--muted);
}

.section-link {
    color: var(--primary);
    font-weight: 600;
}


/* =========================
   COUNTRY CARDS
========================= */

.country-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 16px;
}

.country-card {
    display: flex;
    align-items: center;

    gap: 14px;

    padding: 20px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.country-card:hover {
    transform: translateY(-3px);

    border-color: #bfdbfe;

    box-shadow:
        0 10px 25px rgba(15, 23, 42, 0.07);
}

.country-icon {
    width: 44px;
    height: 44px;

    display: grid;
    place-items: center;

    border-radius: 10px;

    background: #eff6ff;

    font-size: 20px;
}

.country-card strong {
    display: block;
}

.country-card small {
    color: var(--muted);
}


/* =========================
   CONTENT CARDS
========================= */

.content-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 20px;
}

.content-card {
    overflow: hidden;

    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: var(--radius);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.content-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 12px 30px rgba(15, 23, 42, 0.08);
}

.content-card-image {
    height: 190px;

    background:
        linear-gradient(
            135deg,
            #dbeafe,
            #eff6ff
        );
}

.content-card-body {
    padding: 20px;
}

.content-card-meta {
    margin-bottom: 8px;

    color: var(--primary);

    font-size: 13px;
    font-weight: 700;
}

.content-card h3 {
    margin: 0 0 9px;

    font-size: 19px;
    line-height: 1.35;
}

.content-card p {
    margin: 0;

    color: var(--muted);

    font-size: 14px;
}


/* =========================
   CATEGORIES
========================= */

.category-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 16px;
}

.category-card {
    padding: 25px;

    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: var(--radius);
}

.category-card-icon {
    font-size: 25px;

    margin-bottom: 15px;
}

.category-card h3 {
    margin: 0 0 6px;

    font-size: 18px;
}

.category-card p {
    margin: 0;

    color: var(--muted);

    font-size: 14px;
}


/* =========================
   FOOTER
========================= */

.site-footer {
    margin-top: 50px;

    background: #111827;

    color: #ffffff;
}

.footer-inner {
    padding: 55px 0;

    display: grid;

    grid-template-columns:
        1.5fr
        1fr
        1fr;

    gap: 50px;
}

.footer-logo {
    font-size: 25px;
    font-weight: 800;
}

.footer-logo span {
    color: #60a5fa;
}

.footer-description {
    max-width: 400px;

    margin-top: 12px;

    color: #9ca3af;
}

.footer-column h3 {
    margin: 0 0 15px;

    font-size: 15px;
}

.footer-column a {
    display: block;

    margin-bottom: 8px;

    color: #9ca3af;

    font-size: 14px;
}

.footer-column a:hover {
    color: #ffffff;
}

.footer-bottom {
    padding: 18px 0;

    border-top: 1px solid #374151;

    color: #9ca3af;

    font-size: 13px;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {

    .main-navigation {
        display: none;
    }

    .country-grid,
    .category-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .content-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .footer-inner {
        grid-template-columns:
            1fr 1fr;
    }
}


@media (max-width: 600px) {

    .container {
        width: min(
            calc(100% - 28px),
            var(--container)
        );
    }

    .header-inner {
        min-height: 64px;
    }

    .site-logo {
        font-size: 22px;
    }

    .header-login {
        display: none;
    }

    .header-register {
        padding: 8px 12px;
        font-size: 13px;
    }

    .hero {
        padding: 55px 0 50px;
    }

    .hero h1 {
        letter-spacing: -1.5px;
    }

    .hero-description {
        font-size: 16px;
    }

    .search-box {
        display: block;

        padding: 7px;
    }

    .search-box input {
        width: 100%;
    }

    .search-box button {
        width: 100%;

        padding: 13px;
    }

    .section {
        padding: 50px 0;
    }

    .section-header {
        display: block;
    }

    .section-link {
        display: inline-block;
        margin-top: 10px;
    }

    .country-grid,
    .category-grid,
    .content-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;

        gap: 30px;
    }
}


/* =========================
   404 PAGE
========================= */

.ns-error-page {
    padding: 90px 0;
}

.ns-error-content {
    max-width: 720px;
    margin: auto;
    text-align: center;
}

.ns-error-code {
    font-size: clamp(90px, 15vw, 170px);
    line-height: 0.9;
    font-weight: 900;
    letter-spacing: -8px;
    color: #dbeafe;
}

.ns-error-content h1 {
    margin: 25px 0 10px;
    font-size: 38px;
    letter-spacing: -1px;
}

.ns-error-content > p {
    max-width: 580px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 17px;
}

.ns-error-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.ns-primary-button,
.ns-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    border-radius: 9px;
    font-weight: 600;
}

.ns-primary-button {
    background: var(--primary);
    color: #ffffff;
}

.ns-primary-button:hover {
    background: var(--primary-dark);
}

.ns-secondary-button {
    background: #ffffff;
    color: var(--text);
    border: 1px solid var(--border);
}

.ns-error-search {
    max-width: 650px;
    margin: 55px auto 0;
}

.ns-error-search h2 {
    margin-bottom: 15px;
    font-size: 20px;
}


/* =========================
   SEARCH PAGE
========================= */

.ns-search-page {
    padding: 65px 0 80px;
}

.ns-search-header {
    margin-bottom: 35px;
}

.ns-search-label {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ns-search-header h1 {
    margin: 0;
    font-size: clamp(30px, 5vw, 44px);
    line-height: 1.15;
    letter-spacing: -1px;
}

.ns-search-header h1 span {
    color: var(--primary);
}

.ns-search-header p {
    margin: 10px 0 0;
    color: var(--muted);
}

.ns-placeholder-image {
    height: 100%;
    min-height: 190px;

    display: grid;
    place-items: center;

    background:
        linear-gradient(
            135deg,
            #eff6ff,
            #dbeafe
        );

    color: var(--primary);

    font-size: 22px;
    font-weight: 800;
}

.ns-read-more {
    display: inline-block;
    margin-top: 15px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
}


/* =========================
   SEARCH PAGINATION
========================= */

.ns-pagination {
    margin-top: 45px;
}

.ns-pagination ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.ns-pagination li {
    margin: 0;
}

.ns-pagination a,
.ns-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 40px;
    height: 40px;

    padding: 0 12px;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: #ffffff;

    font-size: 14px;
    font-weight: 600;
}

.ns-pagination a:hover {
    border-color: #bfdbfe;
    color: var(--primary);
}

.ns-pagination .current {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}


/* =========================
   NO SEARCH RESULTS
========================= */

.ns-no-results {
    max-width: 650px;
    margin: 50px auto;
    padding: 45px 25px;

    text-align: center;

    background: #ffffff;

    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.ns-no-results-icon {
    font-size: 42px;
    margin-bottom: 15px;
}

.ns-no-results h2 {
    margin: 0 0 8px;
    font-size: 27px;
}

.ns-no-results p {
    color: var(--muted);
    margin-bottom: 25px;
}

.ns-no-results .search-box {
    margin-bottom: 20px;
}

@media (max-width: 600px) {

    .ns-error-page {
        padding: 60px 0;
    }

    .ns-error-actions {
        flex-direction: column;
    }

    .ns-primary-button,
    .ns-secondary-button {
        width: 100%;
    }

    .ns-search-page {
        padding: 45px 0 60px;
    }

    .ns-pagination ul {
        flex-wrap: wrap;
    }

}

