/* ============================================================
   Kids Kingdom - Hindi Jokes (चुटकुले) Stylesheet
   Funky, playful, comic-card look for hindi-jokes.php
   Self-contained - does NOT depend on swar-vyanjan.css
   ============================================================ */

/* ================= BASE: hero ================= */
.hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px;
    padding: 40px 0;
}

.hero-image {
    flex: 1 1 320px;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
}

.hero-content {
    flex: 1 1 380px;
}

.hero-content h1 {
    font-size: 2.6rem;
    margin-bottom: 12px;
}

.hero-content .subheading {
    font-size: 1.15rem;
    color: #555;
    margin-bottom: 14px;
}

.hero-content .intro-paragraph {
    font-size: 1rem;
    color: #666;
    line-height: 1.7;
}

/* ================= BASE: how-to-learn steps ================= */
.how-to-learn {
    padding: 50px 0;
}

.how-to-learn h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.step-card {
    text-align: center;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-primary, #FF6B6B);
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 14px;
}

.step-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.step-card p {
    font-size: 1rem;
    color: #666;
}

@media (max-width: 767px) {
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 420px) {
    .steps-grid {
        grid-template-columns: 1fr;
    }
}

/* ================= HERO: floating emoji background ================= */
.jokes-hero {
    position: relative;
    overflow: hidden;
}

.jokes-hero-emojis {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.floating-emoji {
    position: absolute;
    font-size: 2rem;
    opacity: 0.55;
    animation: floatEmoji 6s ease-in-out infinite;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.08));
}

.fe-0 { top: 6%;  left: 4%;  font-size: 2.4rem; animation-duration: 7s;  animation-delay: 0s; }
.fe-1 { top: 68%; left: 8%;  font-size: 1.8rem; animation-duration: 5.5s; animation-delay: .4s; }
.fe-2 { top: 18%; left: 88%; font-size: 2.1rem; animation-duration: 6.5s; animation-delay: .8s; }
.fe-3 { top: 78%; left: 92%; font-size: 1.6rem; animation-duration: 5s;  animation-delay: 1.2s; }
.fe-4 { top: 42%; left: 2%;  font-size: 1.7rem; animation-duration: 6.2s; animation-delay: .2s; }
.fe-5 { top: 8%;  left: 46%; font-size: 1.5rem; animation-duration: 5.8s; animation-delay: 1.6s; }
.fe-6 { top: 84%; left: 40%; font-size: 1.9rem; animation-duration: 6.8s; animation-delay: .6s; }
.fe-7 { top: 30%; left: 96%; font-size: 1.4rem; animation-duration: 5.3s; animation-delay: 2s; }
.fe-8 { top: 58%; left: 50%; font-size: 1.3rem; animation-duration: 7.2s; animation-delay: 1s; }
.fe-9 { top: 12%; left: 70%; font-size: 1.8rem; animation-duration: 6s;  animation-delay: 1.8s; }

@keyframes floatEmoji {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-16px) rotate(8deg); }
}

.jokes-hero .hero-content,
.jokes-hero .hero-image {
    position: relative;
    z-index: 1;
}

/* ================= HOW TO READ ================= */
.jokes-how-to {
    padding: 50px 0;
}

.jokes-how-to h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
}

/* ================= JOKES GRID ================= */
.jokes-section {
    padding: 50px 0;
}

.jokes-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
}

.jokes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* Comic speech-bubble style card */
.joke-card {
    position: relative;
    background: #fffdf6;
    border: 3px solid var(--joke-color, #FF6B6B);
    border-radius: 22px;
    padding: 28px 24px 22px;
    box-shadow: 6px 6px 0 var(--joke-color, #FF6B6B);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    opacity: 0;
    transform: translateY(10px);
    animation: jokeIn 0.4s ease forwards;
}

.joke-card:hover {
    transform: translateY(-6px) rotate(-0.6deg);
    box-shadow: 8px 10px 0 var(--joke-color, #FF6B6B);
}

@keyframes jokeIn {
    to { opacity: 1; transform: translateY(0); }
}

.joke-card::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 36px;
    width: 26px;
    height: 26px;
    background: #fffdf6;
    border-right: 3px solid var(--joke-color, #FF6B6B);
    border-bottom: 3px solid var(--joke-color, #FF6B6B);
    transform: rotate(45deg);
    border-radius: 0 0 6px 0;
}

.joke-emoji {
    display: inline-block;
    font-size: 1.8rem;
    margin-bottom: 10px;
    animation: wiggle 2.4s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(-6deg); }
    50%      { transform: rotate(6deg); }
}

.joke-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #3a3a3a;
    margin: 0;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1023px) and (min-width: 768px) {
    .jokes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }
}

@media (max-width: 767px) {
    .jokes-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .joke-card {
        padding: 22px 18px 18px;
    }

    .floating-emoji {
        font-size: 1.3rem !important;
    }
}
