/********** Template CSS **********/
:root {
    --primary: #F3BD00;
    --secondary: #757575;
    --light: #F3F6F8;
    --dark: #0C2B4B;
}

.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.btn-primary,
.btn.btn-outline-primary:hover {
    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;
}


/*** Navbar ***/
/* Keep the sticky navbar visible at the top by default. The script will only toggle a shadow
   when the page is scrolled instead of moving the navbar on/off screen. */
.navbar.sticky-top {
    top: 0;
    transition: .25s;
}

/* Visual enhancement for navbar */
.navbar {
    background: linear-gradient(180deg, #ffffff, #fbfbfb);
    transition: background .3s ease, padding .25s ease, box-shadow .25s ease;
}

/* Shrink navbar when scrolled to provide more viewport space */
.navbar.navbar-scrolled {
    padding-top: 6px;
    padding-bottom: 6px;
}

.navbar .navbar-brand h2 {
    color: var(--dark);
    font-weight: 700;
}

.navbar .navbar-brand i.fa-car {
    color: var(--primary);
}

/* Mobile CTA styling inside collapsed menu */
.mobile-cta {
    font-weight: 700;
    padding: 12px 18px;
    border-radius: 6px;
}

.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) {

    /* Desktop dropdown: floating panel with shadow and smooth animation */
    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 120%;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: transform .22s ease, opacity .22s ease, visibility .22s;
        min-width: 200px;
        background: #ffffff;
        border-radius: 8px;
        box-shadow: 0 12px 30px rgba(11, 24, 40, 0.08);
        padding: 6px 0;
        z-index: 1055;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transform: translateY(0);
        opacity: 1;
    }

    /* Dropdown items spacing and hover */
    .navbar .dropdown-menu .dropdown-item {
        padding: 10px 18px;
        color: var(--dark);
        font-weight: 600;
        transition: background .15s ease, color .15s ease;
    }

    .navbar .dropdown-menu .dropdown-item:hover {
        background: rgba(243, 189, 0, 0.08);
        color: var(--primary);
    }

    /* Rotate caret when menu open */
    .navbar .nav-item.show>.nav-link.dropdown-toggle::after,
    .navbar .nav-item:hover>.nav-link.dropdown-toggle::after {
        transform: rotate(180deg);
    }
}

/* Mobile: make dropdown behave as part of the collapsed panel (static, full-width) */
@media (max-width: 991.98px) {
    .navbar .dropdown-menu {
        position: static !important;
        box-shadow: none !important;
        background: transparent !important;
        border-radius: 0 !important;
        padding: 0 !important;
    }

    .navbar .dropdown-menu .dropdown-item {
        padding: 12px 16px;
        color: var(--dark);
        background: transparent;
    }

    .navbar .nav-item .dropdown-toggle::after {
        margin-left: 6px;
    }
}

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 3px 3px 12px rgba(0, 0, 0, 0.4);
}

.whatsapp-float img {
    width: 35px;
    height: 35px;
}


/*** 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;
    }
}

/* Mobile performance tweaks */
@media (max-width: 991.98px) {

    /* Avoid fixed background on mobile where it's costly and can cause scroll issues */
    .courses {
        background-attachment: scroll;
    }
}

/* Mobile navbar improvements */
@media (max-width: 991.98px) {

    /* Reduce brand height and allow wrapping so logo + tagline fit */
    .navbar .navbar-brand,
    .navbar a.btn {
        height: auto;
        padding: 10px 16px;
    }

    .navbar .navbar-brand h2 {
        font-size: 1.1rem;
        line-height: 1.1;
        margin: 0;
    }

    .navbar .navbar-brand small {
        display: block;
        font-size: .7rem;
        color: var(--secondary);
        margin-top: 2px;
    }

    /* Make the collapsed menu a full-width panel with a light shadow for clarity */
    .navbar-collapse {
        position: relative;
    }

    /* `.navbar-collapse.collapse` intentionally left out to avoid empty ruleset; default collapse behavior applies */

    .navbar-collapse.show {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        z-index: 1050;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
        padding-bottom: 12px;
    }

    .navbar .navbar-nav {
        padding: 8px 16px;
    }

    .navbar .navbar-nav .nav-link {
        padding: 12px 0;
        margin-right: 0;
        text-transform: none;
        /* easier to read on small screens */
        font-weight: 600;
    }

    /* Ensure the large CTA button shows under the menu and doesn't overlap */
    .navbar .btn.d-none.d-lg-block {
        display: none !important;
    }
}

@media (max-width: 480px) {

    /* On very small phones reduce the hero height so CTAs remain visible */
    #header-carousel .carousel-item {
        min-height: 300px;
    }

    .carousel-caption h1.display-2 {
        font-size: 2rem;
    }
}

.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;
}


/*** 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);
}

/* Mobile contact bar and responsive map tweaks */
@media (max-width: 992px) {
    .mobile-contact-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        background: #0c2b4b;
        color: #fff;
        display: flex;
        gap: 8px;
        padding: 10px 12px;
        align-items: center;
        justify-content: space-around;
        z-index: 1060;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
    }

    .mobile-contact-bar a {
        color: #fff;
        text-decoration: none;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    /* Prevent the bar from covering page content */
    body {
        padding-bottom: 72px;
    }

    /* Make embedded maps shorter on phones */
    .contact-iframe {
        min-height: 240px !important;
    }
}

@media (min-width: 993px) {
    body {
        padding-bottom: 0;
    }
}

/* Override inline min-height values on small screens to avoid very tall blocks */
@media (max-width: 992px) {

    /* target elements that use inline style="min-height: 400px;" */
    .position-relative[style*="min-height: 400px"] {
        min-height: 260px !important;
    }

    /* target col-lg-6 containers that have min-height: 450px inline */
    .col-lg-6[style*="min-height: 450px"] {
        min-height: 260px !important;
    }

    /* ensure iframe uses reduced height on small screens */
    iframe.contact-iframe[style*="min-height: 450px"] {
        min-height: 240px !important;
    }
}