
/* =========================================================
   KENYA EXAMS PORTAL
   Main stylesheet for index.html
========================================================= */

/* ---------- RESET ---------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f7fb;
    color: #16233b;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
input {
    font: inherit;
}


/* ---------- CONTAINER ---------- */

.container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}


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

.header {
    background: #0d2d5c;
    color: #ffffff;
    height: 72px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.12);
}

.header-content {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 28px;
}


/* ---------- LOGO ---------- */

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 270px;
}

.logo-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #ff861c;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 22px;
    flex-shrink: 0;
}

.logo h1 {
    font-size: 21px;
    line-height: 1.15;
    font-weight: 700;
}

.logo p {
    font-size: 12px;
    color: #dce8f8;
    margin-top: 2px;
}


/* ---------- NAVIGATION ---------- */

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.main-nav a {
    color: #e7eef9;
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s ease;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
    background: #1d5796;
    color: #ffffff;
}

.main-nav i {
    margin-right: 7px;
    font-size: 13px;
}


/* ---------- SEARCH ---------- */

.header-search {
    width: 310px;
    flex-shrink: 0;
}

.header-search form {
    display: flex;
    height: 42px;
}

.header-search input {
    width: 100%;
    border: none;
    outline: none;
    background: #ffffff;
    color: #18263d;
    padding: 0 15px;
    border-radius: 8px 0 0 8px;
    font-size: 13px;
}

.header-search input::placeholder {
    color: #8a96a8;
}

.header-search button {
    width: 48px;
    border: none;
    background: #ff861c;
    color: #ffffff;
    cursor: pointer;
    border-radius: 0 8px 8px 0;
    transition: 0.2s ease;
}

.header-search button:hover {
    background: #e86f0b;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    background: #f4f7fb;
    padding: 48px 0 34px;
}

.hero-content {
    min-height: 330px;
    background: linear-gradient(135deg, #123f78, #1f609d);
    border-radius: 18px;
    padding: 48px 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 45px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 12px 35px rgba(22, 58, 100, 0.18);
}

.hero-content::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    right: -130px;
    bottom: -180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
}

.hero-text {
    max-width: 650px;
    position: relative;
    z-index: 1;
}

.hero-label {
    display: inline-block;
    color: #ff9a32;
    border: 1px solid #ff9a32;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    margin-bottom: 15px;
}

.hero h2 {
    color: #ffffff;
    font-size: clamp(32px, 4vw, 54px);
    line-height: 1.05;
    letter-spacing: -1px;
    margin-bottom: 18px;
    font-weight: 800;
}

.hero-text p {
    color: #dce9f7;
    max-width: 620px;
    font-size: 15px;
    margin-bottom: 25px;
}


/* ---------- HERO BUTTONS ---------- */

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 19px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    transition: 0.2s ease;
}

.btn-primary {
    background: #ff861c;
    color: #ffffff;
}

.btn-primary:hover {
    background: #e9700b;
    transform: translateY(-1px);
}

.btn-secondary {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.16);
}


/* ---------- HERO CARD ---------- */

.hero-card {
    width: 235px;
    min-height: 235px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    padding: 25px;
    color: #ffffff;
    position: relative;
    z-index: 1;
}

.hero-card > i {
    font-size: 36px;
    color: #ff9a32;
    margin-bottom: 13px;
}

.hero-card h3 {
    font-size: 21px;
    margin-bottom: 8px;
}

.hero-card p {
    font-size: 12px;
    color: #e3edf8;
    margin-bottom: 20px;
}

.hero-stat {
    display: flex;
    align-items: baseline;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 14px;
}

.hero-stat strong {
    font-size: 22px;
    color: #ffffff;
}

.hero-stat span {
    font-size: 11px;
    color: #d9e5f3;
}


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

.main-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    padding-top: 15px;
    padding-bottom: 55px;
}


/* ---------- SECTION HEADING ---------- */

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
    gap: 15px;
}

.section-heading > div > span {
    display: block;
    color: #ff7d17;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    margin-bottom: 4px;
}

.section-heading h2 {
    font-size: 27px;
    color: #16233b;
    line-height: 1.2;
}

.section-heading > a {
    color: #1768bb;
    font-size: 12px;
    font-weight: 700;
}

.section-heading > a i {
    margin-left: 5px;
}


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

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

.exam-card {
    background: #ffffff;
    border: 1px solid #dce4ee;
    border-radius: 13px;
    padding: 20px;
    min-height: 190px;
    display: flex;
    gap: 16px;
    transition: 0.22s ease;
    box-shadow: 0 3px 12px rgba(24, 48, 82, 0.04);
}

.exam-card:hover {
    transform: translateY(-4px);
    border-color: #bdd0e6;
    box-shadow: 0 12px 25px rgba(28, 60, 100, 0.10);
}

.exam-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.exam-icon.kcse {
    background: #e7f0ff;
    color: #1768bb;
}

.exam-icon.form-three {
    background: #e9f8f1;
    color: #16865c;
}

.exam-icon.form-four {
    background: #fff0e7;
    color: #ed7316;
}

.exam-icon.cbe {
    background: #f0eaff;
    color: #7654d6;
}

.exam-icon.other {
    background: #edf1f5;
    color: #58677b;
}

.exam-info {
    min-width: 0;
}

.exam-tag {
    display: block;
    color: #ff7210;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.exam-info h3 {
    color: #15233a;
    font-size: 18px;
    line-height: 1.35;
    margin-bottom: 8px;
}

.exam-info p {
    color: #65748a;
    font-size: 12px;
    line-height: 1.55;
    margin-bottom: 14px;
}

.explore {
    color: #0870c9;
    font-size: 11px;
    font-weight: 800;
}

.explore i {
    margin-left: 5px;
    transition: 0.2s ease;
}

.exam-card:hover .explore i {
    transform: translateX(4px);
}


/* =========================================================
   SIDEBAR
========================================================= */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* ---------- QUICK LINKS ---------- */

.sidebar-card {
    background: #ffffff;
    border: 1px solid #dce4ee;
    border-radius: 13px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(24, 48, 82, 0.04);
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 17px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #e4e9f0;
}

.sidebar-title > i {
    color: #1768bb;
}

.sidebar-title h3 {
    font-size: 15px;
    color: #16233b;
}

.quick-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 15px 18px;
    color: #40516a;
    font-size: 12px;
    border-bottom: 1px solid #edf1f5;
    transition: 0.2s ease;
}

.quick-link:last-child {
    border-bottom: none;
}

.quick-link span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-link span i {
    width: 17px;
    color: #1768bb;
    text-align: center;
}

.quick-link > i {
    font-size: 10px;
    color: #a1adbc;
}

.quick-link:hover {
    background: #f5f9fe;
    color: #1768bb;
}


/* ---------- PURCHASE CARD ---------- */

.purchase-card {
    background: #fff8f1;
    border: 1px solid #ffd7b5;
    border-radius: 13px;
    padding: 22px;
}

.purchase-icon {
    width: 43px;
    height: 43px;
    background: #ff861c;
    color: #ffffff;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.purchase-card h3 {
    font-size: 18px;
    color: #16233b;
    margin-bottom: 8px;
}

.purchase-card p {
    color: #69778b;
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.purchase-button {
    display: block;
    text-align: center;
    background: #ff861c;
    color: #ffffff;
    padding: 11px 15px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    transition: 0.2s ease;
}

.purchase-button:hover {
    background: #e9700b;
}


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

footer {
    background: #0b2448;
    color: #ffffff;
}

.footer-content {
    min-height: 115px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    background: #ff861c;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-brand h3 {
    font-size: 15px;
    margin-bottom: 2px;
}

.footer-brand p {
    color: #aebed2;
    font-size: 11px;
}

.footer-links {
    display: flex;
    gap: 22px;
}

.footer-links a {
    color: #d5e0ee;
    font-size: 12px;
}

.footer-links a:hover {
    color: #ff9a32;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.footer-bottom .container {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-bottom p {
    color: #9fb0c6;
    font-size: 10px;
}


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

@media (max-width: 1050px) {

    .header-content {
        gap: 15px;
    }

    .logo {
        min-width: auto;
    }

    .main-nav {
        gap: 0;
    }

    .main-nav a {
        padding: 10px 11px;
    }

    .header-search {
        width: 240px;
    }

    .hero-content {
        padding: 40px;
    }

    .main-content {
        grid-template-columns: 1fr 260px;
    }

}


@media (max-width: 850px) {

    .header {
        height: auto;
    }

    .header-content {
        min-height: 72px;
        flex-wrap: wrap;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .logo {
        flex: 1;
    }

    .main-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        border-top: 1px solid rgba(255,255,255,0.10);
        padding-top: 8px;
    }

    .header-search {
        width: 260px;
    }

    .hero-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-card {
        width: 100%;
        max-width: 380px;
    }

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

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

}


@media (max-width: 620px) {

    .container {
        width: min(100% - 24px, 1200px);
    }

    .logo h1 {
        font-size: 18px;
    }

    .logo p {
        font-size: 10px;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .header-search {
        order: 2;
        width: 100%;
    }

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

    .main-nav a {
        font-size: 12px;
        padding: 9px 12px;
    }

    .hero {
        padding-top: 20px;
    }

    .hero-content {
        padding: 30px 24px;
        border-radius: 13px;
    }

    .hero h2 {
        font-size: 34px;
    }

    .hero-card {
        min-height: auto;
    }

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

    .section-heading h2 {
        font-size: 23px;
    }

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

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 25px 0;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 14px;
    }

    .footer-bottom .container {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 0;
    }

}


@media (max-width: 400px) {

    .hero h2 {
        font-size: 29px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-primary,
    .btn-secondary {
        justify-content: center;
    }

    .exam-card {
        padding: 16px;
    }

}
