/* =========================================
   MATHRUBHUMI KIDS SECTION STRIP
   One line; scrolls sideways on small screens.
========================================= */

.kids-sections {
    background: #f3f8fc;
    border-bottom: 1px solid #dde6ef;
    font-family: "Poppins", sans-serif;
}

.kids-sections-inner {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
}

/* "Kids" label linking to the Kids home page */
.kids-sections-home {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    background: #ffb400;
    color: #3a2a00;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: background 0.2s, transform 0.2s;
}

.kids-sections-home:hover {
    background: #ffc93a;
    transform: translateY(-1px);
}

.kids-sections-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    flex: 1;
    min-width: 0;
    /* fade on the right edge hints there is more to scroll */
    -webkit-mask-image: linear-gradient(to right, #000 92%, transparent);
            mask-image: linear-gradient(to right, #000 92%, transparent);
}

.kids-sections-list::-webkit-scrollbar {
    display: none;
}

.kids-sections-list li {
    flex-shrink: 0;
    scroll-snap-align: start;
}

.kids-sections-list a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 11px 7px;
    font-size: 12.5px;
    font-weight: 500;
    color: #34404d;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s;
}

.kids-sections-list a::after {
    content: "";
    position: absolute;
    left: 7px;
    right: 7px;
    bottom: 4px;
    height: 2px;
    border-radius: 2px;
    background: #005d91;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.kids-sections-list a:hover,
.kids-sections-list a:focus-visible {
    color: #005d91;
}

.kids-sections-list a:hover::after,
.kids-sections-list a:focus-visible::after,
.kids-sections-list a.is-current::after {
    transform: scaleX(1);
}

.kids-sections-list a.is-current {
    color: #005d91;
    font-weight: 700;
}

.kids-sections-list a:focus-visible {
    outline: none;
}

/* Wide screens: no fade once everything fits */
@media (min-width: 1220px) {
    .kids-sections-list {
        -webkit-mask-image: none;
                mask-image: none;
    }
}

@media (max-width: 600px) {
    .kids-sections-inner {
        padding: 0 10px;
        gap: 6px;
        min-height: 38px;
    }

    .kids-sections-home {
        padding: 4px 10px;
        font-size: 11px;
    }

    .kids-sections-list a {
        padding: 10px 8px;
        font-size: 12px;
    }

    .kids-sections-list a::after {
        left: 8px;
        right: 8px;
    }
}

/* ---------- Dark theme ---------- */

html[data-theme="dark"] .kids-sections {
    background: #121b24;
    border-bottom-color: #22303d;
}

html[data-theme="dark"] .kids-sections-list a {
    color: #b8c4d0;
}

html[data-theme="dark"] .kids-sections-list a:hover,
html[data-theme="dark"] .kids-sections-list a:focus-visible,
html[data-theme="dark"] .kids-sections-list a.is-current {
    color: #6cc4f5;
}

html[data-theme="dark"] .kids-sections-list a::after {
    background: #6cc4f5;
}

/* =========================================
   PAGE INTRO / BRAND BANNER (home + category)
========================================= */

.kids-intro {
    position: relative;
    display: flex;
    align-items: center;
    gap: 22px;
    margin: 22px 0;
    padding: 22px 26px;
    border-radius: 22px;
    overflow: hidden;
    background:
        radial-gradient(circle at 92% 20%, rgba(255, 180, 0, 0.25) 0 60px, transparent 61px),
        radial-gradient(circle at 80% 110%, rgba(94, 200, 255, 0.30) 0 90px, transparent 91px),
        linear-gradient(120deg, #e8f6ff 0%, #fff7dd 100%);
    border: 1px solid #d9e9f5;
}

.kids-intro-art {
    position: relative;
    flex-shrink: 0;
    width: 78px;
    height: 78px;
}

.ki-pad {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    background: linear-gradient(145deg, #1e88d0, #005d91);
    color: #fff;
    font-size: 36px;
    box-shadow: 0 6px 0 #00446b, 0 10px 18px rgba(0, 93, 145, 0.3);
    transform: rotate(-8deg);
    animation: ki-bob 3.2s ease-in-out infinite;
}

.ki-star {
    position: absolute;
    color: #ffb400;
    font-size: 16px;
    animation: ki-twinkle 2.4s ease-in-out infinite;
}

.ki-star.s1 { top: -8px; right: -8px; }
.ki-star.s2 { bottom: -4px; left: -10px; font-size: 12px; color: #ff6f61; animation-delay: 0.8s; }
.ki-star.s3 { top: 30%; right: -16px; font-size: 12px; color: #2bb673; animation-delay: 1.4s; }

.kids-intro-text { min-width: 0; }

.kids-intro-eyebrow {
    margin: 0 0 2px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #e07b00;
}

.kids-intro h1 {
    margin: 0;
    font-family: 'Luckiest Guy', 'Noto Sans Malayalam', 'Poppins', cursive;
    font-weight: 400;
    font-size: 40px;
    line-height: 1.1;
    letter-spacing: 0.5px;
    color: #005d91;
}

.kids-intro h1 span { color: #ff8a00; }

.kids-intro-sub {
    margin: 6px 0 10px;
    font-size: 14px;
    line-height: 1.55;
    color: #3d4a57;
    max-width: 680px;
}

.kids-intro-sub strong { color: #005d91; }

.kids-intro-badges {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.kids-intro-badges li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #d9e9f5;
    font-size: 12px;
    font-weight: 600;
    color: #34404d;
}

.kids-intro-badges li i { color: #ff8a00; font-size: 11px; }

@keyframes ki-bob {
    0%, 100% { transform: rotate(-8deg) translateY(0); }
    50%      { transform: rotate(-4deg) translateY(-5px); }
}

@keyframes ki-twinkle {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.7); }
}

/* Desktop / tablet: no description line under the heading */
@media (min-width: 601px) {
    .kids-intro-sub { display: none; }
    .kids-intro-badges { margin-top: 10px; }
}

/* Phones: a slim one-line banner instead of the big card */
@media (max-width: 600px) {
    .kids-intro {
        gap: 10px;
        margin: 10px 0 12px;
        padding: 9px 12px;
        border-radius: 14px;
        background: linear-gradient(120deg, #e8f6ff 0%, #fff7dd 100%);
    }
    .kids-intro-art { width: 36px; height: 36px; }
    .ki-pad { border-radius: 11px; font-size: 17px; box-shadow: 0 3px 0 #00446b; animation: none; transform: rotate(-6deg); }
    .ki-star,
    .kids-intro-eyebrow,
    .kids-intro-badges { display: none; }
    .kids-intro h1 { font-size: clamp(17px, 5.4vw, 21px); }
    .kids-intro-sub {
        margin: 1px 0 0;
        font-size: 11px;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .kids-intro-sub .ki-long { display: none; }
    html[data-theme="dark"] body .kids-intro { background: linear-gradient(120deg, #13263a 0%, #1f2130 100%); }
}

@media (prefers-reduced-motion: reduce) {
    .ki-pad, .ki-star { animation: none; }
}

html[data-theme="dark"] .kids-intro {
    background:
        radial-gradient(circle at 92% 20%, rgba(255, 180, 0, 0.12) 0 60px, transparent 61px),
        radial-gradient(circle at 80% 110%, rgba(94, 200, 255, 0.12) 0 90px, transparent 91px),
        linear-gradient(120deg, #13263a 0%, #1f2130 100%);
    border-color: #26384a;
}

html[data-theme="dark"] .kids-intro h1         { color: #6cc4f5; }
html[data-theme="dark"] .kids-intro h1 span    { color: #ffb84d; }
html[data-theme="dark"] .kids-intro-eyebrow    { color: #ffb84d; }
html[data-theme="dark"] .kids-intro-sub        { color: #b8c4d0; }
html[data-theme="dark"] .kids-intro-sub strong { color: #6cc4f5; }

html[data-theme="dark"] .kids-intro-badges li {
    background: rgba(255, 255, 255, 0.06);
    border-color: #2a3a4a;
    color: #d6dee6;
}

/* =========================================
   GAME PAGE BRANDING
========================================= */

.mathrubhumi-logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    text-decoration: none;
}

.logo-kids-tag {
    margin-top: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #ffb400;
    color: #3a2a00;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.game-brand-eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #ffd54a;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

@media (max-width: 600px) {
    .logo-kids-tag { margin-top: 3px; padding: 2px 7px; font-size: 8px; letter-spacing: 1.5px; }
    .game-brand-eyebrow { font-size: 10px; letter-spacing: 1px; }
}
