/********** Template CSS **********/
:root {
    --primary: #013A8B;
    --secondary: #EAF1FC;
    --light: #F8F8F9;
    --dark: #013A8B;
}

.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.btn-primary:hover {
    color: var(--primary);
    background: transparent;
}

.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 ***/
.fixed-top {
    transition: .5s;
}

.top-bar {
    height: 45px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 25px 0;
    color: #FFFFFF;
    font-weight: 500;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav {
        margin-top: 10px;
        border-top: 1px solid rgba(0, 0, 0, .07);
        background: var(--dark);
    }

    .navbar .navbar-nav .nav-link {
        padding: 10px 0;
    }
}

@media (min-width: 992px) {
    .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;
        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(1, 58, 139, .84);
    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(--dark);
    border: 12px solid var(--dark);
    border-radius: 3rem;
}

@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 {
    padding-top: 12rem;
    padding-bottom: 6rem;
    background: linear-gradient(rgba(1, 58, 139, .84), rgba(1, 58, 139, .84)), url("../img/carousel-1-1440.webp") center center no-repeat;
    background-size: cover;
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: #999999;
}


/*** Causes ***/
.causes-item .progress {
    height: 5px;
    border-radius: 0;
    overflow: visible;
}

.causes-item .progress .progress-bar {
    position: relative;
    overflow: visible;
    width: 0px;
    border-radius: 0;
    transition: 5s;
}

.causes-item .progress .progress-bar span {
    position: absolute;
    top: -7px;
    right: 0;
    width: 40px;
    height: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    background: var(--primary);
    color: #FFFFFF;
}

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

.causes-item:hover .causes-overlay {
    height: 100%;
    opacity: 1;
}


/*** Service ***/
.service-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .06);
}


/*** Donate ***/
.donate {
    background: rgba(1, 58, 139, .84);
}

.btn-group .btn-light:hover,
.btn-group input[type="radio"]:checked+label {
    color: var(--primary);
    border-color: var(--primary);
}


/*** Team ***/
.team-item img {
    position: relative;
    top: 0;
    transition: .5s;
}

.team-item:hover img {
    top: -30px;
}

.team-item .team-text {
    position: relative;
    height: 100px;
    transition: .5s;
}

.team-item:hover .team-text {
    margin-top: -60px;
    height: 160px;
}

.team-item .team-text .team-social {
    opacity: 0;
    transition: .5s;
}

.team-item:hover .team-text .team-social {
    opacity: 1;
}

.team-item .team-social .btn {
    display: inline-flex;
    color: var(--primary);
    background: #FFFFFF;
    border-radius: 40px;
}

.team-item .team-social .btn:hover {
    color: #FFFFFF;
    background: var(--primary);
}


/*** Testimonial ***/
.testimonial-carousel::before {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

.testimonial-carousel::after {
    position: absolute;
    content: "";
    top: 0;
    right: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

@media (min-width: 768px) {
    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 200px;
    }
}

@media (min-width: 992px) {
    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 300px;
    }
}

.testimonial-carousel .owl-item .testimonial-text {
    background: var(--light);
    transform: scale(.8);
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-text {
    background: var(--primary);
    transform: scale(1);
}

.testimonial-carousel .owl-item .testimonial-text *,
.testimonial-carousel .owl-item .testimonial-item img {
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-text * {
    color: var(--light) !important;
}

.testimonial-carousel .owl-item.center .testimonial-item img {
    background: var(--primary) !important;
} 

.testimonial-carousel .owl-nav {
    position: absolute;
    width: 350px;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    opacity: 0;
    transition: .5s;
    z-index: 1;
}

.testimonial-carousel:hover .owl-nav {
    width: 300px;
    opacity: 1;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    position: relative;
    color: var(--primary);
    font-size: 45px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    color: var(--dark);
}


/*** Footer ***/

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: rgba(255,255,255,0.5);
    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: rgba(255,255,255,0.5);
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--light);
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .btn.btn-square {
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.5);
}

.footer .btn.btn-square:hover {
    color: var(--secondary);
    border-color: var(--light);
}

.footer .copyright {
    padding: 25px 0;
    font-size: 15px;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: var(--secondary);
}

.footer .copyright a:hover {
    color: var(--primary);
}

/* TESR-U responsive refinements: mobile navigation, carousel rhythm, page headers and content spacing */
@media (max-width: 991.98px) {
    .navbar-collapse {
        max-height: calc(100vh - 4.5rem);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .navbar .navbar-nav {
        padding: .75rem 1.25rem !important;
    }

    .navbar .navbar-nav .nav-link {
        margin-right: 0;
        padding: .65rem 0;
    }

    .navbar .navbar-nav .dropdown-menu {
        margin: .25rem 0 .5rem;
        padding: .35rem 0;
        border: 0;
        border-radius: .5rem;
        background: #013A8B;
    }

    .navbar .navbar-nav .dropdown-item {
        padding: .65rem 1rem;
        white-space: normal;
        color: rgba(255, 255, 255, .82);
    }

    .navbar .navbar-nav .dropdown-item:hover,
    .navbar .navbar-nav .dropdown-item:focus {
        color: #fff;
        background: rgba(255, 255, 255, .08);
    }
}

@media (max-width: 767.98px) {
    #header-carousel .carousel-item {
        min-height: 500px;
    }

    #header-carousel .carousel-caption {
        padding: 5rem 2.25rem 1.5rem;
    }

    #header-carousel .carousel-caption .col-lg-8 {
        padding-top: 0 !important;
    }

    #header-carousel .carousel-caption h1 {
        font-size: clamp(2rem, 5.6vw, 2.6rem);
        line-height: 1.15;
        margin-bottom: 1rem !important;
        text-wrap: balance;
    }

    #header-carousel .carousel-caption p {
        font-size: clamp(1rem, 2.2vw, 1.1rem) !important;
        line-height: 1.5;
        margin-bottom: 1.4rem !important;
    }

    #header-carousel .carousel-caption .btn {
        padding: .65rem .95rem !important;
        white-space: normal;
    }

    #header-carousel .carousel-control-prev,
    #header-carousel .carousel-control-next {
        width: 9%;
    }

    #header-carousel .carousel-control-prev-icon,
    #header-carousel .carousel-control-next-icon {
        width: 2rem;
        height: 2rem;
        border-width: 7px;
    }

    .page-header {
        padding-top: 9.5rem;
        padding-bottom: 3.5rem;
    }

    .page-header h1 {
        font-size: clamp(1.9rem, 5.8vw, 2.5rem);
        line-height: 1.15;
        margin-bottom: 1.1rem !important;
        text-wrap: balance;
    }
}

@media (max-width: 575.98px) {
    .navbar {
        padding-top: .55rem;
        padding-bottom: .55rem;
    }

    .navbar-brand {
        margin-left: 1rem !important;
    }

    .navbar-brand h1 {
        font-size: 1.65rem;
    }

    .navbar-toggler {
        margin-right: 1rem !important;
        padding: .3rem .55rem;
    }

    #header-carousel .carousel-item {
        min-height: 540px;
    }

    #header-carousel .carousel-caption {
        padding: 5rem 1.75rem 1.35rem;
    }

    #header-carousel .carousel-caption h1 {
        font-size: clamp(1.9rem, 7vw, 2.3rem);
        line-height: 1.14;
        letter-spacing: -.02em;
    }

    #header-carousel .carousel-caption p {
        font-size: 1rem !important;
        line-height: 1.5;
    }

    #header-carousel .carousel-control-prev,
    #header-carousel .carousel-control-next {
        width: 7%;
    }

    #header-carousel .carousel-control-prev-icon,
    #header-carousel .carousel-control-next-icon {
        width: 1.65rem;
        height: 1.65rem;
        border-width: 5px;
    }

    .page-header {
        padding-top: 8.75rem;
        padding-bottom: 3rem;
    }

    .page-header h1 {
        font-size: clamp(1.75rem, 7vw, 2.2rem);
        line-height: 1.16;
        margin-bottom: .9rem !important;
    }

    .page-header .breadcrumb {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: .25rem;
        font-size: .875rem;
    }

    .display-6 {
        font-size: clamp(1.55rem, 6.4vw, 1.95rem);
        line-height: 1.2;
    }

    .bg-light.border-bottom.border-5.rounded.p-4 {
        padding: 1.15rem !important;
    }

    .footer .container.py-5 {
        padding-top: 2.75rem !important;
        padding-bottom: 2.75rem !important;
    }

    .footer .copyright {
        padding: 1.25rem 0;
        font-size: .875rem;
        line-height: 1.55;
    }

    .footer .copyright .col-md-6 {
        overflow-wrap: anywhere;
    }
}


/* TESR-U mobile hero: full visible phone height */
@media (max-width: 767.98px) {
    #header-carousel,
    #header-carousel .carousel-inner,
    #header-carousel .carousel-item {
        height: 100vh;
        height: 100svh;
        min-height: 100vh;
        min-height: 100svh;
    }

    #header-carousel .carousel-item {
        position: relative;
        overflow: hidden;
    }

    #header-carousel .carousel-item img {
        position: absolute;
        inset: 0;
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    #header-carousel .carousel-caption {
        padding: 5.75rem 3.1rem 2rem;
    }

    #header-carousel .carousel-caption .container {
        width: 100%;
        max-width: 820px;
        padding-right: 0;
        padding-left: 0;
    }

    #header-carousel .carousel-caption .row {
        margin-right: 0;
        margin-left: 0;
    }

    #header-carousel .carousel-caption .col-lg-8 {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }

    #header-carousel .carousel-caption h1 {
        font-size: clamp(2rem, 6.8vw, 2.7rem);
        line-height: 1.12;
        letter-spacing: -.025em;
        margin-bottom: 1rem !important;
        text-wrap: balance;
    }

    #header-carousel .carousel-caption p {
        max-width: 38rem;
        margin: 0 auto 1.5rem !important;
        font-size: clamp(1rem, 3.7vw, 1.1rem) !important;
        line-height: 1.5;
        text-wrap: pretty;
    }

    #header-carousel .carousel-caption .btn {
        padding: .7rem 1rem !important;
        white-space: normal;
    }

    #header-carousel .carousel-control-prev,
    #header-carousel .carousel-control-next {
        width: 2.75rem;
    }

    #header-carousel .carousel-control-prev-icon,
    #header-carousel .carousel-control-next-icon {
        width: 1.7rem;
        height: 1.7rem;
        border-width: 5px;
    }

    .container-fluid:has(> #header-carousel) {
        margin-bottom: 2rem !important;
    }
}

@media (max-width: 380px) {
    #header-carousel .carousel-caption {
        padding-right: 2.8rem;
        padding-left: 2.8rem;
    }

    #header-carousel .carousel-caption h1 {
        font-size: clamp(1.85rem, 7vw, 2.2rem);
    }

    #header-carousel .carousel-control-prev,
    #header-carousel .carousel-control-next {
        width: 2.35rem;
    }
}

@media (max-width: 767.98px) and (max-height: 640px) {
    #header-carousel .carousel-caption {
        padding-top: 4.75rem;
        padding-bottom: 1.25rem;
    }

    #header-carousel .carousel-caption h1 {
        font-size: clamp(1.75rem, 6vw, 2.2rem);
        line-height: 1.1;
        margin-bottom: .8rem !important;
    }

    #header-carousel .carousel-caption p {
        font-size: .95rem !important;
        line-height: 1.4;
        margin-bottom: 1rem !important;
    }

    #header-carousel .carousel-caption .btn {
        padding: .55rem .85rem !important;
    }
}


/* TESR-U header, logo and button refinements */
:root {
    --primary: #013A8B;
    --secondary: #EAF1FC;
    --light: #F8F8F9;
    --dark: #013A8B;
    --brand-hover: #012F70;
    --brand-active: #C9DDFB;
}

/* Header surface and sticky state */
.fixed-top {
    background: transparent;
    box-shadow: none;
    transition: background .3s ease, box-shadow .3s ease, top .3s ease;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.fixed-top.is-scrolled {
    background: #013A8B !important;
    box-shadow: 0 8px 28px rgba(1, 31, 75, .24);
}

.fixed-top .top-bar {
    border-bottom-color: rgba(255, 255, 255, .13);
}

/* Keep the wordmark legible over both the hero and sticky header */
.navbar .navbar-brand h1 {
    color: #FFFFFF !important;
    letter-spacing: -.045em;
    font-weight: 700;
}

.navbar .navbar-brand h1 span {
    color: #C9DDFB !important;
}

.footer h1.text-primary {
    color: #FFFFFF !important;
    letter-spacing: -.045em;
}

.footer h1.text-primary span {
    color: #C9DDFB !important;
}

/* Main navigation: clear inactive, active and hover states */
.navbar .navbar-nav .nav-link {
    position: relative;
    color: rgba(255, 255, 255, .88) !important;
    font-weight: 600;
    transition: color .2s ease;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link:focus,
.navbar .navbar-nav .nav-link.active,
.navbar .navbar-nav .show > .nav-link {
    color: #D9E7FF !important;
}

.navbar .navbar-nav .nav-link.active {
    font-weight: 700;
}

@media (min-width: 992px) {
    .navbar .navbar-nav .nav-link::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 15px;
        height: 2px;
        width: 0;
        margin: 0 auto;
        background: #C9DDFB;
        transition: width .22s ease;
    }

    .navbar .navbar-nav .nav-link:hover::before,
    .navbar .navbar-nav .nav-link:focus-visible::before,
    .navbar .navbar-nav .nav-link.active::before {
        width: 22px;
    }
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav {
        background: #013A8B;
        border: 1px solid rgba(255, 255, 255, .12);
        border-top: 1px solid rgba(255, 255, 255, .16);
        border-radius: 0 0 10px 10px;
        padding: .65rem 1.1rem !important;
        box-shadow: 0 12px 24px rgba(0, 24, 60, .18);
    }

    .navbar .navbar-nav .nav-link {
        padding: .7rem 0;
    }

    .navbar .navbar-nav .nav-link::before {
        display: none;
    }
}

/* Dropdown links stay readable and visibly selected */
.navbar .nav-item .dropdown-menu {
    border: 1px solid rgba(1, 58, 139, .10);
    box-shadow: 0 14px 32px rgba(1, 31, 75, .16);
    padding: .45rem;
}

.navbar .dropdown-menu .dropdown-item {
    color: #24364D;
    border-radius: 5px;
    padding: .62rem .85rem;
    font-weight: 500;
    transition: color .18s ease, background-color .18s ease;
}

.navbar .dropdown-menu .dropdown-item:hover,
.navbar .dropdown-menu .dropdown-item:focus {
    color: #013A8B;
    background: #EAF1FC;
}

.navbar .dropdown-menu .dropdown-item.active,
.navbar .dropdown-menu .dropdown-item:active {
    color: #FFFFFF;
    background: #013A8B;
}

/* High-contrast header action and its arrow badge */
.fixed-top .navbar .btn-outline-primary {
    color: #013A8B !important;
    background: #FFFFFF !important;
    border: 1px solid #FFFFFF !important;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(0, 20, 55, .12);
}

.fixed-top .navbar .btn-outline-primary:hover,
.fixed-top .navbar .btn-outline-primary:focus-visible {
    color: #013A8B !important;
    background: #EAF1FC !important;
    border-color: #EAF1FC !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 20, 55, .18);
}

.fixed-top .navbar .btn-outline-primary .btn-sm-square {
    color: #FFFFFF !important;
    background: #013A8B !important;
}

/* Consistent primary, outline and secondary button states */
.btn {
    font-weight: 600;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.btn.btn-primary,
.btn.btn-primary:visited {
    color: #FFFFFF !important;
    background: #013A8B !important;
    border-color: #013A8B !important;
    box-shadow: 0 3px 10px rgba(1, 58, 139, .14);
}

.btn.btn-primary:hover,
.btn.btn-primary:focus-visible,
.btn.btn-primary:active {
    color: #FFFFFF !important;
    background: #012F70 !important;
    border-color: #012F70 !important;
    transform: translateY(-1px);
    box-shadow: 0 7px 17px rgba(1, 58, 139, .22);
}

.btn.btn-outline-primary {
    color: #013A8B !important;
    background: transparent !important;
    border-color: #013A8B !important;
}

.btn.btn-outline-primary:hover,
.btn.btn-outline-primary:focus-visible,
.btn.btn-outline-primary:active {
    color: #FFFFFF !important;
    background: #013A8B !important;
    border-color: #013A8B !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(1, 58, 139, .16);
}

.btn.btn-secondary {
    color: #013A8B !important;
    background: #EAF1FC !important;
    border-color: #EAF1FC !important;
}

.btn.btn-secondary:hover,
.btn.btn-secondary:focus-visible {
    color: #013A8B !important;
    background: #D9E7FF !important;
    border-color: #D9E7FF !important;
}

.btn:focus-visible,
a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(201, 221, 251, .95);
    outline-offset: 3px;
    box-shadow: 0 0 0 3px rgba(1, 58, 139, .16);
}

a:hover,
.btn-link:hover {
    color: #012F70;
}

/* Hero calls to action sit on a blue image overlay, so use a light button */
.carousel-caption .btn.btn-primary {
    color: #013A8B !important;
    background: #FFFFFF !important;
    border-color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(0, 18, 50, .18);
}

.carousel-caption .btn.btn-primary:hover,
.carousel-caption .btn.btn-primary:focus-visible {
    color: #013A8B !important;
    background: #EAF1FC !important;
    border-color: #EAF1FC !important;
}

/* Page headers use the same blue identity as the navigation */
.page-header {
    background: linear-gradient(rgba(1, 58, 139, .88), rgba(1, 58, 139, .88)), url("../img/carousel-1-1440.webp") center center no-repeat;
    background-size: cover;
}

.page-header .breadcrumb-item.active {
    color: #D9E7FF !important;
}


/* Responsive CTA spacing: keep neighbouring actions distinct at every breakpoint */
.tesr-cta-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
}

.tesr-cta-group > .btn {
    margin: 0 !important;
    max-width: 100%;
    white-space: normal;
    line-height: 1.35;
}

.tesr-cta-group-end {
    justify-content: flex-start;
}

@media (min-width: 992px) {
    .tesr-cta-group-end {
        justify-content: flex-end;
    }
}

@media (max-width: 575.98px) {
    .tesr-cta-group {
        gap: .75rem;
    }

    .tesr-cta-group > .btn {
        min-height: 44px;
    }
}

@media (max-width: 380px) {
    .tesr-cta-group {
        align-items: stretch;
    }

    .tesr-cta-group > .btn {
        width: 100%;
    }
}

/* Allow long button labels to wrap instead of forcing horizontal overflow */
.btn {
    max-width: 100%;
    white-space: normal;
    text-align: center;
}


/* Compact desktop navigation for narrow laptop and landscape-tablet widths */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar {
        padding-right: 1.25rem !important;
        padding-left: 1.25rem !important;
    }

    .navbar .navbar-brand h1 {
        font-size: 1.85rem;
    }

    .navbar .navbar-nav .nav-link {
        margin-right: 14px;
        font-size: .95rem;
    }

    .fixed-top .navbar .btn-outline-primary {
        padding-right: .7rem !important;
        padding-left: .7rem !important;
        font-size: .9rem;
        white-space: nowrap;
    }
}


/* Accessible, consistent Explore dropdown colours on desktop and mobile */
.navbar .navbar-nav .dropdown-menu {
    background-color: #FFFFFF !important;
    border: 1px solid rgba(1, 58, 139, .14);
    border-radius: .55rem;
    box-shadow: 0 14px 32px rgba(1, 31, 75, .18);
    padding: .45rem;
}

.navbar .navbar-nav .dropdown-menu .dropdown-item {
    display: block;
    width: 100%;
    padding: .68rem .9rem;
    color: #24364D !important;
    background-color: transparent !important;
    border: 0;
    border-radius: .4rem;
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    transition: color .18s ease, background-color .18s ease;
}

.navbar .navbar-nav .dropdown-menu .dropdown-item:hover,
.navbar .navbar-nav .dropdown-menu .dropdown-item:focus,
.navbar .navbar-nav .dropdown-menu .dropdown-item:focus-visible {
    color: #013A8B !important;
    background-color: #EAF1FC !important;
}

.navbar .navbar-nav .dropdown-menu .dropdown-item.active,
.navbar .navbar-nav .dropdown-menu .dropdown-item:active,
.navbar .navbar-nav .dropdown-menu .dropdown-item.active:hover,
.navbar .navbar-nav .dropdown-menu .dropdown-item.active:focus {
    color: #FFFFFF !important;
    background-color: #013A8B !important;
}

.navbar .navbar-nav .dropdown-menu .dropdown-item:focus-visible {
    outline: 2px solid #013A8B;
    outline-offset: -2px;
}

.navbar .navbar-nav .dropdown-toggle.show,
.navbar .navbar-nav .dropdown-toggle[aria-expanded="true"] {
    color: #D9E7FF !important;
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .dropdown-menu {
        margin: .35rem 0 .65rem !important;
        padding: .45rem !important;
        background-color: #FFFFFF !important;
        border: 1px solid rgba(1, 58, 139, .14) !important;
        border-radius: .55rem !important;
        box-shadow: 0 8px 20px rgba(0, 24, 60, .16);
    }

    .navbar .navbar-nav .dropdown-menu .dropdown-item {
        padding: .72rem .9rem;
    }
}


/* TESR-U social connections and sharing */
.tesru-footer-social {
    padding: 1.4rem 0 1.7rem;
    border-top: 1px solid rgba(255, 255, 255, .12);
}
.tesru-footer-social__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
}
.tesru-footer-social__copy strong {
    display: block;
    color: #fff;
    font-family: "Saira", sans-serif;
    font-size: 1.15rem;
    margin-bottom: .2rem;
}
.tesru-footer-social__copy span {
    display: block;
    color: rgba(255, 255, 255, .62);
    font-size: .92rem;
}
.tesru-social-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
}
.tesru-social-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 42px;
    padding: .55rem .95rem;
    border: 1px solid rgba(255, 255, 255, .38);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.tesru-social-action:hover,
.tesru-social-action:focus {
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border-color: #fff;
    transform: translateY(-1px);
}
.tesru-social-panel {
    margin: 2.5rem auto;
    padding: 2rem 1.5rem;
    background: #f4f7fc;
    border-left: 4px solid #013A8B;
}
.tesru-social-panel__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}
.tesru-social-panel h2 {
    margin: 0 0 .45rem;
    color: #172b4d;
    font-size: clamp(1.35rem, 2.5vw, 1.8rem);
}
.tesru-social-panel p {
    margin: 0;
    color: #596579;
}
.tesru-social-panel .tesru-social-actions {
    flex-shrink: 0;
}
.tesru-social-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 44px;
    padding: .7rem 1rem;
    border: 1px solid #013A8B;
    background: #013A8B;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: filter .2s ease, transform .2s ease;
}
.tesru-social-button:hover,
.tesru-social-button:focus {
    color: #fff;
    filter: brightness(.92);
    transform: translateY(-1px);
}
.tesru-social-button--whatsapp {
    border-color: #1f9d55;
    background: #1f9d55;
}
.tesru-floating-whatsapp {
    position: fixed;
    right: 24px;
    bottom:  24px;
    z-index: 1035;
    display: inline-flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #25D366;
    color: #073b1d;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .22);
    font-size: 1.85rem;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}
.tesru-floating-whatsapp:hover,
.tesru-floating-whatsapp:focus {
    color: #073b1d;
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .26);
}
@media (max-width: 767.98px) {
    .tesru-footer-social__inner,
    .tesru-social-panel__inner {
        align-items: flex-start;
        flex-direction: column;
    }
    .tesru-footer-social__inner {
        gap: 1rem;
    }
    .tesru-social-panel {
        margin: 1.75rem auto;
        padding: 1.5rem 1.1rem;
    }
    .tesru-floating-whatsapp {
        right: 18px;
        bottom:  24px;
        width: 50px;
        height: 50px;
        font-size: 1.7rem;
    }
}


/* TESR-U horizontal wordmark in the public navigation */
.tesru-brand-logo{display:block;width:220px;height:auto;max-width:min(250px,44vw);object-fit:contain;object-position:left center}
@media(max-width:991.98px){.tesru-brand-logo{width:200px;max-width:min(210px,55vw)}}

/* Keep hero copy crisp over the lighter image treatment */
#header-carousel .carousel-caption h1,
#header-carousel .carousel-caption p{text-shadow:0 2px 16px rgba(0,0,0,.38)}


/* Serve a smaller page-header image to mobile visitors. */
@media (max-width: 767.98px) {
    .page-header {
        background-image: linear-gradient(rgba(1, 58, 139, .88), rgba(1, 58, 139, .88)), url("../img/carousel-1-768.webp");
    }
}
