body {
    font-family: 'calibri', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f8f9fa;
    /* Light background */
    padding-top: 7 0px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'calibri', sans-serif;
    font-weight: 700;
    color: #39A958;
    /* Primary dark blue for headings */
}

.text-primary {
    color: #39A958 !important;
    /* Brand primary color */
}

.btn-primary {
    background-color: #39A958;
    border-color: #39A958;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #39A958;
    border-color: #39A958;
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: #39A958;
    border-color: #39A958;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: #39A958;
    color: #fff;
    transform: translateY(-2px);
}

/* Navbar Customizations */
.navbar {
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.95) !important;
    /* Slightly translucent */
}

/* Navbar Customizations */
.navbar {
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.95) !important;

    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar-brand .text-primary {
    color: #39A958 !important;
}

.navbar-nav .nav-link {
    color: #333 !important;
    font-weight: 500;
    padding: 0.8rem 1.2rem;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: #39A958;
    left: 50%;
    bottom: 5px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: calc(100% - 2.4rem);
    /* Adjust width to match padding */
    left: 1.2rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #39A958 !important;
}

/* Navbar Scroll Effect */
.navbar-scrolled {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* -------------------------------------------------
   1. Top-bar (green) – hide on scroll
   ------------------------------------------------- */
#topBar {
    transition: transform 0.35s ease, opacity 0.35s ease;
}

#topBar.hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    /* no accidental clicks */
}

/* -------------------------------------------------
   2. Navbar – sticky after top-bar leaves viewport
   ------------------------------------------------- */
#mainNavbar {
    transition: all 0.35s ease;
}

#mainNavbar.fixed-top {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, .98) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
}

/* -------------------------------------------------
   3. Desktop-only search (lg+)
   ------------------------------------------------- */
#desktopSearch {
    display: none;
    /* hidden by default (mobile) */
}

@media (min-width: 992px) {

    /* lg breakpoint */
    #desktopSearch {
        display: flex !important;
    }
}

/* Mobile search toggle (already in your markup) – keep it hidden on lg+ */
@media (min-width: 992px) {

    #mobileSearchCollapse,
    .d-lg-none [data-bs-target="#mobileSearchCollapse"] {
        display: none !important;
    }
}

/* -------------------------------------------------
   4. Body padding when navbar is fixed
   ------------------------------------------------- */
body.navbar-padded {
    padding-top: 0;
    /* will be set by JS */
}

/* Hero Section */
.hero-section {
    position: relative;
    background-color: #39A958;
    /* Fallback */
    padding: 100px 0;
}

.hero-section .overlay {
    background: rgba(0, 0, 0, 0.6);
}

.hero-section h1 {
    font-size: 3.5rem;
    color: #fff;
}

.hero-section p.lead {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 767.98px) {
    .hero-section {
        min-height: 400px !important;
        text-align: center !important;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }
}

/* Card Styles & Hover Effects */
.card {
    border: none;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .175) !important;
}

/* Dean's Message */
#dean-message .blockquote {
    border-left: 5px solid #39A958;
    padding-left: 1.5rem;
}

#dean-message .blockquote p {
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.8;
}

/* Tab Navigation */
.nav-tabs {
    border-bottom: 1px solid #dee2e6;
}

.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-weight: 600;
}

.nav-tabs .nav-link.active {
    color: #39A958;
    border-bottom-color: #39A958;
    background-color: transparent;
}

.nav-tabs .nav-link:hover {
    color: #39A958;
    border-bottom-color: #a7c2e1;
    /* Lighter hover color */
}


/* Top Scorers - Individual Card Colors (optional) */
#scorers .card-body {
    background-color: #fff;
}

#scorers .border-primary {
    border-color: #39A958 !important;
}

#scorers .border-success {
    border-color: #39A958 !important;
}

#scorers .border-info {
    border-color: #17a2b8 !important;
}

#scorers .border-warning {
    border-color: #ffc107 !important;
}


/* Testimonials Carousel */
#testimonialCarousel .carousel-control-prev-icon,
#testimonialCarousel .carousel-control-next-icon {
    background-color: #39A958;
    border-radius: 50%;
    padding: 15px;
}

#testimonialCarousel .card {
    background-color: #fff;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .05);
}


/* Social & Government Links */
.list-group-item {
    transition: all 0.3s ease;
    border-radius: 0.5rem !important;
    margin-bottom: 0.5rem;
    background-color: #fff;
}

.list-group-item:hover {
    background-color: #e9ecef;
    transform: translateX(5px);
}

/* Map Section */
#contact iframe {
    border-radius: 0.75rem;
}


.contact-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.contact-links a {
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.contact-links a:hover {
    color: #f8f9fa !important;
}

.contact-links a span[dir="ltr"] {
    display: inline-block;
    padding-left: 0.25rem;
}

.rtl-mode .contact-links {
    justify-content: flex-start;
}

.rtl-mode .contact-links a.me-3 {
    margin-right: 0 !important;
    margin-left: 1rem !important;
}

.rtl-mode .contact-links a.me-lg-4 {
    margin-left: 1.5rem !important;
    margin-right: 0 !important;
}

.rtl-mode .contact-links a:last-child {
    margin-left: 0 !important;
}

.rtl-mode .contact-links a span[dir="ltr"] {
    padding-left: 0 !important;
    padding-right: 0.25rem !important;
}


/* Footer */
footer {
    background-color: #39A958 !important;
    /* Darker footer */
    color: #f8f9fa;
}

footer .text-primary {
    color: #a7c2e1 !important;
    /* Lighter primary for footer headings */
}

footer a {
    color: #adb5bd;
    /* Light grey for links */
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #f8f9fa;
    /* White on hover */
}

footer .social-icons a {
    font-size: 1.5rem;
    color: #adb5bd;
    margin-right: 15px;
}

footer .social-icons a:hover {
    color: #a7c2e1;
}

/* Visitor Counter */
#visitorCount {
    color: #ffc107;
    /* Accent color for the counter */
    font-size: 1.2rem;
}


/* Utility Classes & Animations (optional but good for modern feel) */
.fade-in-up {
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    body {
        /* This is a safe estimate. You may need to inspect the exact mobile height. */
        padding-top: 180px;
    }

    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1020;
        max-height: calc(100vh - 76px);
        overflow-y: auto;

        background-color: #fff;
        padding: 1rem;
        border-radius: 0.5rem;
        margin-top: 0.5rem;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .15);
    }

    .navbar-toggler {
        border-color: #39A958;
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 45, 98, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    .navbar-nav .nav-link::after {
        left: 0;
        width: 100%;
        bottom: 0;
    }

    .navbar-nav .nav-link:hover::after,
    .navbar-nav .nav-link.active::after {
        width: 100%;
        left: 0;
    }

    .navbar .btn-primary {
        width: 100%;
        margin-top: 1rem;
    }

    .navbar .form-control {
        width: calc(100% - 70px);
        /* Adjust for search button */
        display: inline-block;
    }

    .navbar .d-flex {
        justify-content: center;
        width: 100%;
    }
}



/* Add this to your style.css or a <style> block */

:root {
    --primary-color: #39A958;
    /* NEXA Primary Blue */
    --primary-hover: #001f46;
    /* A slightly darker shade for hover effects */
}

/* Ensure primary colors are applied globally */
.text-primary {
    color: var(--primary-color) !important;
}

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

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

.border-primary {
    border-color: var(--primary-color) !important;
}

/* RTL Class: This is the core change */
.rtl-mode {
    direction: rtl;
    /* Changes text flow, alignment, and table orientation */
    text-align: right;
}

/* RTL adjustments for specific elements */
.rtl-mode .navbar-collapse {
    justify-content: flex-start !important;
    /* Forces nav items to start from the right */
}

.rtl-mode .navbar-brand {
    margin-right: auto;
    /* Push logo to the right */
    margin-left: 0 !important;
}

.rtl-mode .blockquote {
    border-left: none !important;
    border-right: 5px solid var(--primary-color) !important;
    padding-left: 0 !important;
    padding-right: 1.5rem !important;
}

.rtl-mode .text-md-start {
    text-align: right !important;
    /* Fix alignment in the hero section */
}

.rtl-mode .justify-content-md-start {
    justify-content: flex-end !important;
    /* Push CTA buttons to the right */
}

.rtl-mode .btn i.ms-2 {
    margin-right: 0.5rem !important;
    /* Flip icon margin */
    margin-left: 0 !important;
}

.rtl-mode .btn i.ms-1 {
    margin-right: 0.25rem !important;
    margin-left: 0 !important;
}

.rtl-mode .me-1 {
    margin-right: 0 !important;
    margin-left: 0.25rem !important;
    /* Flip margin for icons */
}

.rtl-mode .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
    /* Flip margin for icons */
}

.rtl-mode .me-3 {
    margin-right: 0 !important;
    margin-left: 1rem !important;
    /* Flip margin for social links */
}

.rtl-mode .dropdown-menu {
    text-align: right;
}

/* Ensure the utility bar components align correctly */
.rtl-mode .top-bar-container {
    flex-direction: row-reverse;
}

.rtl-mode .social-links {
    flex-direction: row-reverse;
}

.rtl-mode .social-links a.me-3 {
    margin-right: 0 !important;
    margin-left: 1rem !important;
}

.rtl-mode .d-flex.me-3 {
    margin-right: 0 !important;
    margin-left: 1rem !important;
}

.rtl-mode .input-group-sm> :not(input) {
    border-top-right-radius: var(--bs-border-radius-sm);
    border-bottom-right-radius: var(--bs-border-radius-sm);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.rtl-mode .input-group-sm>input {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: var(--bs-border-radius-sm);
    border-bottom-left-radius: var(--bs-border-radius-sm);
}
