/* =========================================================
   SUN SHINE CLUB - EVENTS CALENDAR
   events-calendar.css
========================================================= */


/* =========================================================
   CALENDAR SECTION
========================================================= */

.event-calendar-section {
    position: relative;
    padding: 90px 0;
    background: #f8f9fc;
    overflow: hidden;
}

.event-calendar-section::before {
    content: "";
    position: absolute;
    top: -180px;
    right: -180px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(147, 129, 255, 0.08);
    pointer-events: none;
}

.event-calendar-section::after {
    content: "";
    position: absolute;
    bottom: -200px;
    left: -200px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(255, 193, 7, 0.06);
    pointer-events: none;
}


/* =========================================================
   CALENDAR WRAPPER
========================================================= */

.event-calendar-wrapper {
    position: relative;
    z-index: 2;

    width: min(1100px, 100%);
    margin: 45px auto 0;

    background: #ffffff;

    border: 1px solid #e9eaf0;
    border-radius: 24px;

    box-shadow:
        0 20px 60px rgba(25, 30, 45, 0.08);

    overflow: hidden;
}


/* =========================================================
   CALENDAR HEADER
========================================================= */

.event-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 25px;

    padding: 25px 30px;

    border-bottom: 1px solid #ececf2;

    background: #ffffff;
}


/* =========================================================
   CALENDAR HEADING
========================================================= */

.calendar-heading {
    display: flex;
    align-items: center;
    gap: 15px;
}

.calendar-heading > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.calendar-heading > div > span {
    color: #7a7d88;

    font-size: 12px;
    font-weight: 600;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.calendar-heading strong {
    color: #20232b;

    font-size: 23px;
    font-weight: 700;

    line-height: 1.25;
}


/* =========================================================
   CALENDAR ICON
========================================================= */

.calendar-icon {
    width: 52px;
    height: 52px;

    flex: 0 0 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 15px;

    background: #9381ff;
    color: #ffffff;

    font-size: 21px;

    box-shadow:
        0 8px 22px rgba(147, 129, 255, 0.25);
}


/* =========================================================
   CALENDAR CONTROLS
========================================================= */

.calendar-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}


/* =========================================================
   TODAY BUTTON
========================================================= */

.calendar-today-btn {
    min-height: 40px;

    padding: 0 16px;

    border: 1px solid #e3e4ea;
    border-radius: 10px;

    background: #ffffff;
    color: #343741;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}

.calendar-today-btn:hover {
    background: #f5f4ff;
    border-color: #9381ff;
    transform: translateY(-1px);
}


/* =========================================================
   PREVIOUS / NEXT
========================================================= */

.calendar-nav-btn {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #e3e4ea;
    border-radius: 10px;

    background: #ffffff;
    color: #343741;

    font-size: 13px;

    cursor: pointer;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}

.calendar-nav-btn:hover {
    background: #9381ff;
    border-color: #9381ff;
    color: #ffffff;

    transform: translateY(-1px);
}

.calendar-nav-btn:active,
.calendar-today-btn:active {
    transform: scale(0.96);
}


/* =========================================================
   CALENDAR GRID
========================================================= */

.event-calendar {
    padding: 25px 30px 20px;
}


/* =========================================================
   WEEK HEADER
========================================================= */

.calendar-weekdays {
    display: grid;

    grid-template-columns:
        repeat(7, minmax(0, 1fr));

    margin-bottom: 8px;
}

.calendar-weekday {
    min-height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #8a8d97;

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 0.04em;
    text-transform: uppercase;
}


/* =========================================================
   DAYS GRID
========================================================= */

.calendar-days {
    display: grid;

    grid-template-columns:
        repeat(7, minmax(0, 1fr));

    gap: 7px;
}


/* =========================================================
   INDIVIDUAL DAY
========================================================= */

.calendar-day {
    position: relative;

    min-height: 92px;

    padding: 10px;

    border: 1px solid #ececf1;
    border-radius: 13px;

    background: #ffffff;

    color: #353842;

    cursor: default;

    transition:
        border-color 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.calendar-day:hover {
    border-color: #d9d5ff;
    background: #fbfaff;
}


/* =========================================================
   EMPTY DAYS
========================================================= */

.calendar-day.empty {
    min-height: 92px;

    border-color: transparent;

    background: transparent;

    cursor: default;
}

.calendar-day.empty:hover {
    border-color: transparent;
    background: transparent;
}


/* =========================================================
   DAY NUMBER
========================================================= */

.calendar-day-number {
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: #343741;

    font-size: 13px;
    font-weight: 600;
}


/* =========================================================
   TODAY
========================================================= */

.calendar-day.today {
    border-color: #9381ff;

    background:
        linear-gradient(
            145deg,
            #faf9ff,
            #ffffff
        );
}

.calendar-day.today .calendar-day-number {
    background: #9381ff;
    color: #ffffff;

    box-shadow:
        0 4px 12px rgba(147, 129, 255, 0.25);
}


/* =========================================================
   EVENT DAY
========================================================= */

.calendar-day.has-event {
    cursor: pointer;
}

.calendar-day.has-event:hover {
    border-color: #9381ff;

    background: #faf9ff;

    transform: translateY(-2px);

    box-shadow:
        0 8px 25px rgba(25, 30, 45, 0.08);
}


/* =========================================================
   EVENT INDICATOR
========================================================= */

.calendar-event-indicator {
    display: flex;
    align-items: center;
    gap: 6px;

    margin-top: 10px;

    color: #5d5f68;

    font-size: 11px;
    font-weight: 600;

    line-height: 1.35;
}

.calendar-event-indicator::before {
    content: "";

    width: 7px;
    height: 7px;

    flex: 0 0 7px;

    border-radius: 50%;

    background: #ff6b6b;

    box-shadow:
        0 0 0 3px rgba(255, 107, 107, 0.12);
}

.calendar-event-name {
    display: -webkit-box;

    overflow: hidden;

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}


/* =========================================================
   MULTIPLE EVENTS
========================================================= */

.calendar-more-events {
    margin-top: 5px;

    color: #9381ff;

    font-size: 10px;
    font-weight: 700;
}


/* =========================================================
   CALENDAR LEGEND
========================================================= */

.calendar-legend {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 25px;

    padding: 17px 25px;

    border-top: 1px solid #ececf2;

    background: #fbfbfd;

    color: #6f727c;

    font-size: 12px;
    font-weight: 600;
}

.calendar-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}


/* =========================================================
   LEGEND DOT
========================================================= */

.legend-dot {
    width: 8px;
    height: 8px;

    display: inline-block;

    border-radius: 50%;
}

.event-dot {
    background: #ff6b6b;
}

.today-dot {
    background: #9381ff;
}


/* =========================================================
   EVENT MODAL
========================================================= */

.event-modal {
    position: fixed;

    inset: 0;

    z-index: 100000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 25px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.event-modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* =========================================================
   MODAL OVERLAY
========================================================= */

.event-modal-overlay {
    position: absolute;

    inset: 0;

    background: rgba(13, 16, 24, 0.68);

    backdrop-filter: blur(7px);
}


/* =========================================================
   MODAL CONTENT
========================================================= */

.event-modal-content {
    position: relative;

    z-index: 2;

    width: min(620px, 100%);
    max-height: min(850px, 92vh);

    overflow-y: auto;

    border-radius: 25px;

    background: #ffffff;

    box-shadow:
        0 30px 100px rgba(0, 0, 0, 0.28);

    transform:
        translateY(25px)
        scale(0.96);

    transition:
        transform 0.35s cubic-bezier(.2,.8,.2,1);
}

.event-modal.show .event-modal-content {
    transform:
        translateY(0)
        scale(1);
}


/* =========================================================
   MODAL CLOSE BUTTON
========================================================= */

.event-modal-close {
    position: absolute;

    top: 15px;
    right: 15px;

    z-index: 5;

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.94);

    color: #343741;

    font-size: 17px;

    cursor: pointer;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.12);

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.event-modal-close:hover {
    background: #ff5d5d;
    color: #ffffff;

    transform: rotate(90deg);
}


/* =========================================================
   MODAL IMAGE
========================================================= */

.event-modal-image {
    position: relative;

    width: 100%;
    aspect-ratio: 16 / 8.5;

    overflow: hidden;

    background: #f1f2f5;
}

.event-modal-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}


/* =========================================================
   MODAL CATEGORY
========================================================= */

.event-modal-category {
    position: absolute;

    left: 20px;
    bottom: 18px;

    display: inline-flex;
    align-items: center;

    padding: 7px 12px;

    border-radius: 30px;

    background: rgba(255, 255, 255, 0.94);

    color: #383a43;

    font-size: 11px;
    font-weight: 700;

    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.12);
}


/* =========================================================
   MODAL BODY
========================================================= */

.event-modal-body {
    padding: 30px;
}


/* =========================================================
   MODAL DATE
========================================================= */

.event-modal-date {
    display: inline-flex;
    align-items: center;

    margin-bottom: 10px;

    color: #9381ff;

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 0.04em;
    text-transform: uppercase;
}


/* =========================================================
   MODAL TITLE
========================================================= */

.event-modal-body h2 {
    margin: 0 0 17px;

    color: #20232b;

    font-size: clamp(22px, 3vw, 29px);
    font-weight: 750;

    line-height: 1.3;
}


/* =========================================================
   MODAL META
========================================================= */

.event-modal-meta {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 10px;

    margin-bottom: 20px;
}

.event-modal-meta > div {
    display: flex;
    align-items: flex-start;

    gap: 9px;

    padding: 12px;

    border-radius: 12px;

    background: #f7f7fa;

    color: #5d606a;

    font-size: 12px;
    font-weight: 600;

    line-height: 1.45;
}

.event-modal-meta i {
    margin-top: 2px;

    color: #9381ff;

    font-size: 13px;
}


/* =========================================================
   MODAL DESCRIPTION
========================================================= */

.event-modal-body > p {
    margin: 0 0 25px;

    color: #62656f;

    font-size: 14px;

    line-height: 1.75;
}


/* =========================================================
   MODAL ACTIONS
========================================================= */

.event-modal-actions {
    display: flex;
    align-items: center;

    gap: 10px;
}


/* =========================================================
   VIEW EVENT
========================================================= */

.event-modal-view {
    flex: 1;

    min-height: 48px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    padding: 11px 18px;

    border-radius: 12px;

    background: #9381ff;
    color: #ffffff;

    text-decoration: none;

    font-size: 13px;
    font-weight: 700;

    box-shadow:
        0 8px 20px rgba(147, 129, 255, 0.2);

    transition:
        background 0.25s ease,
        transform 0.25s ease;
}

.event-modal-view:hover {
    background: #7d69f0;
    color: #ffffff;

    transform: translateY(-2px);
}


/* =========================================================
   GALLERY BUTTON
========================================================= */

.event-modal-gallery {
    min-height: 48px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 11px 18px;

    border: 1px solid #e1e2e8;
    border-radius: 12px;

    background: #ffffff;
    color: #454750;

    text-decoration: none;

    font-size: 13px;
    font-weight: 700;

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease;
}

.event-modal-gallery:hover {
    background: #f7f6ff;
    border-color: #9381ff;
    color: #7662e8;
}


/* =========================================================
   FOCUS ACCESSIBILITY
========================================================= */

.calendar-nav-btn:focus-visible,
.calendar-today-btn:focus-visible,
.event-modal-close:focus-visible,
.event-modal-view:focus-visible,
.event-modal-gallery:focus-visible {
    outline: 3px solid rgba(147, 129, 255, 0.35);

    outline-offset: 3px;
}


/* =========================================================
   SCROLLBAR
========================================================= */

.event-modal-content::-webkit-scrollbar {
    width: 7px;
}

.event-modal-content::-webkit-scrollbar-track {
    background: #f4f4f6;
}

.event-modal-content::-webkit-scrollbar-thumb {
    border-radius: 10px;

    background: #c8c8d0;
}

.event-modal-content::-webkit-scrollbar-thumb:hover {
    background: #aaaab4;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .event-calendar-section {
        padding: 70px 0;
    }

    .event-calendar-header {
        padding: 22px;
    }

    .event-calendar {
        padding: 20px 22px;
    }

    .calendar-day {
        min-height: 82px;
    }

    .calendar-day.empty {
        min-height: 82px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 650px) {

    .event-calendar-section {
        padding: 55px 0;
    }


    .event-calendar-wrapper {
        margin-top: 30px;

        border-radius: 19px;
    }


    .event-calendar-header {

        flex-direction: column;
        align-items: stretch;

        padding: 20px;

    }


    .calendar-heading {
        justify-content: center;
    }


    .calendar-heading strong {
        font-size: 20px;
    }


    .calendar-controls {
        justify-content: center;
    }


    .calendar-today-btn {
        flex: 1;

        max-width: 120px;
    }


    .event-calendar {
        padding: 15px 10px 12px;
    }


    .calendar-weekday {
        min-height: 35px;

        font-size: 9px;
    }


    .calendar-days {
        gap: 4px;
    }


    .calendar-day {
        min-height: 65px;

        padding: 5px;

        border-radius: 9px;
    }


    .calendar-day.empty {
        min-height: 65px;
    }


    .calendar-day-number {
        width: 25px;
        height: 25px;

        font-size: 11px;
    }


    .calendar-event-indicator {
        margin-top: 5px;

        gap: 4px;

        font-size: 8px;
    }


    .calendar-event-indicator::before {
        width: 5px;
        height: 5px;

        flex: 0 0 5px;
    }


    .calendar-more-events {
        font-size: 8px;
    }


    .calendar-legend {
        gap: 15px;

        padding: 14px;

        font-size: 10px;
    }


    /* Modal */

    .event-modal {
        padding: 12px;
    }


    .event-modal-content {
        border-radius: 20px;

        max-height: 94vh;
    }


    .event-modal-image {
        aspect-ratio: 16 / 9;
    }


    .event-modal-body {
        padding: 22px 18px 20px;
    }


    .event-modal-body h2 {
        font-size: 21px;
    }


    .event-modal-meta {
        grid-template-columns: 1fr;
    }


    .event-modal-actions {
        flex-direction: column;
    }


    .event-modal-view,
    .event-modal-gallery {
        width: 100%;
    }

}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .calendar-heading {
        gap: 10px;
    }


    .calendar-icon {
        width: 44px;
        height: 44px;

        flex-basis: 44px;

        border-radius: 12px;

        font-size: 18px;
    }


    .calendar-heading strong {
        font-size: 17px;
    }


    .calendar-heading > div > span {
        font-size: 10px;
    }


    .calendar-nav-btn {
        width: 36px;
        height: 36px;
    }


    .calendar-today-btn {
        min-height: 36px;

        padding: 0 12px;

        font-size: 11px;
    }


    .calendar-day {
        min-height: 55px;

        padding: 3px;

        border-radius: 7px;
    }


    .calendar-day.empty {
        min-height: 55px;
    }


    .calendar-day-number {
        width: 22px;
        height: 22px;

        font-size: 10px;
    }


    .calendar-event-indicator {
        font-size: 7px;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .event-calendar *,
    .event-modal *,
    .calendar-nav-btn,
    .calendar-today-btn {
        transition: none !important;
        animation: none !important;
    }

}