/********** Template CSS **********/

:root {
    --primary: #7B4FE7;
    --primary-dark: #5A36B8;
    --accent: #FFF200;
    --secondary: #757575;
    --light: #FFFFFF;
    --dark: #2D1457;
}

/* General backgrounds and text */
body, .bg-light {
    background: var(--light) !important;
    color: var(--dark);
}

.bg-dark {
    background: var(--primary-dark) !important;
    color: var(--light);
}

.text-primary, .text-primary * {
    color: var(--primary) !important;
}

.text-accent {
    color: var(--accent) !important;
}

.btn-primary, .btn.btn-primary {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--light) !important;
}

.btn-primary:hover, .btn.btn-primary:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    color: var(--accent) !important;
}

.btn-outline-primary {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    background: var(--primary) !important;
    color: var(--light) !important;
}

/* Navbar */
.navbar, .navbar-light, .navbar-modern {
    background: var(--light) !important;
    color: var(--primary) !important;
}

.navbar .navbar-brand,
.navbar .navbar-brand *,
.navbar .navbar-nav .nav-link {
    color: var(--primary) !important;
}

.navbar .navbar-nav .nav-link.active, .navbar .navbar-nav .nav-link:hover {
    color: var(--accent) !important;
}

/* Section backgrounds */
.school-life-section, .facts, .stats-section, .newsletter-section, .courses, .team-item, .testimonial-item, .feature-highlight, .activity-card, .grade-card, .page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: var(--light) !important;
}

/* Cards and overlays */
.bg-white, .card, .activity-card, .feature-highlight, .grade-card {
    background: var(--light) !important;
    color: var(--primary-dark) !important;
    border: 1.5px solid var(--primary);
}

.courses-item .courses-overlay {
    background: rgba(123, 79, 231, 0.85) !important;
}

/* Gradients and motion borders */
.motion-border::after, .activity-timeline::before {
    background: linear-gradient(45deg, var(--primary), var(--accent), var(--primary-dark), var(--primary)) !important;
}

/* Icon backgrounds */
.btn-lg-square, .card-icon, .feature-icon, .timeline-icon {
    background: var(--primary) !important;
    color: var(--accent) !important;
    border: 2px solid var(--accent) !important;
}

.btn-lg-square.bg-primary, .btn-square.bg-primary {
    background: var(--primary) !important;
    color: var(--accent) !important;
}

/* Badges and highlights */
.activity-badge, .stat-label, .breadcrumb-item.active {
    background: var(--accent) !important;
    color: var(--primary-dark) !important;
    border-radius: 20px;
    font-weight: 600;
}

/* Newsletter, footer, copyright */
.footer, .copyright {
    background: var(--primary-dark) !important;
    color: var(--light) !important;
}

.footer .btn.btn-link, .footer .btn.btn-link:hover {
    color: var(--accent) !important;
}

/* Language toggle */
.language-switch {
    background: linear-gradient(45deg, var(--primary), var(--primary-dark));
    color: var(--accent);
    border: 2px solid var(--accent);
}
.language-switch:hover {
    background: linear-gradient(45deg, var(--primary-dark), var(--primary));
    color: var(--light);
}

.py-6 {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.my-6 {
    margin-top: 6rem;
    margin-bottom: 6rem;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}

/*** Spinner ***/

#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

/*** Button ***/

.btn {
    font-weight: 500;
    transition: .5s;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}

/*** Navbar ***/

.navbar.sticky-top {
    top: -100px;
    transition: .5s;
}

.navbar .navbar-brand,
.navbar a.btn {
    height: 80px
}

.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 25px 0;
    color: var(--dark);
    font-weight: 500;
    text-transform: uppercase;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
    }
    .navbar .navbar-nav {
        border-top: 1px solid #EEEEEE;
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }
    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}

/*** Header ***/

.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(0, 0, 0, .75);
    z-index: 1;
}

.carousel-control-prev,
.carousel-control-next {
    width: 15%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--primary);
    border: 10px solid var(--primary);
}

@media (max-width: 768px) {
    #header-carousel .carousel-item {
        position: relative;
        min-height: 450px;
    }
    #header-carousel .carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.page-header {
    background: linear-gradient(rgba(0, 0, 0, .75), rgba(0, 0, 0, .75)), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: cover;
}

.breadcrumb-item+.breadcrumb-item::before {
    color: #999999;
}

.page-header h1, .page-header .breadcrumb, .page-header .breadcrumb-item, .page-header .breadcrumb-item a {
    color: var(--primary) !important;
}

/*** Facts ***/

@media (min-width: 991.98px) {
    .facts {
        position: relative;
        margin-top: -75px;
        z-index: 1;
    }
}

/*** Courses ***/

.courses {
    min-height: 100vh;
    background: linear-gradient(rgba(255, 255, 255, .9), rgba(255, 255, 255, .9)), url(../img/carousel-1.jpg) center center no-repeat;
    background-attachment: fixed;
    background-size: cover;
}

.courses-item .courses-overlay {
    position: absolute;
    width: 100%;
    height: 0;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .5);
    overflow: hidden;
    opacity: 0;
    transition: .5s;
}

.courses-item:hover .courses-overlay {
    height: 100%;
    opacity: 1;
}

/*** Team ***/

.team-items {
    margin: -.75rem;
}

.team-item {
    padding: .75rem;
}

.team-item::after {
    position: absolute;
    content: "";
    width: 100%;
    height: 0;
    top: 0;
    left: 0;
    background: #FFFFFF;
    transition: .5s;
    z-index: -1;
}

.team-item:hover::after {
    height: 100%;
    background: var(--primary);
}

.team-item .team-social {
    position: absolute;
    width: 100%;
    height: 0;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .75);
    overflow: hidden;
    opacity: 0;
    transition: .5s;
}

.team-item:hover .team-social {
    height: 100%;
    opacity: 1;
}

/*** Testimonial ***/

.testimonial-carousel .owl-dots {
    height: 40px;
    margin-top: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 20px;
    height: 20px;
    background: transparent;
    border: 2px solid var(--primary);
    transition: .5s;
}

.testimonial-carousel .owl-dot.active {
    width: 40px;
    height: 40px;
    background: var(--primary);
}

.testimonial-carousel .owl-item img {
    width: 150px;
    height: 150px;
}

/*** Footer ***/

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: var(--light);
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--light);
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--primary);
    letter-spacing: 1px;
    box-shadow: none;
}

.copyright {
    background: #092139;
}

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

.copyright a:hover {
    color: var(--light);
}

/*** School Life & Activities Section ***/

.school-life-section {
    background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.school-life-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.school-life-section .text-primary {
    color: #fff !important;
}

.school-life-section h1,
.school-life-section h3,
.school-life-section h5,
.school-life-section p {
    color: #fff;
}

/* Activity Timeline Styles */
.activity-timeline {
    position: relative;
    padding: 2rem 0;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(45deg, #8B5CF6, #A855F7, #C084FC, #DDD6FE);
    transform: translateX(-50%);
    animation: timelineGlow 3s ease-in-out infinite;
}

@keyframes timelineGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.5); }
    25% { box-shadow: 0 0 20px rgba(168, 85, 247, 0.5); }
    50% { box-shadow: 0 0 20px rgba(192, 132, 252, 0.5); }
    75% { box-shadow: 0 0 20px rgba(221, 214, 254, 0.5); }
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.timeline-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.timeline-icon {
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #8B5CF6, #A855F7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.1); }
}

.timeline-content {
    margin-left: 2rem;
}

.timeline-content h5 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.timeline-content p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.timeline-content .time {
    display: inline-block;
    background: linear-gradient(45deg, #8B5CF6, #A855F7);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Activity Cards with Motion Borders */
.activity-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.activity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.activity-card:hover::before {
    left: 100%;
}

.activity-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #8B5CF6, #A855F7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.card-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

.activity-card:hover .card-icon::before {
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.activity-card h5 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.activity-card p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.activity-badge {
    display: inline-block;
    background: linear-gradient(45deg, #8B5CF6, #A855F7);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.activity-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.activity-card:hover .activity-badge::before {
    left: 100%;
}

/* Feature Highlights */
.feature-highlight {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.feature-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-highlight:hover::before {
    opacity: 1;
}

.feature-highlight:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #8B5CF6, #A855F7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.feature-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

.feature-highlight:hover .feature-icon::after {
    width: 100%;
    height: 100%;
}

.feature-content h4 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-content p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.feature-list li i {
    color: #8B5CF6;
    margin-right: 0.8rem;
    font-size: 1.1rem;
}

/* Motion Border Animation */
.motion-border {
    position: relative;
}

.motion-border::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(45deg, #8B5CF6, #A855F7, #C084FC, #DDD6FE, #8B5CF6);
    background-size: 400% 400%;
    animation: borderGlow 3s ease-in-out infinite;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
}

@keyframes borderGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .activity-timeline::before {
        left: 20px;
    }
    
    .timeline-icon {
        left: -5px;
    }
    
    .timeline-content {
        margin-left: 3rem;
    }
    
    .activity-card {
        margin-bottom: 2rem;
    }
    
    .feature-highlight {
        margin-bottom: 2rem;
    }
}

/* Floating Animation for Elements */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.school-life-section .wow {
    animation-duration: 1.5s;
}

/* Particle Effect */
.school-life-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: particleFloat 15s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(120deg); }
    66% { transform: translateY(10px) rotate(240deg); }
}

/* Language Toggle Button */
.language-switch {
    background: linear-gradient(45deg, var(--primary), #A855F7);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.language-switch:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background: linear-gradient(45deg, #A855F7, var(--primary));
}

.language-switch:active {
    transform: translateY(0);
}