/********** Template CSS **********/
:root {
    --primary: #06A3DA;
    --secondary: #F57E57;
    --light: #EEF9FF;
    --dark: #091E3E;
}

h1,
h2,
.font-weight-bold {
    font-weight: 700 !important;
}

h3,
h4,
.font-weight-semi-bold {
    font-weight: 600 !important;
}

h5,
h6,
.font-weight-medium {
    font-weight: 500 !important;
}

.btn {
    font-family: 'Jost', sans-serif;
    font-weight: 600;
    transition: .5s;
}

.btn-primary,
.btn-secondary {
    color: #FFFFFF;
}

.btn-primary:hover {
    background: var(--secondary);
    border-color: var(--secondary);
}

.btn-secondary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-square {
    width: 36px;
    height: 36px;
}

.btn-sm-square {
    width: 28px;
    height: 28px;
}

.btn-lg-square {
    width: 46px;
    height: 46px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}

#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;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}

.top-shape::before {
    position: absolute;
    content: "";
    width: 35px;
    height: 100%;
    top: 0;
    left: -17px;
    background: var(--primary);
    transform: skew(40deg);
}

.navbar-light .navbar-nav .nav-link {
    font-family: 'Jost', sans-serif;
    padding: 35px 15px;
    font-size: 18px;
    color: var(--dark);
    outline: none;
    transition: .5s;
}

.sticky-top.navbar-light .navbar-nav .nav-link {
    padding: 20px 15px;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary);
}

.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(9, 30, 62, .25);
    z-index: 1;
}

.carousel-control-prev,
.carousel-control-next {
    width: 10%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
}

.section-title h5::before {
    position: absolute;
    content: "";
    width: 45px;
    height: 3px;
    right: -55px;
    bottom: 11px;
    background: var(--primary);
}

.section-title h5::after {
    position: absolute;
    content: "";
    width: 15px;
    height: 3px;
    right: -75px;
    bottom: 11px;
    background: var(--secondary);
}

.twentytwenty-wrapper {
    height: 100%;
}

.hero-header {
    background: linear-gradient(rgba(9, 30, 62, .25), rgba(9, 30, 62, .25)), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: cover;
}

.bg-appointment {
    background: linear-gradient(rgba(9, 30, 62, .25), rgba(9, 30, 62, .25)), url(../img/banner/04.png) center center no-repeat;
    background-size: cover;
}

.appointment-form {
    background: rgba(6, 163, 218, .7);
}

.service-item img,
.service-item .bg-light,
.service-item .bg-light h5,
.team-item .team-text {
    transition: .5s;
}

.service-item:hover img {
    transform: scale(1.15);
}

.team-item .team-text::after,
.service-item .bg-light::after {
    position: absolute;
    content: "";
    top: 50%;
    bottom: 0;
    left: 15px;
    right: 15px;
    border-radius:100px / 15px;
    box-shadow: 0 0 15px rgba(0, 0, 0, .7);
    opacity: 0;
    transition: .5s;
    z-index: -1;
}

.team-item:hover .team-text::after,
.service-item:hover .bg-light::after {
    opacity: 1;
}

.bg-offer {
    background:url(../img/banner/02.png) center center no-repeat;
    background-size: cover;
}

.offer-text {
    background: rgba(6, 163, 218, .25);
}

.price-carousel .owl-nav {
    position: absolute;
    width: calc(100% + 45px);
    height: 45px;
    top: calc(50% - 22.5px);
    left: -22.5px;
    display: flex;
    justify-content: space-between;
    opacity: 0;
    transition: .5s;
}

.price-carousel:hover .owl-nav {
    opacity: 1;
}

.price-carousel .owl-nav .owl-prev,
.price-carousel .owl-nav .owl-next {
    position: relative;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: var(--primary);
    border-radius: 2px;
    font-size: 22px;
    transition: .5s;
}

.price-carousel .owl-nav .owl-prev:hover,
.price-carousel .owl-nav .owl-next:hover {
    background: var(--secondary);
}

.bg-testimonial {
    background: url(../img/banner/03.png) center center no-repeat;
    background-size: cover;
}

.testimonial-carousel {
    background: rgba(6, 163, 218, .25);
}

.testimonial-carousel .owl-nav {
    position: absolute;
    width: calc(100% + 46px);
    height: 46px;
    top: calc(50% - 23px);
    left: -23px;
    display: flex;
    justify-content: space-between;
    z-index: 1;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    position: relative;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: var(--primary);
    border-radius: 2px;
    font-size: 22px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    background: var(--secondary);
}

.testimonial-carousel .owl-item img {
    width: 120px;
    height: 120px;
}

.team-row-centered {
    justify-content: center !important;
}

.gallery-section-wrapper {
    background-color: #f8f9fa;
}

.gallery-section-title {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 15px;
}

.gallery-section-subtitle {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 700px;
    margin: 0 auto;
}

.gallery-item {
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 350px;
    object-fit: contain;
    display: block;
    transition: transform 0.4s ease;
    background-color: #fff;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* --- CSS for Nested Dropdown (Desktop View) --- */
.dropdown-menu .dropdown-submenu {
    position: relative;
}

.dropdown-menu .dropdown-submenu .dropdown-menu {
    top: -8px;
    left: 100%;
    margin-left: .1rem;
    display: none;
    position: absolute;
}

.dropdown-menu > .dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

.dropdown-menu .dropdown-toggle::after {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: .255em;
    vertical-align: .255em;
    content: "";
    border-top: .3em solid transparent;
    border-right: 0;
    border-bottom: .3em solid transparent;
    border-left: .3em solid;
}


/* ============================================= */
/* === RESPONSIVE FIXES FOR MOBILE AND TABLET === */
/* ============================================= */
@media (max-width: 991.98px) {
    /* General Navbar links */
    .navbar-light .navbar-nav .nav-link,
    .sticky-top.navbar-light .navbar-nav .nav-link {
        padding: 10px 0;
    }

    /* --- Mobile Dropdown Fixes --- */
    .dropdown-menu .dropdown-submenu .dropdown-menu {
        position: static; /* Removes side positioning */
        display: none; /* Hide by default */
        margin-top: .5rem;
        border: 0;
        box-shadow: none;
        background-color: #f8f9fa; /* Lighter background for nested items */
    }

    /* When a submenu is opened via JS, it gets a 'show' class */
    .dropdown-menu .dropdown-submenu .dropdown-menu.show {
        display: block;
    }

    /* Indent nested links slightly */
    .dropdown-menu .dropdown-submenu .dropdown-menu .dropdown-item {
        padding-left: 2rem;
    }
    
    /* Rotate the arrow when a submenu is clicked */
    .dropdown-menu .dropdown-submenu .dropdown-toggle::after {
        transform: rotate(-90deg);
        transition: transform .2s ease-in-out;
    }
    
    /* Carousel text size on small screens */
    .carousel-caption h5 {
        font-size: 14px;
        font-weight: 500 !important;
    }
    .carousel-caption h1 {
        font-size: 30px;
        font-weight: 600 !important;
    }

    /* Hide the skewed shape on the top bar that causes overflow */
    .top-shape::before {
        display: none;
    }

    /* Contains the Price Carousel navigation arrows inside the screen */
    .price-carousel .owl-nav {
        width: 100%;
        left: 0;
        opacity: 1; /* Makes arrows always visible on mobile */
    }

    /* Contains the Testimonial Carousel navigation arrows inside the screen */
    .testimonial-carousel .owl-nav {
        width: 100%;
        left: 0;
    }

    /* A final safety rule to hide any horizontal scrollbars */
    body, html {
        overflow-x: hidden;
    }
}
