/* ── Sanathan Flipbook Styles ─────────────────────────────────────────────
   Used on Hindu Calendar, Pooja Guide, and Sloka Collection posts.
   Brand: saffron (#b5451b), warm gold (#e8740c), light parchment (#fffdf5)
   ────────────────────────────────────────────────────────────────────── */

/* Google Fonts — Noto Sans Devanagari for Sanskrit display */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;600&family=Noto+Serif:ital,wght@0,400;0,600;1,400&display=swap');

/* ── Wrapper ─────────────────────────────────────────────────────────── */

.sas-flipbook-wrap {
    max-width: 600px;
    margin: 2rem auto;
    font-family: 'Noto Serif', Georgia, serif;
}

/* ── StPageFlip container ─────────────────────────────────────────────── */

.sas-flipbook-container {
    width: 100%;
    touch-action: pan-y;
    position: relative;
}

/* ── Individual pages ─────────────────────────────────────────────────── */

.sas-flip-page {
    padding: 2.2rem 2rem;
    background: #fffdf5;
    box-sizing: border-box;
    border: 1px solid #f0e8d8;
    overflow: hidden;
    min-height: 400px;
}

.sas-flip-page h1,
.sas-flip-page h2 {
    color: #b5451b;
    margin-top: 0;
    font-family: 'Noto Serif', Georgia, serif;
}

.sas-flip-page h1 { font-size: 1.6rem; line-height: 1.3; }
.sas-flip-page h2 { font-size: 1.25rem; border-bottom: 2px solid #f0d8c0; padding-bottom: 0.4rem; }

.sas-flip-page p  { line-height: 1.75; color: #333; margin: 0.75rem 0; }
.sas-flip-page ul { padding-left: 1.4rem; line-height: 1.8; color: #333; }
.sas-flip-page li { margin-bottom: 0.4rem; }

.sas-flip-page ol { padding-left: 1.4rem; line-height: 1.8; color: #333; }

/* ── Cover page ──────────────────────────────────────────────────────── */

.sas-page-cover {
    background: linear-gradient(135deg, #b5451b 0%, #e8740c 60%, #f5a623 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 2.5rem 2rem;
}

.sas-page-cover h1 {
    color: #fff;
    font-size: 1.8rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.25);
    border: none;
}

.sas-page-cover p {
    color: rgba(255,255,255,0.92);
    font-size: 1rem;
    line-height: 1.7;
}

.sas-page-cover::before {
    content: '🕉';
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.7;
}

/* ── Sanskrit / Mantra display ───────────────────────────────────────── */

.sas-mantra {
    font-family: 'Noto Sans Devanagari', 'Noto Serif', serif;
    font-size: 1.15rem;
    line-height: 1.9;
    color: #6b2300;
    background: #fff8f0;
    border-left: 4px solid #e8740c;
    padding: 0.8rem 1rem;
    margin: 1rem 0;
    border-radius: 0 4px 4px 0;
}

.sas-transliteration {
    font-style: italic;
    color: #888;
    font-size: 0.9rem;
    margin: 0.3rem 0 0.75rem;
}

.sas-mantra-meaning {
    color: #555;
    font-style: italic;
    font-size: 0.92rem;
    border-top: 1px dashed #f0d8c0;
    padding-top: 0.5rem;
    margin-top: 0;
}

.sas-benefit {
    background: #f9f6f0;
    border-radius: 4px;
    padding: 0.6rem 0.9rem;
    color: #555;
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

/* ── Festival items ──────────────────────────────────────────────────── */

.sas-festival-item {
    background: #fff8f0;
    border: 1px solid #f0d8c0;
    border-radius: 6px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.75rem;
}

.sas-festival-item h3 {
    color: #b5451b;
    font-size: 1rem;
    margin: 0 0 0.4rem;
}

.sas-festival-item p { margin: 0.25rem 0; font-size: 0.9rem; }

/* ── Navigation ──────────────────────────────────────────────────────── */

.sas-flipbook-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0 0.75rem;
}

.sas-flip-btn {
    background: #b5451b;
    color: #fff;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.sas-flip-btn:hover { background: #8b3214; }

.sas-flip-counter {
    font-size: 0.85rem;
    color: #888;
    min-width: 80px;
    text-align: center;
}

/* ── Share bar ───────────────────────────────────────────────────────── */

.sas-share-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: #f9f6f0;
    border-radius: 6px;
    border: 1px solid #f0d8c0;
}

.sas-share-label {
    font-size: 0.85rem;
    color: #888;
    margin-right: 0.25rem;
}

.sas-share-btn {
    padding: 0.45rem 0.9rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: opacity 0.2s;
}

.sas-share-btn:hover { opacity: 0.85; }

.sas-share-btn[data-network="whatsapp"] {
    background: #25d366;
    color: #fff;
}

.sas-share-btn[data-network="facebook"] {
    background: #1877f2;
    color: #fff;
}

.sas-share-btn[data-network="copy"] {
    background: #6c757d;
    color: #fff;
}

/* ── Mobile ──────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .sas-flipbook-wrap { margin: 1rem 0; }
    .sas-flip-page { padding: 1.4rem 1rem; }
    .sas-page-cover h1 { font-size: 1.4rem; }
    .sas-mantra { font-size: 1rem; }
    .sas-flip-btn { padding: 0.45rem 0.8rem; font-size: 0.82rem; }
}

/* ── Non-flipbook fallback (if JS disabled) ──────────────────────────── */

.no-js .sas-flipbook-container .sas-flip-page {
    display: block !important;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border-radius: 6px;
}
