:root {
    --bg: #fffaf3;
    --paper: #fff;
    --paper2: #fff6e8;
    --ink: #30231c;
    --body: #5c4a3e;
    --muted: #8b7767;
    --saffron: #c75a18;
    --gold: #e5a04c;
    --line: #eadcca;
    --shadow: 0 12px 35px rgba(91, 58, 29, 0.09);
}

/* =========================
   RESET
========================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(
        circle at 50% -10%,
        #fff1d8 0,
        #fffaf3 35%,
        #fffaf3 100%
    );
    color: var(--ink);
    font-family: "DM Sans", "Noto Sans Devanagari", sans-serif;
}

/* =========================
   MAIN
========================= */

main {
    max-width: 1450px;
    margin: auto;
    padding: 0 28px 80px;
}

/* =========================
   HERO
========================= */

.hero {
    text-align: center;
    padding: 48px 10px 34px;
}

.hero-mark {
    font-family: "Noto Sans Devanagari";
    font-size: 42px;
    color: var(--saffron);
    line-height: 1;
}

.eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: var(--saffron);
    margin: 8px 0 12px;
}

.hero h1 {
    font-family: "Noto Sans Devanagari";
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.2;
    margin: 0 0 10px;
    font-weight: 800;
}

.hero p {
    font-family: "Noto Sans Devanagari";
    font-size: 16px;
    color: var(--muted);
    line-height: 1.8;
    margin: 0 auto;
    max-width: 700px;
}

/* =========================
   LANGUAGE SWITCH
========================= */

.lang-switch {
    display: inline-flex;
    background: #f1e5d2;
    padding: 4px;
    border-radius: 999px;
    margin-top: 20px;
}

.lang-switch button {
    border: 0;
    background: transparent;
    padding: 9px 19px;
    border-radius: 999px;
    color: #806d5d;
    font-weight: 800;
    cursor: pointer;
}

.lang-switch button.active {
    background: #fff;
    color: var(--saffron);
    box-shadow: 0 2px 9px rgba(80, 50, 20, 0.12);
}

/* =========================
   TOOLBAR
========================= */

.toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 12px 0 16px;
    background: rgba(255, 250, 243, 0.92);
    backdrop-filter: blur(12px);
}

/* =========================
   SEARCH
========================= */

.search {
    max-width: 780px;
    margin: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    display: flex;
    align-items: center;
    padding: 0 17px;
    box-shadow: var(--shadow);
}

.search span {
    font-size: 25px;
    color: var(--saffron);
    margin-right: 9px;
}

.search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 15px 0;
    font-size: 15px;
    color: var(--ink);
}

/* =========================
   FILTERS
========================= */

.filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 13px;
}

.filter {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 8px 15px;
    color: var(--body);
    font-weight: 700;
    cursor: pointer;
}

.filter.active {
    background: var(--saffron);
    border-color: var(--saffron);
    color: #fff;
}

/* =========================
   CARDS
========================= */

.cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    margin-top: 20px;
}

.card {
    width: 255px;
    flex: 0 0 255px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 19px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 42px rgba(91, 58, 29, 0.13);
}

/* =========================
   CARD IMAGE
========================= */

.card-art {
    aspect-ratio: 1.9 / 1;
    background: #fff4df;
    overflow: hidden;
    position: relative;
}

.card-art img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.card:hover .card-art img {
    transform: scale(1.04);
}

/* =========================
   CARD BODY
========================= */

.card-body {
    padding: 16px 17px 18px;
}

.card-cat {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.13em;
    color: var(--saffron);
    text-transform: uppercase;
}

.card h2 {
    font-family: "Noto Sans Devanagari";
    font-size: 18px;
    line-height: 1.5;
    margin: 7px 0 0;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.card-read {
    margin-top: 12px;
    color: var(--saffron);
    font-size: 13px;
    font-weight: 800;
}

/* =========================
   EMPTY STATE
========================= */

.empty {
    text-align: center;
    color: var(--muted);
    padding: 70px 10px;
}

/* =========================
   DETAIL VIEW
========================= */

#detailView {
    max-width: 980px;
    margin: 20px auto;
}

/* =========================
   DETAIL IMAGE
========================= */

.detail-art {
    max-width: 620px;
    margin: 0 auto 24px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #fff4df;
}

.detail-art img {
    width: 100%;
    display: block;
    max-height: 360px;
    object-fit: cover;
}

/* =========================
   BACK BUTTON
========================= */

.back {
    border: 0;
    background: transparent;
    color: var(--saffron);
    font-weight: 800;
    font-size: 15px;
    padding: 8px 0;
    cursor: pointer;
}

/* =========================
   DETAIL CONTENT
========================= */

.detail {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: clamp(24px, 5vw, 52px);
    box-shadow: var(--shadow);
}

.detail-title {
    font-family: "Noto Sans Devanagari";
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.3;
    text-align: center;
    margin: 0 0 9px;
    font-weight: 800;
    color: #332219;
}

.detail-rule {
    width: 72px;
    height: 3px;
    background: var(--gold);
    margin: 16px auto 30px;
    border-radius: 99px;
}

/* =========================
   TABS
========================= */

.tabs {
    display: flex;
    justify-content: center;
    gap: 5px;
    background: #f7eddf;
    border-radius: 13px;
    padding: 5px;
    width: max-content;
    margin: 0 auto 30px;
}

.tab {
    border: 0;
    background: transparent;
    padding: 9px 18px;
    border-radius: 9px;
    color: var(--muted);
    font-weight: 800;
    cursor: pointer;
}

.tab.active {
    background: #fff;
    color: var(--saffron);
    box-shadow: 0 2px 8px rgba(80, 50, 20, 0.12);
}

/* =========================
   CONTENT SECTION
========================= */

.content-section h2 {
    font-family: "Noto Sans Devanagari";
    font-size: 25px;
    line-height: 1.5;
    color: #934514;
    margin: 32px 0 14px;
    padding: 10px 14px;
    border-left: 4px solid var(--gold);
    background: linear-gradient(
        90deg,
        #fff6e5,
        transparent
    );
    border-radius: 0 10px 10px 0;
}

/* =========================
   PROSE
========================= */

.prose {
    font-family: "Noto Sans Devanagari", "DM Sans", sans-serif;
    font-size: 17px;
    line-height: 2.05;
    color: var(--body);
    margin: 13px 0;
}

/* =========================
   VERSE
========================= */

.verse {
    font-family: "Noto Sans Devanagari", sans-serif;
    text-align: center;
    font-size: 20px;
    line-height: 2.15;
    color: #6e2f11;

    background: linear-gradient(
        145deg,
        #fff9ed,
        #fff0d5
    );

    border: 1px solid #efd6ae;
    border-radius: 17px;

    padding: 19px 18px;
    margin: 17px 0;

    box-shadow: 0 5px 20px rgba(150, 90, 25, 0.05);
}

.verse-line {
    display: block;
}

.verse-line + .verse-line {
    margin-top: 1px;
}

/* =========================
   LIST
========================= */

.list {
    padding-left: 27px;
    margin: 14px 0;
}

.list li {
    font-family: "Noto Sans Devanagari", "DM Sans";
    font-size: 16px;
    line-height: 1.95;
    color: var(--body);
    margin: 5px 0;
}

/* =========================
   FAQ
========================= */

.faq {
    margin: 22px 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: #fffdf9;
}

.faq-q {
    font-family: "Noto Sans Devanagari";
    font-size: 18px;
    line-height: 1.6;
    font-weight: 800;
    color: #8d4216;
    background: #fff5e4;
    padding: 15px 18px;
}

.faq-a {
    font-family: "Noto Sans Devanagari", "DM Sans";
    font-size: 16px;
    line-height: 1.95;
    color: var(--body);
    padding: 15px 18px;
}

/* =========================
   PDF
========================= */

.pdf {
    margin-top: 32px;
    padding: 18px;
    background: #fff8ec;
    border: 1px dashed #e4c89d;
    border-radius: 14px;
}

.pdf h2 {
    margin-top: 0 !important;
}

/* =========================================================
   MOBILE - 2 CARDS PER ROW
========================================================= */

@media (max-width: 700px) {

    main {
        padding: 0 14px 55px;
    }

    /* HERO */

    .hero {
        padding: 32px 5px 25px;
    }

    .hero-mark {
        font-size: 34px;
    }

    .hero h1 {
        font-size: 30px;
    }

    .hero p {
        font-size: 14px;
        line-height: 1.7;
    }

    /* LANGUAGE */

    .lang-switch {
        margin-top: 15px;
    }

    .lang-switch button {
        padding: 8px 15px;
        font-size: 13px;
    }

    /* TOOLBAR */

    .toolbar {
        padding: 8px 0 12px;
    }

    /* SEARCH */

    .search {
        border-radius: 14px;
        padding: 0 13px;
    }

    .search span {
        font-size: 21px;
        margin-right: 7px;
    }

    .search input {
        padding: 13px 0;
        font-size: 14px;
    }

    /* FILTERS */

    .filters {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 3px;
        scrollbar-width: none;
    }

    .filters::-webkit-scrollbar {
        display: none;
    }

    .filter {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 8px 14px;
        font-size: 13px;
    }

    /* =====================================================
       IMPORTANT:
       2 CARDS IN ONE ROW
    ===================================================== */

    .cards {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin-top: 16px;
    }

    .card {
        width: 100%;
        min-width: 0;
        flex: none;
        border-radius: 15px;
    }

    /* CARD IMAGE */

    .card-art {
        aspect-ratio: 1.55 / 1;
    }

    .card-art img {
        object-fit: cover;
    }

    /* CARD BODY */

    .card-body {
        padding: 11px 11px 13px;
    }

    .card-cat {
        font-size: 8px;
        letter-spacing: 0.1em;
    }

    .card h2 {
        font-size: 15px;
        line-height: 1.4;
        margin-top: 5px;
    }

    .card-read {
        margin-top: 8px;
        font-size: 11px;
    }

    /* DETAIL */

    #detailView {
        margin: 15px auto;
    }

    .detail {
        padding: 23px 17px;
        border-radius: 20px;
    }

    .detail-title {
        font-size: 31px;
    }

    .detail-art {
        border-radius: 16px;
        margin-bottom: 18px;
    }

    .detail-art img {
        max-height: 280px;
    }

    /* TABS */

    .tabs {
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
    }

    .tab {
        white-space: nowrap;
        padding: 9px 14px;
        font-size: 13px;
    }

    /* CONTENT */

    .content-section h2 {
        font-size: 21px;
        line-height: 1.5;
    }

    .prose {
        font-size: 16px;
        line-height: 1.9;
    }

    .verse {
        font-size: 18px;
        line-height: 2;
        padding: 16px 13px;
    }

    .list {
        padding-left: 23px;
    }

    .list li {
        font-size: 15px;
        line-height: 1.85;
    }

    .faq-q {
        font-size: 16px;
        padding: 13px 15px;
    }

    .faq-a {
        font-size: 15px;
        padding: 13px 15px;
    }
}

/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    main {
        padding-left: 10px;
        padding-right: 10px;
    }

    .cards {
        gap: 9px;
    }

    .card {
        border-radius: 13px;
    }

    .card-body {
        padding: 9px 9px 11px;
    }

    .card h2 {
        font-size: 14px;
    }

    .card-read {
        font-size: 10px;
    }

    .card-cat {
        font-size: 7px;
    }
}