/********** Template CSS **********/
:root {
    --primary: #4F46E5;
    --light: #F3F4F6;
    --dark: #111827;
    --secondary: #10B981;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    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.btn-primary {
    color: #FFFFFF;
}

.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;
    border-radius: 50px;
}


/*** Heading ***/
h1,
h2,
h3,
h4,
.h1,
.h2,
.h3,
.h4,
.display-1,
.display-2,
.display-3,
.display-4,
.display-5,
.display-6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 800;
    color: var(--dark);
}

h5,
h6,
.h5,
.h6 {
    font-weight: 600;
}

.font-secondary {
    font-family: 'Inter', sans-serif;
}


/*** Navbar ***/
.navbar .navbar-nav .nav-link {
    padding: 30px 15px;
    color: var(--dark);
    font-weight: 500;
    outline: none;
    font-family: 'Heebo', sans-serif;
}

.navbar,
.navbar .btn {
    font-family: 'Heebo', sans-serif;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

.navbar.sticky-top {
    top: -100px;
    transition: .5s;
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 5px;
    transition: .5s;
}

.navbar .dropdown-toggle[aria-expanded=true]::after {
    transform: rotate(-180deg);
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar .navbar-nav {
        margin-top: 15px;
        border-top: 1px solid #EEEEEE;
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        top: calc(100% - 15px);
        margin-top: 0;
        opacity: 0;
        visibility: hidden;
        transition: .5s;

    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Header ***/
.header-carousel::before,
.header-carousel::after,
.page-header::before,
.page-header::after {
    position: absolute;
    content: "";
    width: 100%;
    height: 10px;
    top: 0;
    left: 0;
    background: url(../img/bg-header-top.png) center center repeat-x;
    z-index: 1;
}

.header-carousel::after,
.page-header::after {
    height: 19px;
    top: auto;
    bottom: 0;
    background: url(../img/bg-header-bottom.png) center center repeat-x;
}

@media (max-width: 768px) {
    .header-carousel .owl-carousel-item {
        position: relative;
        min-height: 400px;
    }

    .header-carousel .owl-carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .header-carousel .owl-carousel-item .d-flex {
        padding-top: 60px !important;
        /* Prevent overlap with top wave */
        padding-bottom: 60px !important;
        /* Prevent overlap with bottom wave */
    }

    .header-carousel .owl-carousel-item p {
        font-size: 14px !important;
        font-weight: 400 !important;
        margin-bottom: 15px !important;
    }

    .header-carousel .owl-carousel-item h1 {
        font-size: 22px !important;
        line-height: 1.2;
        margin-bottom: 15px !important;
    }

    .header-carousel .owl-nav {
        top: auto;
        bottom: 20px;
        right: 20px;
        transform: none;
        flex-direction: row;
        width: auto;
        /* Ensure it doesn't span full width */
    }

    .header-carousel .owl-nav .owl-prev,
    .header-carousel .owl-nav .owl-next {
        margin: 0 5px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

.header-carousel .owl-nav {
    position: absolute;
    top: 50%;
    right: 8%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
}

.header-carousel .owl-nav .owl-prev,
.header-carousel .owl-nav .owl-next {
    margin: 7px 0;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: transparent;
    border: 1px solid #FFFFFF;
    border-radius: 45px;
    font-size: 22px;
    transition: .5s;
}

.header-carousel .owl-nav .owl-prev:hover,
.header-carousel .owl-nav .owl-next:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.page-header {
    background: linear-gradient(rgba(0, 0, 0, .2), rgba(0, 0, 0, .2)), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: cover;
}

.breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, .5);
}


/*** About ***/
.about-img img {
    transition: .5s;
}

.about-img img:hover {
    background: var(--primary) !important;
}


/*** Classes ***/
.classes-item {
    transition: .5s;
}

.classes-item:hover {
    margin-top: -10px;
}


/*** Team ***/
.team-item .team-text {
    position: absolute;
    width: 250px;
    height: 250px;
    bottom: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: #FFFFFF;
    border: 17px solid var(--light);
    border-radius: 250px;
    transition: .5s;
}

.team-item:hover .team-text {
    border-color: var(--primary);
}


/*** Footer ***/
.footer .btn.btn-social {
    margin-right: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: .3s;
}

.footer .btn.btn-social:hover {
    border-color: var(--primary);
    background: var(--primary);
    transform: translateY(-2px);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    font-size: 16px;
    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;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--primary) !important;
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .form-control {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.footer .copyright {
    padding: 25px 0;
    font-size: 15px;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: #FFFFFF;
}

.footer .footer-menu a {
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, .1);
}

.footer .copyright a:hover,
.footer .footer-menu a:hover {
    color: var(--primary) !important;
}

.footer .footer-menu a:last-child {
    margin-right: 0;
    padding-right: 0;
    border-right: none;
}

/*** Custom CTA Image Visibility ***/
@media (max-width: 991.98px) {
    .cta-image {
        min-height: auto !important;
    }

    .cta-image .position-relative {
        height: auto !important;
        object-fit: contain !important;
    }
}

/********** Mobile-First Refinements **********/

/* Global Mobile Spacing & Typography */
@media (max-width: 575.98px) {
    .container-fluid.py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    h1,
    .h1,
    .display-2 {
        font-size: 1.75rem !important;
    }

    h2,
    .h2 {
        font-size: 1.5rem !important;
    }

    p,
    .fs-5 {
        font-size: 0.95rem !important;
        line-height: 1.6;
    }

    .btn:not(.btn-square):not(.btn-sm-square):not(.btn-lg-square) {
        padding: 0.8rem 1.5rem !important;
        font-size: 0.9rem;
    }
}

/* Navbar Mobile Polish */
@media (max-width: 991.98px) {
    .navbar-brand h1 {
        font-size: 1.5rem !important;
    }

    .navbar-toggler {
        padding: 0.5rem;
        border: none;
        outline: none !important;
        box-shadow: none !important;
    }

    .navbar-collapse {
        background: #FFFFFF;
        margin: 0 -1.5rem;
        padding: 0 1.5rem 1.5rem;
        border-bottom: 5px solid var(--primary);
    }
}

/* Hero Carousel Mobile Balance */
@media (max-width: 767.98px) {
    .header-carousel .owl-carousel-item {
        min-height: 450px;
    }

    .header-carousel .owl-carousel-item .col-10,
    .header-carousel .owl-carousel-item .col-11 {
        width: 100% !important;
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 20px;
        text-align: center;
    }

    .header-carousel .owl-carousel-item .d-flex {
        justify-content: center !important;
    }

    .header-carousel .owl-carousel-item .col-lg-8 {
        margin: 0 auto;
    }
}

/* Classes Component Refinement */
@media (max-width: 575.98px) {
    .classes-item .row.g-1>div {
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 15px;
    }

    .classes-item .row.g-1>div:last-child {
        margin-bottom: 0;
    }

    .classes-item .bg-light.rounded-circle {
        width: 60% !important;
    }
}

/* Form Touch Targets */
@media (max-width: 575.98px) {
    .form-floating>.form-control {
        height: 60px;
        padding-top: 1.625rem;
        padding-bottom: 0.625rem;
    }

    .form-floating>label {
        padding: 1rem 0.75rem;
    }
}

/* Footer Mobile Center */
@media (max-width: 767.98px) {

    .footer .col-lg-3,
    .footer .col-md-6 {
        text-align: center;
        margin-bottom: 2rem;
    }

    .footer .d-flex.pt-2 {
        justify-content: center;
    }

    .footer .btn-link {
        text-align: center;
    }

    .footer .btn-link::before {
        display: none;
    }
}