*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #f4fbf6;
    --bg-dark: #e8f5ec;
    --green: #1a7a45;
    --green-dark: #0f4d2a;
    --green-deep: #0a3319;
    --green-light: #2ead65;
    --gold: #c9a227;
    --text: #0f2d1a;
    --text-light: #3a6b4e;
    --card-bg: #fafffe;
    --border: #b8dfc8;
    --shadow: rgba(15, 77, 42, 0.14);
    --nav-height: 72px;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: 'Crimson Text', Georgia, serif;
    line-height: 1.6;
}

body.rtl {
    font-family: 'Noto Naskh Arabic', 'Crimson Text', serif;
}

body:not(.rtl) [lang="hi"],
html[lang="hi"] body {
    font-family: 'Noto Sans Devanagari', 'Crimson Text', serif;
}

img {
    display: block;
}

.navbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    height: var(--nav-height);
    background: var(--green-deep);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 2rem;
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.35);
    border-bottom: 2px solid var(--green-dark);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    white-space: nowrap;
}

.logo-icon {
    color: var(--gold);
    font-size: 1.8rem;
}

.logo-text,
.footer-logo {
    color: var(--bg);
    font-family: 'Playfair Display', serif;
    font-size: 1.42rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
    list-style: none;
    margin-inline-start: auto;
}

.nav-btn,
.language-toggle,
.language-menu button {
    color: rgba(244, 251, 246, 0.84);
    font: 600 1rem 'Crimson Text', serif;
}

.nav-btn {
    display: block;
    text-decoration: none;
    padding: 0.45rem 0.9rem;
    border: 1.5px solid transparent;
    border-radius: 7px;
    white-space: nowrap;
    transition: 0.25s ease;
}

.nav-btn:hover,
.nav-btn.active,
.language-toggle:hover {
    background: var(--green);
    color: white;
    border-color: var(--green-light);
}

.language-wrap {
    position: relative;
    flex: 0 0 auto;
}

.language-toggle {
    min-width: 142px;
    border: 1.5px solid rgba(244, 251, 246, 0.35);
    background: transparent;
    border-radius: 7px;
    padding: 0.48rem 0.8rem;
    cursor: pointer;
    white-space: nowrap;
}

.language-menu {
    position: absolute;
    top: calc(100% + 0.55rem);
    inset-inline-end: 0;
    min-width: 160px;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    padding: 0.35rem;
    display: none;
}

.language-menu.open {
    display: block;
}

.language-menu button {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text);
    padding: 0.65rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    text-align: start;
}

.language-menu button:hover {
    background: var(--bg-dark);
    color: var(--green-dark);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    display: block;
    width: 27px;
    height: 2.5px;
    border-radius: 2px;
    background: var(--bg);
    transition: 0.25s ease;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

.page {
    display: none;
    min-height: 100vh;
    padding-top: var(--nav-height);
    animation: fadeIn 0.35s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero {
    min-height: 380px;
    color: var(--bg);
    background: linear-gradient(130deg, var(--green-deep), var(--green-dark) 55%, var(--green));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 2rem 4rem 2rem;
    overflow: hidden;
}

.hero-content {
    max-width: 650px;
}

.hero-tag {
    display: inline-block;
    color: #82efad;
    background: rgba(46, 173, 101, 0.18);
    border: 1px solid rgba(46, 173, 101, 0.45);
    border-radius: 999px;
    padding: 0.32rem 1rem;
    margin-bottom: 1.1rem;
    font-size: 0.95rem;
}

.hero h1 {
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.4rem, 6vw, 4rem);
    line-height: 1.05;
    margin-bottom: 0.75rem;
}

.hero-subtitle {
    max-width: 58ch;
    color: rgba(244, 251, 246, 0.82);
    font-size: 1.15rem;
    line-height: 1.75;
    margin-bottom: 2rem;
}

.hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-primary,
.btn-secondary,
.btn-submit {
    border-radius: 8px;
    cursor: pointer;
    font: 700 1.08rem 'Crimson Text', serif;
    transition: 0.25s ease;
}

.btn-primary,
.btn-secondary {
    padding: 0.8rem 2rem;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--green-deep);
}

.btn-secondary {
    background: transparent;
    border-color: rgba(244, 251, 246, 0.45);
    color: white;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

/* .hero-deco {
    color: var(--gold);
    font-size: clamp(5rem, 14vw, 11rem);
    opacity: 0.16;
    line-height: 1;
} */

.hero-deco {
    color: #FFD95A;

    /* Moon size doubled */
    font-size: clamp(10rem, 28vw, 22rem);

    opacity: 0.5;
    line-height: 1;
    user-select: none;
    display: inline-block;

    text-shadow:
        0 0 20px rgba(255,217,90,0.35),
        0 0 40px rgba(255,217,90,0.2),
        0 0 80px rgba(255,217,90,0.12);

    animation: moonFloat 9s ease-in-out infinite;
}

/* Moon animation */
@keyframes moonFloat {

    0%, 100% {
        transform: translateY(20px) rotate(-8deg) scale(1);
    }

    50% {
        transform: translateY(-18px) rotate(9deg) scale(1.05);
    }
}


/* ////////////////////////////////////////////////////////////////// */

.hero {
    position: relative;
    overflow: hidden;
}

/* Sparkles */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;

    background-image:
        radial-gradient(circle, rgba(255,255,255,0.9) 1px, transparent 2px),
        radial-gradient(circle, rgba(255,217,90,0.8) 1.5px, transparent 3px),
        radial-gradient(circle, rgba(255,255,255,0.7) 1px, transparent 2px);

    background-size:
        180px 180px,
        260px 260px,
        320px 320px;

    background-position:
        0 0,
        40px 60px,
        130px 90px;

    animation:
        sparkleMove 30s linear infinite,
        sparkleTwinkle 4s ease-in-out infinite;

    opacity: 0.5;
    pointer-events: none;
}

/* Sparkle movement */
@keyframes sparkleMove {

    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-120px);
    }
}

/* Sparkle twinkle */
@keyframes sparkleTwinkle {

    0%, 100% {
        opacity: 0.25;
    }

    50% {
        opacity: 0.65;
    }
}



.section-container,
.about-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 3rem;
}

.section-title,
.form-section h2,
.about-text h2,
.page-header h1 {
    color: var(--green-dark);
    font-family: 'Playfair Display', serif;
}

.section-title {
    text-align: center;
    font-size: 2.15rem;
    margin-bottom: 0.45rem;
}

.section-sub,
.form-section > p,
.page-header p {
    color: var(--text-light);
    text-align: center;
    font-size: 1.08rem;
}

.section-sub {
    margin-bottom: 2.5rem;
}

.books-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
}

.mini-book-card,
.book-card,
.contact-info,
.purchase-form {
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    box-shadow: 0 4px 18px var(--shadow);
}

.mini-book-card {
    cursor: pointer;
    text-align: center;
    padding: 1rem 0.7rem;
    border-radius: 8px;
    transition: 0.25s ease;
}

.mini-book-card:hover,
.book-card:hover {
    transform: translateY(-6px);
    border-color: var(--green);
    box-shadow: 0 16px 40px rgba(15, 77, 42, 0.2);
}

.mini-book-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 0.65rem;
}

.mini-book-card p {
    color: var(--text-light);
    font-weight: 700;
    line-height: 1.35;
}

.features-section {
    display: flex;
    justify-content: center;
    gap: 2.2rem;
    flex-wrap: wrap;
    background: var(--bg-dark);
    border-block: 1.5px solid var(--border);
    padding: 2.6rem 2rem;
}

.feature-card {
    max-width: 260px;
    text-align: center;
}

.feature-icon {
    display: block;
    font-size: 2.25rem;
    margin-bottom: 0.6rem;
}

.feature-card h3 {
    color: var(--green-dark);
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
}

.feature-card p {
    color: var(--text-light);
}

.page-header {
    background: linear-gradient(135deg, var(--green-deep), var(--green-dark));
    border-bottom: 3px solid var(--green);
    color: white;
    text-align: center;
    padding: 3.4rem 2rem;
}

.page-header h1 {
    color: white;
    font-size: 2.45rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: rgba(244, 251, 246, 0.78);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem;
}

.book-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 8px;
    transition: 0.28s ease;
}

.book-badge {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    z-index: 2;
    background: var(--green);
    color: white;
    border-radius: 999px;
    padding: 0.22rem 0.72rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.book-card > img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    border-bottom: 2px solid var(--border);
}

.book-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.35rem;
}

.book-info h3 {
    color: var(--green-deep);
    font-family: 'Playfair Display', serif;
    font-size: 1.32rem;
    line-height: 1.3;
}

.book-author {
    color: var(--green);
    font-style: italic;
    margin: 0.25rem 0 0.75rem;
}

.book-desc {
    color: var(--text-light);
    flex: 1;
    margin-bottom: 1rem;
}

.book-price {
    color: var(--green-dark);
    border-top: 1.5px solid var(--border);
    font: 700 1.35rem 'Playfair Display', serif;
    padding-top: 0.7rem;
}

.form-section {
    background: var(--bg-dark);
    border-top: 2px solid var(--border);
    padding: 3.4rem 1.2rem;
}

.form-section h2 {
    text-align: center;
    font-size: 1.9rem;
}

.form-section > p {
    margin: 0.35rem 0 2rem;
}

.purchase-form {
    max-width: 760px;
    margin: 0 auto;
    border-radius: 8px;
    padding: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    color: var(--green-deep);
    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font: 1rem 'Crimson Text', serif;
    padding: 0.75rem 0.95rem;
    outline: none;
    resize: vertical;
}

body.rtl .form-group input,
body.rtl .form-group select,
body.rtl .form-group textarea {
    font-family: 'Noto Naskh Arabic', serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(26, 122, 69, 0.14);
}

.btn-submit {
    width: 100%;
    border: 0;
    background: var(--green-dark);
    color: white;
    padding: 0.95rem;
}

.about-section {
    max-width: 880px;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.about-text p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-radius: 8px;
    margin-top: 1.7rem;
    padding: 1.4rem;
}

.contact-item {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
}

.contact-item p {
    color: var(--text);
    margin: 0;
}

.footer {
    background: var(--green-deep);
    color: rgba(244, 251, 246, 0.72);
    text-align: center;
    padding: 1.2rem;
}

.footer-inner {
    max-width: 760px;
    margin: 0 auto;
}

.footer-logo {
    color: var(--gold);
    margin-bottom: 0.2rem;
}

.footer-copy {
    margin-top: 0.35rem;
    opacity: 0.72;
    font-size: 0.9rem;
}

.toast {
    position: fixed;
    z-index: 9999;
    right: 28px;
    bottom: 108px;
    max-width: 320px;
    background: var(--green-deep);
    color: white;
    border-left: 4px solid var(--green-light);
    border-radius: 8px;
    padding: 1rem 1.3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    transform: translateX(130%);
    transition: 0.35s ease;
}

body.rtl .toast {
    right: auto;
    left: 28px;
    border-left: 0;
    border-right: 4px solid var(--green-light);
    transform: translateX(-130%);
}

.toast.show,
body.rtl .toast.show {
    transform: translateX(0);
}

.whatsapp-btn {
    position: fixed;
    z-index: 999;
    right: 28px;
    bottom: 28px;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #25d366;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 22px rgba(37, 211, 102, 0.45);
    transition: 0.25s ease;
}

body.rtl .whatsapp-btn {
    right: auto;
    left: 28px;
}

.wa-label {
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
}

.whatsapp-btn:hover {
    transform: scale(1.08);
}

@media (max-width: 980px) {
    .navbar {
        padding: 0 1.1rem;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        inset-inline: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        background: var(--green-deep);
        padding: 0.8rem 1rem 1.1rem;
        border-bottom: 2px solid var(--green-dark);
    }

    .nav-links.open {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .language-wrap {
        margin-inline-start: auto;
    }

    .hero {
        text-align: center;
        flex-direction: column;
        justify-content: center;
        padding: 1rem 1.5rem;
    }

    .hero-btns {
        justify-content: center;
    }

    .books-preview-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .section-container,
    .about-section {
        padding: 3rem 1.4rem;
    }

    .books-grid {
        padding: 2rem 1.4rem;
    }
}

@media (max-width: 620px) {
    :root {
        --nav-height: 66px;
    }

    .logo-text {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 1.1rem;
    }

    .language-toggle {
        min-width: 0;
        max-width: 132px;
        padding: 0.45rem 0.6rem;
        font-size: 0.88rem;
    }

    .books-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .purchase-form {
        padding: 1.3rem;
    }

    .page-header h1 {
        font-size: 1.9rem;
    }

    .whatsapp-btn {
        right: 18px;
        bottom: 18px;
        width: 54px;
        height: 54px;
    }

    body.rtl .whatsapp-btn {
        left: 18px;
    }

    .toast {
        right: 18px;
        bottom: 88px;
        max-width: calc(100vw - 36px);
    }

    body.rtl .toast {
        left: 18px;
    }
}



/* ========================================
   WHATSAPP SUCCESS TOAST
======================================== */

.toast {
    background: #075E54;
    border-left: 4px solid #25D366;
}

.toast.show {
    animation: toastSlide 0.4s ease;
}

@keyframes toastSlide {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}


/* ========================================
   BUY ON WHATSAPP BUTTON
======================================== */

.buy-whatsapp-btn {
    margin-top: 1rem;
    width: 100%;
    border: none;
    border-radius: 8px;
    background: #25D366;
    color: white;
    padding: 0.85rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s ease;
}

.buy-whatsapp-btn:hover {
    background: #1ebe5d;
    transform: translateY(-2px);
}


/* ========================================
   DARK MODE
======================================== */

.dark-toggle {
    position: fixed;
    left: 25px;
    bottom: 25px;
    z-index: 999;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    background: #111;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0,0,0,0.3);
}

body.dark-mode {
    --bg: #08110c;
    --bg-dark: #0d1a13;
    --card-bg: #102017;
    --text: #f5fff7;
    --text-light: #c2d9ca;
    --border: #244533;
    --shadow: rgba(0,0,0,0.45);
}

body.dark-mode .navbar,
body.dark-mode .footer,
body.dark-mode .page-header {
    background: #050b08;
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background: #0d1a13;
    color: white;
}