﻿/*#region homeevents*/

/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
    @keyframes floatAnimation {
        0% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-2rem);
        }

        100% {
            transform: translateY(0);
        }
    }

    @keyframes floatAnimation2 {
        0% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-3rem);
        }

        100% {
            transform: translateY(0);
        }
    }

    #secEvents {
        padding: var(--sectionPadding);
        overflow: hidden;
        position: relative;
        z-index: 1;                
    }
        #secEvents .cs-container {
            width: 100%;
            /* changes to 1280px at desktop */
            max-width: 44rem;
            margin: auto;
            display: flex;
            flex-direction: column;
            align-items: center;
            /* 48px - 64px */
            gap: clamp(3rem, 6vw, 4rem);
        }

        #secEvents .cs-content {
            /* set text align to left if content needs to be left aligned */
            text-align: center;
            width: 100%;
            display: flex;
            flex-direction: column;
            /* centers content horizontally, set to flex-start to left align */
            align-items: center;
        }

        #secEvents .cs-title {
            max-width: 24ch;
        }

        #secEvents .cs-wrapper {
            width: 100%;
            display: flex;
            flex-direction: column;
            /* 16px - 20px */
            gap: clamp(1rem, 3vw, 1.25rem);
        }

        #secEvents .cs-picture {
            width: 100%;
            /* 200px - 300px */
            min-height: clamp(12.5rem, 40vw, 18.75rem);
            border-radius: var(--borderRadiusLarge);
            /* clips the corners of the img tags */
            overflow: hidden;
            display: block;
            position: relative;
            z-index: 1;
        }

        #secEvents .cs-picture img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            position: absolute;
            top: 0;
            left: 0;
        }

        #secEvents .cs-card-group {
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            /* 16px - 20px */
            gap: clamp(1rem, 3vw, 1.25rem);
            list-style:none;
        }

        #secEvents .cs-item {
            list-style: none;
            border: 1px solid var(--primaryLight);
            background-color: #FFF;
            overflow: hidden;           
            border-radius: var(--borderRadiusLarge);
            position: relative;
            z-index: 1;
        }

        #secEvents .cs-item:before {
            /* background color overlay for dark mode*/
            content: '';
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.2);
            position: absolute;
            display: none;
            top: 0;
            left: 0;
            z-index: -1;
        }

        #secEvents .cs-item:hover .cs-date {
            border-color: var(--secondary);
        }

        #secEvents .cs-item:hover .cs-date:before {
            background-color: var(--secondary);
        }

        #secEvents .cs-link {
            text-decoration: none;
            width: 100%;
            /* 16px - 24px */
            padding: clamp(1rem, 3vw, 1.5rem);
            /* prevents padding from affecting height and width */
            box-sizing: border-box;
            display: flex;
            justify-content: flex-start;
            align-items: center;
            /* 16px - 24px */
            gap: clamp(1rem, 3vw, 1.5rem);
        }

        #secEvents .cs-date {
            font-size: 1rem;
            line-height: 1.5em;
            width: clamp(3.5rem, 7vw, 5rem);
            height: auto; /* Allow auto height to let aspect-ratio handle it */
            aspect-ratio: 1 / 1; /* 👈 keeps it a circle */
            margin: 0;
            color: var(--headerColor);
            border: 1px solid var(--primaryLight);
            overflow: hidden;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            position: relative;
            z-index: 1;
            transition: border-color 0.3s;
            flex-shrink: 0; /* 👈 Prevents shrinking in a flex container */
        }

        #secEvents .cs-date:before {
            /* background color */
            content: '';
            width: 100%;
            height: 100%;
            background-color: var(--primaryLight);
            opacity: .1;
            position: absolute;
            display: block;
            top: 0;
            left: 0;
            z-index: -1;
            transition: background-color 0.3s;
        }

        #secEvents .cs-date strong {
            line-height: 1.2em;
            font-weight: 700;
            color: var(--primary);
        }

        #secEvents .cs-h3 {
            /* 20px - 25px */
            font-size: clamp(1.25rem, 4vw, 1.5625rem);
            line-height: 1.2em;
            font-weight: 700;
            /* 4px - 16px */
            margin: 0 0 clamp(0.25rem, 1vw, 0.5rem);
            color: var(--headerColor);
        }

        #secEvents .cs-time {
            font-size: 1rem;
            line-height: 1.5em;
            margin: 0;
            color: var(--bodyTextColor);
            display: flex;
            justify-content: flex-start;
            align-items: flex-start;
            gap: 0.5rem;
           
        }

        #secEvents .cs-floater-wrapper {
            width: 100%;
            max-width: 120rem;
            height: 100%;
            position: absolute;
            top: 0;
            left: 50%;
            z-index: -1;
            transform: translateX(-50%);
        }

        #secEvents .cs-floater1 {
            width: 32.5rem;
            height: auto;
            position: absolute;
            left: 50%;
            top: -11.25rem;
            z-index: -1;
            transform: rotate(-150deg);
            animation-name: floatAnimation;
            animation-duration: 5s;
            animation-timing-function: ease-in-out;
            animation-fill-mode: forwards;
            animation-iteration-count: infinite;
        }

        #secEvents .cs-floater2 {
            width: 44.375rem;
            height: auto;
            position: absolute;
            right: 50%;
            top: 50%;
            z-index: -1;
            transform: translateY(-50%) rotate(-105deg);
            animation-name: floatAnimation2;
            animation-duration: 14s;
            animation-timing-function: ease-in-out;
            animation-fill-mode: forwards;
            animation-iteration-count: infinite;
        }

        #secEvents .cs-button-4 {
            width:100%;
            border-radius: var(--borderRadiusLarge)
        }
}
/* Small Desktop - 1024px */
@media only screen and (min-width: 64rem) {
    #secEvents .cs-container {
        max-width: 80rem;
    }

    #secEvents .cs-wrapper {
        flex-direction: row;
    }

    #secEvents .cs-picture {
        height: auto;
        width: 60%;
        /* sends it to the right in the 2nd position */
        order: 2;
    }

    #secEvents .cs-card-group {
        width: 50%;
        max-width: 33.875rem;
        /* prevents flexbox from squishing it */
        flex: none;
    }

    #secEvents .cs-floater1 {
        top: 0.625rem;
        left: auto;
        right: -30rem;
    }

    #secEvents .cs-floater2 {
        top: 20.375rem;
        right: auto;
        left: -31.875rem;
        transform: rotate(-105deg);
    }
}
                                
/*#end region*/
