/********** 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 ***/
.navbar.sticky-top {
    top: -100px;
    transition: .5s;
}

.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) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


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

.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 is hidden visually (code kept intact) */
.page-header .breadcrumb {
    display: none;
}


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


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


/*** Appointment Form ***/
.appointment-form-card {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: clamp(22px, 3vw, 36px);
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid rgba(12, 43, 75, 0.08);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(12, 43, 75, 0.08), 0 3px 10px rgba(12, 43, 75, 0.04);
}

.appointment-form-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9edf2;
}

.appointment-form-title {
    margin: 0 0 6px;
    font-size: clamp(1.35rem, 1.2vw + 1rem, 1.7rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--dark);
}

.appointment-form-subtitle {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--secondary);
}

/* Success / error message rendered inside the card, above the fields. */
.appointment-form-card .alert {
    margin-bottom: 24px;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.appointment-form-section + .appointment-form-section {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid #eef1f5;
}

.appointment-form-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1.3;
    color: var(--dark);
}

.appointment-form-section-title::after {
    content: '';
    flex: 1 1 auto;
    height: 1px;
    background: #e9edf2;
}

.appointment-form-section > :last-child {
    margin-bottom: 0;
}

.appointment-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.appointment-form-group {
    min-width: 0;
    margin-bottom: 18px;
}

.appointment-form-label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.4;
    color: var(--secondary);
}

.appointment-form-input,
.appointment-form-select,
.appointment-form-textarea {
    display: block;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    height: 50px;
    padding: 0 16px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--dark);
    background: #fbfcfe;
    border: 1px solid #dfe3e9;
    border-radius: 10px;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.appointment-form-input:focus,
.appointment-form-select:focus,
.appointment-form-select:focus-within,
.appointment-form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(243, 189, 0, 0.15);
}

.appointment-form-input::placeholder,
.appointment-form-textarea::placeholder {
    color: #98a1ac;
}

.appointment-form-textarea {
    height: auto;
    min-height: 112px;
    padding: 13px 16px;
    resize: vertical;
    overflow-wrap: anywhere;
}

.appointment-form-select {
    position: relative;
    display: block;
    padding-right: 44px;
    cursor: pointer;
}

.appointment-form-select select,
#transmission {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    -ms-appearance: none;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
    background: transparent;
    font: inherit;
    color: inherit;
    line-height: 1.5;
    cursor: pointer;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.appointment-form-select select::-ms-expand {
    display: none;
}

.appointment-form-select-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    pointer-events: none;
    transition: color 0.2s ease;
}

.appointment-form-select:hover .appointment-form-select-icon {
    color: var(--primary);
}

.appointment-form-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
    gap: 10px;
}

.appointment-form-checkbox {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 10px 14px;
    background: #fbfcfe;
    border: 1px solid #dfe3e9;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.appointment-form-checkbox:hover {
    border-color: #c6cdd6;
    background: #ffffff;
}

.appointment-form-checkbox:focus-within {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(243, 189, 0, 0.15);
}

.appointment-form-checkbox input {
    position: absolute;
    width: 0;
    height: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.appointment-form-checkbox-label {
    position: relative;
    flex: 1;
    min-width: 0;
    padding-left: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--dark);
    overflow-wrap: break-word;
    word-break: normal;
}

.appointment-form-checkbox-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: #ffffff;
    border: 1.5px solid #c3cad3;
    border-radius: 6px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.appointment-form-checkbox input:checked + .appointment-form-checkbox-label::before {
    content: '\f00c';
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 10px;
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
}

.appointment-form-checkbox:has(input:checked) {
    border-color: var(--primary);
    background: #fffdf3;
    box-shadow: 0 4px 12px rgba(243, 189, 0, 0.16);
}

/* Server-side CAPTCHA: image + input that always fit inside the card. */
.appointment-form-captcha-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
}

.appointment-form-captcha-image {
    flex: 0 1 auto;
    max-width: 100%;
    line-height: 0;
}

.appointment-form-captcha-img {
    display: block;
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
    border: 1px solid #dfe3e9;
    border-radius: 10px;
    background: #ffffff;
}

.appointment-form-captcha-field {
    flex: 1 1 190px;
    min-width: 0;
}

.appointment-form-captcha-hint {
    margin: 12px 0 0;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--secondary);
}

.appointment-form-submit {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid #eef1f5;
    text-align: center;
}

.appointment-form-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 14px 28px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.3;
    color: #ffffff;
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(243, 189, 0, 0.26);
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.appointment-form-btn:hover {
    background: #e2ad00;
    border-color: #e2ad00;
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(243, 189, 0, 0.32);
}

.appointment-form-btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(243, 189, 0, 0.28);
}

.appointment-form-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(243, 189, 0, 0.35);
}

.appointment-form-btn-icon {
    display: inline-flex;
    transition: transform 0.2s ease;
}

.appointment-form-btn:hover .appointment-form-btn-icon {
    transform: translateX(4px);
}

@media (max-width: 767.98px) {
    .appointment-form-card {
        padding: 22px 18px;
        border-radius: 14px;
    }

    .appointment-form-header {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }

    .appointment-form-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .appointment-form-checkboxes {
        grid-template-columns: 1fr;
    }

    .appointment-form-input,
    .appointment-form-select,
    .appointment-form-textarea,
    .appointment-form-checkbox-label {
        font-size: 16px;
    }

    .appointment-form-checkbox {
        padding: 12px 14px;
    }
}

@media (max-width: 480px) {
    .appointment-form-card {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .appointment-form-header {
        margin-bottom: 18px;
        padding-bottom: 14px;
    }

    .appointment-form-title {
        font-size: 1.3rem;
    }

    .appointment-form-section + .appointment-form-section {
        margin-top: 18px;
        padding-top: 18px;
    }

    .appointment-form-group {
        margin-bottom: 16px;
    }

    .appointment-form-submit {
        margin-top: 20px;
        padding-top: 18px;
    }
}

/*** Course & Appointment image height fix (CSS only) ***/
/* Stop the image wrapper from stretching to the opposite column's height;
   give it a controlled responsive height instead. Scoped via :has() so
   index.php / about.php (same markup pattern) are NOT affected. */
.row:has(> .col-lg-6 .appointment-form-card) > .col-lg-6 > .position-relative.overflow-hidden.h-100,
.row:has(> .col-lg-6 > .row.gy-5.gx-4:first-child) > .col-lg-6 > .position-relative.overflow-hidden.h-100 {
    height: 420px !important;
    min-height: 0 !important;
}

@media (max-width: 991.98px) {
    .row:has(> .col-lg-6 .appointment-form-card) > .col-lg-6 > .position-relative.overflow-hidden.h-100,
    .row:has(> .col-lg-6 > .row.gy-5.gx-4:first-child) > .col-lg-6 > .position-relative.overflow-hidden.h-100 {
        height: 340px !important;
    }
}

@media (max-width: 575.98px) {
    .row:has(> .col-lg-6 .appointment-form-card) > .col-lg-6 > .position-relative.overflow-hidden.h-100,
    .row:has(> .col-lg-6 > .row.gy-5.gx-4:first-child) > .col-lg-6 > .position-relative.overflow-hidden.h-100 {
        height: 260px !important;
    }
}

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

/* Flawless Responsive Hero Background Controls */
.hero-header {
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll;
    min-height: 70vh; /* Takes up 70% of the screen height on mobile */
}

/* Enhances the view on larger desktop screens */
@media (min-width: 992px) {
    .hero-header {
        min-height: 80vh; /* Expands to 80% height on desktop for maximum visual impact */
    }
}
