<?php include'includes/session.php';?>
<?php include'includes/header.php';?>
<?php include'includes/sidebar.php';?>
<?php include'includes/navbar.php';?>
<?php include'includes/functions.php';?>
<style>
.insider{
    margin-top: -50px;
}        
@media (max-width: 768px) {
    
}
.the-logo{
    margin-top: 0!important;
}
@media(max-width: 992px){
  .icon-card i{
    font-size: 46px;
  }
  .content-card h4{
    font-size: 20px;
  }
  .content-card span{
    font-size: 18px;
  }
}
.banner {
    width: 100%;
    /*background: linear-gradient(135deg, #062d8f, #1c4eff);*/
    background: linear-gradient(to left, #f1f1f1, #062d8f);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    color: #fff;
    border-radius: 6px;
    padding: 20px 30px;
    font-family: sans-serif;
}

.top-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.banner-left h5 {
    font-weight: bold;
    font-size: 22px;
    margin: 0;
}

.banner-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #ccc;
    
}

.cred {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 16px;
}

.cred p {
    margin: 0;
}

@media (max-width: 768px) {
    
    .banner {
        padding: 15px 20px;
    }

    .banner-left h5 {
        font-size: 12px;
    }

    .banner-img {
        width: 45px;
        height: 45px;
    }

    .cred {
        flex-direction: column;
        gap: 5px;
        font-size: 14px;
    }

    .top-details {
        flex-direction: row;
        align-items: flex-start;
        gap: 10px;
    }
}
</style>
<style>
.package-box {
  background: #fff;
  border-radius: 10px;
  padding: 25px;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}
.package-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}
#basic{
    border-left: 1px solid blue;
    border-top: 1px solid blue;
}
#junior{
    border-left: 1px solid #157347;
    border-top: 1px solid #157347;
}
#senior{
    border-right: 1px solid #255f91;
    border-top: 1px solid #255f91;
}
.the-text-info{
    color: #255f91;
}
.package-header {
  font-weight: bold;
  text-align: center;
  font-size: 1.2rem;
  margin-bottom: 15px;
}
.package-price {
  text-align: center;
  font-size: 1.5rem;
  color: #007bff;
  font-weight: 600;
  margin-bottom: 15px;
}
.package-items li {
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}
.package-items li{
    display: flex; 
    align-items: center; 
    justify-content: space-between;
}
</style>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<?php
// Get student avatar
$avat = "SELECT photo_path FROM student_image WHERE adminNo = ?";
$avastmt = $pdo->prepare($avat);
$avastmt->execute([$adminNo]);
$therow = $avastmt->FETCH(PDO::FETCH_ASSOC);
$stdImg = $therow['photo_path'];

// count Subject
$sql = "SELECT subject FROM teacher_assignments WHERE class = ?";
$sql_sub = $pdo->prepare($sql);
$sql_sub->execute([$current_class]);
$count_subj = $sql_sub->rowCount();


// School Payment Info

?>
<div class="insider">
    <div class="container">
        <div class="banner">
            <div class="top-details">
                <div class="banner-left">
                    <h5>Welcome back, <?= $surName?>!</h5>
                </div>
                <div class="banner-right">
                    <div class="banner-img" style="background: url('images/avatar/<?=$stdImg?>') no-repeat center center/cover;">
                    </div> 
                </div>
            </div>
            <div class="cred">
                <p><strong>Class:</strong> <?=$current_class?></p>
                <p><strong>Session:</strong> <?=$current_session?></p>
                <p><strong>Term:</strong> <?=$current_term?> Term</p>
            </div>
        </div>
        
        <div class="all-cards">
            <div class="row row-cols-2">
                <div class="col-lg-3 mt-3">
                    <a href="my-subjects.php">
                        <div class="single-card success">
                            <div class="content-card">
                                <h4><?=$count_subj?></h4>
                                <span>My Subjects</span>
                            </div>
                            <div class="icon-card">
                                <!-- <label>$</label> -->
                                <i class="fa fa-book"></i>
                            </div>
                        </div>
                    </a>
                </div>

                <div class="col-lg-3 mt-3">
                    <a href="my_results.php">
                        <div class="single-card info">
                            <div class="content-card">
                                <!-- <h4>12</h4> -->
                                <span>My Results</span>
                            </div>
                            <div class="icon-card">
                                <i class="fa fa-file-alt"></i>
                            </div>
                        </div>
                    </a>
                </div>

                <div class="col-lg-3 mt-3">
                    <a href="result_history.php">
                        <div class="single-card primary">
                            <div class="content-card">
                                <!-- <h4>12</h4> -->
                                <span>History</span>
                            </div>
                            <div class="icon-card">
                                <i class="fa fa-history"></i>
                            </div>
                        </div>
                    </a>
                </div>

                <div class="col-lg-3 mt-3">
                    <a href="profile.php">
                        <div class="single-card invoice">
                            <div class="content-card">
                                <h4>01</h4>
                                <span>My Profile</span>
                            </div>
                            <div class="icon-card">
                                <i class="fa fa-user"></i>
                            </div>
                        </div>
                    </a>
                </div>

                
                                
            </div>
        </div>
    </div>

    <!-- <h5>School and national Anthem Here</h5> -->
    <!-- Basic -->
    <div class="container mt-2" style="padding-bottom: 20px;">
        <div class="row justify-content-center g-4 mt-4">
            <div class="col-md-6">
              <div class="package-box" id="basic">
                <div class="package-header text-primary" style="border-bottom: 1px solid #ccc; font-weight: bold;">
                    <i class="fa fa-seedling"></i>All Package Fees
                </div>
                <!-- <div class="package-price">₦10,000</div> -->
                <ul class="list-unstyled package-items">
                    
                </ul>
                <div class="text-center mt-3">
                    <button class="btn btn-primary btn-sm">
                        Check Back
                    </button>
                </div>
              </div>
            </div>

            <!-- Junior -->
            <div class="col-md-6">
              <div class="package-box" id="junior">
                <div class="package-header text-success" 
                    style="border-bottom: 1px solid #ccc; 
                    font-weight: bold;">
                    <i class="fa fa-user-graduate"></i>School Anthem
                </div>
                <ul class="list-unstyled package-items">
                    
                </ul>
                <div class="text-center mt-3">
                    <button class="btn btn-success btn-sm">
                        Check back
                    </button>
                </div>
              </div>
            </div>
        </div>
    </div>
   
</div>





<?php include'includes/footer.php';?>