/* ══════════════════════════════════════════════════════════════════
   KidySpace — Modern Kindergarten Landing Stylesheet v3.5
   ══════════════════════════════════════════════════════════════════ */

/* ── Design Tokens ─────────────────────────────────────────────── */
:root {
    --ks-primary: #0D9488;
    --ks-primary-light: #2DD4BF;
    --ks-primary-dark: #0F766E;
    --ks-primary-bg: rgba(13, 148, 136, 0.08);
    --ks-secondary: #F97066;
    --ks-secondary-light: #FECACA;
    --ks-secondary-bg: rgba(249, 112, 102, 0.08);
    --ks-accent-yellow: #F59E0B;
    --ks-accent-yellow-bg: rgba(245, 158, 11, 0.1);
    --ks-accent-blue: #3B82F6;
    --ks-accent-blue-bg: rgba(59, 130, 246, 0.08);
    --ks-accent-purple: #8B5CF6;
    --ks-accent-purple-bg: rgba(139, 92, 246, 0.08);
    --ks-accent-green: #10B981;
    --ks-accent-green-bg: rgba(16, 185, 129, 0.08);
    --ks-bg: #FAFBFC;
    --ks-bg-soft: #F4F9F8;
    --ks-bg-warm: #FFFDF9;
    --ks-surface: #FFFFFF;
    --ks-slate: #0F172A;
    --ks-muted: #64748B;
    --ks-border: rgba(226, 232, 240, 0.9);
    --ks-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.03);
    --ks-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
    --ks-shadow-lg: 0 12px 35px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    --ks-shadow-xl: 0 20px 50px -6px rgba(15, 23, 42, 0.12), 0 8px 20px -4px rgba(15, 23, 42, 0.06);
    --ks-radius: 18px;
    --ks-radius-lg: 24px;
    --ks-radius-xl: 32px;
    --ks-transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Base ───────────────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--ks-bg);
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    position: relative;
    background: var(--ks-bg);
    color: var(--ks-slate);
    line-height: 1.6;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* ── Glassmorphism Navbar ──────────────────────────────────────── */
.ks-navbar {
    position: sticky;
    top: 0;
    z-index: 1100;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    transition: var(--ks-transition);
}

.ks-nav-link {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--ks-muted) !important;
    padding: 0.45rem 0.9rem;
    border-radius: 12px;
    transition: var(--ks-transition);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.ks-nav-link:hover {
    color: var(--ks-primary) !important;
    background: var(--ks-primary-bg);
}

/* ── Logo Exact Dimensions ─────────────────────────────────────── */
.ks-logo-img {
    height: 38px !important;
    width: 38px !important;
    max-height: 38px !important;
    max-width: 38px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
}

.ks-drawer-logo-img {
    height: 32px !important;
    width: 32px !important;
    max-height: 32px !important;
    max-width: 32px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
}

.ks-footer-logo-img {
    height: 44px !important;
    width: 44px !important;
    max-height: 44px !important;
    max-width: 44px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
}

/* ── Badge Pills ───────────────────────────────────────────────── */
.ks-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--ks-primary-bg);
    color: var(--ks-primary);
    padding: 0.4rem 1.05rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.82rem;
    border: 1px solid rgba(13, 148, 136, 0.16);
    letter-spacing: -0.01em;
    box-shadow: 0 1px 3px rgba(13, 148, 136, 0.06);
}

/* ── Floating Bubble Tags ──────────────────────────────────────── */
.ks-bubble-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1.15rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.84rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    animation: gentle-bob 4.5s ease-in-out infinite alternate;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

@keyframes gentle-bob {
    0% { transform: translateY(0) rotate(-1deg); }
    100% { transform: translateY(-7px) rotate(1deg); }
}

/* ── Hero Section ──────────────────────────────────────────────── */
.ks-hero-section {
    position: relative;
    background:
        radial-gradient(ellipse 80% 60% at 85% 15%, rgba(45, 212, 191, 0.12) 0%, transparent 65%),
        radial-gradient(ellipse 60% 50% at 15% 85%, rgba(249, 112, 102, 0.08) 0%, transparent 65%),
        linear-gradient(180deg, #FAFBFC 0%, #FFFFFF 100%);
    padding: 4.5rem 1.25rem 5.5rem;
    overflow: hidden;
}

.ks-hero-title {
    font-size: clamp(2rem, 4.8vw, 3.4rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--ks-slate);
    letter-spacing: -0.03em;
}

.ks-hero-title .gradient-text {
    background: linear-gradient(135deg, #0D9488 0%, #2DD4BF 50%, #F97066 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Device Mockup Frames ──────────────────────────────────────── */
.ks-device-frame {
    position: relative;
    background: #FFFFFF;
    border-radius: var(--ks-radius-lg);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.05),
        var(--ks-shadow-xl);
    padding: 12px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ks-device-frame:hover {
    transform: translateY(-4px);
}

.ks-phone-floating {
    position: absolute;
    bottom: -25px;
    right: -15px;
    width: 195px;
    background: #FFFFFF;
    border-radius: 28px;
    padding: 6px;
    box-shadow:
        0 0 0 3px #1E293B,
        0 16px 40px rgba(0, 0, 0, 0.18);
    z-index: 10;
    animation: phone-float 5s ease-in-out infinite;
}

@keyframes phone-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(1deg); }
    75% { transform: translateY(-4px) rotate(-0.5deg); }
}

/* ── Modern Card System ────────────────────────────────────────── */
.ks-card {
    border-radius: var(--ks-radius) !important;
    border: 1px solid var(--ks-border) !important;
    background: #FFFFFF !important;
    box-shadow: var(--ks-shadow-sm) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.ks-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: var(--ks-shadow-lg) !important;
    border-color: rgba(13, 148, 136, 0.25) !important;
}

.ks-card-feature {
    border-radius: var(--ks-radius-lg) !important;
    border: 1px solid var(--ks-border) !important;
    background: #FFFFFF !important;
    box-shadow: var(--ks-shadow-sm) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.ks-card-feature:hover {
    transform: translateY(-5px) !important;
    box-shadow: var(--ks-shadow-lg) !important;
    border-color: rgba(13, 148, 136, 0.25) !important;
}

/* ── Icon Box ──────────────────────────────────────────────────── */
.ks-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: transform 0.25s ease;
}

.ks-card:hover .ks-icon-box,
.ks-card-feature:hover .ks-icon-box {
    transform: scale(1.06) rotate(-2deg);
}

/* ── Stat Card ─────────────────────────────────────────────────── */
.ks-stat-card {
    padding: 1.5rem;
    border-radius: var(--ks-radius);
    border: 1px solid var(--ks-border);
    background: #FFFFFF;
    text-align: center;
    transition: var(--ks-transition);
}

.ks-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ks-shadow);
}

/* ── Timeline ──────────────────────────────────────────────────── */
.ks-timeline {
    position: relative;
}

.ks-timeline-item {
    position: relative;
    padding-left: 3.5rem;
    padding-bottom: 1.75rem;
}

.ks-timeline-item:last-child { 
    padding-bottom: 0; 
}

.ks-timeline-item::before {
    content: '';
    position: absolute;
    left: 1.25rem;
    top: 2.5rem;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, rgba(13, 148, 136, 0.3) 0%, rgba(13, 148, 136, 0.06) 100%);
    border-radius: 4px;
}

.ks-timeline-item:last-child::before { 
    display: none; 
}

.ks-timeline-dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--ks-shadow-sm);
    transition: transform 0.25s ease;
}

.ks-timeline-item:hover .ks-timeline-dot {
    transform: scale(1.08);
}

/* ── Radar Pulse Animation for Live Notifications ──────────────── */
.ks-live-pulse {
    position: relative;
}

.ks-live-pulse::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: #10B981;
    opacity: 0.6;
    animation: live-radar 2s cubic-bezier(0, 0, 0.2, 1) infinite;
    z-index: 0;
}

@keyframes live-radar {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(2.2); opacity: 0; }
}

/* ── Pricing Card ──────────────────────────────────────────────── */
.ks-pricing-card {
    border-radius: var(--ks-radius-lg) !important;
    border: 1px solid var(--ks-border) !important;
    background: #FFFFFF !important;
    box-shadow: var(--ks-shadow-sm) !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ks-pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--ks-shadow-lg) !important;
}

/* ── CTA Banner ────────────────────────────────────────────────── */
.ks-cta-banner {
    background: linear-gradient(135deg, #0F766E 0%, #0D9488 45%, #115E59 100%);
    color: #FFFFFF;
    border-radius: var(--ks-radius-xl);
    padding: 3.5rem 2.25rem;
    box-shadow: 0 16px 40px rgba(13, 148, 136, 0.22);
    position: relative;
    overflow: hidden;
}

.ks-cta-banner::before {
    content: '';
    position: absolute;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(249, 112, 102, 0.2) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
    pointer-events: none;
}

.ks-cta-banner::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.15) 0%, transparent 70%);
    bottom: -80px;
    left: -80px;
    border-radius: 50%;
    pointer-events: none;
}

/* ── Floating WhatsApp ─────────────────────────────────────────── */
.ks-floating-whatsapp {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1200;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #FFFFFF;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: whatsapp-glow 3s infinite;
}

@keyframes whatsapp-glow {
    0%, 100% { box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 8px 30px rgba(37, 211, 102, 0.65), 0 0 15px rgba(37, 211, 102, 0.4); }
}

.ks-floating-whatsapp:hover {
    transform: scale(1.1);
    color: #FFFFFF;
}

/* ── Light Footer ──────────────────────────────────────────────── */
.ks-footer-light {
    background: linear-gradient(180deg, #FFFFFF 0%, var(--ks-bg-soft) 100%);
    color: #334155;
    padding: 4.5rem 1.25rem 2rem;
    border-top: 1px solid var(--ks-border);
}

.ks-footer-light a {
    color: var(--ks-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.ks-footer-light a:hover {
    color: var(--ks-primary);
}

.ks-footer-social-btn {
    width: 38px;
    height: 38px;
    background: var(--ks-primary-bg);
    color: var(--ks-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--ks-transition);
    text-decoration: none;
}

.ks-footer-social-btn:hover {
    background: var(--ks-primary);
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* ── Showcase Tabs Container & Pills ───────────────────────────── */
.ks-showcase-tabs-container {
    display: flex;
    flex-wrap: nowrap !important;
    gap: 0.5rem;
    overflow-x: auto !important;
    overflow-y: hidden;
    padding: 0.4rem 0.25rem 0.85rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
}

@media (min-width: 992px) {
    .ks-showcase-tabs-container {
        justify-content: center;
    }
}

.ks-showcase-tabs-container::-webkit-scrollbar {
    display: none;
}

.ks-showcase-tab {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    border-radius: 100px !important;
    font-weight: 700 !important;
    font-size: 0.86rem !important;
    padding: 0.5rem 1.15rem !important;
    box-shadow: var(--ks-shadow-sm);
    transition: all 0.25s ease !important;
}

.ks-showcase-tab:hover {
    transform: translateY(-2px);
}

/* ── Responsive & Global Containment Rules ─────────────────────── */
.ks-landing-layout,
.mud-layout,
.mud-main-content,
main,
section,
footer,
header {
    max-width: 100% !important;
    overflow-x: clip !important;
}

.container,
.container-fluid,
.mud-container {
    max-width: 100% !important;
    overflow-x: clip;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

@media (min-width: 768px) {
    .container,
    .mud-container {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

.row {
    --bs-gutter-x: 1rem;
    margin-right: 0 !important;
    margin-left: 0 !important;
    max-width: 100%;
}

.row > * {
    padding-right: calc(var(--bs-gutter-x) * .5);
    padding-left: calc(var(--bs-gutter-x) * .5);
    max-width: 100%;
}

.table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100% !important;
    max-width: 100% !important;
}

@media (max-width: 991px) {
    .ks-hero-section {
        padding: 2.5rem 0.75rem 3rem;
    }
    
    .ks-hero-title {
        font-size: clamp(1.8rem, 6vw, 2.4rem);
    }

    .ks-device-frame {
        margin-top: 1rem;
        max-width: 100%;
    }
    
    .ks-phone-floating {
        position: relative !important;
        bottom: auto !important;
        right: auto !important;
        left: auto !important;
        margin: -35px auto 0 auto !important;
        width: 160px !important;
        max-width: 80% !important;
        animation: none !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    }
    
    .ks-cta-banner {
        padding: 2.2rem 1.25rem;
        border-radius: var(--ks-radius-lg);
    }
}

@media (max-width: 768px) {
    section {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .ks-hero-title {
        font-size: 1.85rem;
        line-height: 1.2;
    }

    .ks-hero-section {
        padding-top: 1.5rem;
        padding-bottom: 2rem;
    }

    .ks-badge-pill {
        font-size: 0.75rem;
        padding: 0.35rem 0.85rem;
    }

    .ks-bubble-tag {
        font-size: 0.72rem;
        padding: 0.35rem 0.75rem;
    }

    .ks-timeline-item {
        padding-left: 2.75rem;
        padding-bottom: 1.5rem;
    }

    .ks-timeline-dot {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 1rem;
        border-radius: 10px;
    }

    .ks-timeline-item::before {
        left: 1.1rem;
        top: 2.2rem;
    }

    .ks-card, .ks-card-feature {
        padding: 1.25rem !important;
    }

    .ks-pricing-card {
        padding: 1.5rem 1.25rem !important;
    }

    .ks-floating-whatsapp {
        width: 52px;
        height: 52px;
        bottom: 16px;
        right: 16px;
    }

    .ks-footer-light {
        padding: 3rem 1rem 2rem;
    }
}

@media (max-width: 480px) {
    .ks-hero-title {
        font-size: 1.65rem;
    }

    .lead {
        font-size: 0.98rem !important;
    }

    .ks-phone-floating {
        width: 140px !important;
        margin-top: -25px !important;
    }

    .ks-showcase-tab {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.85rem !important;
    }
}
