﻿/* =========================================================
   Shiksha Portal - Main Stylesheet
   ========================================================= */


/* =========================================================
   VARIABLES
   ========================================================= */

:root {
    --primary: #b21f35;
    --primary-dark: #8f182a;
    --accent: #d24a5e;
    --black: #111111;
    --white: #fff;
    --light: #f7f7f7;
    --border: #e5e5e5;
    --text: #222;
    --muted: #666;
    --r: 6px;

    --card: #fff;
    --serif: Georgia, "Source Serif 4", "Times New Roman", serif;
}


/* =========================================================
   GLOBAL
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--light);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary);
}

a:hover {
    color: var(--primary-dark);
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}


/* =========================================================
   HEADINGS
   ========================================================= */

h1,
h2,
h3 {
    line-height: 1.25;
    margin: 0 0 .6rem;
    color: var(--black);
}

h1 {
    font-size: 2.4rem;
}

h2 {
    font-size: 1.6rem;
}

h3 {
    font-size: 1.1rem;
}


/* =========================================================
   CONTAINERS
   ========================================================= */

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.narrow {
    max-width: 780px;
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.sr,
.skip:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip:focus {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 200;
    background: #fff;
    padding: .5rem 1rem;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    border: 2px solid var(--primary);
    padding: .65rem 1.2rem;
    min-height: 44px;
    border-radius: var(--r);
    font-weight: 600;
    font-size: .95rem;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.btn.ghost {
    background: transparent;
    border-color: #fff;
}

.btn.ghost:hover {
    background: #fff;
    color: var(--black);
}


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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 3px solid var(--primary);
}

.bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
    color: var(--black);
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
}


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

.nav {
    margin-left: auto;
}

.nav>ul {
    list-style: none;
    margin: 0;
    padding: 0;

    display: flex;
    flex-direction: row;

    align-items: center;
    gap: .1rem;
}

.nav>ul>li {
    position: relative;
}

.nav a,
.dd-btn {
    display: block;

    padding: .5rem .6rem;

    color: var(--text);
    text-decoration: none;

    font-weight: 500;
    font-size: .9rem;
    font-family: inherit;

    background: none;
    border: 0;

    cursor: pointer;

    border-radius: var(--r);
}

.nav a:hover,
.dd-btn:hover,
.nav a[aria-current="page"] {
    color: var(--primary);
    background: #fbeef0;
}


/* =========================================================
   MORE DROPDOWN
   ========================================================= */

.dd-btn::after {
    content: "▼";
    font-size: .75em;
}

.has-dd {
    position: relative;
}

.has-dd>.dd {
    display: none;

    position: absolute;

    right: 0;
    top: 100%;

    min-width: 190px;

    margin: 0;
    padding: .3rem;

    list-style: none;

    background: #fff;

    border: 1px solid var(--border);
    border-radius: var(--r);

    box-shadow: 0 6px 18px rgba(0, 0, 0, .1);

    flex-direction: column;
    align-items: stretch;

    z-index: 1000;
}

.has-dd.open>.dd {
    display: flex;
}

.has-dd>.dd>li {
    width: 100%;
}

.has-dd>.dd>li>a {
    width: 100%;
}


/* =========================================================
   TOOLS
   ========================================================= */

.tools {
    display: flex;
    gap: .25rem;
}

.icon-btn {
    width: 44px;
    height: 44px;

    display: grid;
    place-items: center;

    background: none;
    border: 0;

    color: var(--black);

    cursor: pointer;

    border-radius: var(--r);
}

.icon-btn:hover {
    color: var(--primary);
}


/* =========================================================
   MOBILE MENU BUTTON
   ========================================================= */

.menu-btn {
    display: none;
}


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

.search-panel {
    background: var(--light);
    border-top: 1px solid var(--border);
    padding: .75rem 0;
}

.search-form,
.widget form {
    display: flex;
    gap: .5rem;
}

input,
textarea {
    width: 100%;
    padding: .65rem .8rem;
    border: 1px solid #c9c9c9;
    border-radius: var(--r);
    font: inherit;
    background: #fff;
}


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


/* =========================================================
   PAGE TITLE
   ========================================================= */

.page-title {
    background: var(--black);
    color: #fff;
    padding: 2rem 0;
    border-bottom: 4px solid var(--primary);
}

.page-title h1 {
    color: #fff;
    margin: 0;
    font-size: 2rem;
}

.prose {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.prose h2 {
    margin-top: 1.8rem;
    font-size: 1.3rem;
}


/* =========================================================
   LAYOUT
   ========================================================= */

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 2rem;

    padding-top: 2rem;
    padding-bottom: 3rem;
}

section {
    margin-bottom: 2.5rem;
}

.content>section>h2 {
    border-left: 4px solid var(--primary);
    padding-left: .7rem;
}


/* =========================================================
   GRID
   ========================================================= */

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


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

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 1.1rem;

    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);

    display: flex;
    flex-direction: column;

    overflow: hidden;
}

.card p {
    color: var(--muted);
    margin: 0 0 .8rem;
    font-size: .95rem;
}

.card h3 a {
    color: var(--black);
    text-decoration: none;
}

.card h3 a:hover {
    color: var(--primary);
}

.cat {
    color: var(--primary);
    font-weight: 700;
    font-size: .85rem;
    margin-bottom: .3rem;
}

.meta {
    margin-top: auto;

    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size: .85rem;
    color: var(--muted);
}

.more {
    font-weight: 600;
    font-size: .9rem;
    margin-top: auto;
}

.meta .more {
    margin: 0;
}

.hint {
    color: var(--muted);
    font-size: .95rem;
}


/* =========================================================
   THUMBNAILS
   ========================================================= */

.thumb {
    display: block;

    margin: -1.1rem -1.1rem .9rem;

    aspect-ratio: 16 / 9;

    overflow: hidden;
}

.thumb img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;
}

.thumb.ph {
    background: linear-gradient(135deg,
            #111 0%,
            var(--primary-dark) 100%);

    color: #fff;

    font-weight: 700;

    display: grid;
    place-items: center;

    text-decoration: none;

    font-size: 1.1rem;
}

.featured .thumb {
    aspect-ratio: 21 / 9;
}


/* =========================================================
   MCQ
   ========================================================= */

.mcq {
    background: #fff;

    border: 1px solid var(--border);
    border-radius: var(--r);

    padding: 1.1rem;

    margin-bottom: 1rem;
}

.q {
    font-weight: 600;
    margin: 0 0 .7rem;
}

.mcq ul {
    list-style: none;
    margin: 0;
    padding: 0;

    display: grid;
    gap: .5rem;
}

.opt {
    width: 100%;

    text-align: left;

    padding: .6rem .8rem;

    min-height: 44px;

    background: var(--light);

    border: 1px solid var(--border);
    border-radius: var(--r);

    font: inherit;

    cursor: pointer;
}

.opt:hover:not(:disabled) {
    border-color: var(--primary);
}

.opt.correct {
    background: #e7f4ea;
    border-color: #2e7d32;
    color: #1b5e20;
}

.opt.wrong {
    background: #fbeaec;
    border-color: var(--primary);
    color: var(--primary-dark);
}

.fb {
    margin: .7rem 0 0;

    font-weight: 600;

    min-height: 1.2em;
}


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

.widget {
    background: #fff;

    border: 1px solid var(--border);
    border-radius: var(--r);

    padding: 1rem;

    margin-bottom: 1rem;
}

.widget h2 {
    font-size: 1.05rem;

    border-bottom: 2px solid var(--primary);

    padding-bottom: .4rem;
}

.widget ul {
    list-style: none;

    margin: 0;
    padding: 0;
}

.widget li a {
    display: block;

    padding: .35rem 0;

    text-decoration: none;

    font-size: .95rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.tags a {
    border: 1px solid var(--border);
    border-radius: var(--r);

    padding: .2rem .6rem !important;
}


/* =========================================================
   CONTACT FORM
   ========================================================= */

.contact {
    display: grid;

    gap: .4rem;

    margin: 1.5rem 0;
}

.contact label {
    font-weight: 600;
    margin-top: .5rem;
}

.contact .btn {
    justify-self: start;
    margin-top: 1rem;
}


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

.site-footer {
    background: #141414;
    color: #cfcfcf;
}

.fgrid {
    display: grid;

    grid-template-columns: 1.4fr 1fr 1fr 1fr;

    gap: 2rem;

    padding-top: 2.5rem;
    padding-bottom: 2rem;
}

.site-footer h3 {
    color: #fff;
    font-size: 1rem;
}

.site-footer ul {
    list-style: none;

    margin: 0;
    padding: 0;
}

.site-footer a {
    color: #e8a0ab;

    text-decoration: none;

    display: inline-block;

    padding: .15rem 0;
}

.site-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.social {
    display: flex;

    gap: .5rem;

    margin-top: .8rem;
}

.social a {
    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    border: 1px solid #444;
    border-radius: 50%;

    font-weight: 700;
    font-size: .8rem;

    padding: 0;
}

.copy {
    border-top: 1px solid #2a2a2a;

    padding: 1rem 0;

    font-size: .9rem;

    text-align: center;
}

.to-top {
    position: fixed;

    right: 1rem;
    bottom: 1rem;

    width: 44px;
    height: 44px;

    border-radius: 50%;
    border: 0;

    background: var(--primary);

    color: #fff;

    font-size: 1.2rem;

    cursor: pointer;

    z-index: 90;
}

[hidden] {
    display: none !important;
}


/* =========================================================
   RESPONSIVE - TABLET / MOBILE NAVIGATION
   ========================================================= */

@media (max-width: 1200px) {

    .container {
        max-width: 1040px;
    }

}


@media (max-width: 992px) {

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

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

    .menu-btn {
        display: grid;
    }

    .nav {
        position: absolute;

        left: 0;
        right: 0;

        top: 100%;

        margin: 0;

        background: #fff;

        border-bottom: 3px solid var(--primary);

        display: none;

        max-height: calc(100vh - 70px);

        overflow-y: auto;
    }

    .nav.open {
        display: block;
    }

    .nav>ul {
        display: flex;

        flex-direction: column;

        align-items: stretch;

        padding: .5rem 1rem;

        gap: 0;
    }

    .nav>ul>li {
        width: 100%;
    }

    .nav>ul>li>a,
    .nav>ul>li>.dd-btn {
        width: 100%;

        text-align: left;

        padding: .75rem;
    }

    .has-dd>.dd {
        position: static;

        width: 100%;

        min-width: 0;

        margin: 0;

        padding: 0 0 0 1rem;

        border: 0;

        border-radius: 0;

        box-shadow: none;

        display: none;

        flex-direction: column;
    }

    .has-dd.open>.dd {
        display: flex;
    }

    .has-dd>.dd>li {
        width: 100%;
    }

    .has-dd>.dd a {
        width: 100%;

        padding: .65rem .75rem;
    }

    .tools {
        margin-left: auto;
    }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 768px) {

    h1 {
        font-size: 2rem;
    }

    .hero {
        padding: 2.5rem 0;
    }

    .hero p {
        font-size: 1.05rem;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 576px) {

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

    h1 {
        font-size: 1.7rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    .brand span {
        font-size: .92rem;

        white-space: normal;

        line-height: 1.2;
    }

    .actions .btn {
        width: 100%;
        text-align: center;
    }

    .dl {
        flex-wrap: wrap;
    }

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

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

}


/* =========================================================
   NEWS TABS & ARTICLE
   ========================================================= */

.tabs {
    display: flex;

    flex-wrap: wrap;

    gap: .5rem;

    margin: 0 0 1rem;
}

.tab {
    min-height: 40px;

    padding: .4rem .9rem;

    background: #fff;

    border: 1px solid var(--border);

    border-radius: var(--r);

    font: inherit;

    font-weight: 600;

    font-size: .9rem;

    cursor: pointer;

    color: var(--text);
}

.tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.tab[aria-pressed="true"] {
    background: var(--primary);

    border-color: var(--primary);

    color: #fff;
}

.card[data-off] {
    display: none;
}

.mcq[data-off] {
    display: none;
}

.article h1 {
    font-size: 2rem;

    margin-top: .3rem;
}

.article .body p {
    font-size: 1.05rem;
}


/* =========================================================
   NOTICE STRIP
   ========================================================= */

.notice-strip {
    background: #fbeef0;

    border-bottom: 1px solid var(--border);

    font-size: .9rem;
}

.notice-strip .container {
    display: flex;

    gap: 1rem;

    align-items: center;

    flex-wrap: wrap;

    padding-top: .45rem;
    padding-bottom: .45rem;
}

.notice-strip .items {
    display: flex;

    gap: 1.2rem;

    flex-wrap: wrap;
}


/* =========================================================
   SECTION HEADINGS
   ========================================================= */

.sec-head {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 1rem;

    margin-bottom: 1rem;
}

.sec-head h2 {
    margin: 0;

    border-left: 4px solid var(--primary);

    padding-left: .7rem;
}

.viewall {
    display: flex;

    gap: .7rem;

    font-size: .9rem;

    align-items: center;

    flex-wrap: wrap;
}

.viewall span {
    color: var(--muted);
}


/* =========================================================
   FEATURED LATEST NEWS
   ========================================================= */

#featured {
    width: 100%;
    margin-bottom: 1.5rem;
}

#featured .featured {
    width: 100%;
    min-height: 360px;

    padding: 2.5rem;

    box-sizing: border-box;

    border-left: 6px solid var(--primary);

    display: flex;
    flex-direction: column;
    justify-content: center;
}

#featured .featured h3 {
    font-size: 2.5rem;
    line-height: 1.2;

    margin-bottom: 1.2rem;
}

#featured .featured p {
    font-size: 1.15rem;
    line-height: 1.8;

    max-width: 850px;
}

#featured .featured .meta {
    margin-top: 1.5rem;
}


/* =========================================================
   TWO POSTS BELOW FEATURED
   ========================================================= */

.news-two {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 25px;

    margin-top: 25px;
}


/* =========================================================
   BREADCRUMBS
   ========================================================= */

.crumbs {
    font-size: .9rem;

    color: var(--muted);

    margin-bottom: 1rem;

    display: flex;

    gap: .5rem;

    flex-wrap: wrap;
}

.crumbs a {
    text-decoration: none;
}


/* =========================================================
   ARTICLE
   ========================================================= */

.wide {
    padding-top: 1.5rem;
    padding-bottom: 3rem;
}

.article p {
    font-size: 1.05rem;
    line-height: 1.8;
}

.article .btn {
    margin: .5rem 0 1rem;
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.empty {
    grid-column: 1 / -1;

    background: var(--card);

    border: 1px dashed #c9c9c9;

    border-radius: var(--r);

    padding: 1.5rem;

    color: var(--muted);
}


/* =========================================================
   DOWNLOADS
   ========================================================= */

.grid .dl {
    grid-column: 1 / -1;
}

.dl {
    display: flex;

    gap: 1rem;

    align-items: center;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: var(--r);

    padding: .9rem 1rem;
}

.dl div {
    flex: 1;
}

.dl h3,
.dl p {
    margin: 0;
}

.dl p {
    color: var(--muted);

    font-size: .9rem;
}

.dl h3 a {
    color: var(--black);

    text-decoration: none;
}

.badge {
    background: var(--primary);

    color: #fff;

    font-weight: 700;

    font-size: .75rem;

    padding: .35rem .5rem;

    border-radius: 4px;
}

.numlist {
    padding-left: 1.2rem !important;

    list-style: decimal !important;
}

.widget time {
    display: block;

    font-size: .8rem;

    color: var(--muted);
}

#related {
    margin-bottom: 1rem;
}


/* =========================================================
   DARK MODE
   ========================================================= */

:root[data-theme="dark"] {
    --light: #121212;
    --text: #e6e6e6;
    --muted: #a8a8a8;
    --border: #2e2e2e;
    --card: #1c1c1c;
}

[data-theme="dark"] :is(.site-header,
    .nav,
    .dd,
    .card,
    .widget,
    .mcq,
    .intro,
    .tab,
    input,
    textarea,
    .dl,
    .empty) {
    background: var(--card);
}

[data-theme="dark"] :is(.search-panel,
    .opt) {
    background: #181818;
}

[data-theme="dark"] :is(h1,
    h2,
    h3,
    .brand,
    .icon-btn,
    .card h3 a,
    .tab,
    .dl h3 a) {
    color: #f2f2f2;
}

[data-theme="dark"] :is(input,
    textarea,
    .opt) {
    color: var(--text);
}

[data-theme="dark"] a {
    color: #ea7a8b;
}

[data-theme="dark"] :is(.nav a,
    .dd-btn) {
    color: var(--text);
}

[data-theme="dark"] .btn,
[data-theme="dark"] .tab[aria-pressed="true"] {
    color: #fff;
}

[data-theme="dark"] .notice-strip {
    background: #2a1418;
}

[data-theme="dark"] .nav a:hover,
[data-theme="dark"] .dd-btn:hover {
    background: #2a1418;
}


/* =========================================================
   DARK MODE MOBILE DROPDOWN
   ========================================================= */

[data-theme="dark"] .nav {
    background: var(--card);
}

[data-theme="dark"] .dd {
    background: var(--card);
}


/* =========================================================
   POST PAGE TWO-COLUMN LAYOUT
   ========================================================= */

.wrapper {
    display: grid;

    grid-template-columns: 3fr 1fr;

    gap: 30px;

    align-items: start;
}


/* =========================================================
   RESPONSIVE FEATURED NEWS
   ========================================================= */

@media (max-width: 768px) {

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

    #featured .featured {
        min-height: 300px;
        padding: 2rem;
    }

    #featured .featured h3 {
        font-size: 2rem;
    }

    #featured .featured p {
        font-size: 1.05rem;
    }

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

}


@media (max-width: 580px) {

    #featured .featured {
        min-height: 250px;
        padding: 1.25rem;
    }

    #featured .featured h3 {
        font-size: 1.7rem;
    }

    #featured .featured p {
        font-size: 1rem;
    }

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

}
.post-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 0 1.5rem;
    border-radius: 6px;
}
.about-main .page-title {
  padding-left: 1.5rem;
}

