/********** Template CSS **********/
:root {
    /* Theme colors taken from the provided Santsams logo */
    --primary: #0D6EB8; /* logo blue */
    --accent:  #E03A2D; /* logo red */
    --secondary: #6C6F71; /* medium gray from logo */
    --light: #F8FAFB; /* near-white background */
    --dark: #0C2B4B; /* deep/navy for contrast */
}

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

/* Ensure Bootstrap primary button uses our --primary color */
.btn.btn-primary,
.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn.btn-primary:hover,
.btn-primary:hover {
    background-color: color-mix(in srgb, var(--primary) 85%, black 15%);
    border-color: color-mix(in srgb, var(--primary) 85%, black 15%);
}

/* Small helper for accent-coloured text */
.text-accent {
    color: var(--accent) !important;
}

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

/* Make team cards equal height and ensure images don't change layout
   - make the column containers flex so .team-item can stretch
   - make .team-item a column-flex layout so image area grows and the info area stays fixed
   - force images to cover their area (object-fit)
*/
.team-items .col-lg-3,
.team-items .col-md-6 {
    display: flex;
}

.team-items .col-lg-3 > .team-item,
.team-items .col-md-6 > .team-item {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.team-item .position-relative {
    flex: 1 1 auto; /* image/social area grows */
    min-height: 220px;
}

.team-item .position-relative img,
.team-item .position-relative .img-fluid {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.team-item .bg-light {
    flex: 0 0 auto; /* info area stays its natural height */
}

/* CEO quote styling */
.ceo-quote { position: relative; }
.ceo-quote .big-quote {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 4.5rem;
    line-height: 0.6;
    color: rgba(0,0,0,0.08);
    position: absolute;
    left: 10px;
    top: -10px;
}
.ceo-quote p { margin-left: 3.5rem; font-size: 0.95rem; }

@media (max-width: 576px) {
    .ceo-quote .big-quote { font-size: 3rem; left: 6px; }
    .ceo-quote p { margin-left: 2.8rem; }
}

/* Team bio tweak: ensure two-column bios match CEO styling and have balanced spacing */
.team-item.p-3 { padding: 1rem !important; }
.team-item .bg-light.ceo-quote { background: #f7f7f7; }
.team-item .big-quote { font-size: 3.5rem; color: rgba(0,0,0,0.06); left: 8px; top: -6px; }
.team-item .ceo-quote p { margin-left: 3rem; }

@media (max-width: 576px) {
    .team-item .big-quote { font-size: 2.2rem; left: 6px; }
    .team-item .ceo-quote p { margin-left: 2rem; }
}


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

/* Value icon subtle continuous motion */
@keyframes iconFloatRotate {
    0% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-6px) rotate(4deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(6px) rotate(-4deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

.value-icon-animate {
    animation: iconFloatRotate 6s ease-in-out infinite;
    will-change: transform;
}

/* ---------- Override: replace yellow/gold Bootstrap tones with brand accent red ---------- */
:root {
    /* Ensure Bootstrap utilities that use --bs-* vars render red instead of yellow */
    --bs-primary: #E03A2D; /* brand accent (red) */
    --bs-warning: #E03A2D;
    --bs-yellow:  #E03A2D;
}

/* Generic text/background utilities */
.text-primary, .link-primary {
    color: var(--accent) !important;
}
.bg-primary {
    background-color: var(--accent) !important;
}

/* Make cards equal height and ensure images don't change layout
   - Use flex layout for card containers so their image/content areas stretch uniformly
   - Constrain image display with object-fit: cover so different image heights don't change card size
*/
.courses-item, .team-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.courses-item .text-center {
    /* header/description area should not grow */
    flex: 0 0 auto;
}

.courses-item .position-relative {
    /* image/container grows to fill remaining space */
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.courses-item .position-relative img,
.team-item .position-relative img {
    width: 100%;
    height: 220px; /* consistent image height for cards */
    object-fit: cover;
    display: block;
}

.team-item .bg-light {
    /* keep footer/info area fixed */
    flex: 0 0 auto;
}

/* Smaller images on small screens to preserve vertical space */
@media (max-width: 767.98px) {
    .courses-item .position-relative img,
    .team-item .position-relative img {
        height: 160px;
    }
}


/* Primary buttons and outline versions */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.show>.btn-primary.dropdown-toggle {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
}
.btn-outline-primary {
    color: var(--accent) !important;
    border-color: var(--accent) !important;
}

/* Active/focus states that previously used yellow glows */
.btn-check:focus + .btn,
.btn:focus,
.btn-check:focus + .btn-primary,
.btn-primary:focus,
.btn-close:focus,
.page-link:focus,
.form-control:focus,
.form-select:focus,
.accordion-button:focus {
    outline: 0 !important;
    box-shadow: 0 0 0 .25rem rgba(224,58,45,0.25) !important;
}

/* Pagination, list-group, nav-pills, dropdown active states */
.page-item.active .page-link,
.list-group-item.active,
.nav-pills .nav-link.active,
.dropdown-item.active {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
}

/* Progress and form-range thumb */
.progress-bar {
    background-color: var(--accent) !important;
}
.form-range::-webkit-slider-thumb,
.form-range::-moz-range-thumb {
    background-color: var(--accent) !important;
}

/* Small helpers */
.text-accent {
    color: var(--accent) !important;
}

/* Navbar hover/active using accent instead of the previous yellow */
.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--accent) !important;
}

/* Dropdown item active */
.navbar .nav-item .dropdown-menu .dropdown-item.active {
    background-color: var(--accent) !important;
    color: #fff !important;
}

/* End override block */

/* Santsams logo utility */
.brand-logo {
    height: 64px;
    width: auto;
    object-fit: contain;
    margin-right: 12px;
}

.navbar-brand .brand-title {
    display: inline-block;
    vertical-align: middle;
}

/* Footer logo */
.footer-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
    margin-left: 10px;
}

/* Larger white footer logo variant */
.footer-logo--white {
    height: 64px; /* larger footprint */
    filter: brightness(0) invert(1) drop-shadow(0 1px 0 rgba(0,0,0,0.25));
    margin-left: 12px;
}

/* ---------------- Get Started forms enhancements ---------------- */
.form-card {
    box-shadow: 0 12px 30px rgba(14,30,57,0.08);
    border: 0;
    overflow: hidden;
}
.form-card-header {
    padding: 18px 20px;
    background: linear-gradient(90deg, rgba(13,110,184,0.06), rgba(224,58,45,0.04));
    border-bottom: 1px solid rgba(13,110,184,0.06);
    border-radius: 6px;
}
.form-card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}
.form-card .form-floating .form-control,
.form-card .form-floating .form-select,
.form-card .form-floating textarea.form-control {
    border-radius: 8px;
    padding: 1rem .75rem;
    height: calc(2.5rem + 1rem);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
    border: 1px solid rgba(14,30,57,0.08);
}
.form-card .form-floating label {
    padding-left: .75rem;
}
.form-card .form-floating:focus-within .form-control,
.form-card .form-floating:focus-within .form-select {
    border-color: rgba(13,110,184,0.6);
    box-shadow: 0 6px 18px rgba(13,110,184,0.06);
}
.form-card .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
}
.btn-cta {
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: .2px;
}
.btn-cta i {
    transform: translateY(-1px);
}

@media (max-width: 767.98px) {
    .form-card-header {
        padding: 14px 12px;
    }
    .form-card .form-floating .form-control {
        padding: .85rem .6rem;
    }
}

/* Small helper to slightly lift card on hover for desktop */
@media (min-width: 992px) {
    .form-card:hover { transform: translateY(-6px); transition: transform .28s ease; }
}

/* ---------------- Mobile navbar enhancements ---------------- */
@media (max-width: 991.98px) {
    /* Add subtle depth for mobile nav and reduce header height */
    .navbar { box-shadow: 0 6px 20px rgba(12,43,75,0.08); }
    .navbar .navbar-brand,
    .navbar a.btn { height: 60px; }
    .brand-logo { height: 48px; }

    /* Toggler cleanup and focus state */
    .navbar .navbar-toggler {
        border: 0;
        padding: .4rem .6rem;
        box-shadow: none !important;
    }
    .navbar .navbar-toggler:focus {
        outline: none;
        box-shadow: 0 0 0 .25rem rgba(224,58,45,0.25) !important;
        border-radius: 8px;
    }

    /* Collapsed panel turned into a neat card */
    .navbar .navbar-collapse {
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 12px 30px rgba(14,30,57,0.12);
        margin: 8px 12px 12px;
        padding: 10px 12px;
    }

    .navbar .navbar-nav { border-top: 0; padding-top: 4px; }

    .navbar .navbar-nav .nav-link {
        padding: 12px 8px;
        margin: 2px 0;
        border-radius: 8px;
    }
    .navbar .navbar-nav .nav-link:hover {
        background: rgba(224,58,45,0.06);
    }

    /* Dropdowns inside the collapsed menu */
    .navbar .dropdown-menu {
        position: static;
        float: none;
        transform: none !important;
        display: block;
        border: 1px solid #eee;
        border-radius: 10px;
        box-shadow: none;
        margin: 6px 0 8px;
        padding: 6px;
    }
    .navbar .dropdown-menu .dropdown-item {
        padding: 10px 12px;
        border-radius: 8px;
    }
    .navbar .dropdown-menu .dropdown-item:hover {
        background: rgba(224,58,45,0.06);
    }

    /* Promote the CTA button inside the collapse on mobile */
    .navbar .navbar-collapse .btn.d-none.d-lg-block {
        display: block !important;
        width: 100%;
        margin-top: 8px;
        padding: 12px 16px;
        height: auto;
        border-radius: 10px;
    }
}