:root {
    --color-yellow-rgb: 248, 242, 90;
    --color-yellow: rgb(var(--color-yellow-rgb));
    --color-blue-rgb: 32, 0, 236;
    --color-blue: rgb(var(--color-blue-rgb));
    --color-green-rgb: 131, 248, 127;
    --color-green: rgb(var(--color-green-rgb));
    --color-red-rgb: 216, 61, 129;
    --color-red: rgb(var(--color-red-rgb));

    --carousel-active-border-width: 5px;
    --section-title-border-width: 5px;
    --footer-background-color: rgb(242, 242, 242);
    --navbar-toggler-dot-size: 15px;

    --bs-secondary-rgb: 222, 226, 230;
    --bs-body-font-weight: 400;
    --bs-border-radius: 40px;
}

html {
    font-size: 18px;
}

@media (min-width: 780px) {
    :root {
        --navbar-toggler-dot-size: 18px;
    }

    html {
        font-size: 21px;
    }
}

b,
strong {
    font-weight: 600;
}

button {
    font-weight: var(--bs-body-font-weight);
}

.btn-link {
    text-decoration: none;
    color: var(--bs-body-color);

    &.has-icon {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding-left: 0;

        i {
            font-size: 1rem;
            color: var(--bs-white);
            background-color: var(--bs-body-color);
            border-radius: 50%;
            width: 1.8rem;
            height: 1.8rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }
    }
}

nav {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.navbar-brand {
    img {
        height: 75px;

        @media (min-width: 780px) {
            height: 120px;
        }
    }
}

.navbar-toggler {
    display: grid;
    grid-template-columns: auto auto;
    gap: 2px;

    div {
        border-radius: 100%;
        width: var(--navbar-toggler-dot-size);
        height: var(--navbar-toggler-dot-size);
        background-color: var(--background-color);

        &:nth-child(1) {
            --background-color: var(--color-yellow);
        }

        &:nth-child(2) {
            --background-color: var(--color-blue);
        }

        &:nth-child(3) {
            --background-color: var(--color-green);
        }

        &:nth-child(4) {
            --background-color: var(--color-red);
        }
    }
}

.navbar-brand-icon {
    img {
        width: auto;
        height: calc(var(--navbar-toggler-dot-size) * 2.5);
    }
}

.home-hero-image {
    width: 100%;
    height: 60vh;

    img {
        object-fit: cover;
        width: 100%;
        height: 100%;
    }
}

.carousel-item {
    color: var(--bs-body-color);
    text-decoration: none;
}

.carousel-item-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    height: 60vh;
    max-height: 60vh;

    .desktop-image,
    .mobile-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .desktop-image {
        display: none;
    }

    @media (min-width: 780px) {
        aspect-ratio: calc(16 / 9);
        height: 70vh;
        max-height: 70vh;

        .desktop-image {
            display: block;
        }

        .mobile-image {
            display: none;
        }
    }
}

.carousel-item-content {
    padding-top: 1rem;
    padding-bottom: 1rem;
    font-size: 1.3rem;
    line-height: 1.2;
}

.carousel-utility-container {
    gap: 1.5rem;
}

.carousel-indicators-container {
    height: 1.3rem;
}

.carousel-indicators {
    align-items: flex-end;
    margin: 0;

    [data-bs-target] {
        position: relative;
        width: 100%;
        opacity: 1;
        background-color: var(--bs-body-color);
        transition: none;
        text-indent: 0;
    }

    .active {
        background-color: var(--color);
        height: var(--carousel-active-border-width);
    }

    span {
        position: absolute;
        bottom: 0;
        left: 0px;
        width: 100%;
        transform: translateY(100%);
        text-align: left;
        color: var(--bs-body-color);
    }
}

.carousel-control {
    background-color: unset;
    outline: none;
    border: 0;
    padding: 0;
    margin: 0;
    width: 24px;
    color: var(--bs-body-color);

    &:first-child {
        text-align: left;
    }

    &:last-child {
        text-align: right;
    }

    i {
        font-size: 1.3rem;
    }
}

.events-container {
    --cut-out-size: 0.5rem;

    .swiper {
        margin-left: calc(-1 * var(--cut-out-size));
        margin-left: calc(-1 * var(--cut-out-size));
    }

    .swiper-slide {
        transition: transform .3s cubic-bezier(0,0,.5,1);
        padding: var(--cut-out-size);

        p {
            line-height: 1.3;
            margin-bottom: 0.5rem;
        }

        .btn {
            background-color: rgba(var(--border-color-rgb, var(--bs-dark-rgb)), 0.3);
        }

        &:hover {
            transform: scale(1.01);
        }
    }

}

.card {
    text-decoration: none;
    color: var(--bs-body-color);
    --bs-border-radius: 0;
    --bs-border-width: 0;
}

.event-image-container,
.card-image {
    width: 100%;
    aspect-ratio: calc(1 / 1.4142);
    max-height: 50vh;
    margin-bottom: 1rem;

    img {
        object-fit: cover;
        width: 100%;
        height: 100%;
    }
}

.card-image {
    max-height: unset;
}

.card-body {
    padding: 0;
    text-align: center;
}

.card-text {
    margin-bottom: 0;
}

.swiper-button-next,
.swiper-button-prev {
    --swiper-navigation-color: var(--bs-body-color);
}

.newsletter-carousel {
    --swiper-navigation-top-offset: 40%;
    --swiper-navigation-sides-offset: -54px;
    position: relative;

    .card-image {
        border: 1px solid var(--bs-border-color);
    }

    @media (max-width: 768px) {
        --swiper-navigation-sides-offset: 0px;
    }
}

article.wiki-article {
    padding-top: 4rem;

    h1 {
        font-weight: 500;
        font-size: 2rem;
    }

    h2 {
        font-weight: 400;
        font-size: 1.4rem;
        border-bottom: var(--section-title-border-width) solid rgb(var(--border-color-rgb, var(--bs-dark-rgb)));
    }

    h3 {
        font-weight: 400;
        font-size: 1.2rem;
    }

    h4 {
        font-weight: 600;
        font-size: 1.1rem;
    }
}

article.wiki-article table {
    --border: 1px solid rgb(var(--border-color-rgb, var(--bs-dark-rgb)));
    margin-bottom: 2rem;
    border: var(--border);
    overflow: hidden;
    width: 100%;

    th {
        background-color: rgb(var(--border-color-rgb, var(--bs-dark-rgb)));
        color: white;
        font-weight: 500;
    }

    th,
    td {
        padding: 0.5rem 1rem;
        border-bottom: var(--border);
        text-align: left;
    }

    tr:last-child td {
        border-bottom: none;
    }

    @media screen and (max-width: 768px) {

        &,
        tbody,
        th,
        td,
        tr {
            display: block;
        }

        &,
        td {
            border: 0;
        }

        thead {
            display: none;
        }

        tr {
            margin-bottom: 1rem;
            border: var(--border);
            padding: 1.5rem 1rem 1rem;
        }

        td {
            padding: 0;
        }

        td:nth-child(1) {
            font-size: 1.5rem;
            font-weight: 600;
            line-height: 1;
            margin-bottom: 1rem;
        }
    }
}

section {
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(21vh);
    transition: all 0.75s ease-in-out;

    &.in-view {
        opacity: 1;
        transform: translateY(0);
    }

    h2 {
        display: inline-block;
        font-weight: 400;
        font-size: 1.4rem;
        border-bottom: var(--section-title-border-width) solid rgb(var(--border-color-rgb, var(--bs-dark-rgb)));
    }
}

.navbar-mobile {
    --navbar-width: 100%;

    .navbar-collapse {
        background: white;
        position: fixed;
        z-index: 10001;
        right: calc(-1 * var(--navbar-width));
        top: 0;
        bottom: 0;
        width: var(--navbar-width);
        padding: 20px;
        height: 100% !important;
        box-sizing: border-box;
        overflow-x: hidden;
        overflow-y: auto;
        text-align: left;
        backface-visibility: hidden;
        transform: translate3d(0, 0, 0);
        transform-origin: 0 10%;
        transform: perspective(1000px) scale(1.3);
        transition: all 0.4s 0s ease-in;

        &.collapsing {
            transition-duration: 0.1s;
        }

        &.show {
            transition: all 0.3s 0s ease-out;
            transform: perspective(1000px) scale(1) translate3d(calc(-1 * var(--navbar-width)), 0, 0);
        }
    }

    .navbar-toggler {
        display: inline-block;
        padding: 10px;
        font-size: 2rem;
    }

    .nav-item {
        .nav-link {
            --bs-nav-link-padding-y: 0.2rem;
            color: var(--bs-body-color);
            font-size: 1.5rem;
            font-weight: 300;
        }

        .btn {
            margin-top: 1rem;
            margin-left: 1rem;
        }
    }

    .line {
        border-top: 1px solid var(--bs-body-color);
        margin-top: 1rem;
    }

    .search-container {
        padding: 1.2rem var(--bs-nav-link-padding-x);

        i {
            font-size: 1.8rem;
        }

        .form-control {
            border: 0;
            padding: 0 1rem 0;
            font-size: 1.5rem;

            &:focus {
                background-color: transparent;
                outline: 0;
                box-shadow: none;
            }
        }
    }

    .download {
        font-size: 1.5rem;
        font-weight: 300;
    }

    @media (min-width: 414px) {
        --navbar-width: 414px;
    }
}



.footer {
    background-color: var(--footer-background-color);
    padding: 2rem 0;
    font-size: 0.8rem;

    .nav-link {
        color: var(--bs-body-color);
        padding: 0 0 0.3rem;
    }

    .nav-item-header {
        font-weight: 500;
        margin-bottom: 0.3rem;
    }

    .social-media-container {
        i {
            font-size: var(--social-icon-size, 1.5rem);
        }
    }

    @media screen and (max-width: 768px) {
        --bs-nav-link-font-size: 1rem;
        --social-icon-size: 2.1rem;
    }
}

blockquote {
    border-left: 10px solid #efefef;
    /* vertical grey line */
    padding-left: 1em;
    /* space between the line and text */
    font-size: 1rem !important;
    font-weight: 400;
}

.swiper-pagination {
    --swiper-pagination-bullet-size: 6px;
    --swiper-pagination-color: var(--bs-gray);
    --swiper-pagination-bullet-horizontal-gap: 6px;


    .swiper-pagination-bullet {
        transition: transform 0.4s ease;
    }

    .swiper-pagination-bullet-active {
        transform: scale(3);
    }
}

.history-titles {
    --color: var(--bs-gray);
    --active-color: var(--bs-gray);

    .swiper-slide {
        /* width: 40vw !important; */
        text-align: center;
        cursor: pointer;
        font-size: min(9vw, 120px);
        font-weight: 700;
        line-height: 1;
        transition: color 0.4s ease;
        -webkit-text-stroke: 1px var(--color);
        text-stroke: 1px var(--color);
        color: transparent;
        white-space: nowrap;

        &.swiper-slide-active {
            color: var(--active-color);
            -webkit-text-stroke: 1px var(--active-color);
            text-stroke: 1px var(--active-color);
        }
    }
}

.history-gallery {
    --swiper-navigation-size: 1rem;

    .image-container {
        width: 100%;
        aspect-ratio: calc(1.4142 / 1);

        img {
            object-fit: cover;
            width: 100%;
            height: 100%;
        }
    }
}

.history-records {
    --swiper-pagination-bottom: -70px;
}

.image-button {
    --color: var(--bs-gray);
    text-align: center;
    font-weight: bold;
    background-color: var(--bs-light);
    border-radius: 10px;
    overflow: hidden;

    .inner {
        border-top: 10px solid var(--color);
        padding: 1rem;
    }

    a {
        text-decoration: none;
        color: var(--bs-body-color);
    }

    img {
        width: auto;
        height: 60px;
        min-height: 60px;
    }
}

.image-row {
    h3 {
        text-decoration: none;
    }
    a {
        text-decoration: none;
    }
    a:hover {
        opacity: 0.8;
    }
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 767px) {
    .btn-mobile-full {
        width: 100%;
    }
}

.tab-container {
    .title-container {
        display: flex;
        gap: 4rem;
        margin-bottom: 2rem;

        h2 {
            cursor: pointer;
            --border-color-rgb: var(--bs-secondary-rgb);
            transition: all 0.3s ease;

            &.active {
                --border-color-rgb: var(--border-color-rgb-active);
            }
        }

        .swiper-slide {
            width: auto !important;
        }
    }

    .detail-container {
        .detail {
            display: flex;
            gap: 3rem;
            align-items: flex-start;

            @media screen and (min-width: 769px) {
                &.right {
                    justify-content: flex-end;
                    flex-direction: row-reverse;
                }
            }

            .image-container {
                width: 30%;
                aspect-ratio: calc(4 / 3);
                overflow: hidden;

                img {
                    object-fit: cover;
                    width: 100%;
                    height: 100%;
                }
            }

            a {
                text-decoration: none;
                color: var(--bs-body-color);
            }

            h2,
            p {
                margin-bottom: 1rem;
            }

            p:last-child {
                margin-bottom: 0;
            }

            @media screen and (max-width: 768px) {
                flex-direction: column;
                gap: 1.5rem;

                .image-container {
                    width: 100%;
                }
            }
        }
    }

    .swiper {
        --swiper-navigation-top-offset: 27%;
        --swiper-navigation-size: 1.5rem;
    }
}

.social-media-container {
    a {
        color: var(--color);
    }
    a:hover {
        opacity: 0.8;
    }
}
