body {
    margin: 0;
    font-family: "Tiro Devanagari Sanskrit", "Noto Serif Devanagari", serif;
    font-size: 16px;
    line-height: 1.45;
}

.page {
    max-width: 850px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
}

details {
    margin: 1rem 0;
}

summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #f7f7f7;
}

details[open] summary {
    margin-bottom: 0.6rem;
}

details h2 {
    margin-top: 1.2rem;
    margin-bottom: 0.25rem;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
}

details h2 + p {
    margin-top: 0.15rem;
}

details hr {
    border: 0;
    border-top: 1px solid #ddd;
    margin: 1rem 0;
}

.class-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.class-main,
.class-sidebar {
    min-width: 0;
}

.class-sidebar {
    position: sticky;
    top: 1rem;
}

/* On phones, put common material above the classes */
@media (max-width: 700px) {
    .class-layout {
        grid-template-columns: 1fr;
    }

    .class-sidebar {
        position: static;
        order: -1;
    }
}

.book-section {
    border: 1px solid #ccc;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;

    /* padding for the class contents */
    padding: 0 1rem 1rem 1rem;
    margin-bottom: 1.2rem;
}

summary.book-summary {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    align-items: center;
    gap: 1rem;

    /* extend summary back across the padded book box */
    margin: 0 -1rem;
    padding: 0.8rem 1rem;

    cursor: pointer;
    background: #f7f7f7;

    border: 0;
    border-radius: 0;

    font-weight: 700;

}

.book-cover {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 3px;
}

.book-title {
    font-size: 1.35rem;
    padding-bottom: 0.45rem;
    border-bottom: 2px solid #aaa;
}

.book-section[open] > summary.book-summary{
    border-bottom: 1px solid #ddd;
    margin-bottom: 0.7rem;
}

.book-content {
    padding: 0.7rem 1rem 1rem 1rem;
}

summary.book-summary::webkit-details-marker {
    display:none;
}

summary.book-summary::marker{
    content: "";
}

/* Custom dropdown arrow */
summary.book-summary::after {
    content: "▼";
    font-size: 1rem;
    margin-left: 0.75rem;
}

/* Arrow changes when opened */
details[open] > summary.book-summary::after {
    content: "▲";
}

/* Header */
.class-hero {
    min-height: 190px;
    display: flex;
    align-items: center;
    padding: 1.5rem 3rem;

    background:
        linear-gradient(
            120deg,
            rgba(31, 43, 48, 0.97),
            rgba(47, 63, 70, 0.94)
        );

    margin-bottom: 1.5rem;
}

.class-hero-content {
    width: 100%;
    text-align: center;
}

.class-hero-title {
    color: white;
    font-size: 2.7rem;
    font-weight: 400;
    line-height: 1.3;
}

.class-hero-subtitle {
    margin-top: 0.5rem;
    color: rgba(255,255,255,0.8);
    font-size: 1.2rem;
}

/* Site Navigation at top */
.site-nav {
    display: flex;
    align-items: center;
    gap: 2rem;

    padding: 0.5rem 1.5rem;
    background: #28343a;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-shrink: 0;
}

.site-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.site-name {
    color: white;
    font-size: 1.15rem;
    font-weight: 700;
    white-space: nowrap;
}

.site-links {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    margin-left: auto;
}

.site-links a {
    color: white;
    text-decoration: none;
    white-space: nowrap;
}

.site-links a:hover {
    text-decoration: underline;
}
/* Bhagavad Gita chapter index */

.gita-index {
    max-width: 1100px;
    margin: 0 auto;
}

.gita-dhyana-card {
    display: block;
    width: 220px;
    margin: 0 auto 1.6rem;
    border: 1px solid #ccc;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    text-decoration: none;
}

.gita-dhyana-card img {
    display: block;
    width: 100%;
    height: auto;
}

.gita-grid {
    display: grid;
    grid-template-columns: repeat(3, 220px);
    justify-content: center;
    gap: 1rem;
}

.gita-card {
    display: block;
    overflow: hidden;

    border: 1px solid #ccc;
    border-radius: 10px;
    background: #fff;

    color: inherit;
    text-decoration: none;
}

.gita-card img {
    display: block;
    width: 100%;
    aspect-ratio: 180px;
    object-fit: cover;
}

.gita-card-body {
    padding: 0.75rem 0.85rem 0.9rem;
    text-align: center;
}

.gita-card-number {
    font-size: 0.95rem;
    opacity: 0.72;
}

.gita-card-title {
    margin-top: 0.15rem;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

.gita-card-status {
    margin-top: 0.45rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

.gita-card.active,
.gita-dhyana-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gita-card.active:hover,
.gita-dhyana-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(0,0,0,0.12);
}

.gita-dhyana-row {
    display: grid;
    grid-template-columns: 220px;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.gita-card.current {
    border: 2px solid #9a7440;
}

.gita-card.future {
    opacity: 0.62;
}

@media (max-width: 800px) {
    .gita-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gita-dhyana-card {
        grid-template-columns: 120px 1fr;
        gap: 1rem;
    }

    .gita-dhyana-card img {
        width: 120px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .gita-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .gita-card-title {
        font-size: 1rem;
    }

    .gita-dhyana-card {
        grid-template-columns: 95px 1fr;
    }

    .gita-dhyana-card img {
        width: 95px;
        height: 120px;
    }

    .gita-dhyana-title {
        font-size: 1.35rem;
    }
}

.gita-page-image {
    text-align: center;
    margin: 0 auto 2rem;
}

.gita-page-image img {
    width: 220px;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}
/* Gita Dhyanam sloka boxes */

.gita-sloka {
    max-width: 720px;
    margin: 0 auto 1.5rem;
    padding: 1.25rem 1.5rem;

    background: #f7f7f7;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
}

.gita-sloka h2 {
    margin: 0 0 1rem;
    padding-bottom: 0.6rem;

    text-align: center;
    font-size: 1.2rem;
    line-height: 1.4;

    border-bottom: 1px solid #d0d0d0;
}

.sloka-text {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;

    text-align: left;
    font-size: 1.1rem;
    line-height: 1.9;
}

.sloka-audio {
    margin-top: 1rem;
    text-align: center;
}

.sloka-audio p {
    margin: 0;
}

@media (max-width: 700px) {
    .gita-sloka {
        padding: 1rem;
    }

    .sloka-text {
        width: 100%;
        font-size: 1rem;
        line-height: 1.8;
    }
}

/* ===== Home page ===== */

.home-welcome {
    max-width: 860px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.home-welcome h1 {
    margin-bottom: 1.5rem;
}

.home-welcome-text {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.12rem;
    line-height: 1.9;
}

.home-welcome-text p {
    margin: 0 0 1.25rem;
}

.home-jaya {
    font-weight: 600;
}

.home-section {
    max-width: 900px;
    margin: 0 auto 3rem;
}

.home-section > h2 {
    text-align: center;
    margin-bottom: 1.25rem;
}

.home-card-grid {
    display: grid;
    gap: 1rem;
    justify-content: center;
}

.home-class-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-card {
    display: block;
    overflow: hidden;
    background: #f7f7f7;
    border: 1px solid #d8d8d8;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.home-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10);
}

.home-card-body {
    padding: 1rem;
    text-align: center;
}

.home-card-title {
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.5;
}

.home-card-subtitle {
    margin-top: 0.35rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.home-card-action {
    margin-top: 0.8rem;
    font-size: 0.95rem;
    text-decoration: underline;
}

.home-feature-row {
    display: grid;
    grid-template-columns: 220px;
    justify-content: center;
}

.home-feature-card img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
}

@media (max-width: 800px) {
    .home-class-grid {
        grid-template-columns: 1fr;
        max-width: 430px;
        margin: 0 auto;
    }

    .home-welcome-text {
        font-size: 1rem;
        line-height: 1.8;
    }
}
