<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>
        <?php 
            $page_title = 'Home';
            if (isset($current_page)) {
                switch ($current_page) {
                    case 'home': $page_title = 'Home'; break;
                    case 'program': $page_title = 'Program'; break;
                    case 'jurnal': $page_title = 'Jurnal'; break;
                    case 'about': $page_title = 'About'; break;
                    case 'resource': $page_title = 'Resource'; break;
                }
            } elseif (isset($title)) {
                $page_title = strip_tags($title);
            }
            echo $page_title . ' | Stemspark';
        ?>
    </title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        html, body {
            max-width: 100%;
            position: relative;
        }
        * {
            font-family: 'Poppins', sans-serif;
            box-sizing: border-box;
        }
        .navbar {
            padding: 1rem 0;
        }
        @media (min-width: 992px) {
            .navbar {
                padding: 1.5rem 0;
            }
        }
        .navbar-brand img {
            height: 6rem;
            margin-top: -20px;
            margin-left: 0;
        }
        @media (min-width: 992px) {
            .navbar-brand img {
                height: 11rem;
                margin-top: -50px;
                margin-left: -80px;
            }
        }
        .navbar-collapse {
                margin-top: 1rem;
                margin-right: -74px;
                padding-top: 1rem;
        }
        @media (min-width: 992px) {
            .navbar-collapse {
                margin-top: -4.7rem;
                margin-left: -8rem;
                padding-top: -4rem;
            }
        }
                
                
            }
        .logo-img {
            height: 70px;
            width: auto;
            transition: height 0.3s ease;
        }
        @media (max-width: 991.98px) {
            html, body {
                overflow-x: hidden;
            }
            .logo-img {
                height: 50px;
            }
        }
        .nav-link {
            color: #1e3a5f !important;
            font-weight: 500;
            margin: 0 1rem;
            position: relative;
        }
        .nav-link:hover, .nav-link.active {
            color: #ff6b35 !important;
        }
        .nav-link.active::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 0;
            width: 100%;
            height: 2px;
            background-color: #1e3a5f;
        }
        .btn-enroll {
            background-color: #ff6b35;
            color: white;
            border: none;
            padding: 0.75rem 1.75rem;
            border-radius: 30px;
            font-weight: 600;
            transition: all 0.3s ease;
            margin-right: 60px;
        }
        .btn-enroll:hover {
            background-color: #e55a2b;
            color: white;
        }
        .hero-section {
            padding: 4rem 0;
        }
        .hero-title {
            font-size: 5.2rem;
            font-weight: 700;
            color: #1e3a5f;
            line-height: 1.1;
            margin-bottom: 1.5rem;
        }
        .hero-text {
            color: #1e3a5f;
            font-size: 1.1rem;
            line-height: 1.6;
            margin-bottom: 2rem;
        }
        .btn-primary-custom {
            background-color: #ff6b35;
            color: white;
            border: none;
            padding: 0.75rem 2.5rem;
            border-radius: 30px;
            font-weight: 600;
            transition: all 0.3s ease;
        }
        .btn-primary-custom:hover {
            background-color: #e55a2b;
            color: white;
        }
        .btn-outline-custom {
            background-color: transparent;
            color: #ff6b35;
            border: 2px solid #ff6b35;
            padding: 0.75rem 2.5rem;
            border-radius: 30px;
            font-weight: 600;
            transition: all 0.3s ease;
        }
        .btn-outline-custom:hover {
            background-color: #ff6b35;
            color: white;
        }
        .hero-image {
            border-radius: 0 0 0 100px;
            overflow: hidden;
            margin-top: -6rem;
            margin-right: -2rem;
        }
        .hero-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            
        }
        .decorative-lines {
            margin-top: 3rem;
        }
        .decorative-lines .line {
            height: 4px;
            background-color: #ff6b35;
            margin-bottom: 8px;
        }
        .decorative-lines .line:nth-child(1) {
            width: 80px;
        }
        .decorative-lines .line:nth-child(2) {
            width: 40px;
        }
        @media (max-width: 991.98px) {
            .hero-title {
                font-size: 2.5rem;
            }
            .navbar-collapse {
                margin-top: 1rem;
                padding: 1rem;
                border-top: 1px solid #eee;
                background-color: #fff;
                border-radius: 15px;
                box-shadow: 0 10px 30px rgba(0,0,0,0.05);
            }
            .navbar-nav {
                padding-bottom: 1rem;
            }
            .nav-link {
                margin: 0.5rem 0;
                padding-left: 7rem;
            }
            .nav-link.active::after {
                display: none;
            }
            .btn-enroll {
                width: 100%;
                text-align: center;
                margin-top: 0.5rem;
                margin-left: 6.5rem;
            }
            .hero-section {
                padding: 2rem 0;
            }
            .hero-image {
                margin-right: 0;
                margin-top: 2rem;
                border-radius: 30px;
            }
        }
        .programs-section {
            padding: 5rem 0;
            background-color: #ffffff;
        }
        .section-title {
            font-size: 4.3rem;
            font-weight: 700;
            color: #1e3a5f;
            margin-bottom: 1.5rem;
        }
        .section-description {
            color: #4a6fa5;
            font-size: 1.1rem;
            line-height: 1.7;
            max-width: 900px;
            margin: 0 auto 4rem auto;
        }
        .program-card {
            border: none;
            background: transparent;
        }
        .program-card img {
            border-radius: 20px;
            width: 100%;
            height: 280px;
            object-fit: cover;
            margin-bottom: 1.5rem;
        }
        .program-card h3 {
            font-size: 2rem;
            font-weight: 700;
            color: #1e3a5f;
            margin-bottom: 1rem;
        }
        .program-card p {
            color: #4a6fa5;
            font-size: 1rem;
            line-height: 1.6;
        }
        .gallery-section {
            padding: 5rem 0;
            background: linear-gradient(135deg, #f8f9ff 0%, #e8eef8 100%);
        }
        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1.5rem;
        }
        .gallery-item {
            position: relative;
            border-radius: 20px;
            overflow: hidden;
            aspect-ratio: 4/3;
        }
        .gallery-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }
        .gallery-item:hover img {
            transform: scale(1.05);
        }
        .gallery-caption {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 1.5rem;
            background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
            color: white;
            font-weight: 500;
        }
        .parents-section {
            padding: 5rem 0;
            background-color: #ffffff;
        }
        .parents-card {
            background: linear-gradient(135deg, #f0f4ff 0%, #e6ebff 100%);
            border-radius: 25px;
            padding: 3rem;
        }
        .parents-title {
            font-size: 3rem;
            font-weight: 700;
            color: #1e3a5f;
            margin-bottom: 1.5rem;
            line-height: 1.2;
        }
        .parents-text {
            color: #4a6fa5;
            font-size: 1rem;
            line-height: 1.7;
            margin-bottom: 2rem;
        }
        .tag-pill {
            display: inline-block;
            background-color: #55c592;
            color: white;
            padding: 0.5rem 1.25rem;
            border-radius: 25px;
            font-size: 0.875rem;
            font-weight: 500;
            margin-right: 0.75rem;
            margin-bottom: 0.75rem;
        }
        .btn-resources {
            background-color: #ff3b5c;
            color: white;
            border: none;
            padding: 0.75rem 1.75rem;
            border-radius: 25px;
            font-weight: 600;
            margin-top: 1rem;
            transition: all 0.3s ease;
        }
        .btn-resources:hover {
            background-color: #e03250;
            color: white;
        }
        .parents-image-wrapper {
            position: relative;
            border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(0,0,0,0.1);
            animation: morph 8s ease-in-out infinite;
        }
        @keyframes morph {
            0%, 100% {
                border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
            }
            50% {
                border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
            }
        }
        .parents-image-wrapper img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .cta-section {
            background-color: #ff6b35;
            padding: 5rem 0;
            position: relative;
            overflow: hidden;
        }
        .cta-title {
            font-size: 4.5rem;
            font-weight: 700;
            color: white;
            margin-bottom: 1.5rem;
        }
        .cta-text {
            color: white;
            font-size: 1.1rem;
            line-height: 1.6;
            margin-bottom: 2rem;
            max-width: 900px;
            margin-left: auto;
            margin-right: auto;
        }
        .cta-buttons {
            display: flex;
            gap: 1rem;
            justify-content: center;
            flex-wrap: wrap;
        }
        .btn-cta-outline {
            background-color: transparent;
            color: white;
            border: 2px solid white;
            padding: 0.75rem 2rem;
            border-radius: 30px;
            font-weight: 600;
            transition: all 0.3s ease;
        }
        .btn-cta-outline:hover {
            background-color: white;
            color: #ff6b35;
        }
        .impact-section {
            padding: 5rem 0;
            background-color: #ffffff;
            position: relative;
            overflow: hidden;
        }
        .impact-title {
            font-size: 4.5rem;
            font-weight: 700;
            color: #1e3a5f;
            margin-bottom: 0.5rem;
        }
        .impact-subtitle {
            color: #4a6fa5;
            font-size: 1.25rem;
            font-weight: 500;
            margin-bottom: 3rem;
        }
        .map-background {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 80%;
            max-width: 800px;
            opacity: 0.15;
            z-index: 0;
        }
        .impact-cards {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 1.5rem;
            position: relative;
            z-index: 2;
        }
        .impact-card {
            padding: 2.5rem 1.5rem;
            border-radius: 20px;
            text-align: center;
            transition: transform 0.3s ease;
        }
        .impact-card:hover {
            box-shadow: 0 15px 40px rgba(0,0,0,0.1);
        }
        .impact-card.orange {
            background-color: #ff6b35;
            color: white;
        }
        .impact-card.navy {
            background-color: #1e3a5f;
            color: white;
        }
        .impact-card.light-blue {
            background-color: #f0f4ff;
            color: #1e3a5f;
        }
        .impact-card.yellow {
            background-color: #ffdc80;
            color: #1e3a5f;
        }
        .impact-card.blue {
            background-color: #4a6fa5;
            color: white;
        }
        .impact-icon {
            font-size: 2.5rem;
            margin-bottom: 1rem;
        }
        .impact-number {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 0.25rem;
        }
        .impact-label {
            font-size: 1rem;
            font-weight: 500;
        }
        .footer-section {
            padding: 5rem 0;
            background-color: #ffffff;
        }
        .footer-logo {
            display: flex;
            align-items: center;
        }
        .footer-logo svg {
            height: 80px;
        }
        .footer-title {
            font-size: 1.5rem;
            font-weight: 700;
            color: #1e3a5f;
            margin-bottom: 1.5rem;
        }
        .footer-contact p {
            color: #4a6fa5;
            font-size: 1rem;
            line-height: 1.7;
            margin-bottom: 0.5rem 0;
        }
        .social-icons {
            display: flex;
            gap: 1rem;
            margin-bottom: 1.5rem;
        }
        
        .social-icon {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            transition: transform 0.3s ease;
            border: none;
            outline: none;
            box-shadow: none;
            text-decoration: none;
            
        }
        .social-icon:hover {
            opacity: 0.9;
        }
        .social-icon.facebook {
            background-color: #1877f2;
            color: white;
        }
        .social-icon.instagram {
            background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
            color: white;
        }
        .social-icon.youtube {
            background-color: #ff0000;
            color: white;
        }
        .social-icon.tiktok {
            background-color: #000;
            color: white;
        }
        .social-icon.linkedin {
            background-color: #0a66c2;
            color: white;
        }
        .footer-copyright {
            color: #4a6fa5;
            font-size: 0.9rem;
            line-height: 1.6;
        }
        .fade-in {
            opacity: 0;
            transform: translateY(40px);
            transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .fade-in.visible {
            opacity: 1;
            transform: translateY(0);
        }
        .fade-in-left {
            opacity: 0;
            transform: translateX(-60px);
            transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .fade-in-left.visible {
            opacity: 1;
            transform: translateX(0);
        }
        .fade-in-right {
            opacity: 0;
            transform: translateX(60px);
            transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .fade-in-right.visible {
            opacity: 1;
            transform: translateX(0);
        }
        .fade-up {
            opacity: 0;
            transform: translateY(30px);
            transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .fade-up.visible {
            opacity: 1;
            transform: translateY(0);
        }
        .scale-in {
            opacity: 0;
            transform: scale(0.85);
            transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .scale-in.visible {
            opacity: 1;
            transform: scale(1);
        }
        @media (max-width: 991.98px) {
            .hero-title {
                font-size: 2.5rem;
            }
            .section-title {
                font-size: 2rem;
            }
            .parents-title {
                font-size: 2rem;
            }
            .cta-title {
                font-size: 2rem;
            }
            .impact-title {
                font-size: 3rem;
            }
            .parents-card {
                padding: 2rem;
            }
            .btn-primary-custom, .btn-outline-custom {
                width: 100%;
                margin-bottom: 1rem;
            }
            .program-card {
                margin-bottom: 3rem;
            }
            .gallery-grid {
                grid-template-columns: 1fr;
            }
            .parents-image-wrapper {
                margin-top: 2rem;
            }
            .impact-cards {
                grid-template-columns: repeat(2, 1fr);
            }
            .footer-section {
                text-align: center;
            }
            .footer-logo {
                justify-content: center;
                margin-bottom: 2rem;
            }
            .social-icons {
                justify-content: center;
            }
            .footer-contact {
                margin-bottom: 2rem;
            }
            
            .partners-grid {
                gap: 2rem !important;
            }
            /* Animations responsive adjustments */
            .fade-in-left {
                transform: translateX(-30px);
            }
            .fade-in-right {
                transform: translateX(30px);
            }
            .fade-in-left.visible, .fade-in-right.visible {
                transform: translateX(0);
            }
            /* Global responsive adjustments */
            h1, h2, h3 {
                word-wrap: break-word;
                overflow-wrap: break-word;
            }
            .container {
                padding-left: 15px;
                padding-right: 15px;
            }
            img {
                max-width: 100%;
                height: auto;
            }
        }

        @media (max-width: 575.98px) {
            .impact-cards {
                grid-template-columns: 1fr;
            }
            .hero-title {
                font-size: 2rem;
                margin-top: -4rem;
            }
            .section-title {
                font-size: 1.75rem;
            }
            .cta-buttons {
                flex-direction: column;
            }
            .btn-cta-outline {
                 width: 100%;
             }
             .gallery-caption {
                 padding: 1rem;
                 font-size: 0.9rem;
             }
             .parents-title {
                 font-size: 1.75rem;
             }
             .impact-title {
                 font-size: 3rem;
             }
         }
        
        /* Back to Top Button */
        .back-to-top {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 50px;
            height: 50px;
            background-color: #ff6b35;
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            cursor: pointer;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
            transition: all 0.3s ease;
            opacity: 0;
            visibility: hidden;
            z-index: 1000;
            border: none;
        }
        .back-to-top.show {
            opacity: 1;
            visibility: visible;
        }
        .back-to-top:hover {
            background-color: #e55a2b;
            color: white;
        }
        @media (max-width: 991.98px) {
            .hero-title {
                font-size: 2.5rem;
            }
            .section-title {
                font-size: 2rem;
            }
            .parents-title {
                font-size: 2rem;
            }
            .cta-title {
                font-size: 2rem;
            }
            .impact-title {
                font-size: 3rem;
            }
            .parents-card {
                padding: 2rem;
            }
            .btn-primary-custom, .btn-outline-custom {
                width: 100%;
                margin-bottom: 1rem;
            }
            .program-card {
                margin-bottom: 3rem;
            }
            .gallery-grid {
                grid-template-columns: 1fr;
            }
            .parents-image-wrapper {
                margin-top: 2rem;
            }
            .impact-cards {
                grid-template-columns: repeat(2, 1fr);
            }
            .footer-section {
                text-align: center;
            }
            .footer-logo {
                justify-content: center;
                margin-bottom: 2rem;
            }
            .social-icons {
                justify-content: center;
            }
            .footer-contact {
                margin-bottom: 2rem;
            }
            
            .partners-grid {
                gap: 2rem !important;
            }
            /* Animations responsive adjustments */
            .fade-in-left {
                transform: translateX(-30px);
            }
            .fade-in-right {
                transform: translateX(30px);
            }
            .fade-in-left.visible, .fade-in-right.visible {
                transform: translateX(0);
            }
            /* Global responsive adjustments */
            h1, h2, h3 {
                word-wrap: break-word;
                overflow-wrap: break-word;
            }
            .container {
                padding-left: 15px;
                padding-right: 15px;
            }
            img {
                max-width: 100%;
                height: auto;
            }
            /* Fix navbar margins for mobile */
            .navbar-collapse {
                margin-top: 1rem;
                margin-left: 0.5rem;
                margin-right: 0.5rem;
                padding: 1rem;
                border-top: 1px solid #eee;
                background-color: #fff;
                border-radius: 15px;
                box-shadow: 0 10px 30px rgba(0,0,0,0.05);
            }
            .navbar-nav {
                padding-bottom: 1rem;
            }
            .nav-link {
                margin: 0.5rem 0;
                padding-left: 1rem;
            }
            .nav-link.active::after {
                display: none;
            }
            .btn-enroll {
                width: 100%;
                text-align: center;
                margin-top: 0.5rem;
                margin-left: 0;
            }
            .hero-section {
                padding: 2rem 0;
            }
            .hero-image {
                margin-right: 0;
                margin-top: 2rem;
                border-radius: 30px;
            }

        }

        @media (max-width: 767.98px) {
            .impact-cards {
                grid-template-columns: 1fr;
            }
            .hero-title {
                font-size: 2rem;
                margin-top: 0;
            }
            .section-title {
                font-size: 1.75rem;
            }
            .cta-buttons {
                flex-direction: column;
            }
            .btn-cta-outline {
                 width: 100%;
             }
             .gallery-caption {
                 padding: 1rem;
                 font-size: 0.9rem;
             }
             .parents-title {
                 font-size: 1.75rem;
             }
             .impact-title {
                 font-size: 3rem;
             }
            .back-to-top {
                bottom: 25px;
                right: 20px;
                width: 45px;
                height: 45px;
                font-size: 1.25rem;
                box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            }
        }
    </style>
</head>
<body>
    <nav class="navbar navbar-expand-lg navbar-light bg-white">
        <div class="container px-0 px-lg-3">
            <a class="navbar-brand ms-0 ms-lg-3" href="<?php echo BASE_URL; ?>">
                <img src="<?php echo BASE_URL; ?>/assets/images/logo.jpg" alt="Stemspark Logo" class="logo-img">
            </a>
            <button class="navbar-toggler me-0 me-lg-3" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav me-auto ms-auto">
                    <li class="nav-item">
                        <a class="nav-link <?php echo (!isset($current_page) || $current_page == 'home') ? 'active' : ''; ?>" href="<?php echo BASE_URL; ?>">Home</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link <?php echo (isset($current_page) && $current_page == 'program') ? 'active' : ''; ?>" href="<?php echo BASE_URL; ?>/program">Program List</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link <?php echo (isset($current_page) && $current_page == 'jurnal') ? 'active' : ''; ?>" href="<?php echo BASE_URL; ?>/jurnal">Jurnal Exhibition & Hall of Fame</a>
                    </li>
                    
                    <li class="nav-item">
                        <a class="nav-link <?php echo (isset($current_page) && $current_page == 'about') ? 'active' : ''; ?>" href="<?php echo BASE_URL; ?>/about">About Us & Contact</a>
                    </li>
                </ul>
                <a href="https://wa.me/6285179545415" target="_blank" class="btn-enroll" style="text-decoration: none;">Enroll Now</a>
            </div>
        </div>
    </nav>
