/* ============================================================
   STUDY GUIDE PAGE — PREMIUM REDESIGN
   Bihar Board 2026 | Science Sangrah
   ============================================================ */

/* ── Hindi / Devanagari font utility ── */
.devanagari {
    font-family: 'Noto Sans Devanagari', 'Mangal', 'Nirmala UI', sans-serif;
    line-height: 1.8;
}

/* ── Page background ── */
.study-guide-page {
    background: #fdfaf7;
}

/* ════════════════════════════════════════
   HERO SECTION
════════════════════════════════════════ */
.sg-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(135deg, #1a0a00 0%, #2d1200 45%, #3d1a00 100%);
    padding: 5rem 0 4rem;
    border-bottom: 1px solid rgba(255,69,0,0.2);
}

/* Decorative grid overlay */
.sg-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,69,0,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,69,0,0.07) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
}

/* Glowing orbs */
.sg-hero-glow-1 {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,69,0,0.35) 0%, transparent 70%);
    top: -180px;
    right: -100px;
    z-index: 0;
    animation: glowPulse 8s ease-in-out infinite;
}

.sg-hero-glow-2 {
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,130,0,0.25) 0%, transparent 70%);
    bottom: -120px;
    left: -80px;
    z-index: 0;
    animation: glowPulse 11s ease-in-out infinite reverse;
}

.sg-hero-inner {
    position: relative;
    z-index: 1;
}

/* Badge pill */
.sg-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,69,0,0.15);
    border: 1px solid rgba(255,69,0,0.4);
    color: #ff7a35;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

/* Hero heading */
.sg-hero-title {
    font-size: clamp(2rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
    letter-spacing: -0.02em;
}

.sg-hero-title .accent {
    background: linear-gradient(90deg, #ff6a00, #ffb347);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sg-hero-subtitle {
    font-size: 1rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.8;
    max-width: 520px;
}

/* CTA Buttons */
.sg-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff4500, #ff7a00);
    color: #fff;
    font-weight: 700;
    padding: 0.8rem 1.6rem;
    border-radius: 12px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 8px 24px rgba(255,69,0,0.4);
    text-decoration: none;
}
.sg-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(255,69,0,0.5);
}

.sg-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1.5px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    padding: 0.8rem 1.6rem;
    border-radius: 12px;
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
    text-decoration: none;
    backdrop-filter: blur(4px);
}
.sg-btn-outline:hover {
    border-color: #ff6a00;
    background: rgba(255,69,0,0.12);
    transform: translateY(-3px);
    color: #fff;
}

/* Stat chips on hero right */
.sg-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.sg-stat-chip {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 1rem 1.2rem;
    backdrop-filter: blur(10px);
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
    animation: floatChip 7s ease-in-out infinite;
}
.sg-stat-chip:hover {
    border-color: rgba(255,69,0,0.5);
    background: rgba(255,69,0,0.1);
    transform: translateY(-4px);
}
.sg-stat-chip:nth-child(2) { animation-delay: 0.8s; }
.sg-stat-chip:nth-child(3) { animation-delay: 1.6s; }
.sg-stat-chip:nth-child(4) { animation-delay: 2.4s; }

.sg-stat-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(255,255,255,0.45);
    font-weight: 600;
}

.sg-stat-value {
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    margin-top: 4px;
}
.sg-stat-value .devanagari {
    font-size: 0.88rem;
}

/* ════════════════════════════════════════
   SECTION HEADER STYLE (REUSABLE)
════════════════════════════════════════ */
.sg-section-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ff4500;
    background: #fff3ee;
    border: 1px solid #ffc5a8;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
}

.sg-section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.sg-section-desc {
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.75;
    max-width: 680px;
}

/* ════════════════════════════════════════
   PHASE TIMELINE (STRATEGIC GUIDE)
════════════════════════════════════════ */
.sg-phases-section {
    background: #fff;
    padding: 5rem 0;
    border-bottom: 1px solid #f0e8e0;
}

.sg-timeline {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-top: 3rem;
}

/* Horizontal connector line */
.sg-timeline::before {
    content: "";
    position: absolute;
    top: 36px;
    left: calc(12.5%);
    right: calc(12.5%);
    height: 2px;
    background: linear-gradient(90deg, #ff4500, #ffb347, #ff4500);
    z-index: 0;
}

.sg-phase-item {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
}

.sg-phase-node {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff4500, #ff7a00);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    border: 4px solid #fff;
    box-shadow: 0 0 0 3px #ff4500, 0 8px 20px rgba(255,69,0,0.35);
    margin-bottom: 1.2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sg-phase-item:hover .sg-phase-node {
    transform: scale(1.1) translateY(-4px);
    box-shadow: 0 0 0 3px #ff4500, 0 16px 30px rgba(255,69,0,0.45);
}

.sg-phase-number {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ff4500;
    margin-bottom: 4px;
}

.sg-phase-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

.sg-phase-title .devanagari {
    font-size: 0.95rem;
}

.sg-phase-desc {
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.6;
}

/* Responsive: stack on mobile */
@media (max-width: 767px) {
    .sg-timeline {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .sg-timeline::before {
        display: none;
    }
    .sg-phase-item {
        flex-direction: row;
        text-align: left;
        gap: 1rem;
        align-items: flex-start;
    }
    .sg-phase-node {
        flex-shrink: 0;
        margin-bottom: 0;
    }
}

/* ════════════════════════════════════════
   STRATEGY CARDS GRID
════════════════════════════════════════ */
.sg-strategies-section {
    background: #fdfaf7;
    padding: 5rem 0;
    border-bottom: 1px solid #f0e8e0;
}

.sg-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 2.5rem;
}

@media (max-width: 1023px) {
    .sg-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 640px) {
    .sg-cards-grid {
        grid-template-columns: 1fr;
    }
}

.sg-card {
    background: #fff;
    border: 1px solid #f0e0d4;
    border-radius: 20px;
    padding: 1.6rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.sg-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff4500, #ffb347);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.sg-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(255,69,0,0.12);
    border-color: rgba(255,69,0,0.3);
}

.sg-card:hover::before {
    opacity: 1;
}

.sg-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff3ee, #ffe5d0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff4500;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.sg-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

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

.sg-card-body {
    font-size: 0.88rem;
    color: #6b7280;
    line-height: 1.7;
}

.sg-card-body .devanagari {
    font-size: 0.86rem;
}

/* ════════════════════════════════════════
   DEFINITION CARDS (3 col)
════════════════════════════════════════ */
.sg-definitions {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 1023px) {
    .sg-definitions {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 640px) {
    .sg-definitions {
        grid-template-columns: 1fr;
    }
}

.sg-def-card {
    border-radius: 16px;
    padding: 1.4rem;
    position: relative;
    overflow: hidden;
}

.sg-def-card.orange {
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border: 1px solid #fed7aa;
}

.sg-def-card.gray {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
}

.sg-def-card.blue {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe;
}

.sg-def-card-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ff4500;
    margin-bottom: 6px;
}

.sg-def-card-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.sg-def-card-body {
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.7;
}

.sg-def-card-body .devanagari {
    font-size: 0.83rem;
}

/* ════════════════════════════════════════
   VOICE Q&A SECTION
════════════════════════════════════════ */
.sg-voice-section {
    background: linear-gradient(180deg, #1a0a00 0%, #2d1200 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.sg-voice-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,69,0,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,69,0,0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

.sg-voice-section .sg-section-title {
    color: #fff;
}

.sg-voice-section .sg-section-desc {
    color: rgba(255,255,255,0.55);
}

.sg-voice-section .sg-section-tag {
    background: rgba(255,69,0,0.2);
    border-color: rgba(255,69,0,0.4);
    color: #ff8c55;
}

.sg-voice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 2.5rem;
    position: relative;
    z-index: 1;
}

@media (max-width: 767px) {
    .sg-voice-grid {
        grid-template-columns: 1fr;
    }
}

.sg-voice-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 1.6rem;
    backdrop-filter: blur(10px);
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sg-voice-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #ff4500, #ffb347);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sg-voice-card:hover {
    border-color: rgba(255,69,0,0.4);
    background: rgba(255,69,0,0.08);
    transform: translateY(-4px);
}

.sg-voice-card:hover::before {
    opacity: 1;
}

.sg-voice-q {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ff8c55;
    margin-bottom: 10px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.sg-voice-q .devanagari {
    font-size: 0.83rem;
}

.sg-voice-q-badge {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(255,69,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    color: #ff8c55;
    margin-top: 1px;
}

.sg-voice-a {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.75;
    padding-left: 32px;
}

.sg-voice-a .devanagari {
    font-size: 0.83rem;
}

/* ════════════════════════════════════════
   FAQ SECTION
════════════════════════════════════════ */
.sg-faq-section {
    background: #fdfaf7;
    padding: 5rem 0;
}

.sg-faq-list {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sg-faq-item {
    background: #fff;
    border: 1px solid #e8ddd4;
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.sg-faq-item[open] {
    border-color: rgba(255,69,0,0.5);
    box-shadow: 0 8px 30px rgba(255,69,0,0.1);
}

.sg-faq-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background 0.2s ease;
}

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

.sg-faq-summary:hover {
    background: #fff8f4;
}

.sg-faq-item[open] .sg-faq-summary {
    background: linear-gradient(90deg, #fff8f4, #fff);
}

.sg-faq-q-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.5;
}

.sg-faq-q-text .devanagari {
    font-size: 0.92rem;
}

.sg-faq-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff3ee;
    border: 1px solid #ffd5bc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff4500;
    font-size: 1.1rem;
    font-weight: 700;
    transition: transform 0.3s ease, background 0.3s ease;
    line-height: 1;
}

.sg-faq-item[open] .sg-faq-icon {
    transform: rotate(45deg);
    background: #ff4500;
    color: #fff;
    border-color: #ff4500;
}

.sg-faq-body {
    padding: 0 1.5rem 1.3rem;
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.8;
    border-top: 1px solid #f9ede5;
}

.sg-faq-body .devanagari {
    font-size: 0.88rem;
}

/* ════════════════════════════════════════
   CTA SECTION
════════════════════════════════════════ */
.sg-cta-section {
    padding: 4rem 0;
    background: #fff;
    border-top: 1px solid #f0e8e0;
}

.sg-cta-box {
    background: linear-gradient(135deg, #1a0a00 0%, #2d1200 60%, #3d1a00 100%);
    border-radius: 28px;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: flex-start;
}

@media (min-width: 768px) {
    .sg-cta-box {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.sg-cta-box::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,69,0,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,69,0,0.06) 1px, transparent 1px);
    background-size: 32px 32px;
}

.sg-cta-box .glow {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,69,0,0.3) 0%, transparent 70%);
    top: -150px;
    right: -80px;
    pointer-events: none;
}

.sg-cta-text {
    position: relative;
    z-index: 1;
}

.sg-cta-title {
    font-size: clamp(1.3rem, 2.5vw, 1.9rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
}

.sg-cta-title .devanagari {
    font-size: clamp(1.2rem, 2.2vw, 1.75rem);
}

.sg-cta-subtitle {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.55);
    margin-top: 6px;
    line-height: 1.7;
}

.sg-cta-subtitle .devanagari {
    font-size: 0.88rem;
}

.sg-cta-actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* ════════════════════════════════════════
   REVEAL ANIMATIONS
════════════════════════════════════════ */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ════════════════════════════════════════
   KEYFRAMES
════════════════════════════════════════ */
@keyframes floatChip {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-7px); }
}

@keyframes glowPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.05); opacity: 0.8; }
}
