/* =========================================================================
GENERAL
============================================================================
*/

body {
    background: #f1f3f6;
}

.primary-nav button {
    color: var(--color-bg);
}

.primary-nav {
    background: white;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(36px);
    transition: box-shadow 0.3s ease;
}

.primary-nav.scrolled {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.primary-nav a {
    color: var(--color-gray);
}

.primary-nav .nav_profile ul li {
    background: var(--color-white);
}

.primary-nav .nav_profile ul li a {
    color: var(--color-gray);
}

.nav_profile ul li:last-child{
    background: var(--color-red);
}

.nav_profile ul li:last-child a{
    color: var(--color-white);
}

@media screen and (max-width: 1024px) {
    /* =========================== GENERAL ============================*/
     .container {
         width: var(--container-width-md);
     }
 
     h2 {
         font-size: 1.6rem;
     }
 
     h3 {
         font-size: 1.2rem;
     }
 
     h5 {
         font-size: 0.8rem;
     }

     /* =========================== NAV ============================*/

     .primary-nav ul li, .primary-nav .nav_profile ul li {
        background: rgba(255, 255, 255, 0.7);
     }

     .primary-nav ul li:not(:last-child):hover {
        background: var(--color-white);
     }

     .primary-nav ul li:last-child:hover {
        background: var(--color-white);
     }

     .primary-nav li:last-child a {
        color: var(--color-gray);
    }

 }

section {
    margin-top : 3rem;
    width: 100vw;
}

.alert_message {
    width: 350px;
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    margin: 2rem 0 0;
    border-radius: var(--card-border-radius-2);
    font-size: 0.9rem;
    animation: slideDown 0.5s ease;
}

.alert_message.success {
    background-color: var(--color-green-light);
    color: var(--color-green);
}

.alert_message.error {
    background-color: var(--color-red);
    color: var(--color-white);
}

@keyframes slideDown {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

h2 {
    color: black;
    font-size: 1.4rem;
    font-weight: 600;
}

h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

a {
    color: black;
}

footer {
    background: #3586ff;
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-top: 12rem;
    box-shadow: none;
}

footer a {
    color: white;
}

.footer_socials a {
    background: var(--color-white);
    color: var(--color-bg);
}

.footer_socials a:hover {
    background-color: var(--color-bg);
    color: var(--color-white);
}

footer ul a {
    opacity: 1;
}

.footer_copyright {
    border: none;
    border-top: 2px solid var(--color-white);
    width: 100%;
    color: var(--color-white);
}

footer .wave {
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    height: 100px;
    background: url(../image/wave.png);
    background-size: 1000px 100px;
    box-shadow: none;
}

footer .wave#wave1 {
    z-index: 999;
    opacity: 1;
    bottom: 0;
    animation: animateWave_1 4s linear infinite;
}

footer .wave#wave2 {
    z-index: 998;
    opacity: 0.5;
    bottom: 10px;
    animation: animateWave_2 4s linear infinite;
}

footer .wave#wave3 {
    z-index: 999;
    opacity: 0.2;
    bottom: 15px;
    animation: animateWave_1 3s linear infinite;
}

footer .wave#wave4 {
    z-index: 998;
    opacity: 0.7;
    bottom: 20px;
    animation: animateWave_2 3s linear infinite;
}

@keyframes animateWave_1{
    0% {
        background-position-x: 1000px;
    }
    100% {
        background-position-x: 0px;
    }
}

@keyframes animateWave_2{
    0% {
        background-position-x: 0px;
    }
    100% {
        background-position-x: 1000px;
    }
}

/* =========================================================================
CALENDAR SECTION
============================================================================
*/

.calendar-section {
    width: 90vw;
    margin-inline: auto;
    padding: 0rem 1rem;
}

.calendar-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 1400px;
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.calendar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 1024px) {
    .calendar-container {
        flex-direction: row;
        align-items: flex-start;
        gap: 30px;
    }

    .calendar-wrapper {
        flex: 1;
    }

    .event-panel {
        flex: 1;
        margin-top: 0;
    }
}

.calendar-header {
    background: linear-gradient(135deg, #3659e3 0%, #b6c5e7 100%);
    color: white;
    padding: 1.5rem;
    text-align: center;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    transform: rotate(300deg);
}

.month-year {
    font-size: 1.8rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
    flex: 1;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.nav-btn:focus {
    outline: none;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-top: 1rem;
}

.weekday {
    text-align: center;
    font-weight: 600;
    color: #22215B;
    padding: 0.8rem 0;
    font-size: 0.95rem;
}

.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin: 1rem 0;
}

.day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
    color: #22215B;
    border: 2px solid transparent;
    background: #f8f9fa;
}

.day:hover:not(.other-month):not(.selected) {
    background: #e5e9f1;
    transform: scale(1.05);
}

.day.today {
    background: #fd79a8;
    color: white;
    font-weight: bold;
}

.day.selected {
    background: #3659e3;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(54, 89, 227, 0.3);
}

.day.other-month {
    color: #b6c5e7;
    opacity: 0.5;
    background: transparent;
}

.day.has-events::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 20px;
    height: 2px;
    border-radius: 1px;
    background: #0ecce9;
}

.calendar-footer {
    padding: 1rem 0;
    border-top: 1px solid #e5e9f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.today-btn {
    background: linear-gradient(135deg, #0ecce9 0%, #00b894 100%);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.today-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(14, 204, 233, 0.3);
}

.cal-indicator {
    font-size: 0.9rem;
    color: #0ecce9;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

/* Event Panel */
.event-panel {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    margin-top: 1rem;
    height: 80vh;
    display: flex;
    flex-direction: column;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e9f1;
}

.event-date {
    font-size: 1.4rem;
    font-weight: 700;
    color: #3659e3;
}

.event-icon {
    font-size: 1.3rem;
    color: #0ecce9;
}

.event-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Stylish scrollbar */
.event-list::-webkit-scrollbar {
    width: 8px;
}

.event-list::-webkit-scrollbar-track {
    background: transparent;
}

.event-list::-webkit-scrollbar-thumb {
    background: #3659e3;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.event-list::-webkit-scrollbar-thumb:hover {
    background: #2641b1;
}

/* Firefox scrollbar */
.event-list {
    scrollbar-color: #3659e3 transparent;
    scrollbar-width: thin;
}

.event-item {
    background: #f8f9fa;
    padding: 1.5rem 2.2rem 1.5rem 1.2rem;
    margin-bottom: 1.2rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    border-left: 4px solid #3659e3;
    overflow: hidden;
}

.event-thumb {
    width: 160px;
    height: 160px;
    max-width: 40vw;
    max-height: 40vw;
    object-fit: cover;
    border-radius: 18px;
    flex-shrink: 0;
    margin-left: 2rem;
    margin-right: 0;
    background: #e5e9f1;
    box-shadow: 0 2px 8px rgba(54,89,227,0.08);
    align-self: center;
    transition: width 0.2s, height 0.2s;
}

@media (max-width: 600px) {
    .event-thumb {
        display: none;
    }
}

.event-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.event-time-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.2rem;
    min-width: 50px;
    flex-shrink: 0;
}

.event-time {
    font-weight: 700;
    color: #3659e3;
    font-size: 1.3rem;
    line-height: 1;
}

.event-ampm {
    font-weight: 600;
    color: #3659e3;
    font-size: 0.75rem;
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.event-title {
    color: #22215B;
    font-weight: 700;
    font-size: 1rem;
    word-wrap: break-word;
    margin: 0;
}

.event-title a {
    color: #3659e3;
    text-decoration: none;
    transition: all 0.2s ease;
}

.event-title a:hover {
    color: #2641b1;
    font-weight: 700;
}

.event-location {
    color: #999;
    font-size: 0.85rem;
    font-weight: 500;
    word-wrap: break-word;
    margin: 0;
}

.event-hoster {
    color: #999;
    font-size: 0.85rem;
    font-weight: 500;
    word-wrap: break-word;
    margin: 0;
}

.event-duration {
    color: #666;
    font-size: 0.8rem;
    word-wrap: break-word;
    margin: 0;
}

.no-events {
    text-align: center;
    color: #b6c5e7;
    padding: 2rem 1rem;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .event-item {
        flex-direction: column;
        align-items: stretch;
        padding: 1.2rem 1rem 1.2rem 1rem;
        gap: 1rem;
    }
    .event-thumb {
        display: block;
        width: 100%;
        max-width: 320px;
        height: auto;
        margin: 1rem auto 0 auto;
        border-radius: 14px;
        order: 3;
    }
    .event-time-section {
        text-align: left;
        order: 1;
    }
    .event-time-section div{
        text-align: left;
    }
    .event-details {
        order: 2;
    }

    .calendar-container {
        padding: 0.5rem;
        gap: 1.5rem;
    }

    .calendar-header {
        flex-direction: column;
        gap: 1.2rem;
        padding: 2.2rem 1rem 1.2rem 1rem;
        font-size: 1.1rem;
    }

    .month-year {
        font-size: 1.7rem;
        font-weight: 700;
    }

    .nav-buttons {
        width: 100%;
        justify-content: center;
        gap: 1.5rem;
    }

    .event-panel {
        padding: 0rem 1.2rem 1.5rem 1.2rem;
        border-radius: 18px;
        box-shadow: 0 6px 18px rgba(54,89,227,0.08);
    }

    .event-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.7rem;
        margin-bottom: 1.2rem;
        padding-bottom: 0.7rem;
    }

    .event-date {
        font-size: 1.3rem;
        font-weight: 700;
    }

    .event-list {
        max-height: 60vh;
        padding-bottom: 1.2rem;
    }

    .event-item {
        padding: 1.6rem 1.1rem;
        font-size: 1.1rem;
        gap: 1.5rem;
        border-radius: 14px;
    }
}

@media (max-width: 600px) {
    .calendar-section {
        padding: 1.5rem 0.5rem;
    }

    .calendar-container {
        padding: 10px;
    }

    .month-year {
        font-size: 1.3rem;
    }

    .weekdays {
        gap: 5px;
    }

    .weekday {
        font-size: 0.8rem;
        padding: 0.5rem 0;
    }

    .days {
        gap: 5px;
    }

    .day {
        font-size: 0.9rem;
    }

    .calendar-footer {
        flex-direction: column;
        gap: 1rem;
    }
    
    .calendar-section {
        width: 100vw;
        padding: 1.5rem 0.2rem 1.2rem 0.2rem;
    }

    .calendar-container {
        padding: 0.2rem;
        gap: 1.2rem;
    }

    .month-year {
        font-size: 1.4rem;
    }

    .weekdays {
        gap: 3px;
    }

    .weekday {
        font-size: 0.85rem;
        padding: 0.4rem 0;
    }

    .days {
        gap: 3px;
    }

    .day {
        font-size: 1rem;
        border-radius: 12px;
    }

    .calendar-footer {
        flex-direction: column;
        gap: 1.2rem;
    }

    .today-btn {
        padding: 0.7rem 1.2rem;
        font-size: 1.1rem;
        border-radius: 30px;
    }

    .event-panel {
        padding: 2rem 0.7rem 1.2rem 0.7rem;
        border-radius: 20px;
        margin-top: 2.5rem;
    }

    .event-date {
        font-size: 1.2rem;
        font-weight: 700;
    }

    .event-list {
        max-height: 65vh;
        padding-bottom: 1.5rem;
    }

    .event-item {
        padding: 1.8rem 1.2rem;
        font-size: 1.15rem;
        gap: 0.7rem;
        border-radius: 16px;
    }
}