/* =========================================================================
   HOME PAGE STYLESHEET (Kalpavrikshalaya - Little Sprouts / Childit Theme)
   ========================================================================= */

/* =========================================================================
   HEADER OVERLAP & SEAMLESS BLEND ON HERO SECTION
   The floating header card overlaps downward onto the hero slider,
   completely concealing the top corner edge of the hero section.
   ========================================================================= */
.home-floating-header-container {
    position: relative;
    z-index: 100;
    background-color: #0c3670;
    padding: 0 24px 0 24px;
}

.home-floating-header-card {
    position: relative;
    z-index: 100;
    max-width: 1360px;
    margin: 0 auto -52px auto; /* Overlaps 52px directly onto the hero section */
    box-shadow: 0 20px 48px rgba(10, 29, 55, 0.22);
}

/* In sticky full-width mode when scrolled, reset bottom overlap margin */
.home-floating-header-container.is-sticky-fullwidth .home-floating-header-card {
    margin-bottom: 0 !important;
}

/* Hero Canvas Backdrop (Increased Height for Elevated Blue Framing) */
.home-hero-backdrop {
    background-color: #0c3670;
    padding: 0 24px 55px 24px;
    position: relative;
    overflow: hidden;
}

/* Bottom Curvy Wave Divider (Matching other subpage designs) */
.home-wave-divider {
    background: transparent;
    line-height: 0;
    overflow: hidden;
    width: 100%;
    margin-top: -1px;
    margin-bottom: 0;
}

.home-wave-divider svg {
    height: 48px;
    display: block;
    width: 100%;
}

/* Framed Hero Section - Centered & Aligned with 1360px Header Card */
.home-exact-hero {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    border-radius: 24px 24px 28px 28px;
    min-height: 520px;
    max-height: 560px;
    padding-top: 60px; /* Ample breathing room under the overlapping header */
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* Background Slides Track with Matching Rounded Corners */
.hero-slides-track {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    border-radius: 24px 24px 28px 28px;
}

@media (max-width: 991px) {
    .home-floating-header-card {
        margin: 0 auto -38px auto;
    }

    .home-hero-backdrop {
        padding: 0 16px 40px 16px;
    }

    .home-exact-hero {
        min-height: 540px;
        padding-top: 48px;
        border-radius: 20px 20px 24px 24px;
    }

    .hero-slides-track {
        border-radius: 20px 20px 24px 24px;
    }
}

@media (max-width: 640px) {
    .home-floating-header-card {
        margin: 0 auto -28px auto;
    }

    .home-hero-backdrop {
        padding: 0 10px 30px 10px;
    }

    .home-exact-hero {
        min-height: 560px;
        padding-top: 36px;
        border-radius: 16px 16px 20px 20px;
    }

    .hero-slides-track {
        border-radius: 16px 16px 20px 20px;
    }
}

.hero-bg-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.9s ease;
    z-index: 1;
}

.hero-bg-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.hero-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    transform: scale(1.0);
    transition: transform 7s cubic-bezier(0.25, 1, 0.5, 1);
    display: block;
    filter: brightness(1.16) contrast(1.08) saturate(1.12);
}

.hero-bg-slide.active .hero-slide-img {
    transform: scale(1.06);
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(10, 29, 55, 0.05) 0%,
            transparent 30%,
            transparent 65%,
            rgba(10, 29, 55, 0.20) 100%);
    pointer-events: none;
}

/* Foreground content relative */
.hero-content-relative {
    position: relative;
    z-index: 5;
    width: 100%;
}

/* Card slide content animation */
.hero-card-slide {
    display: none;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-card-slide.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Card Badge */
.hero-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.24);
    color: #FFFFFF;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 5px 16px;
    border-radius: var(--radius-pill);
    margin-bottom: 14px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(4px);

}

/* Bottom Controls Container */
.hero-bottom-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    margin-right: 6px;
    z-index: 6;
}

/* Slide Counter */
.hero-slide-counter {
    background: rgba(10, 29, 55, 0.65);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-pill);
    padding: 8px 18px;
    color: #FFFFFF;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.hero-current-slide {
    color: var(--childit-yellow);
}

.hero-counter-sep {
    opacity: 0.5;
}

.hero-total-slides {
    opacity: 0.85;
}

/* Interactive Slide Dots */
.hero-slide-dots {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(10, 29, 55, 0.45);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-pill);
    padding: 8px 14px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.45);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
}

.hero-dot:hover {
    background: rgba(255, 255, 255, 0.85);
}

.hero-dot.active {
    width: 26px;
    background: var(--childit-yellow);
    box-shadow: 0 0 10px rgba(255, 210, 0, 0.4);
}

/* Arrow buttons */
.hero-bottom-arrows {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

/* Mobile Responsiveness for Hero Slider */
@media (max-width: 900px) {
    .hero-content-relative {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-end;
        gap: 20px;
        min-height: auto;
    }

    .hero-bottom-controls {
        flex-wrap: wrap;
        width: 100%;
        justify-content: space-between;
        margin: 0;
    }
}

@media (max-width: 575px) {
    .hero-slide-dots {
        display: none;
    }
}

/* Welcome Section Styles */
.home-welcome-h3 {
    font-size: 2rem;
    margin-bottom: 16px;
    color: var(--childit-navy);
}

.home-welcome-lead {
    font-size: 1.08rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.7;
}

.home-welcome-p {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.7;
}

/* Philosophy 4 Fanned Cards Section */
.home-philosophy-h2 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    color: var(--childit-navy);
}

.home-philosophy-sub {
    max-width: 680px;
    margin: 0 auto 30px;
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* Orange Special Programs Section */
.home-programs-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 6px 18px;
    border-radius: var(--radius-pill);
    margin-bottom: 12px;
}

.white-card-content-grow {
    flex: 1;
}

.white-card-age-tag {
    color: var(--childit-orange);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.white-card-btn-align {
    display: flex;
    justify-content: flex-end;
}

/* Our Classes Section */
.home-classes-h2 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    color: var(--childit-navy);
}

.home-classes-sub {
    max-width: 680px;
    margin: 0 auto 40px;
    color: var(--text-muted);
    font-size: 1.05rem;
}


.orange-programs-section {
    background-color: #ff009de1;
}

/* Stats & Milestones Section */
.home-stats-h2 {
    font-size: 2.8rem;
    margin-bottom: 16px;
    color: var(--childit-navy);
}

.home-stats-lead {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.7;
}

/* Safety & Wholesome Care Navy Section */
.navy-safety-section {
    background-color: #ff009de1;
}

.home-safety-photo-frame {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(10, 29, 55, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.15);
}

.home-safety-img {
    width: 100%;
    height: auto;
    display: block;
}

.home-safety-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #f9f9f9;
}

.home-safety-h2 {
    font-size: 2.8rem;
    margin-bottom: 16px;
    color: #FFFFFF;
}

.home-safety-lead {
    font-size: 1.05rem;
    color: #CBD5E1;
    margin-bottom: 24px;
    line-height: 1.7;
}

.home-safety-btn-wrap {
    margin-top: 30px;
}

/* Testimonials Section */
.home-testimonial-h2 {
    font-size: 2.8rem;
    margin-bottom: 30px;
    color: var(--childit-navy);
}

.home-testimonial-slider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
}

.home-parent-name {
    font-size: 1.25rem;
    color: var(--childit-navy);
    margin-bottom: 2px;
}

.home-parent-role {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Events & Notice Board */

.home-events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 16px;
}

.home-events-title {
    font-size: 2.8rem;
    color: var(--childit-navy);
    margin: 0;
}

.home-event-orange-thumb {
    width: 140px;
    height: 140px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.home-event-orange-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-event-pill {
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.home-event-orange-h4 {
    color: #FFFFFF;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.home-event-date-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #FFFFFF;
}

.home-event-orange-p {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.home-event-white-thumb {
    height: 140px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 16px;
}

.home-event-white-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-event-tag-orange {
    color: var(--childit-orange);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.home-event-white-h4 {
    font-size: 1.35rem;
    margin-bottom: 6px;
    color: var(--childit-navy);
}

.home-event-time {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.home-event-white-p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0;
}

.fan-card-4 {
    background: #8400ff;
}


/* Admission Inquiry Form */
.home-inquiry-badge {
    background: rgba(255, 42, 109, 0.2);
    color: #FF2A6D;
}

.navy-form-section {
    background-color: #6f13b6;
}

.home-inquiry-h2 {
    font-size: 2.8rem;
    color: #FFFFFF;
    margin-bottom: 16px;
}

.home-inquiry-lead {
    font-size: 1.05rem;
    color: #CBD5E1;
    line-height: 1.7;
}

.home-inquiry-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.home-inquiry-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: #CBD5E1;
    margin-bottom: 6px;
}

.home-inquiry-submit-btn {
    width: 100%;
    font-size: 1.1rem;
    padding: 14px 28px;
}

/* Recent News */
.home-news-h2 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    color: var(--childit-navy);
}

.home-news-sub {
    max-width: 680px;
    margin: 0 auto 40px;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.home-news-read-link {
    color: var(--childit-pink);
    font-weight: 700;
    font-size: 0.95rem;
}

/* --- HOME GALLERY SHOWCASE SECTION --- */
.home-gallery-showcase {
    padding: 85px 0 90px;
    background: #FFFFFF;
    position: relative;
    overflow: hidden;
}

.home-gallery-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 45px;
}

.home-gallery-title {
    font-size: 2.8rem;
    color: var(--childit-navy);
    margin-top: 10px;
    margin-bottom: 14px;
}

.home-gallery-lead {
    color: var(--text-muted);
    font-size: 1.08rem;
    line-height: 1.65;
}

.home-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 45px;
}

.home-gallery-card {
    border-radius: 18px;
    overflow: hidden;
    background: #FFFFFF;
    border: 2px solid #E2E8F0;
    box-shadow: 0 4px 14px rgba(10, 29, 55, 0.05);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.home-gallery-card:hover {
    transform: translateY(-8px) rotate(-1deg);
    border-color: #CBD5E1;
    box-shadow: 0 12px 28px rgba(10, 29, 55, 0.09);
}

.home-gallery-thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #F1F5F9;
}

.home-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.home-gallery-card:hover .home-gallery-thumb img {
    transform: scale(1.07);
}

.home-gallery-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.home-gallery-card-body {
    padding: 16px 18px;
    flex: 1;
}

.home-gallery-card-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--childit-navy);
    line-height: 1.35;
    margin-bottom: 6px;
}

.home-gallery-card-desc {
    font-size: 0.84rem;
    color: #64748B;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-gallery-cta {
    text-align: center;
}

/* Funny floating decorative doodles */
.floating-sticker-sun {
    position: absolute;
    top: 40px;
    right: 4%;
    font-size: 2.4rem;
    animation: playfulBounce 3s ease-in-out infinite;
    pointer-events: none;
    user-select: none;
}

.floating-sticker-plant {
    position: absolute;
    bottom: 30px;
    left: 3%;
    font-size: 2.2rem;
    animation: floatSway 4s ease-in-out infinite;
    pointer-events: none;
    user-select: none;
}

/* =========================================================================
   MOBILE APP RESPONSIVE BREAKPOINTS (Home Page)
   ========================================================================= */
@media (max-width: 768px) {
    .home-exact-hero {
        min-height: 480px;
        max-height: none;
        padding-top: 40px;
        padding-bottom: 30px;
    }
    .exact-hero-title {
        font-size: 2rem !important;
        line-height: 1.25;
    }
    .exact-hero-lead {
        font-size: 0.98rem !important;
    }
    .exact-orange-card {
        padding: 24px 18px !important;
    }
    /* Fan cards: neutral transforms on mobile to avoid overflow and awkward cuts */
    .cards-fan-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    .fan-card,
    .fan-card-1,
    .fan-card-2,
    .fan-card-3,
    .fan-card-4 {
        transform: none !important;
    }
    .fan-card:hover {
        transform: translateY(-4px) !important;
    }
    .home-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
        gap: 18px;
    }
    .home-inquiry-grid-row {
        grid-template-columns: 1fr;
    }
    .home-inquiry-h2,
    .home-news-h2,
    .home-gallery-title {
        font-size: 2rem !important;
    }
    .floating-sticker-sun,
    .floating-sticker-plant {
        display: none !important;
    }
}