/* --- Custom Responsive Testimonial Tweaks (Dec 2025) --- */
@media (max-width: 576px) {
    .testimonial-item {
        padding: 10px 7px !important;
        margin-bottom: 1.1rem !important;
        border-radius: 0.7rem !important;
    }
    .testimonial-content {
        max-height: 90px !important;
        font-size: 0.98rem !important;
        line-height: 1.3 !important;
        padding: 0.2rem 0.1rem !important;
    }
    .testimonial-content.expanded {
        max-height: 1000px !important;
    }
    .testimonial-content .testimonial-text {
        font-size: 0.98rem !important;
        padding: 0 !important;
    }
    .testimonial-carousel .owl-item img {
        width: 60px !important;
        height: 60px !important;
    }
}
/* --- Custom Responsive Header Tweaks (Dec 2025) --- */
@media (max-width: 576px) {
    .nav-bar .header-title-responsive {
        font-size: 1.15rem !important;
        padding: 0.3rem 0 !important;
        line-height: 1.15 !important;
        letter-spacing: 0.2px !important;
        margin-bottom: 0 !important;
        white-space: normal !important;
        word-break: break-word !important;
    }
    .nav-bar .w-100.d-flex {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.2rem !important;
    }
    .nav-bar .row.py-3 {
        padding-top: 0.4rem !important;
        padding-bottom: 0.4rem !important;
    }
    .nav-bar .d-flex.d-md-none.align-items-center {
        min-width: 40px !important;
    }
    .nav-bar .header-phone {
        margin-top: 0.3rem !important;
    }
    .nav-bar .navbar-toggler {
        padding: 0.3rem 0.7rem !important;
        font-size: 1.1rem !important;
    }
    .nav-bar .navbar-nav .nav-link {
        font-size: 1rem !important;
        padding: 7px 8px !important;
    }
}
@media (max-width: 576px) {
    .test-modal-header-spaced h4 {
        font-size: 1rem !important;
        padding-right: 2.5rem !important; /* space for close button */
    }
    .test-modal-close-btn {
        top: 8px !important;
        right: 8px !important;
        width: 1.5rem !important;
        height: 1.5rem !important;
        z-index: 3;
    }
}
/* Custom style for Take Test button in new student section */
#takeTestBtn {
    background-color: #198754 !important; /* Bootstrap green */
    color: #fff !important;
    border: none !important;
}
#takeTestBtn:hover, #takeTestBtn:focus {
    background-color: #fff !important;
    color: #198754 !important;
    border: 2px solid #198754 !important;
}
/* Force black color for test modal header h4 (online driving test) */
#testModal .modal-header h4,
.test-modal-header-spaced h4 {
    color: #000 !important;
}
.modal-header#enrollmentModalLabel, #enrollmentModal .modal-header .modal-title {
    color: #000 !important;
}
@media (max-width: 576px) {
    #takeTestBtn,
    .btn[data-bs-target="#enrollmentModal"] {
        width: 100% !important;
        display: block;
        margin-top: 1.5rem !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .btn[data-bs-target="#enrollmentModal"] {
        margin-top: 0 !important;
    }
}
@media (max-width: 576px) {
    #takeTestBtn {
        margin-top: 1.5rem !important;
        display: block;
        width: 100%;
    }
}
/* Force black color for test modal header h4 */
.modal-header h4 {
    color: #000 !important;
}
@media (max-width: 576px) {
    .test-modal-header-spaced {
        min-height: 70px !important;
        padding-top: 1rem !important;
        padding-bottom: 0.7rem !important;
    }
    .test-modal-close-btn {
        top: 8px !important;
        right: 8px !important;
        width: 1.5rem !important;
        height: 1.5rem !important;
    }
    .test-modal-header-dark h4, .test-modal-header-dark .modal-title {
        font-size: 1.1rem !important;
    }
}
/* Custom: Extra spacing for test modal header and reposition close button */
.test-modal-header-spaced {
    min-height: 90px !important;
    padding-top: 1.5rem !important;
    padding-bottom: 1.2rem !important;
    position: relative;
}
.test-modal-close-btn {
    position: absolute !important;
    top: 18px !important;
    right: 18px !important;
    z-index: 2;
}
/* Custom: Test Modal Header Dark (Light Black) */
.test-modal-header-dark {
    background: #23272b !important;
    color: #fff !important;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    border-bottom: 3px solid #D4A762 !important;
}
.test-modal-header-dark .modal-title,
.test-modal-header-dark h4,
.test-modal-header-dark .modal-title.text-white,
.test-modal-header-dark h4.text-white {
    color: #fff !important;
}
.test-modal-header-dark .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}
/* Custom: Test Modal Header Grey */
.test-modal-header-grey {
    background: #f3f3f3 !important;
    color: #333 !important;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    border-bottom: 3px solid #D4A762 !important;
}
.test-modal-header-grey .modal-title,
.test-modal-header-grey h4 {
    color: #333 !important;
}
/* Custom: Test Modal Header */
.modal-header.bg-primary.text-white {
    background: #0d6efd !important;
    color: #fff !important;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    border-bottom: 3px solid #D4A762 !important;
}
.modal-header .modal-title,
.modal-header h4 {
    color: #FFD700 !important;
}
.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}
/* Ensure enrollment modal close button is always visible */
.enrollment-modal-close-btn {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
}
/* Mobile responsive styles for enrollment modal close button */
@media (max-width: 768px) {
    .enrollment-modal-close-btn {
        width: 2rem !important;
        height: 2rem !important;
        font-size: 1.2rem !important;
        padding: 0.5rem !important;
        margin: 0.5rem !important;
        position: absolute !important;
        top: 10px !important;
        right: 10px !important;
        z-index: 10 !important;
        background: rgba(255, 255, 255, 0.1) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat !important;
        border-radius: 50% !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.2s ease !important;
        color: white !important; /* Ensure icon color */
        cursor: pointer !important;
        pointer-events: auto !important;
    }
    .enrollment-modal-close-btn::before {
        content: "×" !important;
        font-size: 1.5rem !important;
        font-weight: bold !important;
        color: white !important;
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
    .enrollment-modal-close-btn:hover {
        background: rgba(255, 255, 255, 0.2) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat !important;
        transform: scale(1.1) !important;
    }
    #enrollmentModal .modal-header {
        position: relative !important;
        min-height: 70px !important;
        padding: 1rem 3rem 1rem 1rem !important; /* extra right padding for close button */
    }
    #enrollmentModal .modal-title {
        font-size: 1.1rem !important;
        padding-right: 1rem !important;
    }
}
/* Ensure input group for enrollments search is always horizontal and compact */
#enrollmentSearch, #enrollmentSearchBtn, #enrollmentRefreshBtn, .input-group-text {
    height: 52px !important;
    font-size: 1.2rem !important;
    box-sizing: border-box;
}
.input-group.flex-nowrap > * {
    margin-right: 0 !important;
    margin-left: 0 !important;
}
#enrollmentRefreshBtn {
    margin-left: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Testimonial card fixed height and read more (robust) */
.testimonial-content {
    max-height: 120px !important;
    overflow: hidden !important;
    position: relative;
    transition: max-height 0.3s;
    display: flex;
    flex-direction: column;
}
.testimonial-content.expanded {
    max-height: 1000px !important;
    overflow: visible !important;
}
.testimonial-content .testimonial-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}
.testimonial-content .read-more {
    display: block;
    color: #007bff;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 0.5rem;
    text-align: right;
    background: none;
    border: none;
    padding: 0;
}
.testimonial-content .read-more:focus {
    outline: none;
    text-decoration: underline;
}
/* Sticky header/navbar */
.nav-bar {
    /* position: sticky; */
    /* top: 0; */
    z-index: 1050;
    background: var(--bs-light);
}
@media (max-width: 576px) {
    .nav-bar .w-100 .d-flex.d-md-none i.fa-phone-alt {
        color: #27ae60 !important; /* Green for call icon */
    }
}
@media (max-width: 576px) {
    .nav-bar .header-phone {
        justify-content: flex-end !important;
        text-align: right !important;
    }
}
/* Responsive: Compact header for mobile */
@media (max-width: 576px) {
    .nav-bar h1 {
        font-size: 1.4rem !important;
        padding: 0.5rem 0 !important;
        line-height: 1.1 !important;
        letter-spacing: 0.5px !important;
        margin-bottom: 0 !important;
    }
    .nav-bar .row.py-3 {
        padding-top: 0.7rem !important;
        padding-bottom: 0.7rem !important;
    }
}

/*** Spinner Start ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .8s ease-out, visibility 0s linear .5s;
    z-index: 99999;
 }

 #spinner.show {
     transition: opacity .8s ease-out, visibility 0s linear .0s;
     visibility: visible;
     opacity: 1;
 }
/*** Spinner End ***/


.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}

h1, h2, h3, .h1, .h2, .h3 {
    font-weight: 600 !important;
    font-family: 'Montserrat', sans-serif !important;
}

h4, h5, h6, .h4, .h5, .h6 {
    font-weight: 600 !important;
    font-family: 'Open Sans', sans-serif !important;
}

.my-6 {
    margin-top: 6rem;
    margin-bottom: 6rem;
}

.py-6 {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.wow,
.animated {
    animation-duration: 2s !important;
}


/*** Button Start ***/
.btn.btn-primary {
    border: 0;
}

.btn.btn-primary:hover {
    background: var(--bs-dark) !important;
    color: var(--bs-primary) !important;
}

.btn {
    font-weight: 600;
    transition: .5s;
}

.btn-square {
    width: 32px;
    height: 32px;
}

.btn-sm-square {
    width: 38px;
    height: 38px;
}

.btn-md-square {
    width: 44px;
    height: 44px;
}

.btn-lg-square {
    width: 56px;
    height: 56px;
}

.btn-square,
.btn-sm-square,
.btn-md-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}
/*** Button End ***/


/*** Navbar Start ***/
.nav-bar {
    background: var(--bs-light);
    border-bottom: 1px solid rgba(0, 0, 0, .05);
}

.navbar .navbar-nav .nav-link {
    padding: 10px 12px;
    font-weight: 600;
    font-size: 17px;
    transition: .5s;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--bs-primary);
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 700;
    vertical-align: middle;
    margin-left: 8px;
}

@media (min-width: 1200px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        visibility: hidden;
        top: 100%;
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
        transition: .5s;
        opacity: 0;
    }
    
    .navbar .nav-item:hover .dropdown-menu {
        transform: rotateX(0deg);
        visibility: visible;
        opacity: 1;
    }
}

.dropdown .dropdown-menu a:hover {
    background: var(--bs-primary);
    color: var(--bs-white);
}

#searchModal .modal-content {
    background-color: rgba(255, 255, 255, .95);
}
/*** Navbar End ***/

@media (max-width: 768px) {
    .nav-bar {
        background: white !important;
    }
}

/*** Events Start ***/
.event .tab-class .nav-item a.active {
    background: var(--bs-primary) !important;
}

.event .event-img .event-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(212, 167, 98, 0.7);
    border-radius: 8px;
    transition: 0.5s;
    opacity: 0;
    z-index: 1;
}

.event .event-img:hover .event-overlay {
    opacity: 1;
}
/*** Events End ***/


/*** service start ***/
.service .service-item {
    position: relative;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
}

.service-content::after {
    position: absolute;
    content: "";
    width: 100%;
    height: 0;
    top: 0;
    left: 0;
    bottom: auto;
    background: var(--bs-primary);
    border-radius: 8px;
    transition: 1s;
}

.service-item:hover .service-content::after {
    height: 100%;
    opacity: 1;
}

.service-item .service-content-icon {
    position: relative;
    z-index: 2;
}

.service-item .service-content-icon i,
.service-item .service-content-icon p {
    transition: 1s;
}

.service-item:hover .service-content-icon i {
    color: var(--bs-dark) !important;
}

.service-item:hover .service-content-icon p {
    color: var(--bs-white);
}

.service-item:hover .service-content-icon a.btn-primary {
    background: var(--bs-white);
    color: var(--bs-dark);
}

.service-item .service-content-icon a.btn-primary {
    transition: 1s !important;
}
/*** Services End ***/


/*** Menu Start ***/
.menu .nav-item a.active {
    background: var(--bs-primary) !important;
}

.menu .menu-item .border-bottom {
    border-bottom-style: dashed !important;
}
/*** Menu End ***/


/*** Youtube Video start ***/
.video {
    position: relative;
    height: 100%;
    min-height: 400px;
    background: linear-gradient(rgba(254, 218, 154, 0.1), rgba(254, 218, 154, 0.1)), url(../img/fact.jpg);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 8px;
}

.video .btn-play {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    box-sizing: content-box;
    display: block;
    width: 32px;
    height: 44px;
    border-radius: 50%;
    border: none;
    outline: none;
    padding: 18px 20px 18px 28px;
}

.video .btn-play:before {
    content: "";
    position: absolute;
    z-index: 0;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 100px;
    height: 100px;
    background: var(--bs-primary);
    border-radius: 50%;
    animation: pulse-border 1500ms ease-out infinite;
}

.video .btn-play:after {
    content: "";
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 100px;
    height: 100px;
    background: var(--bs-white);
    border-radius: 50%;
    transition: all 200ms;
}

.video .btn-play img {
    position: relative;
    z-index: 3;
    max-width: 100%;
    width: auto;
    height: auto;
}

.video .btn-play span {
    display: block;
    position: relative;
    z-index: 3;
    width: 0;
    height: 0;
    border-left: 32px solid var(--bs-dark);
    border-top: 22px solid transparent;
    border-bottom: 22px solid transparent;
}

@keyframes pulse-border {
    0% {
        transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1.5);
        opacity: 0;
    }
}

#videoModal {
    z-index: 99999;
}

#videoModal .modal-dialog {
    position: relative;
    max-width: 800px;
    margin: 60px auto 0 auto;
}

#videoModal .modal-body {
    position: relative;
    padding: 0px;
}

#videoModal .close {
    position: absolute;
    width: 30px;
    height: 30px;
    right: 0px;
    top: -30px;
    z-index: 999;
    font-size: 30px;
    font-weight: normal;
    color: #FFFFFF;
    background: #000000;
    opacity: 1;
}
/*** Youtube Video End ***/


/*** Blog Start ***/
.blog-item {
    position: relative;
}

.blog-item img {
    transition: 0.5s;
}

.blog-item:hover img {
    transform: scale(1.3)
}

.blog-item .blog-content {
    position: relative;
    transform: translateY(-50%);
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
}

.blog-item .blog-content a.btn h5 {
    transition: 0.5s;
}

.blog-item:hover .blog-content a.btn h5 {
    color: var(--bs-primary) !important;
}
/*** Blog End ***/


/*** Team Start ***/
.team-item {
    width: 100%;
    height: 100%;
    position: relative;
}

.team-item .team-icon {
    position: absolute;
    top: 0;
    right: 0;
}

.team-item .team-icon .share-link {
    opacity: 0;
    transition: 0.9s;
}

.team-item:hover .share-link {
    opacity: 1;
}

.team-item .team-content {
    transition: 0.9s;
}

.team-item:hover .team-content {
    background: var(--bs-primary) !important;
    color: var(--bs-dark) !important;
}

.team-item .team-content h4,
.team-item .team-content p {
    transition: 0.5s;
}

.team-item:hover .team-content h4 {
    color: var(--bs-dark) !important;
}

.team-item:hover .team-content p {
    color: var(--bs-white);
}
/*** Team End ***/


/*** testimonial Start ***/
.testimonial-item {
    border: 1px solid var(--bs-primary);
    padding: 20px 20px;
}

.testimonial-carousel .owl-item img {
    width: 100px;
    height: 100px;
}

.testimonial-carousel.owl-rtl .testimonial-item {
    direction: ltr !important;
}
/*** testimonial End ***/


/*** Contact start ***/
.contact-form {
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
}

/*** Contact End ***/


/*** Footer Start ***/
.footer .footer-item a.text-body:hover {
    color: var(--bs-primary) !important;
}
/*** Footer End ***/



/* Custom nav link styling */
.nav-item.nav-link {
    color: #000;
    font-weight: bold;
}

.nav-item.nav-link:hover {
    color: #D4A762;
}

.nav-item.nav-link.active {
    color: #D4A762;
}

/* Reduce nav link font size on small devices */
@media (max-width: 576px) {
    .nav-item.nav-link {
        font-size: 0.85rem;
    }
}
