@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Sinhala:wght@700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    background-color: #ffffff;
    color: #000000;
}

/* Header */
header.fixed-top {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.navbar-dark .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-login {
    background: linear-gradient(90deg, #ffc107, #ff9800);
    color: #212529;
    border: none;
    border-radius: 50px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
    color: #212529;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255,255,255,.8);
    margin: 0 15px;
    padding-bottom: 5px;
    position: relative;
}

.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
}

.navbar-dark .navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15px;
    right: 15px;
    height: 2px;
    background-color: #00d1b2;
}

/* Carousel */
#heroCarousel {
    height: 100vh;
}

.carousel-item {
    height: 100vh;
    background-size: cover;
    background-position: center;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.288);
}

.carousel-caption {
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    text-align: center;
}

.carousel-caption h1 {
    font-family: 'Noto Sans Sinhala', sans-serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.5;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 25px;
}

.btn-outline-light {
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 25px;
}

/* Carousel Controls & Indicators */
.carousel-control-prev, .carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    transition: background-color 0.3s ease;
}

.carousel-control-prev:hover, .carousel-control-next:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid #fff;
    opacity: 0.5;
    margin: 0 8px;
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    opacity: 1;
    background-color: #ffc107;
    border-color: #ffc107;
    transform: scale(1.2);
}

/* Features Section */
.features-section {
    background-color: #f8f9fa;
}

.feature-card {
    background-color: #fff;
    padding: 40px 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    height: 70px;
    margin-bottom: 15px;
}

/* Process Section */
.process-icon-wrapper {
    width: 80px;
    height: 80px;
    background-color: #f8f9fa; /* Light grey background */
    border: 2px solid #e9ecef; /* Slightly darker border */
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0d6efd; /* Bootstrap primary blue */
    transition: all 0.3s ease;
}

.process-step:hover .process-icon-wrapper {
    background-color: #0d6efd;
    color: #fff;
    transform: scale(1.1);
}

.process-step {
    position: relative;
}

/* Connecting lines for desktop */
@media (min-width: 768px) {
    .process-step:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 40px; /* Vertically center with the icon */
        left: 50%;
        width: 100%;
        height: 2px;
        background-color: #e9ecef;
        z-index: -1;
    }
}

/* Promo Banner / CTA Section */
.promo-banner-section {
    position: relative;

    background-size: cover;
    padding: 100px 0;
    margin: 40px 0; /* Add some margin to separate it */
}

.promo-banner-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.288);
    z-index: 1;
}

.promo-banner-section .container {
    position: relative;
    z-index: 2;
}

.promo-banner-section .btn-warning {
    padding: 15px 30px;
    font-weight: bold;
    border-radius: 50px;
    transition: transform 0.3s ease;
}

.promo-banner-section .btn-warning:hover {
    transform: scale(1.05);
}

/* Telegram Channels Section */
.multi-channel-section {
    background-color: #f8f9fa;
}

.telegram-card {
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 20px;
    border-radius: 15px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease-in-out;
    height: 100%;
}

.telegram-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1);
    color: inherit;
}

.telegram-card img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 20px;
    object-fit: cover;
    border: 2px solid #eee;
}

.telegram-card .channel-info {
    line-height: 1.3;
}

.telegram-card .channel-handle {
    color: #6c757d;
    font-size: 0.9rem;
}

/*--------------------------------------------------------------
# Footer Section
--------------------------------------------------------------*/
.footer-section {
    background-color: #f8f9fa; /* Light background for the newsletter part */
    font-size: 14px;
}

.footer-newsletter {
    padding: 50px 0;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
}

.footer-newsletter .newsletter-wrapper {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.07);
    text-align: center;
}

.footer-newsletter h4 {
    font-size: 24px;
    margin: 0 0 20px 0;
    padding: 0;
    line-height: 1;
    font-weight: 600;
}

.footer-newsletter form {
    margin-top: 30px;
    position: relative;
}

.footer-newsletter .form-control {
    border-radius: 50px;
    padding: 10px 20px;
}

.footer-newsletter .btn-subscribe {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #ffc107;
    color: #212529;
    border: 0;
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: bold;
    transition: 0.3s;
}

.footer-newsletter .btn-subscribe:hover {
    background: #ffca2c;
}

.footer-main {
    background: #212529; /* Dark background for main footer */
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0;
}

.footer-main .footer-info .logo {
    line-height: 1;
    margin-bottom: 20px;
    color: #fff;
    text-decoration: none;
}

.footer-main .footer-info .logo img {
    max-height: 40px;
    margin-right: 10px;
}

.footer-main .footer-info .logo span {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    font-family: 'Poppins', sans-serif;
}

.footer-main .footer-info p {
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
}

.footer-main .footer-contact p {
    margin-bottom: 5px;
}

.footer-main .footer-contact i {
    margin-right: 8px;
    color: #ffc107;
}

.footer-main .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    margin-right: 10px;
    transition: 0.3s;
}

.footer-main .social-links a:hover {
    background: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.footer-main .footer-links {
    margin-bottom: 30px;
}

.footer-main .footer-links h4 {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 15px;
    padding-bottom: 10px;
    position: relative;
}

.footer-main .footer-links h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background: #ffc107;
}

.footer-main .footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-main .footer-links ul li {
    padding: 8px 0;
}

.footer-main .footer-links ul a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: 0.3s;
}

.footer-main .footer-links ul a:hover {
    color: #fff;
}

.footer-main .footer-working-hours h4 {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 15px;
    padding-bottom: 10px;
    position: relative;
}

.footer-main .footer-working-hours h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background: #ffc107;
}

.footer-bottom {
    padding: 20px 0;
    background: #1a1d20;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom .copyright {
    float: left;
}

.footer-bottom .credits {
    float: right;
    font-size: 13px;
}

.footer-bottom .credits a {
    color: #ffc107;
    text-decoration: none;
    transition: 0.3s;
}

.footer-bottom .credits a:hover {
    color: #fff;
}

/*--------------------------------------------------------------
# Contact Section
--------------------------------------------------------------*/
.contact-section .contact-split-wrapper {
    border-radius: 15px;
    overflow: hidden;
}

.contact-section .contact-info-split {
    background-color: #0d6efd; /* Professional Blue */
    color: #fff;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-section .contact-info-split .info-item {
    font-size: 1.1rem;
}

.contact-section .contact-info-split .info-item i {
    font-size: 1.5rem;
    width: 30px; /* Align icons */
}

.contact-section .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-section .social-icon:hover {
    background-color: #fff;
    color: #0d6efd;
    transform: scale(1.1);
}

.contact-section .contact-form-split {
    background-color: #fff;
    padding: 50px;
}

.contact-section .form-floating > .form-control {
    height: calc(3.5rem + 2px);
    padding: 1rem 0.75rem;
}

.contact-section .form-floating > label {
    padding: 1rem 0.75rem;
}

.contact-section .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.contact-section .btn-primary {
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-section .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px rgba(13, 110, 253, 0.5);
}

/* Scroll Animation */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/*--------------------------------------------------------------
# Animated Stats Section
--------------------------------------------------------------*/
.stats-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    overflow: hidden;
}

.stat-item {
    position: relative;
    z-index: 2;
    padding: 20px 0;
}

.stat-item i {
    color: #ffc107; /* Bright yellow for contrast */
    text-shadow: 0 0 15px rgba(255, 193, 7, 0.7);
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.stat-item:hover i {
    transform: scale(1.1);
    text-shadow: 0 0 25px rgba(255, 193, 7, 1);
}

.stat-counter {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

.stat-item p {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Fixed Elements */
.winner-badge {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1031; /* Higher than navbar */
}

.winner-badge img {
    height: 40px;
}

.hotline {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 16px;
    z-index: 1031; /* Higher than navbar */
    background-color: rgba(0,0,0,0.5);
    padding: 5px 10px;
    border-radius: 5px;
}

/* Add your custom styles here */

.promo-banner-section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 100px 0;
    color: #fff;
}

.promo-banner-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); 
    z-index: 1;
}

.promo-content-wrapper {
    position: relative;
    z-index: 2;
}

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
    .carousel-caption h1 {
        font-size: 38px;
    }
}

/* About Teacher Section */
.about-teacher-section {
    overflow: hidden; /* Contains floats */
}

.about-teacher-section .about-teacher-content h2 {
    color: #212529;
}

.about-teacher-section .blockquote {
    border-left: none;
    padding: 0;
}



.about-teacher-section .seal-image {
    max-width: 110px;
    height: auto;
}

/* Gallery Filter Buttons */
.filter-button-group .btn {
    border-radius: 50px;
    padding: 10px 30px;
    margin: 0 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-width: 2px;
    transition: all 0.3s ease;
}

.filter-button-group .btn.active {
    background-color: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
}

.filter-button-group .btn:not(.active):hover {
    background-color: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
}

/* Final Paper Class Section */
.final-paper-section {background: #CEC9C3;
    background: linear-gradient(8deg, rgba(206, 201, 195, 1) 20%, rgba(255, 255, 255, 1) 100%);}

.feature-card {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    transition: all 0.4s ease;
    overflow: hidden;
    position: relative;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.feature-card .read-more-btn {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    border-radius: 50px;
    font-weight: 600;
}

.feature-card:hover .read-more-btn {
    opacity: 1;
    transform: translateY(0);
}

.final-paper-section .icon-wrapper {
    background-color: #fff7e6;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Gallery Section - Isotope */
.gallery-item {
    margin-bottom: 30px;
}

.gallery-img-wrapper {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 15px;
}

.gallery-img-wrapper img {
    width: 100%;
    height: auto;
    transition: transform 0.4s ease;
}

.gallery-img-wrapper:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.gallery-img-wrapper:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
}


/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
    .promo-banner-section {
        display: none;
    }

    .carousel-control-prev,
    .carousel-control-next {
        display: none;
    }

    .carousel-caption {
        width: 80%; /* Prevent text from touching edges */
    }

    .carousel-caption h1 {
        font-size: 28px;
        line-height: 1.4;
    }

    .hero-buttons .btn {
        padding: 10px 20px;
        font-size: 1rem; /* Reset from btn-lg */
    }

    .winner-badge img {
        height: 60px;
    }

    .hotline {
        font-size: 12px;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .carousel-caption h1 {
        font-size: 24px;
    }

    .hero-buttons .btn {
        display: block;
        width: 70%;
        margin: 10px auto !important; /* Stack and center buttons */
    }
}


/*--------------------------------------------------------------
# Top 20 Ranks Section - Modern Look
--------------------------------------------------------------*/
.top-ranks-section {
    padding: 80px 0;
    background-color: #f8f9fa; /* Lighter grey background */
}

.rank-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative; /* Crucial for popover positioning */
    margin-bottom: 30px;
    z-index: 1;
}

.rank-card:hover {
    transform: translateY(-12px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    z-index: 2; /* Bring card to front on hover */
}

.rank-card-small {
    padding: 20px 15px;
}

.rank-number {
    font-size: 24px;
    font-weight: 800;
    color: #0d6efd;
    margin-bottom: 12px;
}

.rank-name {
    font-size: 1rem;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 8px;
    line-height: 1.3;
}

.rank-percentage {
    font-size: 0.9rem;
    color: #495057;
    font-weight: 600;
}

/* Modern Popover Styles */
.rank-popover {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 105%; /* Position above the card */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    width: 240px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.rank-card:hover .rank-popover {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Popover Arrow */
.rank-popover::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
}

.rank-hover-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: -50px auto 15px;
    border: 4px solid #0d6efd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    background-color: #fff;
}

.rank-hover-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 5px;
}

.rank-hover-school {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 12px;
}

.rank-hover-percentage {
    font-size: 1rem;
    font-weight: 700;
    color: #0d6efd;
    margin-bottom: 18px;
}

.rank-hover-btn {
    background-color: #0d6efd;
    color: #fff;
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    transition: background-color 0.2s ease;
}

.rank-hover-btn:hover {
    background-color: #0b5ed7;
}
