/* importing the font from the figma mockup */
@import url('https://fonts.googleapis.com/css2?family=Hanuman:wght@400;700&display=swap');

/* ============================================ globals ============================================ */
:root {
    font-family: Hanuman, serif;
    font-size: 1rem;
    padding: 0;
    margin: 0;

    --green: rgba(17, 100, 17, 1);
    --darkerGreen: rgba(17, 80, 17, 1);
    --greenHalfOpacity: rgba(17, 110, 17, 0.5);

}

* {
    box-sizing: border-box;
}


/* ============================================ builtins ============================================ */
html {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    margin: 0;
}

main {
    flex: 1 0 auto;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

h1 {
    font-size: 4rem;
    text-align: center;
    margin-top: 0;
    padding-top: 2rem;
}

p {
    font-size: 1.1rem;
}

nav {
    color: white;
    font-size: 1.25rem;
    height: 6.75rem;
    background-color: var(--green);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 5%;
}

img {
    object-fit: contain;
    max-width: 100%;
    width: auto;
}

button {
    background-color: black;
    color: white;
    font-family: inherit;
    font-size: 1.5rem;
    padding: 1rem 1rem;
    border-radius: 1rem;
    border: none;
    transition: all 0.2s ease-in-out;
}

button:hover {
    transform: scale(1.05);
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.navLinks {
    display: flex;
    list-style: none;
    flex-grow: 1;
    justify-content: flex-end;
    align-items: center;
    gap: 2rem;
    margin-right: 2rem;
}

.navLinks a {
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.navLinks a:hover {
    color: #E8F5E9;
    border-radius: 4px;
    opacity: 0.85;
}

.navLinks li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

.navLinks li a:hover::after {
    width: 100%;
}

.navLinks a:visited {
    color: white;
}

.navLinks li {
    color: white;
    text-align: center;
}

.sidebarNavLinks {
    list-style: none;
    text-align: center;
    justify-content: center;
    padding: 0 50px;

    li a {
        color: white;
    }
}

/* Navigation Buttons */
.navButton {
    background-color: var(--green);
    color: white;
    border: none;
}

/* Change the background color of the dropdown button when the dropdown content is shown */
.navButton:hover {
    background-color: var(--darkerGreen);
}

/* The container <div> - needed to position the dropdown content */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Show the dropdown menu on hover */
.dropdown:hover .dropContent {
    display: block;
}

/* Dropdown Content (Hidden by Default) */
.dropContent {
    right: 0;
    display: none;
    position: absolute;
    background-color: white;
    min-width: 150%;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    overflow: auto;
}

/* Links inside the dropdown */
.dropContent a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropContent a:visited {
    color: black;
}

/* Change color of dropdown links on hover */
.dropContent a:hover {
    background-color: #ddd;
}

.contentBlock {
    padding: 5%;
    justify-content: center;
    align-content: center;
}

.contentBlock h1 {
    font-size: xxx-large;
}

.contentBlockSpread {
    justify-content: center;
    column-gap: 10vw;
    row-gap: 20px;
}

.hbox {
    display: flex;
    flex-wrap: wrap;
    margin-top: auto;
    margin-bottom: auto;
}

.vbox {
    display: flex;
    flex-flow: column;
    align-items: flex-start;
    height: fit-content;
    margin-top: auto;
    margin-bottom: auto;
}

.eventPreview {
    padding: 10px;
    flex-wrap: nowrap;
    border-radius: 5px;
    background-color: white;
    p {
        font-size: 1.25rem;
    }
    h2 {
        font-size: 1.5rem;
    }
}

.eventDetails {
    margin-top: auto;
    margin-bottom: auto;
}

.eventDate {
    min-width: 15%;
    max-width: 20%;
}

.vline {
    background-color: var(--greenHalfOpacity);
    min-width: 5px;
    border-radius: 2px;
    margin-right: 20px;
}

.whiteTextOutlineBig {
    -webkit-text-stroke: 1.5px white;
    text-shadow: 1px 1px 4px black;
    font-size: xxx-large;
}

.whiteTextOutlineNormal {
    -webkit-text-stroke: 0.3px white;
    text-shadow: 1px 1px 1px black;
}

.noTopMargin {
    margin-top: 0;
}

.noBottomMargin {
    margin-bottom: 0;
}

.centerVertical {
    margin-top: auto;
    margin-bottom: auto;
}

.noPaddingMargin {
    padding: 0;
    margin: 0;
}

.rightAlign {
    margin-right: 0;
    margin-left: auto;
}

.centerAlign {
    align-items: center;
}

.raw-html-embed {
    width: 80vw;
    height: 80vh;
}

.pageTitle {
    text-align: left;
}

.eventName {
    font-size: x-large;
    font-weight: bold;
    color: black;
}

.eventName:visited {
    color: black;
}

.eventName:hover {
    text-decoration: underline solid black;
}

.wellness-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: none;
    opacity: 0;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    transition: all 0.4s ease-in-out;
}

/*When the modal is actually active*/
.wellness-overlay.active {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

.wellness-overlay.active .wellness-subpage {
    transform: scale(1) rotateY(0deg);
}

.wellness-subpage {
    background-color: #ffffff;
    position: absolute;

    top: 40px;
    bottom: 40px;
    left: 40px;
    right: 40px;

    border-radius: 20px;
    padding: 60px 0 40px 40px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);

    transform: scale(0.8) rotateX(5deg);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1)
}

.close-subpage {
    position: absolute;
    top: 20px;
    right: 20px;

    background: transparent;
    border: 1px solid #ddd;
    color: #888;

    /* Circular background */
    width: 35px;
    height: 35px;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 32px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

/* Creating the lines to make the X (exit) */
.close-subpage::before,
.close-subpage::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background-color: #666;
    border-radius: 1px;
}

.close-subpage::before {
    transform: rotate(45deg);
}

.close-subpage::after {
    transform: rotate(-45deg);
}

.subpage-content h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 2.5rem;
    font-weight: bold;
    color: #000;
}

.scroll-area {
    display: block;
    max-height: 60vh;
    overflow-y: auto;
    flex-grow: 1;
    margin-top: 20px;
    padding-right: 25px;
    line-height: 1.6;
    text-align: left;

    scrollbar-gutter: stable;
}

.scroll-area::-webkit-scrollbar {
    width: 15px;
}

.scroll-area::-webkit-scrollbar-thumb {
    background-color: #d1d1d1;
    border-radius: 10px;
    transition: background 0.3s;
}

.scroll-area::-webkit-scrollbar-thumb:hover {
    background-color: #a9a9a9;
}

.scroll-area::-webkit-scrollbar-track {
    background: transparent;
    margin-bottom: 10px;
}

.subpage-content {
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    height: 15vh;
    background-color: (--green);

    .nav-logo {
        height: inherit;

        #navLogo {
            margin-left: 0;
            margin-top: auto;
            margin-bottom: auto;
            height: 100%;
        }
    }
}

.main-content {
    margin-left: auto;
    margin-right: auto;
    width: 80%;
}

.has-dropdown {
    position: relative;
    padding-bottom: 20px;
    margin-bottom: -20px;
    display: inline-block;
    align-items: center;
    cursor: pointer;
    height: 100%;
}

.dropdown-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 180px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    padding: 10px 0;
    margin: 0;
    list-style: none !important;
}

.dropdown-menu li a {
    color: #333 !important;
    padding: 10px 20px;
    text-decoration: none;
    display: block;
    font-weight: normal;
}

.has-dropdown:hover>.dropdown-menu {
    display: block !important;
}

.dropdown-menu li a:hover {
    background-color: #f1f1f1;
}

.split-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 50px;
    margin: auto 5vw;
}



.dow-text {
    flex: 1;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Adds space between cards*/
    gap: 24px;
    max-width: 1200px;
    margin: 50px auto;
    /* Centers the whole grid on your page */
    padding: 20px;
}

.wellness-card {
    background-color: #ffffff;
    border: 2px solid #eaeaea;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
}

.wellness-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.wellness-card:nth-child(1):hover { border-color: #D11388; }
.wellness-card:nth-child(3):hover { border-color: #F6911E; }
.wellness-card:nth-child(5):hover { border-color: #FDD500; }
.wellness-card:nth-child(7):hover { border-color: #6EC054; }
.wellness-card:nth-child(9):hover { border-color: #00abcd; }
.wellness-card:nth-child(11):hover { border-color: #527991; }
.wellness-card:nth-child(13):hover { border-color: #172A53; }
.wellness-card:nth-child(15):hover { border-color: #5D256B; }


.wellness-card h3 {
    margin-bottom: 12px;
    color: #333;
    font-size: 20px;
}

.wellness-card p {
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}

footer,
.site-footer {
    flex-shrink: 0;
}

.site-footer {
    background-color: var(--green);
    padding: 0.5rem 0;
    width: 100%;
    display: block;
    clear: both;
    flex-shrink: 0;
}

.footer-container {
    padding-left: 2rem;
    padding-right: 2rem;
    margin: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    flex-shrink: 0;
}

.footer-contact p,
.footer-contact a {
    font-size: 0.75rem;
    line-height: 1.4;
    margin: 4px 0;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.footer-contact h4 {
    margin-bottom: 10px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.footer-contact {
    color: #ffffff !important;
    text-decoration: none;
    margin: 5px 0;
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 0 40px;
    margin: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 200px;
}

.footer-contact a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.footer-links {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    margin-right: auto;
    padding: 0;
}

.footer-links a,
.footer-socials a,
.footer-socials i {
    color: white !important;
    display: inline-block;
    min-width: 20px;
    min-height: 20px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.footer-socials a i {
    font-size: 32px;
    display: inline-block;
    vertical-align: middle;
}


.footer-links a:hover {
    text-decoration: underline;
}

.footer-socials {
    display: flex;
    gap: 15px;
    margin-right: 0;
}

.footer-socials a {
    color: white;
    font-size: 1.4rem;
    padding: 5px;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.footer-socials a:hover {
    transform: translateY(-3px);
    transform: scale(1.1);
    opacity: 0.8;
}

.footer-logo img {
    height: 80px;
    width: auto;
    display: block;
    margin-right: 40px;
}

.carousel {
    anchor-name: --carousel;
    display: flex;
    /* width: 80vw; */
    height: 50vh;
    overflow-x: auto;
    overflow-y: visible;
    margin-left: auto;
    margin-right: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: none;
    scroll-behavior: smooth;
    gap: 2vw;
    margin-top: 10vh;

    /* note that buttons and the progress markers only work on chrome and edge. 
       firefox and safari have not yet implemented them */
    &::scroll-button(*) {
        color: black;
        background-color: white;
        border-radius: 50px;
        font-size: 1.5rem;
        text-align: center;
        align-content: center;
        position: absolute;
        position-anchor: --carousel;
        bottom: anchor(center);
        z-index: 10;
    }

    &::scroll-button(left) {
        content: "◂" / "Scroll Left";
        inset-inline: anchor(start) auto;
    }
    
    &::scroll-button(right) {
        content: "▸" / "Scroll Right";
        inset-inline: auto anchor(end);
    }

    &::scroll-button(*):focus-visible {
        outline-offset: 5px;
    }

    .carouselItem {
        flex-shrink: 0;
        height: 90%;
        background-repeat: no-repeat;
        background-size: cover;
        border-radius: 10px;
        align-content: center;

        div {
            height: 100%;
            aspect-ratio: 16/9;
            background-color: rgba(255, 255, 255, 0.3);
            backdrop-filter: blur(2px);
            border-radius: inherit;
            scroll-snap-align: center;
            scroll-snap-stop: always;

            img {
                height: 100%;
                width: 100%;
                border-radius: inherit;
            }
        }
    }
}

.jump-button {
    display: inline-block;
    background-color: var(--green);
    color: white !important;
    padding: 15px 30px;
    font-size: 1.25rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-align: center;
    margin-bottom: 20px;
    border: 2px solid transparent;
}

.jump-button:visited, .jump-button:active, .jump-button:link {
    color: #ffffff !important;
}

.jump-button:hover {
    background-color: white !important;
    color: var(--green) !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* ============================================ ids ============================================ */
#footer {
    height: 200px;
    background-color: var(--green);
}

#homepageTitle {
    height: fit-content;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    padding: 10vh 0;
    width: 100%;
    gap: 0;
    background-image:
        linear-gradient(to right, white 50%, rgba(0, 0, 0, 0)),
        var(--var-image);

    .vbox {
        margin-left: 0;
        width: 50vw;
    }

    #logoImage {
        margin-left: 5vw;
        margin-right: 0;
    }

    div,
    img {
        margin-left: auto;
        margin-right: auto;
    }

    h1,
    h2 {
        text-align: left;
    }
}

#searchBar {
    display: inline-flex;
    background-color: white;
    border-radius: 10px;
    margin-bottom: 20px;
    padding: 5px;
    height: fit-content;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);

    form {
        width: 100%;
    }
}

#searchInput {
    font-size: x-large;
    font-family: inherit;
    border: none;
    width: 70%;
    height: fit-content;
    margin-top: auto;
    margin-bottom: auto;
    padding-top: 0;
    padding-bottom: 0;
}

#searchInput:focus {
    border-color: rgba(0, 0, 0, 0.1);
}

#searchButton {
    height: 48px;
    width: 48px;
    background-color: white;
    margin-top: auto;
    margin-bottom: auto;
    padding: 7px;
}

#searchButton:hover {
    cursor: pointer;
    box-shadow: none;
}

#searchPageNav {
    background-color: rgba(0, 0, 0, 0);
}

#searchPage {
    margin: 0 20%;
    font-size: larger;
}

#logoImage {
    margin: 20px;
    margin-right: 0;
    padding-right: 0;
    width: 360px;
}

#missionStatement {
    text-align: center;
    padding: 50pt;
    padding-bottom: 25pt;
    padding-left: 25%;
    padding-right: 25%;
}

#upcomingEventsPreviews {
    padding: 10px;
    border-radius: 10px;
    background-color: var(--green);
    width: 75vw;
}

#calendarPage {
    align-items: center;
}

#calendarBlock {
    margin-top: 5vh;
    margin-bottom: 10vh;
    padding: 20px;
    background-color: var(--greenHalfOpacity);
    border-radius: 20px;
    border: 2px solid var(--green);
}

#formsBlock {
    margin-bottom: 20vh;
    padding: 20px;
    background-color: var(--greenHalfOpacity);
    border-radius: 20px;
    border: 2px solid var(--green);
}

#dowImage {
    max-width: 300px;
    height: auto;
    display: block;
    margin: 0 auto;
}

#hamburger {
    display: none;
}

#menuSidebar {
    display: none;
}


/* ============================================ animations ============================================ */


/* ============================================ responsive design (mobile) ============================================ */
@media (max-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* homepage for mobile */
@media (max-width: 909px) {

    h1 {
        text-align: center;
        font-size: 3rem;
    }

    .pageTitle {
        text-align: center;
    }

    .navLinks {
        display: none;
    }

    .carousel {
        .carouselItem {
            div {
                width: 80vw;
            }
        }
    }

    .has-dropdown:hover>.dropdown-menu {
        top: auto;
        bottom: 0;
        height: fit-content;
    }

    #homepageTitle {
        background-image:
            linear-gradient(to bottom, white 50%, rgba(0, 0, 0, 0)),
            var(--var-image);

        .vbox {
            margin-left: auto;
        }

        #logoImage {
            margin-left: auto;
            margin-right: auto;
        }

        h1,
        h2 {
            text-align: center;
            width: 100%;
        }
    }

    #missionStatement {
        text-align: center;
        padding-bottom: 25pt;
        padding-left: 10%;
        padding-right: 10%;
    }

    #searchBar {
        width: 80%;
        margin-left: 10%;
        margin-right: 10%;
    }

    #hamburger {
        display: unset;
        height: 75%;
        width: fit-content;
        margin-right: 20px;
        background-color: unset;
    }

    #hamburger:hover {
        box-shadow: none;
    }

    #hamburger img {
        height: 100%;
    }

    #menuSidebar {
        display: none;
        z-index: 100;
        position: fixed;
        background-color: rgba(0, 0, 0, 0.75);
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;

        #sidebarWithOptions {
            z-index: 101;
            background-color: var(--darkerGreen);
            position: fixed;
            top: 0;
            bottom: 0;
            right: 0;
            width: fit-content;
            max-width: 100vw;

            .sidebarNavLinks li {
                padding-top: 10px;
                padding-bottom: 10px;
            }

            .fitToSidebar {
                width: 100%;
                height: 200px;
                justify-content: center;
            }

            .closeBar {
                width: 100%;
                height: 40px;
                display: inline-flex;
                justify-content: flex-end;

                button {
                    background-color: unset;
                    width: fit-content;
                    height: fit-content;
                    box-shadow: none;

                    img {
                        height: 40px;
                        width: auto;
                    }
                }
            }
        }
    }

    #upcomingEventsPreviews {
        width: 90vw;
    }
}

/* 8DoW */
@media (max-width: 768px) {
    .split-container {
        flex-direction: column;
        padding: 20px;
        text-align: center;
    }

    .dow-image-container img {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}
