@font-face {
    font-family: 'HelveticaNeue';
    src: url('/fonts/HelveticaNeueRoman.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'HelveticaNeueB';
    src: url('/fonts/HelveticaNeueRBold.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'HelveticaNeueI';
    src: url('/fonts/HelveticaNeueItalic.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'HelveticaNeueBI';
    src: url('/fonts/HelveticaNeueBoldItalic.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* standard desktop layout */
html {
  font-size: 14px;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
    font-family: 'HelveticaNeue', sans-serif;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 100vh;
    margin: 0;
}

/* ----- header ----- */

header {
    position: sticky;
    top: 0;
    z-index: 4;
}

#logo-large {
    width: 13rem;
}

#logo-small {
    width: 4.1rem;
}

#profile-icon {
    object-fit: cover;
    height: 3.7rem;
    width: 3.7rem;
    border-radius: 50%;
}

#login-menu-toggle {
    padding: 0;
}

.navbar {
    padding: 0 0 0 0;
    box-shadow: 0 0.1rem 0.4rem -0.2rem black;
}

.navbar-nav {
    gap: 0.5rem;
}

.navbar-default {
    background-color: #FFFFFF;
}

.navbar-logged-in {
    background-color: #FF5800;
}

.navbar-default .nav-link {
    color: #000 !important;
}

.navbar-logged-in .nav-link {
    color: #FFF !important;
}

/* Active page link (not logged in = white nav, highlight orange) */
.navbar-default .nav-link.active-page {
    color: #fff !important;
    background-color: #FF5800;
    font-weight: bold;
}

/* Active page link (logged in = orange nav, highlight white) */
.navbar-logged-in .nav-link.active-page {
    color: #FF5800 !important;
    background-color: #fff;
    font-weight: bold;
}

.navbar-default .nav-link.active-page:hover, .navbar-default .nav-link.active-page:focus {
    color: #fff !important;
}

.navbar-logged-in .nav-link.active-page:hover, .navbar-logged-in .nav-link.active-page:focus {
    color: #FF5800 !important;
}

.nav-link {
    height: 4rem;
    display: flex;
    align-items: center;
    border-radius: 0.125rem;
    transition: color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.navbar-default .nav-link:hover, .navbar-default .nav-link:focus,
.navbar-default #profileDropdownButton:hover, .navbar-default #profileDropdownButton:focus {
    color: #FF5800 !important;
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #FF5800;
}

.navbar-logged-in .nav-link:hover, .navbar-logged-in .nav-link:focus,
.navbar-logged-in #profileDropdownButton:hover, .navbar-logged-in #profileDropdownButton:focus {
    color: #fff !important;
    box-shadow: 0 0 0 0.1rem #FF5800, 0 0 0 0.25rem white;
}

/* ----- content ----- */
mark {
    background-color: #FF5800;
    color: #fff;
    border-radius: .25rem;
}

main {
    flex: 1;
    width: 100%;
    max-width: 68rem;
    margin: 0 auto;
    margin-bottom: 12rem;
    border-right: 1px solid rgba(0, 0, 0, 0.125);
    border-bottom: 2px solid rgba(0, 0, 0, 0.125);
    box-shadow: 0 0.1rem .4rem -0.2rem black;
}

.main {
    height: calc(100vh - 77px);
}

.page-head {
    color: #fff;
    background-color: #FF5800;
    padding: 1rem 0 2rem 1.5rem;
}

.page-container {
    padding: 1.125rem 4rem;
}

.carousel-control-next, .carousel-control-prev {
    z-index: 2;
}

#agenda-page-container {
    display: flex;
    justify-content: space-between;
}

#trainings-container h4, #trainings-container p {
    white-space: nowrap;
}

#trainings-container {
    width: 16rem;
    margin-left: 4rem;
}

.training {
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.25rem;
    padding: 0.5rem;
    margin-bottom: 1rem;
}

.orange {
    color: #FF5800;
}

/* sneaky way to make the bottom of the page longer for the contact form */
iframe {
    width: 600px;
    height: 450px;
    margin-bottom: 6rem;
}

.text-justify {
    text-align: justify;
    text-align-last: center;
}

/* ----- buttons ----- */
.btn:focus, .btn:active:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #FF5800;
}

.dropdown-item.active, .dropdown-item:active {
    color: #fff;
    text-decoration: none;
    background-color: #FF5800;
}

.btn-primary {
    color: #fff;
    background-color: #FF5800;
    border-color: #FF5800;
}

.form-btn {
    margin-top: .25rem;
    width: 49%;
}

.btn-primary:hover, .btn-primary:active {
    color: #FF5800;
    background-color: #fff;
    border-color: #FF5800;
}

.btn-primary:focus {
    color: #FF5800;
    background-color: #fff;
    border-color: #fff;
}

.btn-primary.disabled, .btn-primary:disabled {
    color: #fff;
    background-color: #FF5800;
    border-color: #FF5800;
    opacity: .65;
}

.btn-outline-primary {
    color: #FF5800;
    border-color: #FF5800;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #FF5800;
    border-color: #FF5800;
}

/* menu icons */
.menu-option-icon {
    height: 1rem;
    width: 1rem;
    cursor: pointer;
    opacity: .65;
}

/* home page */
#homeCarousel {
    background: #fafafa;
    
}

.carousel-item {
    height: 20rem;
    display: block;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.carousel-caption.top-left-dark {
    top: 0;
    bottom: auto;
    left: 0;
    right: auto;
    text-align: left;
    color: #6c757d;
    border-radius: 0.25rem;
}

.carousel-caption.top-left-light {
    top: 0;
    left: 0;
    text-align: left;
    color: #fff;
    border-radius: 0.25rem;
    background: rgba(0, 0, 0, 0.4);
}

.custom-caption-bottom-center {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 1rem;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
}

.carousel-caption {
    width: 100%;
    height: 100%;
    padding: 1rem 4rem 1rem 4rem;
}

.ellipsis-one-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ellipsis-multiline {
    display: -webkit-box;
    -webkit-line-clamp: 9; /* Change to desired number of lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.5); /* semi-transparent black background */
    background-size: 60% 60%;
    height: 100%;
    padding: 1.5rem; /* makes the area clickable bigger */
    filter: invert(1); /* makes the icon itself white */
}

.carousel-control-prev,
.carousel-control-next {
    width: 3rem;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    background-color: #000;
    opacity: 0.5;
    filter: none; /* makes arrow itself black on hover */
}



/* ----- forms ----- */
/* verify */
#verification-form {
    width: 15.5rem;
}

/* gallery */
#gallery-container {
    display: flex;
    justify-content: center;
    padding-bottom: 4rem;
}

.gallery-list-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    width: fit-content;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.gallery-item {
    will-change: transform;
    width: 10rem;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    border-radius: 0.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    image-rendering: auto;
    backface-visibility: hidden;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 0.1rem 0.4rem -0.2rem black;
    z-index: 3;
}

.photo-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9;
    padding: 1rem;
    box-sizing: border-box;
    overflow: hidden;
}

.photo-overlay-content {
    max-width: 100%;
    max-height: 100%;
}

.photo-overlay-content img {
    width: auto;
    height: auto;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 2rem);
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    display: block;
    margin: 0 auto;
}

.close-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    border: none;
    padding: 0.8rem 0.8rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s ease;
}

.close-btn:hover {
    opacity: 0.8;
}

/* contact form */
#contactform-container {
    width: 30.5rem;
}

#contactform-container .form-control {
    margin-bottom: 1rem;
}

#contactform-container textarea {
    width: 100%;
    height: 6.625rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.contact-form-wrapper {
    display: flex;
    justify-content: center;
}

/* profile page */
.profile-container {
    margin-top: 2rem;
}

.profile-card {
    min-width: 20rem;
    width: fit-content;
    margin: 0 auto;
    border: 1px solid rgba(0, 0, 0, .125);
    border-radius: 0.5rem;
    padding: 3rem 2rem;
    margin-top: 1rem;
}

.large-profile-picture {
    width: 12rem;
    height: 12rem;
    border-radius: 50%;
    margin-bottom: 1rem;
    object-fit: cover;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    margin: 0.25rem 0;
}

.profile-label {
    font-weight: bold;
    text-align: left;
}

.profile-value {
    text-align: right;
    margin-left: 1rem;
    white-space: nowrap;
}


/* group chat */
.chat-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    border-radius: 0.5rem;
    min-width: 20rem;
    max-width: 80rem;
    margin: auto;
    margin-top: 1rem;
    margin-bottom: 1rem;
    background: #fafafa;
    height: calc(var(--vh, 1vh) * 100 - 104px);
    height: calc(100dvh - 104px);
/*    height: calc(100vh - 104px);*/
    padding: 1rem;
}

.chat-messages {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    padding: 1rem;
    background: #fff;
    border-radius: 0.5rem 0.5rem 0 0;
    margin-bottom: 1rem;
}

.chat-message {
    margin: 0.5rem 0;
    padding: 0.5rem;
    border-radius: 0.5rem 0.5rem 0 0;
    max-width: 60%;
    word-wrap: break-word;
}

.own-message {
    background-color: #FF5800;
    color: #fff;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-left-radius: 0.5rem;
}

.own-message span {
    text-align: right;
}

.other-message {
    background-color: #f0f0f0;
    color: #999;
    align-self: flex-start;
    margin-right: auto;
    border-bottom-right-radius: 0.5rem;
}

.other-message strong {
    color: #FF5800;
}

.timestamp, .chat-date-stamp {
    font-size: 0.8em;
    color: #999;
    margin-left: 5px;
}

.chat-date-stamp {
    text-align: center;
}

#chat-form {
    display: flex;
    gap: 0.5rem;
}

#chat-input {
    flex-grow: 1;
    resize: none;
    max-height: 23rem;
    height: 3rem;
    overflow-y: auto;
    line-height: 1.4;
    padding: 0.5rem;
}

#send-button {
    border-radius: 50%;
    height: 3rem;
    width: 3rem;
}

#send-button img {
    height: 100%;
    width: 100%;
    object-fit: contain;
    margin: 0 0 0 0.1rem;
    transition: filter 0.15s ease-in-out;
    display: block;
}

#send-button:hover img,
#send-button:focus img {
    content: url("/img/icons/send-icon-1.png");
}

.portal-layout {
    display: flex;
    height: calc(100vh - 76px);
    margin: auto;
}

.portal-sidebar {
    width: 15rem;
    border-right: 1px solid #ccc;
    padding: 0.5rem 1rem;
}

#sidebarToggle {
    display: none;
}

.slide-sidebar {
    position: static;
    height: auto;
    left: 0;
    box-shadow: none;
}

.slide-sidebar.open {
    left: 0;
}

.sidebar-float-btn {
    display: none;
}

.chat-group-list {
    list-style: none;
    padding: 0;
    margin-bottom: 0;
}

.chat-group-list li a {
    display: block;
    padding: 0.5rem;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
}

.chat-group-list li a:hover {
    background-color: #f0f0f0;
}

.chat-group-list li a:active {
    color: #fff;
    background-color: #FF5800;
}

.portal-main {
    flex-grow: 1;
    width: 100%;
}

.modal-content {
    max-width: 600px;
    padding: 1rem;
    margin: 10rem auto;
}

.overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content li {
    list-style: none;
    padding: 0;
}

.modal-content ul {
    padding-left: 1rem;
}

.selected-user {
    background-color: #f0f0f0;
    color: #999;
}

/* portal events/trainings page */
#portal-events-container, #portal-trainings-container {
    padding: 1rem 1rem 0 1rem;
    height: calc(100vh - 88px);
    overflow-y: auto;
}

.masonry-layout {
    column-count: 2;
    column-gap: 1rem;
}

.flex-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.flex-layout .portal-trainings-card {
    flex: 1 1 calc(50% - 0.5rem);
}

.portal-events-card, .portal-trainings-card {
    height: fit-content;
    break-inside: avoid;
    margin-bottom: 1rem;
    width: 100%;
    display: inline-block;
}

/* portal sick page */
.portal-sick-form {
    max-width: 20rem;
    margin: 1rem 1rem 0 1rem;
}

#sick-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start; /* or center if you want centered layout */
}

.sick-card {
    max-width: 23rem;
}

/* paging */
#paging {
    z-index: 3;
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
}

.pagination {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.page-btn:last-child {
    font-weight: bold;
    border-top-right-radius: .25rem;
    border-bottom-right-radius: .25rem;
}

.page-btn:first-child {
    font-weight: bold;
    border-top-left-radius: .25rem;
    border-bottom-left-radius: .25rem;
}

.page-btn:not(:first-child) {
    margin-left: -1px;
}

.page-btn {
    padding: .375rem .75rem;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #FF5800;
    cursor: pointer;
}

.page-btn.active {
    z-index: 5;
    font-weight: bold;
    background: #FF5800;
    border: 1px solid #FF5800;
    color: white;
}

.page-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.dots {
    padding: .375rem .75rem;
    user-select: none;
}

/* textarea */
textarea.auto-grow, textarea.just-auto-grow {
    resize: none;
    min-height: 6.625rem;
    line-height: 1.4;
    padding: 0.5rem;
}

/* alert message */

#live-message, #successMessage {
    position: fixed;
    float: left;
    bottom: 0;
    left: 1rem;
    z-index: 9;
}

.alert {
    transition: opacity 0.5s ease-out;
}

/* ----- link ----- */
a {
    color: #6c757d;
    text-decoration: none;
}

a:hover{
    color: #FF5800;
}

.link {
    color: #FF5800;
}

.link:hover {
    color: #0d6efd;
}

/* ----- footer ----- */

footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding-top: 1rem;
    white-space: nowrap;
    line-height: 2rem;
    background-color: #f9f9f9;
    z-index: 1;
}

footer ul {
    list-style: none;
    padding: 0;
}

#footer-info-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

#footer-info {
    display: flex;
    justify-content: space-around;
    width: 92%;
    max-width: 62rem;
    padding: 0 1rem;
}

#footer-left {
    width: 50%;
}

#footer-right {
    width: 50%;
    display: flex;
    justify-content: space-around;
}

.footer-text {
    font-size: 0.8rem;
    color: #000;
}

.copyright {
    width: 92%;
    max-width: 62rem;
}

/* mobile layout */
@media (max-width: 1087px) {
    main {
        border: none;
        margin-bottom: 26rem;
    }

    #footer-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0;
    }

    #footer-left,
    #footer-right {
        width: 100%;
    }

    #footer-right {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 991.98px) {
    .navbar {
        min-height: 5.5rem;
    }

    .navbar-nav {
        align-items: start;
        padding-top: 1rem;
    }
}

@media (max-width: 786px) {
    .gallery-list-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    html {
        font-size: 16px;
    }

    .page-container {
        padding: 1.125rem 1.5rem;
    }

    #trainings-container {
        display: flex;
        justify-content: space-between;
        width: 100%;
        margin-left: 0;
    }

    #standard-trainings-container, #upcoming-trainings-container {
        width: 16rem;
    }

    .chat-container, #portal-events-container, #portal-trainings-container {
        margin-top: 0.375rem;
        margin-bottom: 0rem;
        height: calc(100vh - 94px);
    }

    .portal-sick-form {
        margin-top: 1.375rem;
    }

    .mpt {
        margin-left: 2.5rem;
    }

    .chat-message {
        max-width: 85%;
    }

    #sidebarToggle {
        display: block;
    }

    .slide-sidebar {
        position: fixed;
        top: 88px;
        left: -15rem;
        width: 15rem;
        height: calc(100vh - 88px);
        background-color: #f9f9f9;
        z-index: 3;
        padding: 1rem;
        transition: left 0.3s ease-in-out;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    }

    .sidebar-float-btn {
        position: absolute;
        top: 1rem;
        right: -2.5rem;
        width: 2.5rem;
        height: 2.5rem;
        background-color: #FF5800;
        border: none;
        color: white;
        border-radius: 0 0.5rem 0.5rem 0;
        font-size: 1.2rem;
        box-shadow: 0 0.1rem 0.4rem rgba(0,0,0,0.2);
        cursor: pointer;
        transition: background-color 0.2s ease-in-out;
    }

    .portal-layout {
        flex-direction: column;
        height: calc(100vh - 88px);
    }

    .masonry-layout {
        column-count: 1;
    }

    .flex-layout {
        flex-direction: column;
    }

    .flex-layout .portal-trainings-card {
        flex: 1 1 100%;
    }

    #agenda-page-container {
        display: block;
    }
}

@media (max-width: 716px) {
    .gallery-list-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 646px) {
    iframe {
        width: 500px;
        height: 400px;
        margin-bottom: 1rem;
    }
}

@media (max-width: 575px) {
    #trainings-container {
        display: block;
    }

    #standard-trainings-container, #upcoming-trainings-container {
        margin: 0 auto 2rem auto;
    }
}

@media (max-width: 550px) {
    .gallery-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-container {
        padding: 1.125rem 1rem;
    }

    iframe {
        width: 400px;
        height: 300px;
        margin-bottom: 1rem;
    }
}

@media (max-width: 425px) {
    .form-row {
        gap: 0;
    }

    iframe {
        width: 350px;
        height: 250px;
        margin-bottom: 1rem;
    }
}

@media (max-width: 375px) {
    .gallery-item {
        width: 8rem;
    }

    .page-container {
        padding: 1.125rem 0.5rem;
    }

    iframe {
        width: 300px;
        height: 200px;
        margin-bottom: 1rem;
    }
}