/********** Template CSS **********/
@import url('https://fonts.googleapis.com/css2?family=Afacad+Flux:wght@400&display=swap');

:root {
    --bs-tertiary: #797E88;
}

/* Set all titles and headings to Open Sans */
h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: 'Afacad Flux', sans-serif;
    font-weight: 400;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}

.fw-bold {
    font-weight: 700 !important;
}

.fw-medium {
    font-weight: 600 !important;
}

.fw-normal {
    font-weight: 400 !important;
}


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


/*** Global Rounding (Site-Wide) ***/
.card,
.form-control,
.form-select,
.alert {
    border-radius: 0.875rem !important; /* Rounded corners for boxes and inputs */
}


/*** Button ***/
.btn {
    transition: .5s;
    border-radius: 0.875rem !important; /* Rounded corners for buttons */
}

.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;
    border-radius: 50% !important; /* Keep icon buttons circular */
}


/*** Top Bar ***/
.top-bar {
    height: 90px;
    padding: 0 90px;
}

.top-bar h6 {
    letter-spacing: 1px;
}


/*** Nav Bar ***/
.nav-bar {
    padding: 20px 90px;
    transition: .5s;
}

.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 20px 0;
    color: var(--bs-dark);
    font-size: 18px;
    outline: none;
}

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

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

/* MAIN SITE TITLE (In Orange Bar) */
.navbar-brand h1 {
    font-family: 'Afacad Flux', sans-serif !important;
    font-size: 2.25rem !important;
    color: var(--bs-secondary) !important;
    text-shadow: none !important;
    font-weight: 400;
    margin: 0 !important;
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar .navbar-nav {
        margin-top: 20px;
        border-top: 1px solid var(--bs-white);
    }

    /* Override padding for mobile nav bar */
    .nav-bar {
        padding: 0 15px;
    }

    /* Mobile title size & color */
    .navbar-brand h1 {
        font-size: 1.6rem !important;
        color: var(--bs-secondary) !important; /* Teal */
        font-weight: 700 !important; /* ADDED: Bold Title on Mobile */
    }
}

@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 ***/
.header-carousel {
    position: relative;
    background: url(../img/bg.jpg) center center no-repeat;
    background-size: cover;
}

.header-carousel .carousel-img {
    position: relative;
}

.header-carousel .owl-nav {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.header-carousel .owl-nav .owl-prev,
.header-carousel .owl-nav .owl-next {
    width: 45px;
    height: 45px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--bs-dark);
    background: var(--bs-primary);
}

/*** Page Header (Title Strips) ***/
.page-header {
    background: url(../img/bg.jpg) center center no-repeat;
    background-size: cover;
    /* FORCE HEIGHT REDUCTION */
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

.page-header .container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* FORCE FONT SIZE REDUCTION */
.page-header h1.display-3,
.page-header h1 {
    color: var(--bs-secondary) !important; /* Teal Color */
    font-size: 2.25rem !important; /* Forced small size */
    text-shadow: none !important; /* No Effects */
    font-weight: 400 !important;
    font-family: 'Afacad Flux', sans-serif !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: var(--bs-tertiary);
}

.page-header .breadcrumb-item,
.page-header .breadcrumb-item a {
    font-size: 18px;
    color: var(--bs-primary);
}

.page-header .breadcrumb-item.active {
    color: var(--bs-dark);
}


/*** Section Title ***/
.section-title {
    position: relative;
    display: inline-block;
    text-transform: uppercase;
}

.section-title::before {
    position: absolute;
    content: "";
    width: calc(100% + 80px);
    height: 0px;
    top: 5px;
    left: -40px;
    border-top: 2px solid var(--bs-primary);
    z-index: -1;
}

.section-title::after {
    position: absolute;
    content: "";
    width: calc(100% + 120px);
    height: 0px;
    bottom: 6px;
    left: -60px;
    border-bottom: 2px solid var(--bs-primary);
    z-index: -1;
}

.section-title.text-start::before {
    width: calc(100% + 40px);
    left: 0;
}

.section-title.text-start::after {
    width: calc(100% + 60px);
    left: 0;
}


/*** About ***/
.about-img {
    position: relative;
}

.about-img::before,
.about-img::after {
    position: absolute;
    content: "";
    width: 33%;
    height: 90px;
    background: var(--bs-white);
}

.about-img::before {
    top: 0px;
    left: 0px;
}

.about-img::after {
    right: 0px;
    bottom: 0px;
}


/*** Banner ***/
.banner .banner-inner {
    position: relative;
    background: url(../img/bg.jpg) center center no-repeat;
    background-size: cover;
}

.banner .banner-inner::before,
.banner .banner-inner::after {
    position: absolute;
    content: "";
    width: 0;
    height: 0;
}

.banner .banner-inner::before {
    top: 0;
    left: 0;
    border-top: 150px solid var(--bs-primary);
    border-right: 150px solid transparent;
}

.banner .banner-inner::after {
    right: 0;
    bottom: 0;
    border-bottom: 150px solid var(--bs-secondary);
    border-left: 150px solid transparent;
}


/*** Footer ***/
.footer {
    color: var(--bs-tertiary);
    background-color: #252525;
    /* Default Desktop Height */
    height: 110px;
}

.footer-content {
    padding: 0 115px;
}

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

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

.footer .copyright {
    border-top: 1px solid rgba(255, 255, 255, .1);
}

/* --- VERTICAL TIMELINE STYLES --- */

/* The main container acts as the center line wrapper */
.timeline {
    position: relative;
    padding: 0;
    margin-top: 1rem;
}

/* Vertical line for the timeline */
.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--bs-primary); /* Use primary color for the line */
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px; /* Center the line */
}

/* Individual timeline item container */
.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

/* Rounded corners for timeline images */
.timeline-content img {
    border-radius: 0.875rem !important;
}

/* Dot/circle on the timeline line */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -12.5px; /* Half of width to center */
    background-color: var(--bs-secondary); /* Use secondary color for the dot */
    border: 3px solid var(--bs-light); /* Use light color for contrast circle */
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

/* Place content on the right side */
.timeline-item-right {
    left: 50%;
}

/* Adjust marker for right side */
.timeline-item-right::after {
    left: -12.5px;
}

/* Adjust content position for left side */
.timeline-item-left {
    left: 0;
}

/* Arrows pointing to the center line */
.timeline-content::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    border: medium solid white;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent white;
}

/* Position arrow for right side to point left */
.timeline-item-right .timeline-content::before {
    left: -10px;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
}

/* Position arrow for left side to point right */
.timeline-item-left .timeline-content::before {
    right: -10px;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent white;
}

/* Media query for mobile view: stack all items vertically on the left */
@media (max-width: 768px) {
    .timeline {
        /* Move the line to the left edge on mobile */
        margin-left: 20px;
    }
    /* Move the line to the left edge */
    .timeline::after {
        left: 20px;
    }

    /* All items should use full width */
    .timeline-item {
        width: 100%;
        padding-left: 40px; /* Space for the line and dot */
        padding-right: 20px;
        left: 0; /* Align all items to the left */
    }

    /* Move the dot to the left edge */
    .timeline-item::after {
        left: 14.5px;
    }

    /* Ensure all content arrows point correctly from the left edge */
    .timeline-content::before {
        left: -10px;
        border-width: 10px 10px 10px 0;
        border-color: transparent white transparent transparent;
    }

    /* Override the right-side specific arrow positioning */
    .timeline-item-right .timeline-content::before {
        border-width: 10px 10px 10px 0;
        border-color: transparent white transparent transparent;
        left: -10px;
        right: auto;
    }

    /* Ensure left-side items behave like right-side items in this vertical stack */
    .timeline-item-left .timeline-content::before {
        border-width: 10px 10px 10px 0;
        border-color: transparent white transparent transparent;
        left: -10px;
        right: auto;
    }
}

/* Footer with background image */
.footer-with-bg {
    background-image: url('../img/footer.jpg');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    position: relative;
    z-index: 1;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 !important;
}

/* Translucent Backgrounds */
.bg-primary-translucent {
    background-color: rgba(var(--bs-primary-rgb), 0.7) !important;
}

.bg-secondary-translucent {
    background-color: rgba(var(--bs-secondary-rgb), 0.7) !important;
}


/******************************************/
/* DESKTOP & MOBILE CUSTOM STYLES    */
/******************************************/

/* Header/Footer Height Syncing Class */
.mobile-banner-match {
    height: 110px;
}

/* DESKTOP STYLES (Screens > 992px) */
@media (min-width: 992px) {
    .sticky-nav-force {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 1020 !important;
    }
    .navbar .nav-item:hover .dropdown-menu {
        display: block;
        margin-top: 0;
    }
    .mobile-close-btn { display: none; }
}

/* MOBILE STYLES (Screens < 992px) */
@media (max-width: 991.98px) {

    /* 1. Sync Header & Footer Height on Mobile */
    .mobile-banner-match {
        height: 110px !important;
    }

    /* Adjust navbar container to center content vertically */
    .nav-bar {
        padding: 0 15px !important;
        display: flex;
        align-items: center;
        height: 100%;
    }

    .footer-content {
        padding: 0 15px;
    }

    /* 2. Page Header Strip (Reduced Height) */
    .page-header {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
    .page-header .container {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    .page-header h1.display-3,
    .page-header h1 {
        font-size: 2rem !important;
    }

    /* Smaller Top Bar Title */
    .top-bar h1 {
        font-size: 1.8rem !important;
    }

    /* 3. Full Screen Overlay Container */
    #navbarCollapse {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 9999;
        padding: 80px 30px 40px 30px;
        overflow-y: auto;

        /* Hardcoded RGB for Teal */
        background-color: rgba(26, 104, 91, 0.9) !important;

        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        display: block !important;
        visibility: visible !important;
    }

    /* 4. Open State */
    #navbarCollapse.open {
        transform: translateX(0);
    }

    /* 5. Links Styling (White Text) */
    .navbar-nav .nav-link {
        color: #ffffff !important;
        font-size: 1.5rem;
        font-weight: 600;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        padding: 15px 0;
    }

    /* 6. Submenu Styling */
    .navbar-nav .dropdown-menu {
        display: block !important;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease;
        background-color: transparent !important;
        border: none;
        padding: 0;
        margin-top: 0;
        padding-left: 20px;
    }

    .navbar-nav .dropdown-menu.show {
        max-height: 500px;
        margin-bottom: 15px;
    }

    /* 7. Dropdown Items (White Text) */
    .dropdown-item {
        color: #ffffff !important;
        font-size: 1.2rem;
        padding: 12px 0;
        opacity: 0.9;
    }

    .dropdown-item:hover, .dropdown-item:focus {
        background: transparent;
        color: var(--bs-primary) !important;
        opacity: 1;
    }

    /* 8. Close Button */
    .mobile-close-btn {
        position: absolute;
        top: 25px;
        right: 25px;
        background: transparent;
        border: none;
        color: #fff;
        font-size: 2.5rem;
        line-height: 1;
        cursor: pointer;
    }

    .nav-bar .navbar { padding: 0; }
}
