/* ============================================
   MODERN KIDS HOMEPAGE — jijiboo.com
   World-class design for children learning
   ============================================ */

/* ── Floating Animations ── */
@keyframes float-gentle {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(3deg); }
    50% { transform: translateY(-25px) rotate(0deg); }
    75% { transform: translateY(-15px) rotate(-3deg); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    33% { transform: translateY(-18px) rotate(-4deg) scale(1.02); }
    66% { transform: translateY(-10px) rotate(3deg) scale(1.01); }
}

.animate-float-gentle { animation: float-gentle 5s ease-in-out infinite; }
.animate-float-slow { animation: float-slow 6s ease-in-out infinite; }
.animate-float-delayed { animation: float-delayed 7s ease-in-out infinite; }

/* ── Blob Morphing Animation ── */
@keyframes blob-morph {
    0%, 100% { 
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; 
        transform: rotate(0deg) scale(1); 
    }
    25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    50% { 
        border-radius: 50% 50% 20% 80% / 25% 75% 50% 60%; 
        transform: rotate(90deg) scale(1.08); 
    }
    75% { border-radius: 80% 20% 50% 50% / 60% 25% 75% 50%; }
}

.animate-blob { 
    animation: blob-morph 20s ease-in-out infinite; 
    will-change: transform, border-radius;
}

/* ── Pulse Glow for Hero Image ── */
@keyframes pulse-glow {
    0%, 100% { opacity: 0.25; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(1.05); }
}

.animate-pulse-glow {
    animation: pulse-glow 4s ease-in-out infinite;
}

/* ── Hero Heading Gradient - Soft Pastels ── */
.hero-heading-modern {
    background: linear-gradient(135deg, #A8C9E8 0%, #F8B5CF 50%, #FDB591 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 10s ease infinite;
    will-change: background-position;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ── Search Box Glow Effect ── */
.search-box-glow {
    position: relative;
    transition: filter 0.4s ease;
}

.search-box-glow:focus-within {
    filter: drop-shadow(0 0 30px rgba(107, 151, 196, 0.5));
}

.search-box-glow::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(45deg, #A8C9E8, #F8B5CF, #FDB591, #A8C9E8);
    background-size: 400% 400%;
    border-radius: 2rem;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s;
    animation: gradient-rotate 4s ease infinite;
}

.search-box-glow:hover::before {
    opacity: 0.6;
}

@keyframes gradient-rotate {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ── Feature Card Hover Effects ── */
.feature-card-hover {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.4s ease;
    will-change: transform;
}

.feature-card-hover:hover {
    transform: translateY(-12px) scale(1.025);
    box-shadow: 0 20px 50px rgba(31, 51, 78, 0.15);
}

/* ── Card Radial Glow on Hover ── */
.card-magic-glow {
    position: relative;
    overflow: hidden;
}

.card-magic-glow::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(255,255,255,0.45) 0%, transparent 65%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.55s ease;
    pointer-events: none;
    border-radius: 50%;
}

.card-magic-glow:hover::after {
    transform: translate(-50%, -50%) scale(1.5);
}

/* ── Bounce In Animation ── */
.animate-bounce-in {
    animation: bounce-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes bounce-in {
    0% { transform: scale(0.85); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* ── Stagger Animation for Children ── */
.stagger-children > * {
    animation: fade-slide-up 0.55s ease-out both;
    opacity: 0;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.35s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.45s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.55s; }

@keyframes fade-slide-up {
    0%   { opacity: 0; transform: translateY(28px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ── Path Cards Hover ── */
.path-card {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.4s ease;
}

.path-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 24px 56px rgba(31, 51, 78, 0.18);
}

/* ── Blog Card Hover ── */
.blog-card {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 44px rgba(31, 51, 78, 0.14);
}

/* ── Step Circle Hover Animation ── */
.step-circle {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s ease;
}

.step-circle:hover {
    transform: scale(1.12) rotate(-6deg);
    box-shadow: 0 16px 36px rgba(107, 151, 196, 0.35);
}

/* ── CTA Pulse Ring Effect ── */
.btn-pulse {
    position: relative;
}

.btn-pulse::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    background: inherit;
    opacity: 0.4;
    animation: btn-pulse-ring 2s ease-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes btn-pulse-ring {
    0%   { transform: scale(1);   opacity: 0.4; }
    70%  { transform: scale(1.08); opacity: 0; }
    100% { transform: scale(1.08); opacity: 0; }
}

/* ── Card Shine Sweep Effect ── */
.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -75%;
    width: 50%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255,255,255,0.3) 50%,
        transparent 100%
    );
    transform: skewX(-20deg);
    transition: left 0.7s ease;
    pointer-events: none;
}

.card-shine:hover::before {
    left: 125%;
}

/* ── Hero Pro (seasonal cat only) ── */
.hero-section--pro {
    background: linear-gradient(165deg, #f0f7ff 0%, #ffffff 45%, #fff8fb 100%);
}

.hero-section--pro .hero-section__grid {
    display: grid;
    align-items: center;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .hero-section--pro .hero-section__grid {
        grid-template-columns: 1fr 1fr;
        gap: 3.5rem;
    }
}

.hero-section__visual {
    order: -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .hero-section__visual {
        order: 1;
        justify-content: flex-end;
    }
}

.hero-section__seasonal-cat {
    width: 100%;
    max-width: min(90vw, 22rem);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(47, 74, 107, 0.12));
}

@media (min-width: 768px) {
    .hero-section__seasonal-cat {
        max-width: 28rem;
    }
}

@media (min-width: 1280px) {
    .hero-section__seasonal-cat {
        max-width: 32rem;
    }
}

.hero-section__seasonal-cat--float {
    animation: float-gentle 5s ease-in-out infinite;
}

.hero-section__season-badge {
    margin-top: 0.75rem;
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 800;
    color: #4d7aab;
    background: rgba(107, 151, 196, 0.12);
    border: 1px solid rgba(107, 151, 196, 0.2);
}

.hero-section__content {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .hero-section__content {
        text-align: right;
        gap: 1.75rem;
    }
}

.hero-section__title {
    font-size: clamp(2rem, 6vw, 3.25rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #2f4a6b;
}

.hero-section__title-accent {
    display: block;
    background: linear-gradient(135deg, #6b97c4 0%, #e89bb8 55%, #fb923c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section__desc {
    max-width: 32rem;
    margin-inline: auto;
    font-size: clamp(1rem, 2vw, 1.125rem);
    font-weight: 700;
    line-height: 1.85;
    color: #5a6b7f;
}

@media (min-width: 768px) {
    .hero-section__desc {
        margin-inline: 0;
    }
}

.hero-section__search {
    width: 100%;
    max-width: 28rem;
    margin-inline: auto;
}

@media (min-width: 768px) {
    .hero-section__search {
        margin-inline: 0;
    }
}

.hero-section__search-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #fff;
    border-radius: 1.25rem;
    border: 2px solid rgba(107, 151, 196, 0.2);
    box-shadow: 0 4px 20px rgba(107, 151, 196, 0.1);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-section__search-inner:focus-within {
    border-color: #6b97c4;
    box-shadow: 0 4px 24px rgba(107, 151, 196, 0.18);
}

.hero-section__search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #6b97c4, #4d7aab);
    color: #fff;
    font-size: 1rem;
}

.hero-section__search-input {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 0.5rem;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 700;
    color: #2f4a6b;
}

.hero-section__search-input::placeholder {
    color: #8a9bb0;
}

.hero-section__search-btn {
    flex-shrink: 0;
    padding: 0.75rem 1.25rem;
    border: 0;
    border-radius: 1rem;
    font-weight: 900;
    font-size: 0.875rem;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #6b97c4, #4d7aab);
    transition: opacity 0.2s ease;
}

.hero-section__search-btn:hover {
    opacity: 0.92;
}

.hero-section__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .hero-section__actions {
        justify-content: flex-start;
    }
}

.hero-section__btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 1rem;
    font-weight: 900;
    font-size: 1rem;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, #6b97c4, #4d7aab);
    box-shadow: 0 4px 14px rgba(107, 151, 196, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-section__btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 1rem;
    font-weight: 900;
    font-size: 1rem;
    color: #4d7aab;
    text-decoration: none;
    background: #fff;
    border: 2px solid rgba(107, 151, 196, 0.3);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.hero-section__btn-secondary:hover {
    background: #6b97c4;
    color: #fff;
    border-color: #6b97c4;
}

.hero-section__chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .hero-section__chips {
        justify-content: flex-start;
    }
}

.hero-section__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 700;
}

.hero-section__chip--safe {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.hero-section__chip--level {
    background: #eff6fc;
    color: #4d7aab;
    border: 1px solid rgba(107, 151, 196, 0.25);
}

body.reduce-motion-mode .hero-section__seasonal-cat--float,
body.accessibility-mode .hero-section__seasonal-cat--float {
    animation: none !important;
}

body.reduce-motion-mode .hero-section__btn-primary:hover,
body.reduce-motion-mode .hero-section__btn-secondary:hover {
    transform: none;
}

/* ── Reduced Motion Support ── */
@media (prefers-reduced-motion: reduce) {
    .cat-float-1,
    .cat-float-2,
    .cat-float-3,
    .hero-section__seasonal-cat--float,
    .animate-float-gentle,
    .animate-float-slow,
    .animate-float-delayed,
    .animate-blob,
    .animate-pulse-glow,
    .hero-heading-modern,
    .stagger-children > *,
    .btn-pulse::before,
    .search-box-glow::before {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .feature-card-hover,
    .card-magic-glow,
    .path-card,
    .blog-card,
    .step-circle {
        transition: none !important;
    }
}
