/* --- Playful Programs Section --- */
#courses {
    background: linear-gradient(180deg, #FFF7ED 0%, #FDF2F8 40%, #EFF6FF 80%, #F0FDF4 100%) !important;
    position: relative; overflow: hidden;
}
#courses::before {
    content: ''; position: absolute; top: -100px; right: -80px; width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(251,191,36,0.15) 0%, transparent 70%);
    border-radius: 50%; animation: blobDrift 8s ease-in-out infinite alternate;
}
#courses::after {
    content: ''; position: absolute; bottom: -60px; left: -60px; width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(168,85,247,0.12) 0%, transparent 70%);
    border-radius: 50%; animation: blobDrift 10s ease-in-out infinite alternate-reverse;
}
@keyframes blobDrift { from { transform: translate(0,0) scale(1); } to { transform: translate(30px,-20px) scale(1.15); } }

#courses .sec-title { font-size: 52px !important; }
#courses .sec-subtitle { font-size: 20px; color: #64748B; }

.program-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl); margin-top: var(--space-2xl); position: relative; z-index: 1;
}

.program-card {
    background: white; border-radius: 28px; padding: 0; text-align: center;
    position: relative; border: 2px solid transparent;
    box-shadow: 0 12px 40px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
    overflow: visible; display: flex; flex-direction: column; align-items: center;
    transition: transform 0.5s cubic-bezier(0.175,0.885,0.32,1.275), box-shadow 0.4s ease, border-color 0.3s ease;
    animation: cardFloat 4s ease-in-out infinite;
}
.program-card:nth-child(1) { animation-delay: 0s; }
.program-card:nth-child(2) { animation-delay: 0.5s; transform: translateY(20px); }
.program-card:nth-child(3) { animation-delay: 1s; }
.program-card:nth-child(4) { animation-delay: 1.5s; transform: translateY(20px); }
@keyframes cardFloat {
    0%, 100% { transform: translateY(var(--card-offset, 0px)); }
    50% { transform: translateY(calc(var(--card-offset, 0px) - 10px)); }
}

.program-card::before {
    content: ''; position: absolute; top: -3px; left: -3px; right: -3px; bottom: -3px;
    border-radius: 30px; z-index: -1; opacity: 0;
    transition: opacity 0.4s ease;
}
.program-card.green::before { background: linear-gradient(135deg, #34D399, #10B981, #059669); }
.program-card.blue::before { background: linear-gradient(135deg, #60A5FA, #3B82F6, #2563EB); }
.program-card.purple::before { background: linear-gradient(135deg, #A78BFA, #8B5CF6, #7C3AED); }
.program-card.red::before { background: linear-gradient(135deg, #FB923C, #EF4444, #DC2626); }

.program-card:hover {
    transform: translateY(-16px) rotate(-1deg) !important;
    box-shadow: 0 30px 60px rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.06);
}
.program-card:hover::before { opacity: 1; }

/* Sparkle on hover */
.program-card::after {
    content: '✨'; position: absolute; top: -10px; right: -5px;
    font-size: 24px; opacity: 0; transform: scale(0) rotate(-30deg);
    transition: all 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
    pointer-events: none; z-index: 5;
}
.program-card:hover::after { opacity: 1; transform: scale(1) rotate(0deg); }

/* Image area with colored blob */
.program-image {
    width: 100%; height: 200px; margin-bottom: 0; border-radius: 26px 26px 0 0;
    overflow: hidden; position: relative;
}
.program-card.green .program-image { background: linear-gradient(145deg, #D1FAE5, #A7F3D0); }
.program-card.blue .program-image { background: linear-gradient(145deg, #DBEAFE, #BFDBFE); }
.program-card.purple .program-image { background: linear-gradient(145deg, #EDE9FE, #DDD6FE); }
.program-card.red .program-image { background: linear-gradient(145deg, #FFEDD5, #FED7AA); }

.program-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4,0,0.2,1), filter 0.4s ease;
}
.program-card:hover .program-image img {
    transform: scale(1.12) rotate(1deg); filter: brightness(1.05) saturate(1.1);
}

/* Floating shapes decoration */
.program-image::before {
    content: ''; position: absolute; bottom: -20px; right: -20px; width: 80px; height: 80px;
    border-radius: 50%; z-index: 0; opacity: 0.3;
}
.program-card.green .program-image::before { background: #34D399; }
.program-card.blue .program-image::before { background: #60A5FA; }
.program-card.purple .program-image::before { background: #A78BFA; }
.program-card.red .program-image::before { background: #FB923C; }

.program-image::after {
    content: ''; position: absolute; top: -10px; left: -10px; width: 50px; height: 50px;
    border-radius: 12px; transform: rotate(30deg); z-index: 0; opacity: 0.2;
}
.program-card.green .program-image::after { background: #059669; }
.program-card.blue .program-image::after { background: #2563EB; }
.program-card.purple .program-image::after { background: #7C3AED; }
.program-card.red .program-image::after { background: #EF4444; }

/* Card body padding */
.program-card > .grade-pill,
.program-card > .program-title,
.program-card > .program-desc { padding-left: 1.5rem; padding-right: 1.5rem; }

/* Grade badges — glossy pills */
.grade-pill {
    font-size: 0.78rem; font-weight: 800; padding: 8px 20px;
    border-radius: 100px; margin-top: -16px; margin-bottom: 1rem;
    text-transform: uppercase; letter-spacing: 1.2px; position: relative; z-index: 2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.program-card:hover .grade-pill { transform: scale(1.08); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }

.green .grade-pill { background: linear-gradient(135deg, #6EE7B7, #34D399); color: #064E3B; }
.blue .grade-pill { background: linear-gradient(135deg, #93C5FD, #60A5FA); color: #1E3A5F; }
.purple .grade-pill { background: linear-gradient(135deg, #C4B5FD, #A78BFA); color: #3B1F8E; }
.red .grade-pill { background: linear-gradient(135deg, #FCA5A5, #F87171); color: #7F1D1D; }

.program-title {
    font-family: 'Fredoka One', cursive; font-size: 1.55rem;
    color: #1e293b; margin-bottom: 0.5rem; line-height: 1.3;
}

.program-desc {
    color: #64748b; font-size: 1rem; margin-bottom: 1.5rem;
    line-height: 1.6; padding-bottom: 1.5rem;
}

@media (max-width: 1024px) {
    .program-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
    .program-card:nth-child(2), .program-card:nth-child(4) { transform: translateY(0); }
}
@media (max-width: 640px) {
    .program-grid { grid-template-columns: 1fr; gap: var(--space-lg); }
    #courses .sec-title { font-size: 32px !important; }
}

/* --- Brand Flow --- */
.brand-flow-wrap {
    margin-top: 5rem;
    padding: 3rem;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 32px;
    color: white;
    position: relative;
    overflow: hidden;
}

.brand-flow-wrap::after {
    content: '💡';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 8rem;
    opacity: 0.05;
}

.brand-flow-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 2.5rem;
    color: #fbbf24;
    letter-spacing: 2px;
}

.flow-items {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.flow-step {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.flow-box {
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.flow-box:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
    color: #3b82f6;
}

.flow-arrow {
    color: rgba(255, 255, 255, 0.2);
    font-size: 1.5rem;
}

.flow-final {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border: none;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

@media (max-width: 768px) {
    .flow-items { flex-direction: column; }
    .flow-arrow { transform: rotate(90deg); }
}
/* --- About Sections --- */
.about-brainel-sec, .about-company-sec {
    padding: 100px 0;
    background: linear-gradient(180deg, #FFFBF5 0%, #FFF9F0 50%, #FFFDF7 100%);
    position: relative;
    overflow: hidden;
}
.about-company-sec {
    background: linear-gradient(180deg, #FFFDF7 0%, #FFF7ED 40%, #FEFCF3 100%);
}
.about-grid-brainel {
    display: grid;
    grid-template-columns: 1.2fr 1fr; /* 55% / 45% approx */
    gap: 56px; /* tighter gap for wider container */
    align-items: center;
}
.about-grid-company {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 50/50 */
    gap: 56px;
    align-items: center;
}
.about-visual {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.about-visual:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(37,99,235,0.15);
}
.about-img {
    width: 100%;
    height: auto;
    max-height: 480px;
    aspect-ratio: 4/3;
    display: block;
    object-fit: cover;
    border-radius: 24px;
}
.about-content .sec-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #2563EB;
    background: #EFF6FF;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
    text-transform: uppercase;
}
.about-content .sec-title {
    font-size: 42px;
    line-height: 1.2;
    color: #0B3D91;
    margin-bottom: 24px;
}
.about-content .sec-title span {
    color: #F4A000;
}
.about-content .sec-desc {
    font-size: 17px;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 20px;
}
.about-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.about-list li {
    font-size: 16px;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 10px;
}
.about-list li i {
    color: #10B981;
    font-size: 18px;
}
.feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}
.fpill {
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: default;
}
.fp-blue { background: #DBEAFE; color: #1D4ED8; }
.fp-orange { background: #FFEDD5; color: #C2410C; }
.fp-green { background: #D1FAE5; color: #047857; }
.fp-purple { background: #EDE9FE; color: #6D28D9; }
.fp-yellow { background: #FEF9C3; color: #A16207; }
.fp-indigo { background: #E0E7FF; color: #4338CA; }
.fpill:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

@media (max-width: 991px) {
    .about-grid-brainel, .about-grid-company {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .about-company-sec .about-grid-company .about-content {
        order: 2;
    }
    .about-company-sec .about-grid-company .about-visual {
        order: 1;
    }
    .about-content .sec-title { font-size: 32px; }
    .about-list { grid-template-columns: 1fr; }
}

/* --- Reveal Split Cards Section --- */
#coding-journey {
    padding: 100px 0;
    background: linear-gradient(180deg, #FFFDF7 0%, #FFF7ED 50%, #FEFCF3 100%);
    position: relative;
    overflow: hidden;
}

/* Subtle radial blur gradients */
#coding-journey::before {
    content: ''; position: absolute; top: -100px; left: -100px; width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(30, 77, 183, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

#coding-journey::after {
    content: ''; position: absolute; bottom: -100px; right: -100px; width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(244, 160, 0, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.cj-header {
    text-align: center;
    margin-bottom: 64px;
}
.cj-header h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 48px;
    color: #1E4DB7;
    margin-bottom: 16px;
}
.cj-header h2 span {
    color: #F4A000;
}
.cj-header p {
    font-size: 18px;
    color: #475569;
    max-width: 600px;
    margin: 0 auto;
}

.cj-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
    z-index: 2;
    padding: 0;
}

.cj-card {
    background: #ffffff;
    border-radius: 28px;
    height: 480px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(30, 77, 183, 0.05);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.cj-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(30, 77, 183, 0.12), 0 0 0 2px rgba(244, 160, 0, 0.3);
}

.cj-card-top {
    flex: 1;
    padding: 24px;
    background: linear-gradient(135deg, rgba(30, 77, 183, 0.03), rgba(244, 160, 0, 0.03));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Glassmorphism placeholders */
.cj-placeholder {
    background: rgba(255, 255, 255, 0.6);
    border: 2px dashed rgba(30, 77, 183, 0.15);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    animation: cjFloat 4s ease-in-out infinite;
}

.cj-card:nth-child(odd) .cj-placeholder:nth-child(even) { animation-delay: 1s; }
.cj-card:nth-child(even) .cj-placeholder:nth-child(odd) { animation-delay: 1.5s; }

@keyframes cjFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.cj-card:hover .cj-placeholder {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(244, 160, 0, 0.4);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    animation-play-state: paused;
}

/* Subdivision Layouts */
/* Card 1: 2 small horizontal */
.cj-card:nth-child(1) .cj-card-top { flex-direction: row; }
.cj-card:nth-child(1) .cj-placeholder { width: 45%; height: 100px; transform: translateY(5px); }
.cj-card:nth-child(1):hover .cj-placeholder:nth-child(1) { transform: translateY(-10px) translateX(-10px) rotate(-3deg); }
.cj-card:nth-child(1):hover .cj-placeholder:nth-child(2) { transform: translateY(-10px) translateX(10px) rotate(3deg); }

/* Card 2: 3 subdivisions (small, wide, small) */
.cj-card:nth-child(2) .cj-card-top { flex-direction: column; padding: 16px; gap: 8px; }
.cj-card:nth-child(2) .cj-placeholder:nth-child(1) { width: 50%; height: 50px; transform: translateY(2px); }
.cj-card:nth-child(2) .cj-placeholder:nth-child(2) { width: 90%; height: 80px; }
.cj-card:nth-child(2) .cj-placeholder:nth-child(3) { width: 50%; height: 50px; transform: translateY(-2px); align-self: flex-end; }
.cj-card:nth-child(2):hover .cj-placeholder:nth-child(1) { transform: translateY(-12px) translateX(-8px); }
.cj-card:nth-child(2):hover .cj-placeholder:nth-child(2) { transform: scale(1.03); }
.cj-card:nth-child(2):hover .cj-placeholder:nth-child(3) { transform: translateY(12px) translateX(8px); }

/* Card 3: 2 vertical */
.cj-card:nth-child(3) .cj-card-top { flex-direction: row; }
.cj-card:nth-child(3) .cj-placeholder { width: 40%; height: 160px; transform: scale(0.95); }
.cj-card:nth-child(3):hover .cj-placeholder:nth-child(1) { transform: translateY(-12px) scale(1.02); }
.cj-card:nth-child(3):hover .cj-placeholder:nth-child(2) { transform: translateY(12px) scale(1.02); }

/* Card 4: 2 top/bottom */
.cj-card:nth-child(4) .cj-card-top { flex-direction: column; }
.cj-card:nth-child(4) .cj-placeholder { width: 80%; height: 90px; }
.cj-card:nth-child(4):hover .cj-placeholder:nth-child(1) { transform: translateY(-12px) rotate(2deg); }
.cj-card:nth-child(4):hover .cj-placeholder:nth-child(2) { transform: translateY(12px) rotate(-2deg); }

.cj-card-bottom {
    background: #ffffff;
    padding: 32px 24px;
    border-radius: 30px; 
    margin-top: -20px;
    z-index: 2;
    position: relative;
    box-shadow: 0 -10px 20px rgba(0,0,0,0.02);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cj-card:hover .cj-card-bottom {
    transform: translateY(-16px);
    padding-bottom: 48px;
}

.cj-title {
    font-family: 'Fredoka One', cursive;
    font-size: 20px;
    color: #1E4DB7;
    margin-bottom: 8px;
    transition: color 0.3s;
}
.cj-card:hover .cj-title {
    color: #0B3D91;
}

.cj-subtitle {
    font-size: 14px;
    color: #64748B;
    line-height: 1.5;
    margin-bottom: 24px;
}

.cj-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #3B82F6, #1E4DB7);
    color: white;
    font-weight: 600;
    font-size: 14px;
    padding: 12px 24px;
    border-radius: 100px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(30, 77, 183, 0.3);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.9;
    transform: translateY(0);
}

.cj-card:hover .cj-btn {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 77, 183, 0.4);
}

.cj-btn i {
    font-size: 12px;
    transition: transform 0.3s;
}

.cj-card:hover .cj-btn i {
    transform: translateX(4px);
}

/* Responsive */
@media (max-width: 1024px) {
    .cj-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

@media (max-width: 640px) {
    .cj-grid { grid-template-columns: 1fr; gap: 24px; }
    .cj-card { height: 420px; }
    .cj-header h2 { font-size: 36px; }
}
