/* Events Page Specific Styles */

.events-hero {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 2rem 20px;
    background: linear-gradient(135deg, rgba(46, 49, 146, 0.05), rgba(0, 174, 239, 0.05));
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.events-container {
    padding: 60px 0;
    overflow-x: hidden;
    width: 100%;
}

.events-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
    width: 100%;
    min-width: 0;
}

@media (max-width: 992px) {
    .events-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .events-container {
        padding: 40px 0;
    }

    .calendar-card {
        position: relative;
        top: 0;
        margin-bottom: 30px;
    }
}

@media (max-width: 600px) {
    .events-layout {
        gap: 20px;
    }

    .calendar-card {
        padding: 15px;
        border-radius: 20px;
    }

    .events-hero {
        padding: 60px 1rem 20px;
        min-height: 300px;
    }

    .events-hero h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 500px) {
    .calendar-card {
        padding: 10px;
        border-radius: 12px;
        width: 100%;
        max-width: none;
        margin: 0 0 25px;
    }
    .calendar-grid {
        gap: 1px;
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }
    .cal-day {
        font-size: 0.75rem;
    }
    .day-name {
        font-size: 0.6rem;
        padding-bottom: 5px;
    }
    .calendar-header {
        margin-bottom: 12px;
    }
    .calendar-header h3 {
        font-size: 1rem;
    }
    .cal-btn {
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 380px) {
    .calendar-card {
        padding: 8px;
        width: 100%;
        max-width: none;
    }
    .calendar-grid {
        gap: 2px;
    }
    .events-hero h1 {
        font-size: 1.8rem;
    }
    .events-hero p {
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    .calendar-card {
        padding: 6px;
        width: 100%;
        max-width: none;
    }
    .calendar-header h3 {
        font-size: 0.9rem;
    }
    .cal-btn {
        width: 24px;
        height: 24px;
    }
    .cal-day {
        font-size: 0.7rem;
    }
}

/* Calendar Styling */
.calendar-card {
    position: sticky;
    top: 100px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 174, 239, 0.2);
    border-radius: 25px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--esn-blue);
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.cal-btn {
    background: none;
    border: 1px solid rgba(0, 174, 239, 0.2);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.cal-btn:hover {
    background: var(--esn-cyan);
    color: white;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
    text-align: center;
    width: 100%;
}

.day-name {
    font-size: 0.75rem;
    font-weight: 700;
    opacity: 0.5;
    padding-bottom: 10px;
    text-transform: uppercase;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.cal-day:hover {
    background: rgba(0, 174, 239, 0.1);
}

.cal-day.today {
    background: #444 !important;
    color: white;
    font-weight: 700;
}

.cal-day.has-event::after {
    display: none !important;
}

/* Event Type Colors & Accents */
.event-card.type-social { --type-color: #ec008c; }
.event-card.type-trip { --type-color: #2e3192; }
.event-card.type-sport { --type-color: #f47b20; }
.event-card.type-culture { --type-color: #00aeef; }
.event-card.type-food-drink { --type-color: #ffc107; }
.event-card.type-volunteering { --type-color: #7ac143; }
.event-card.type-other { --type-color: #95a5a6; }

.event-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    background: var(--type-color, var(--esn-cyan));
    color: white !important;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 1px;
    width: fit-content;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.cal-day.has-event.type-social { border: 3px solid #ec008c !important; background: rgba(236, 0, 140, 0.08); }
.cal-day.has-event.type-trip { border: 3px solid #2e3192 !important; background: rgba(46, 49, 146, 0.08); }
.cal-day.has-event.type-sport { border: 3px solid #f47b20 !important; background: rgba(244, 123, 32, 0.08); }
.cal-day.has-event.type-culture { border: 3px solid #00aeef !important; background: rgba(0, 174, 239, 0.08); }
.cal-day.has-event.type-food-drink { border: 3px solid #ffc107 !important; background: rgba(255, 193, 7, 0.08); }
.cal-day.has-event.type-volunteering { border: 3px solid #7ac143 !important; background: rgba(122, 193, 67, 0.08); }
.cal-day.has-event.type-other { border: 3px solid #95a5a6 !important; background: rgba(149, 165, 166, 0.08); }

/* Force dark background for today even if it has an event */
.cal-day.today.has-event {
    background: #444 !important;
}

/* Legend Styles */
.calendar-legend {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.8;
}

.legend-color {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.cal-day.other-month {
    opacity: 0.2;
}

/* Event Card Styling */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.event-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0, 0, 0, 0.03);
    cursor: pointer;
    position: relative;
}

@media (max-width: 600px) {
    .event-card {
        border-radius: 24px;
    }

    .event-img-wrapper {
        height: 220px !important;
    }
}

.event-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 25px 50px rgba(0, 174, 239, 0.12);
    border-color: rgba(0, 174, 239, 0.2);
}

/* Horizontal Agenda layout for public view (no image) */
.event-card.no-image {
    flex-direction: row;
    min-height: auto;
    padding: 10px;
    border-left: 8px solid var(--type-color, var(--esn-cyan));
    background: rgba(255, 255, 255, 0.9);
}

.event-card.no-image .event-img-wrapper {
    width: 90px;
    height: 90px;
    margin: auto 15px auto 10px;
    border-radius: 18px;
    background: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.event-card.no-image .event-date-badge-overlay {
    position: static;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    border: none;
    padding: 0;
}

.event-card.no-image .overlay-day {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--esn-blue);
    line-height: 1;
}

.event-card.no-image .overlay-month {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--esn-cyan);
    margin-top: 2px;
    letter-spacing: 1px;
}

.event-card.no-image .overlay-time {
    display: none; /* We show time in the info section */
}

.event-card.no-image .event-content {
    padding: 15px 25px;
    border-left: 1px solid rgba(0,0,0,0.05);
}

.event-card.no-image .event-header-compact {
    flex-direction: row;
    align-items: center;
}

.event-card.no-image .event-description {
    margin-bottom: 10px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.event-card.no-image .event-meta-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    padding-top: 15px;
    gap: 10px;
}

.event-card.no-image .see-more-btn {
    padding: 8px 20px;
    margin-bottom: 0;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .event-card.no-image {
        flex-direction: column;
        padding: 0;
        border-left: none;
        border-top: 8px solid var(--type-color, var(--esn-cyan));
    }
    .event-card.no-image .event-img-wrapper {
        width: 100% !important;
        height: 120px !important;
        margin: 0;
        margin-bottom: 0;
        background: rgba(0, 174, 239, 0.05);
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 0;
    }
    .event-card.no-image .event-content {
        padding: 20px;
        border-left: none;
    }
    .event-card.no-image .event-header-compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

.event-img-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 320px;
    background: #f0f2f5;
}

.image-blur-bg {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background-size: cover;
    background-position: center;
    filter: blur(30px) brightness(0.9);
    opacity: 0.6;
    z-index: 0;
}

.event-date-badge-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 18px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    z-index: 2;
}

.overlay-day {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--esn-blue);
    line-height: 1;
}

.overlay-month {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--esn-cyan);
    margin-top: 2px;
}

.overlay-time {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.8;
    margin-top: 4px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 4px;
}

.event-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.event-card:hover .event-img {
    transform: scale(1.05);
}

/* Event Filter Tabs */
.events-filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.5);
    padding: 6px;
    border-radius: 50px;
    width: fit-content;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.filter-tab {
    padding: 10px 24px;
    border-radius: 50px;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.filter-tab:hover {
    opacity: 1;
}

.filter-tab.active {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    opacity: 1;
    color: var(--esn-blue);
}

@media (max-width: 600px) {
    .events-filter-tabs {
        width: 100%;
        margin: 0 0 25px;
        padding: 8px;
        border-radius: 20px;
        overflow-x: visible;
        white-space: normal;
        flex-wrap: wrap;
        justify-content: center;
        border: 1px solid rgba(0, 0, 0, 0.05);
        background: rgba(255, 255, 255, 0.5);
        display: flex;
    }

    .filter-tab {
        padding: 8px 16px;
        flex-shrink: 1;
        font-size: 0.85rem;
    }
}

.event-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.event-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

@media (max-width: 500px) {
    .event-header-compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

.event-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    letter-spacing: -0.5px;
}

.spots-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.spots-status.available {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(40, 167, 69, 0.2));
    color: #1e7e34;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.spots-status.full {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.2));
    color: #bd2130;
    border: 1px solid rgba(220, 53, 69, 0.2);
}


.event-title {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 15px;
}

.event-description {
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-description.expanded {
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

.event-description ul,
.event-description ol {
    margin-top: 10px;
    margin-bottom: 10px;
    padding-left: 20px;
}

.event-description li {
    margin-bottom: 5px;
}

.event-description b,
.event-description strong {
    font-weight: 700;
}

.event-description i,
.event-description em {
    font-style: italic;
}

.event-description u {
    text-decoration: underline;
}

.see-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(0, 174, 239, 0.1);
    color: var(--esn-blue);
    font-weight: 700;
    font-size: 1.05rem;
    padding: 12px 25px;
    border-radius: 50px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.see-more-btn:hover {
    background: var(--blue-gradient);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 174, 239, 0.3);
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 500px) {
    .calendar-legend {
        gap: 8px;
        margin-top: 15px;
        padding-top: 12px;
    }
    .legend-item {
        font-size: 0.65rem;
        gap: 4px;
    }
    .legend-color {
        width: 8px;
        height: 8px;
    }
}

.event-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 400px) {
    .event-meta-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

.meta-icon {
    font-size: 1.2rem;
    color: var(--esn-cyan);
}

.meta-text-top {
    font-size: 0.7rem;
    opacity: 0.5;
    text-transform: uppercase;
    font-weight: 700;
}

.meta-text-bottom {
    font-weight: 600;
}

.event-spots-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(40, 167, 69, 0.9);
    backdrop-filter: blur(5px);
    color: white;
    padding: 5px 12px;
    border-radius: 10px;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
    backdrop-filter: blur(10px);
}

.edit-event-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--blue-gradient);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.edit-event-badge:hover {
    transform: scale(1.1);
}

.event-date-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: white;
    width: 50px;
    height: 55px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.date-day {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--esn-blue);
    line-height: 1;
}

.date-month {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--esn-cyan);
}

.event-date-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--esn-blue);
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.spots-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.spots-status.available {
    background: rgba(40, 167, 69, 0.1);
    color: #218838;
}

.spots-status.full {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.event-map-container {
    margin-top: 15px;
    margin-bottom: 20px;
}

.map-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
    opacity: 0.8;
}

.event-map {
    height: 180px;
    width: 100%;
    border-radius: 15px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--esn-blue);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 10;
}

.back-btn:hover {
    transform: translateX(-8px);
    background: white;
    box-shadow: 0 12px 30px rgba(0, 174, 239, 0.15);
    color: var(--esn-cyan);
}

.back-btn .material-symbols-rounded {
    font-size: 1.2rem;
}

.shadow-sm {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.dashboard-actions {
    margin-top: 15px;
    margin-bottom: 25px;
    display: flex;
    gap: 12px;
}

@media (max-width: 600px) {
    .dashboard-actions {
        flex-direction: column;
        gap: 10px;
    }

    .dashboard-actions .btn {
        width: 100%;
        margin: 0;
    }
}