/* ============================================
   Crawling Kiddo - A Future Ready School
   Custom Stylesheet
   ============================================ */

/* CSS Custom Properties */
:root {
    --primary: #03A9F4;
    --primary-dark: #0288D1;
    --primary-light: #B3E5FC;
    --secondary: #FF9800;
    --secondary-dark: #F57C00;
    --secondary-light: #FFE0B2;
    --accent: #4CAF50;
    --accent-dark: #388E3C;
    --accent-light: #C8E6C9;
    --light-bg: #E3F2FD;
    --dark-text: #1a1a2e;
    --white: #ffffff;
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-600: #757575;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --radius-full: 9999px;
    --transition: all 0.3s ease;
}

/* Global Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-text);
    background-color: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Selection */
::selection {
    background: var(--primary-light);
    color: var(--dark-text);
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.navbar .logo-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    position: relative;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--secondary);
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover {
    color: var(--primary) !important;
}

.nav-link.active {
    color: var(--primary) !important;
    font-weight: 700;
}

/* Mobile Menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu-overlay {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Hamburger Animation */
.hamburger span {
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, #03A9F4 0%, #0288D1 50%, #01579B 100%);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 0;
}

/* Floating Decorative Shapes */
.hero-shape {
    position: absolute;
    opacity: 0.15;
    z-index: 0;
}

.hero-cloud {
    width: 200px;
    height: 80px;
    background: white;
    border-radius: 100px;
    position: absolute;
}

.hero-cloud::before,
.hero-cloud::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 50%;
}

.hero-cloud::before {
    width: 80px;
    height: 80px;
    top: -40px;
    left: 30px;
}

.hero-cloud::after {
    width: 100px;
    height: 100px;
    top: -50px;
    right: 30px;
}

.cloud-1 {
    top: 15%;
    left: -5%;
    opacity: 0.12;
    transform: scale(0.8);
}

.cloud-2 {
    top: 25%;
    right: 5%;
    opacity: 0.08;
    transform: scale(0.6);
}

.cloud-3 {
    bottom: 30%;
    left: 10%;
    opacity: 0.1;
    transform: scale(0.5);
}

/* Star shapes */
.hero-star {
    position: absolute;
    color: rgba(255, 255, 255, 0.2);
    z-index: 0;
}

/* Typing cursor */
.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--secondary);
    margin-left: 4px;
    animation: blink 0.8s infinite;
    vertical-align: middle;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Hero wave bottom */
.hero-wave {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    z-index: 1;
}

/* ============================================
   Page Hero Banners
   ============================================ */
.page-hero {
    background: linear-gradient(135deg, #03A9F4 0%, #0288D1 60%, #01579B 100%);
    padding: 8rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.06' fill-rule='evenodd'%3E%3Cpath d='M20 20c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10S20 25.523 20 20zM0 20c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10S0 25.523 0 20z'/%3E%3C/g%3E%3C/svg%3E");
    z-index: 0;
}

.page-hero .hero-wave {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    z-index: 1;
}

/* ============================================
   Cards
   ============================================ */
.card-hover {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.card-icon {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    transition: var(--transition);
}

.card-hover:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Program cards with colored top border */
.program-card {
    border-top: 4px solid var(--primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.program-card:nth-child(2) {
    border-top-color: var(--secondary);
}

.program-card:nth-child(3) {
    border-top-color: var(--accent);
}

.program-card:nth-child(4) {
    border-top-color: #E91E63;
}

/* ============================================
   Stats Section
   ============================================ */
.stat-item {
    text-align: center;
    padding: 2rem;
}

.stat-number {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

/* ============================================
   Testimonials
   ============================================ */
.testimonial-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 5rem;
    font-family: Georgia, serif;
    color: var(--primary);
    opacity: 0.15;
    line-height: 1;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
}

.testimonial-stars {
    color: var(--secondary);
}

/* ============================================
   CTA Banner
   ============================================ */
.cta-banner {
    background: linear-gradient(135deg, var(--secondary) 0%, #F57C00 100%);
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.cta-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

/* ============================================
   Timeline (Admission Process)
   ============================================ */
.timeline-item {
    position: relative;
    padding-left: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 40px;
    bottom: -20px;
    width: 2px;
    background: var(--primary-light);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 4px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    z-index: 1;
}

/* ============================================
   Forms
   ============================================ */
.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
    background: white;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.15);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark-text);
}

.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
    background: white;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23757575' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.15);
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(3, 169, 244, 0.35);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: white;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.35);
}

.btn-outline {
    background: transparent;
    color: white;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: 2px solid white;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

.btn-outline:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.35);
}

/* ============================================
   WhatsApp Floating Button
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    animation: whatsappPulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
    color: white;
}

@keyframes whatsappPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--dark-text);
    color: rgba(255, 255, 255, 0.8);
}

.footer a:hover {
    color: var(--primary);
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: var(--transition);
    font-size: 1.1rem;
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* ============================================
   Gallery
   ============================================ */
.gallery-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-placeholder {
    width: 100%;
    height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.gallery-placeholder span {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-weight: 600;
}

/* Gallery Filter Tabs */
.gallery-tab {
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid var(--gray-200);
    background: white;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
}

.gallery-tab:hover,
.gallery-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ============================================
   Schedule Table
   ============================================ */
.schedule-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.schedule-item:hover {
    background: var(--light-bg);
}

.schedule-time {
    font-weight: 700;
    color: var(--primary);
    min-width: 100px;
    font-size: 0.9rem;
}

.schedule-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg);
    color: var(--primary);
    flex-shrink: 0;
}

/* ============================================
   Alert Messages
   ============================================ */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: var(--accent-light);
    color: var(--accent-dark);
    border: 1px solid var(--accent);
}

.alert-error {
    background: #FFCDD2;
    color: #C62828;
    border: 1px solid #EF5350;
}

/* ============================================
   Section Styling
   ============================================ */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-full);
    margin: 0.75rem auto 0;
}

.section-subtitle {
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

/* Decorative dots background */
.dots-bg {
    background-image: radial-gradient(circle, var(--primary-light) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* ============================================
   Animations (visibility helper)
   ============================================ */
[data-reveal] {
    opacity: 0;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .hero-section {
        min-height: 100svh;
    }

    .stat-number {
        font-size: 2.25rem;
    }

    .gallery-placeholder {
        height: 180px;
    }

    .page-hero {
        padding: 6rem 0 3rem;
    }

    .whatsapp-float {
        bottom: 16px;
        right: 16px;
        width: 54px;
        height: 54px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .stat-number {
        font-size: 1.875rem;
    }

    .btn-primary,
    .btn-secondary,
    .btn-outline,
    .btn-accent {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .whatsapp-float {
        animation: none;
    }

    [data-reveal] {
        opacity: 1 !important;
    }
}

/* ============================================
   Print
   ============================================ */
@media print {
    .navbar,
    .whatsapp-float,
    .footer {
        display: none !important;
    }
}
