.calendar-container {
    background-color: #002a6100;
    border-radius: var(--border-radius);
    padding: 12px 24px 24px;
    box-shadow: var(--box-shadow);
    margin-bottom: 18px;
}

.calendar-hero {
    width: min(1380px, calc(100% - 28px));
    margin: 0 auto 10px;
    padding: 12px 22px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.66);
    background: rgba(0, 18, 42, 0.42);
    backdrop-filter: blur(5px);
}

.calendar-title-block {
    display: block;
}

.calendar-kicker {
    grid-column: 1;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.95rem;
    line-height: 1.2;
}

.calendar-hero h1 {
    grid-column: 1;
    margin: 0;
    color: #ffffff;
    font-size: 1.78rem;
    line-height: 1.05;
    white-space: nowrap;
}

.calendar-control-strip {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 8px;
}

.calendar-time-strip {
    max-width: max-content;
}

.calendar-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    margin: 0;
    padding: 6px 7px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(2, 8, 23, 0.56);
}

.calendar-control-wide {
    min-width: 16rem;
}

.calendar-control label,
.calendar-control span {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.calendar-control input[type="search"],
.calendar-control select {
    min-height: 28px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    background-color: rgba(0, 0, 0, 0.54);
    color: #ffffff;
    padding: 0.28rem 0.55rem;
    font-size: 0.94rem;
}

.calendar-control input[type="search"] {
    width: 100%;
    min-width: 0;
}

.calendar-control input::placeholder {
    color: rgba(255, 255, 255, 0.68);
}

.calendar-control input:focus,
.calendar-control select:focus {
    outline: 2px solid #6ee7f7;
    outline-offset: 2px;
}

.timezone-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.timezone-toggle input {
    accent-color: #08d8a6;
}

.calendar-download-menu {
    position: relative;
    flex: 0 0 auto;
}

.calendar-download-menu summary {
    list-style: none;
}

.calendar-download-menu summary::-webkit-details-marker {
    display: none;
}

.download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    min-height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 8px;
    background: #08b889;
    color: #ffffff;
    padding: 0.45rem 0.72rem;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
}

.download-button:hover,
.download-button:focus {
    background: #0f9f78;
    outline: 2px solid rgba(255, 255, 255, 0.72);
    outline-offset: 2px;
}

.calendar-download-options {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 40;
    display: grid;
    gap: 4px;
    min-width: 14rem;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 8px;
    background: rgba(3, 15, 34, 0.96);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.36);
}

.calendar-download-options a {
    display: block;
    padding: 0.58rem 0.64rem;
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.94rem;
    font-weight: 700;
    text-decoration: none;
}

.calendar-download-options a:hover,
.calendar-download-options a:focus {
    background: rgba(110, 231, 247, 0.16);
    outline: none;
}

.city-selector {
    min-width: 0;
}

.city-selector select {
    width: 8.8rem;
}

.calendar-search .calendar-clearable-field {
    width: 100%;
}

.calendar-search .calendar-clearable-field input {
    width: 100%;
}

.timezone-controls select {
    flex: 1 1 12rem;
    min-width: 12rem;
    max-width: 16rem;
}

.timezone-select-label {
    margin-left: 2px;
}

.calendar-freshness {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.78rem;
    max-width: 100%;
    text-align: left;
}

.calendar-date-control {
    flex: 0 0 auto;
}

.calendar-date-range {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.28rem 0.58rem;
    border: 1px solid rgba(110, 231, 247, 0.62);
    border-radius: 6px;
    background: rgba(2, 8, 23, 0.7);
    color: #8bdcf5;
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

@media (max-width: 980px) {
    .calendar-hero h1 {
        font-size: 1.75rem;
        white-space: normal;
    }
}

@media (max-width: 640px) {
    .calendar-container {
        padding: 8px 8px 18px;
    }

    .calendar-hero {
        width: calc(100% - 12px);
        padding: 10px;
    }

    .calendar-control-strip {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-control,
    .calendar-control-wide,
    .calendar-date-control,
    .city-selector,
    .calendar-search,
    .timezone-controls {
        width: 100%;
        min-width: 0;
        flex-basis: auto;
    }

    .calendar-control {
        align-items: stretch;
    }

    .city-selector select,
    .timezone-controls select,
    .calendar-date-range {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .calendar-download-menu,
    .download-button {
        width: 100%;
    }

    .calendar-download-options {
        left: 0;
        right: 0;
    }
}

.calendar-filter-panel {
    width: min(980px, calc(100% - 28px));
    margin: 12px auto 18px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(0, 0, 0, 0.48);
    border-radius: 8px;
}

.calendar-legend .calendar-filter-panel {
    width: 100%;
    margin: 0;
    padding: 10px;
    background: rgba(15, 23, 42, 0.62);
}

.calendar-legend .calendar-filter-panel summary {
    cursor: pointer;
    color: #fff;
    font-weight: 700;
}

.calendar-legend .calendar-filter-grid {
    grid-template-columns: 1fr;
    margin-top: 10px;
}

.calendar-legend .calendar-filter-row,
.calendar-legend .calendar-filter-group-wide .calendar-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calendar-legend .calendar-filter-grid input[type="date"],
.calendar-legend .calendar-filter-grid input[type="time"] {
    min-width: 0;
}

.calendar-filter-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1.1fr) repeat(2, minmax(310px, 1fr));
    gap: 12px;
    align-items: stretch;
}

.calendar-filter-group {
    min-width: 0;
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
}

.calendar-filter-group legend {
    padding: 0 6px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.86rem;
    font-weight: 700;
}

.calendar-filter-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 10px;
}

.calendar-filter-group-wide .calendar-filter-row {
    grid-template-columns: minmax(180px, 1fr) minmax(92px, 0.36fr);
}

.calendar-filter-grid label,
.calendar-input-with-unit,
.calendar-clearable-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    text-align: left;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.92rem;
}

.calendar-clearable-field {
    position: relative;
    display: block;
    width: 100%;
}

.calendar-filter-grid input {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background-color: rgba(0, 0, 0, 0.62);
    color: #ffffff;
    padding: 0.45rem 0.65rem;
    font-size: 0.96rem;
}

.calendar-clearable-field input {
    padding-right: 2.35rem;
}

.calendar-filter-grid input[type="date"],
.calendar-filter-grid input[type="time"] {
    min-width: 148px;
    font-size: 0.92rem;
    padding-left: 0.48rem;
    padding-right: 2.25rem;
}

.calendar-input-with-unit {
    position: relative;
}

.calendar-input-with-unit input {
    padding-right: 4rem;
}

.calendar-input-with-unit .calendar-unit-label {
    position: absolute;
    right: 2.15rem;
    bottom: 0.63rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.88rem;
    pointer-events: none;
}

.calendar-field-clear {
    position: absolute;
    right: 0.35rem;
    bottom: 0.34rem;
    width: 1.75rem;
    height: 1.75rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.84);
    color: #ffffff;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.calendar-field-clear:hover,
.calendar-field-clear:focus {
    background: rgba(37, 99, 235, 0.95);
    outline: none;
}

.calendar-location-button {
    width: 100%;
    min-height: 38px;
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.92);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    padding: 0.45rem 0.75rem;
}

.calendar-location-button:hover,
.calendar-location-button:focus {
    background: rgba(5, 150, 105, 0.98);
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.calendar-location-button:disabled {
    cursor: wait;
    opacity: 0.78;
}

.calendar-location-button[data-state="error"] {
    background: rgba(185, 28, 28, 0.92);
}

.current-location-readout {
    margin-top: 8px;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.34);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.9rem;
}

.current-location-coordinates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.current-location-accuracy {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.84rem;
}

.current-location-map {
    margin-top: 8px;
}

.current-location-map summary {
    cursor: pointer;
    font-weight: 700;
}

.current-location-map iframe {
    width: 100%;
    height: 180px;
    margin-top: 8px;
    border: 0;
    border-radius: 8px;
}

.current-location-map a {
    display: inline-block;
    margin-top: 6px;
    color: #ffffff;
    font-weight: 700;
}

.calendar-filter-grid input::placeholder {
    color: rgba(255, 255, 255, 0.65);
}

.calendar-filter-grid input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.calendar-filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.calendar-filter-actions button {
    min-height: 38px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: var(--primary-color);
    color: #ffffff;
    font-weight: 700;
    padding: 0.45rem 0.8rem;
    cursor: pointer;
}

.calendar-filter-actions button:hover {
    background: #2563eb;
}

.calendar-filter-actions #calendar-filter-clear {
    background: rgba(15, 23, 42, 0.88);
}

#calendar-filter-status {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.94rem;
}

@media (max-width: 1160px) {
    .calendar-filter-grid {
        grid-template-columns: 1fr;
    }

    .calendar-filter-row,
    .calendar-filter-group-wide .calendar-filter-row {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }
}

@media (max-width: 560px) {
    .calendar-filter-row,
    .calendar-filter-group-wide .calendar-filter-row {
        grid-template-columns: 1fr;
    }

    .calendar-filter-actions button {
        flex: 1 1 120px;
    }

    .calendar-location-button {
        min-height: 44px;
        font-size: 1rem;
    }

    .current-location-coordinates {
        grid-template-columns: 1fr;
    }
}

.calendar-filter-page .mobile-cards-container,
.calendar-filter-page .simple-events-list {
    width: min(980px, 100%);
    margin: 0 auto;
    grid-template-columns: 1fr;
}

.calendar-filter-page .simple-events-list {
    display: block;
    color: #ffffff;
}

.calendar-filter-page .date-head {
    margin: 1.7rem 0 0.8rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.72);
    font-size: 1.24rem;
    line-height: 1.3;
    font-weight: 700;
    text-align: left;
}

.calendar-filter-page .event {
    background: rgba(0, 42, 97, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    margin: 0.65rem 0;
}

.calendar-filter-page .event-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.calendar-filter-page .event-meta {
    display: inline-flex;
    gap: 0.75rem;
    min-width: 0;
    flex: 1 1 auto;
}

.calendar-filter-page .event-time {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
}

.calendar-filter-page .event-title {
    min-width: 0;
    flex: 1 1 auto;
    line-height: 1.35;
}

.calendar-filter-page .event-title a,
.calendar-filter-page .event-title .nolink {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.calendar-filter-page .event-title a:hover,
.calendar-filter-page .event-title a:focus {
    text-decoration: underline;
}

.calendar-filter-page .toggle-btn {
    flex: 0 0 auto;
    width: 2rem;
    min-width: 2rem;
    height: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: #ffffff;
    color: #0c2147;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.calendar-filter-page .event-body {
    margin-top: 0.65rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.55);
    padding-top: 0.65rem;
}

.calendar-filter-page .event-body[hidden] {
    display: none;
}

.calendar-filter-page .event-desc {
    color: rgba(255, 255, 255, 0.92);
}

.calendar-filter-page .event-desc p {
    margin: 0.5rem 0 0;
}

.calendar-filter-page .location {
    margin-top: 0.55rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
}

.calendar-filter-page .event-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 260px;
    height: auto;
    margin-top: 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.58);
    object-fit: contain;
}

@media (max-width: 560px) {
    .calendar-filter-page .event-header,
    .calendar-filter-page .event-meta {
        align-items: flex-start;
    }

    .calendar-filter-page .event-meta {
        flex-direction: column;
        gap: 0.25rem;
    }
}

#calendar {
    height: 'auto'

}

.fc-theme-standard th,
.fc-theme-standard td {
    border-color: #e9ecef;
}

.fc-day-today {
    background-color: rgba(242, 255, 58, 1) !important;
    position: relative;
}

.fc-day-today::before {
    content: "Today";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: bold;
    color: #333;
    background: rgba(255, 255, 255, 0.8);
    padding: 6px 10px;
    border-radius: 5px;
    pointer-events: none;
    z-index: 1;
    text-align: center;
}

table .fc-col-header {
    background-color: #002a61;
    color: #fff;
    font-weight: 600;
    font-size: 2vw;
    text-align: center;
    padding: 10px 0;
}

.fc-cell-shaded {
    background-color: rgba(58, 134, 255, 0.1) !important;
}

.fc-event {
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.fc-event-content-wrapper {
    width: 100%;
    height: 100%;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.85vw;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
    overflow: hidden;
}

.fc-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.event-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.fc table {
  font-size: 0.5vw !important;
}

.fc-header-toolbar {
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
}
/* Make sure the toolbar chunks stay inline */
.fc-toolbar-chunk {
  flex-shrink: 0; /* Prevent shrinking */
  font-size: 3vw;
}

/* Optional: Make title shorter if needed */
.fc-toolbar-title {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  white-space: nowrap;
  overflow: hidden;
}
.fc-button-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.fc-button-primary:hover {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
}

.fc-button-active {
    background-color: #002a61 !important;
    border-color: #002a61 !important;
}

.event-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.event-popup-content {
    background-color: #002a61;
    padding: 30px;
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: popup-fade 0.3s ease;
}

@keyframes popup-fade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    color: #666;
    transition: color 0.2s;
}

.close-button:hover {
    color: var(--accent-color);
}

.event-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

#popup-title {
    margin-top: 0;
    color: var(--secondary-color);
    font-size: 1.8rem;
}

.event-date-time {
    display: flex;
    align-items: center;
    margin: 15px 0;
    color: #555;
    font-weight: 500;
}

.event-date-time i {
    margin-right: 10px;
    color: var(--primary-color);
}

.event-location {
    margin-top: 20px;
    padding: 15px;
    background-color: #002a61;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.event-group {
    display: inline-block;
    margin-top: 15px;
    padding: 5px 10px;
    background-color: #002a61;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.event-link {
    display: inline-block;
    margin-top: 25px;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: background-color 0.2s, transform 0.2s;
}

.event-link:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
}

.download-section {
    text-align: center;
    margin: 0px 0;
}

.download-button {
    padding: 6px 14px;
    background-color: #10b981;
    color: white;
    font-size: 0.95rem;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.download-button i {
    margin-right: 8px;
}

.download-button:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

#loading {
    text-align: center;
    padding: 30px;
    font-style: italic;
    color: #777;
}

.filter-section {
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.filter-button {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    background-color: #eee;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.filter-button:hover {
    background-color: #ddd;
    transform: translateY(-2px);
}

.filter-button.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendar-options {
    display: flex;
    margin-bottom: 20px;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.view-selector {
    padding: 10px 20px;
    background-color: #1e61b8;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-selector i {
    margin-right: 8px;
    background-color: #f8f9fa;
}

.view-selector:hover {
    background-color: #f8f9fa;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.view-selector.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.calendar-container {
    padding: 15px;
}

h1 {
    font-size: 2vw;
}

.fc-toolbar {
    flex-direction: column;
    gap: 10px;
}

.calendar-options {
    flex-direction: column;
    align-items: center;
}

.view-selector {
    width: 100%;
    max-width: 250px;
}

/* Mobile Cards Styles */
.mobile-cards-container {
    padding: 0;
    background: transparent;
    max-width: 100%;
    overflow-x: hidden;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.no-events-message {
    text-align: center;
    padding: 40px 15px;
    color: #6c757d;
}

.no-events-message i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #dee2e6;
}

.no-events-message h3 {
    margin: 0 0 8px 0;
    color: #495057;
    font-size: 1.2rem;
}

.no-events-message p {
    margin: 0;
    font-size: 0.9rem;
}

.event-card {
    background-color: #007bff;
}

.event-card:last-child {
    margin-bottom: 20px;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.card-date-badge {
    font-size: 0.8rem;
    font-weight: 500;
    flex: 1;
    min-width: 0;
}

.card-time {
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 16px;
    white-space: nowrap;
}
.card-image {
    width: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 0px;
    margin: 0 0 0px 0;
}

.card-content {

    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    margin-bottom: 0;
    width: 100%;
    box-sizing: border-box;

    padding: 16px;
    background-color: #000;
}

@media (min-width: 900px) {
    .mobile-cards-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .mobile-cards-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.card-title {
    margin: 0 0 6px 0 !important;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.card-location {
    color: #dc3545;
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-weight: 500;
}

.card-location i {
    font-size: 0.9rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.card-description {
    margin-bottom: 16px;
}

.card-description-short,
.card-description-full {
    color: #EEE;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.more-btn {
    background: none;
    border: none;
    color: #007bff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

.more-btn:hover {
    color: #0056b3;
}

.more-btn i {
    font-size: 0.75rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.card-group {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.card-link-indicator {
    color: #28a745;
    font-size: 1rem;
    flex-shrink: 0;
}

.fc-daygrid-day {
  border-width: 6px !important; /* Default is usually 1px */
}

.fc-daygrid-day-number {
    color: #fff !important;
    font-weight: bold !important;
    background-color: #000 !important;
    font-size: 1.5vw !important;
    border-radius: 50% !important;
    padding: 2px 6px !important;
    display: inline-block !important;
    text-align: center !important;
    text-decoration: none !important;
    margin: 4px !important;
}

.fc-day-background {
    pointer-events: none;
    border-radius: 4px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover !important;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 1;
    z-index: 1;
}

/* Event List Flex Layout */
.event-flex-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.event-image-container {
    flex: 0 0 120px;
}

.event-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    aspect-ratio: 1;
}

.event-details {
    flex: 1;
    min-width: 0;
}

@media (max-width: 600px) {
    .event-flex-container {
        flex-direction: column;
    }
    
    .event-image-container {
        flex: 0 0 auto;
        width: 100%;
    }
    
    .event-image {
        max-height: 200px;
        width: 100%;
        object-fit: cover;
    }
}

.fc-event-title {
    color: #fff;
    background-color: #000;
    border-radius: 4px;
    border-color: #d9ff00;
    text-decoration: none !important;
    padding: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.fc-event-title.tagged,
.card-title.tagged {
    display: inline-block;
    padding: 4px 6px;
    border-radius: 4px;
    background-color: var(--tag-color, #475569);
    color: var(--tag-text-color, #ffffff);
}

.calendar-overflow-summary-event {
    border: 1px solid rgba(103, 232, 249, 0.78) !important;
    background: rgba(8, 47, 73, 0.94) !important;
}

.calendar-overflow-summary-title {
    background: transparent !important;
    color: #a5f3fc !important;
    font-weight: 900;
    text-align: center;
}

.calendar-day-event-list {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.6rem;
}

.calendar-day-event-button {
    display: grid;
    grid-template-columns: 5.2rem minmax(0, 1fr);
    gap: 0.6rem;
    align-items: center;
    width: 100%;
    min-height: 2.4rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 8px;
    background: rgba(0, 42, 97, 0.82);
    color: #ffffff;
    cursor: pointer;
    text-align: left;
}

.calendar-day-event-button:hover,
.calendar-day-event-button:focus {
    background: rgba(8, 184, 137, 0.72);
    outline: 2px solid rgba(165, 243, 252, 0.75);
    outline-offset: 2px;
}

.calendar-day-event-time {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.86rem;
    font-weight: 800;
}

.calendar-day-event-title {
    min-width: 0;
    overflow: hidden;
    color: #ffffff;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-content.tagged {
    border-top: 4px solid var(--tag-color, #475569);
}

.card-content.tag-tech-skills,
.fc-event-title.tag-tech-skills,
.legend-swatch.tag-tech-skills {
    background-color: #1d4ed8;
    color: #fff;
}

.card-content.tag-economic-development,
.fc-event-title.tag-economic-development,
.legend-swatch.tag-economic-development {
    background-color: #136d34;
    color: #fff;
}

.card-content.tag-infrastructure,
.fc-event-title.tag-infrastructure,
.legend-swatch.tag-infrastructure {
    background-color: #334155;
    color: #fff;
}

.card-content.tag-makerspace,
.fc-event-title.tag-makerspace,
.legend-swatch.tag-makerspace {
    background-color: #f59e0b;
    color: #1f2937;
}

.card-content.tag-business,
.fc-event-title.tag-business,
.legend-swatch.tag-business {
    background-color: #fc28f1;
    color: #000000;
}

.card-content.tag-politics,
.fc-event-title.tag-politics,
.legend-swatch.tag-politics {
    background-color: #b91c1c;
    color: #fff;
}

.card-content.tag-finance,
.fc-event-title.tag-finance,
.legend-swatch.tag-finance {
    background-color: #a16207;
    color: #fff;
}

.card-content.tag-code-collective-and-partners,
.fc-event-title.tag-code-collective-and-partners,
.legend-swatch.tag-code-collective-and-partners {
    background-color: #ffe600;
    color: #000;
}

.card-content.tag-tech-skills .card-title,
.card-content.tag-economic-development .card-title,
.card-content.tag-infrastructure .card-title,
.card-content.tag-politics .card-title,
.card-content.tag-finance .card-title {
    color: #fff;
}

.card-content.tag-makerspace .card-title,
.card-content.tag-business .card-title,
.card-content.tag-code-collective-and-partners .card-title {
    color: #000;
}

@keyframes ccMetalShineSweep {
    0% {
        transform: translateX(-130%) skewX(-22deg);
        opacity: 0;
    }
    35% {
        opacity: 0.5;
    }
    100% {
        transform: translateX(160%) skewX(-22deg);
        opacity: 0;
    }
}

@keyframes ccSparkleTwinkle {
    0%, 100% {
        opacity: 0.25;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes ccSparklePulse {
    0%, 100% {
        opacity: 0.35;
        transform: scale(0.95);
    }
    50% {
        opacity: 0.95;
        transform: scale(1.08);
    }
}

@keyframes ccSparklesFall {
    0% {
        transform: translateY(-30%);
    }
    100% {
        transform: translateY(130%);
    }
}

@keyframes ccMetalGradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes ccBorderChase {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes ccGlowPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 102, 204, 0.5), 0 0 20px rgba(0, 102, 204, 0.3), 0 0 30px rgba(0, 102, 204, 0.1);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 102, 204, 0.8), 0 0 40px rgba(0, 102, 204, 0.5), 0 0 60px rgba(0, 102, 204, 0.2);
    }
}

@keyframes ccSparkleBurst {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(0) rotate(360deg);
        opacity: 0;
    }
}

@keyframes ccShimmerWave {
    0% {
        background-position: -200% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

@keyframes ccFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes ccRainbowBorder {
    0% {
        border-color: #ff0000;
    }
    16% {
        border-color: #ff9900;
    }
    33% {
        border-color: #ffff00;
    }
    50% {
        border-color: #00ff00;
    }
    66% {
        border-color: #0000ff;
    }
    83% {
        border-color: #9900ff;
    }
    100% {
        border-color: #ff0000;
    }
}

.card-content.source-codecollective-luma {
    position: relative;
    overflow: hidden;
    border: 2px solid #0066cc;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.4), transparent 45%),
        linear-gradient(140deg, #003366 0%, #0066cc 28%, #3399ff 49%, #66b3ff 72%, #99ccff 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.3) inset,
        0 10px 24px rgba(0, 51, 102, 0.45);
}

.card-content.source-codecollective-luma > * {
    position: relative;
    z-index: 2;
}

.card-content.source-codecollective-luma::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: conic-gradient(
        from 0deg,
        rgba(0, 102, 204, 0.15) 0deg,
        rgba(0, 102, 204, 0.15) 300deg,
        rgba(102, 179, 255, 0.95) 330deg,
        rgba(0, 102, 204, 1) 360deg
    );
    animation: ccBorderChase 1.4s linear infinite;
    pointer-events: none;
    z-index: 3;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    padding: 2px;
}

.card-content.source-codecollective-luma::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -45%;
    width: 42%;
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.85) 45%, transparent 100%);
    animation: ccMetalShineSweep 4.4s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

.card-content.source-codecollective-luma .card-title,
.card-content.source-codecollective-luma .card-description-short,
.card-content.source-codecollective-luma .card-description-full,
.card-content.source-codecollective-luma .card-time {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.card-content.source-codecollective-luma .card-time {
    font-weight: 700;
    color: #e6f2ff;
}

.card-content.source-codecollective-luma .card-location {
    color: #cce6ff;
}

/* Enhanced Code Collective Event Styles with Sparkle Effects */
.card-content.source-codecollective-luma {
    animation: ccGlowPulse 3s ease-in-out infinite, ccFloat 4s ease-in-out infinite;
}

.card-content.source-codecollective-luma:hover {
    animation: ccGlowPulse 1s ease-in-out infinite, ccFloat 2s ease-in-out infinite, ccRainbowBorder 3s linear infinite;
    transform: scale(1.02);
    z-index: 10;
}

/* Sparkle particles for Code Collective cards */
.card-content.source-codecollective-luma .sparkle-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    border-radius: inherit;
}

.card-content.source-codecollective-luma .sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(102, 179, 255, 0.8) 70%, transparent 100%);
    border-radius: 50%;
    animation: ccSparkleTwinkle 2s infinite;
}

.card-content.source-codecollective-luma .sparkle:nth-child(1) {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.card-content.source-codecollective-luma .sparkle:nth-child(2) {
    top: 25%;
    left: 85%;
    animation-delay: 0.5s;
}

.card-content.source-codecollective-luma .sparkle:nth-child(3) {
    top: 65%;
    left: 20%;
    animation-delay: 1s;
}

.card-content.source-codecollective-luma .sparkle:nth-child(4) {
    top: 75%;
    left: 75%;
    animation-delay: 1.5s;
}

.card-content.source-codecollective-luma .sparkle:nth-child(5) {
    top: 40%;
    left: 50%;
    animation-delay: 0.8s;
}

/* Enhanced title with shimmer effect */
.card-content.source-codecollective-luma .card-title {
    background: linear-gradient(90deg, 
        #ffffff 0%, 
        #e6f2ff 25%, 
        #cce6ff 50%, 
        #e6f2ff 75%, 
        #ffffff 100%);
    background-size: 200% 100%;
    animation: ccShimmerWave 3s linear infinite;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(0, 102, 204, 0.5);
    font-weight: 800;
    letter-spacing: 0.5px;
}

.fc-event.source-codecollective-luma {
    position: relative;
    overflow: visible;
    border: 2px solid #0066cc !important;
    background: linear-gradient(140deg, #003366 0%, #0066cc 33%, #3399ff 51%, #66b3ff 72%, #99ccff 100%) !important;
    background-size: 220% 220% !important;
    animation: ccMetalGradientShift 3.2s ease-in-out infinite, ccGlowPulse 4s ease-in-out infinite !important;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.3) inset !important;
    z-index: 8;
}

.fc-event.source-codecollective-luma::before {
    content: "";
    position: absolute;
    top: -20%;
    bottom: -20%;
    left: -40%;
    width: 40%;
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.78) 52%, transparent 100%);
    animation: ccMetalShineSweep 3.8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.fc-event.source-codecollective-luma::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: conic-gradient(
        from 0deg,
        rgba(255, 230, 0, 0.06) 0deg,
        rgba(255, 230, 0, 0.06) 305deg,
        rgba(255, 242, 122, 0.95) 332deg,
        rgba(255, 230, 0, 1) 360deg
    );
    animation: ccBorderChase 1.2s linear infinite;
    pointer-events: none;
    z-index: 10001;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    padding: 2px;
}

.fc-daygrid-day.source-codecollective-luma-day .fc-daygrid-day-frame {
    position: relative;
    overflow: visible;
}

.fc-daygrid-day.source-codecollective-luma-day .fc-daygrid-day-frame::after {
    content: none;
    position: absolute;
    left: 0;
    right: 0;
    top: -35%;
    height: 170%;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 1.1px, transparent 1.7px),
        radial-gradient(circle, rgba(255, 244, 200, 0.82) 0 1.2px, transparent 1.8px),
        radial-gradient(circle, rgba(255, 255, 255, 0.85) 0 0.9px, transparent 1.5px);
    background-size: 38px 56px, 52px 72px, 70px 94px;
    background-position: 0 0, 18px 10px, 30px 22px;
    opacity: 0.95;
    animation: none;
    pointer-events: none;
    z-index: 10000;
}

.fc-event.source-codecollective-luma .fc-event-title.source-codecollective-luma-title {
    background: linear-gradient(140deg, #003366 0%, #0066cc 30%, #3399ff 50%, #66b3ff 75%, #99ccff 100%);
    background-size: 220% 220%;
    animation: ccMetalGradientShift 2.6s ease-in-out infinite, ccShimmerWave 4s linear infinite;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.65);
    text-shadow: 0 0 8px rgba(0, 102, 204, 0.5);
    font-weight: 800;
    position: relative;
    z-index: 1;
    letter-spacing: 0.3px;
}

/* Enhanced hover effects for calendar events */
.fc-event.source-codecollective-luma:hover {
    animation: ccMetalGradientShift 1.5s ease-in-out infinite, ccGlowPulse 1s ease-in-out infinite, ccFloat 2s ease-in-out infinite !important;
    transform: translateY(-4px) scale(1.05) !important;
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.5) inset !important;
    z-index: 20 !important;
}

/* Sparkle burst effect on hover */
.fc-event.source-codecollective-luma:hover::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(102, 179, 255, 0.7) 30%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    animation: ccSparkleBurst 0.6s ease-out forwards;
    pointer-events: none;
    z-index: -1;
    border-radius: inherit;
}

/* Special premium Code Collective events */
.fc-event.source-codecollective-luma.premium {
    border: 3px solid #ffe600 !important;
    background: linear-gradient(45deg, 
        #636f82 0%, 
        #d7dde9 25%, 
        #ffffff 50%, 
        #b0bac9 75%, 
        #586274 100%) !important;
    background-size: 300% 300% !important;
    animation: ccMetalGradientShift 2s ease-in-out infinite, ccGlowPulse 3s ease-in-out infinite, ccRainbowBorder 5s linear infinite !important;
    box-shadow: 0 6px 20px rgba(255, 230, 0, 0.5), 0 0 30px rgba(255, 230, 0, 0.3), 0 0 0 2px rgba(255, 255, 255, 0.4) inset !important;
}

.fc-event.source-codecollective-luma.premium::after {
    background: conic-gradient(
        from 0deg,
        #ff0000 0deg,
        #ff9900 60deg,
        #ffff00 120deg,
        #00ff00 180deg,
        #0000ff 240deg,
        #9900ff 300deg,
        #ff0000 360deg
    );
    animation: ccBorderChase 0.8s linear infinite !important;
    opacity: 0.8;
}

/* Day highlighting for Code Collective events */
.fc-daygrid-day.has-codecollective-event {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1) 0%, rgba(0, 102, 204, 0.05) 100%) !important;
    position: relative;
}

.fc-daygrid-day.has-codecollective-event::before {
    content: "★";
    position: absolute;
    top: 2px;
    right: 2px;
    color: #0066cc;
    font-size: 12px;
    text-shadow: 0 0 4px rgba(0, 102, 204, 0.8);
    z-index: 5;
    animation: ccSparkleTwinkle 2s infinite;
}

/* Enhanced legend for Code Collective */
.legend-swatch.tag-code-collective-and-partners {
    position: relative;
    overflow: hidden;
    border: 2px solid #0066cc;
    background: linear-gradient(45deg, #0066cc 0%, #66b3ff 50%, #0066cc 100%);
    background-size: 200% 200%;
    animation: ccMetalGradientShift 3s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(0, 102, 204, 0.5);
}

.legend-swatch.tag-code-collective-and-partners::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);
    transform: rotate(30deg);
    animation: ccMetalShineSweep 3s ease-in-out infinite;
}

.legend-item.tag-code-collective-and-partners {
    font-weight: 700;
    color: #66b3ff;
    text-shadow: 0 0 4px rgba(0, 102, 204, 0.5);
}

/* Code Collective Events Section Styling */
.code-collective-events {
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(0, 42, 97, 0.1) 0%, rgba(0, 0, 0, 0.2) 100%);
    border-top: 3px solid #0066cc;
    border-bottom: 3px solid #0066cc;
    margin: 40px 0;
    position: relative;
    overflow: hidden;
}

.code-collective-events::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #0066cc, transparent);
    animation: ccShimmerWave 3s linear infinite;
}

#code-collective-events-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.cc-event-card {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1) 0%, rgba(0, 42, 97, 0.2) 100%);
    border: 2px solid #0066cc;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    animation: ccFloat 6s ease-in-out infinite;
}

.cc-event-card:nth-child(2n) {
    animation-delay: 1s;
}

.cc-event-card:nth-child(3n) {
    animation-delay: 2s;
}

.cc-event-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 102, 204, 0.3), 0 0 40px rgba(0, 102, 204, 0.2);
    animation: ccGlowPulse 1s ease-in-out infinite, ccFloat 3s ease-in-out infinite;
    z-index: 10;
}

.cc-event-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.event-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 2px solid #0066cc;
}

.cc-event-card-content {
    padding: 20px;
}

.cc-event-card-title {
    margin: 0 0 12px 0;
    font-size: 1.3rem;
    font-weight: 800;
    color: #66b3ff;
    background: linear-gradient(90deg, #0066cc 0%, #66b3ff 50%, #0066cc 100%);
    background-size: 200% 100%;
    animation: ccShimmerWave 4s linear infinite;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(0, 102, 204, 0.3);
}

.cc-event-card-date {
    color: #fff;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cc-event-card-date::before {
    content: "📅";
    font-size: 1rem;
}

.cc-event-card-location {
    color: #a1c6ff;
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cc-event-card-location::before {
    content: "📍";
    font-size: 1rem;
}

.cc-event-card-description {
    color: #e0e0e0;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.cc-show-more-btn {
    background: linear-gradient(135deg, #0066cc 0%, #3399ff 100%);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.cc-show-more-btn:hover {
    background: linear-gradient(135deg, #3399ff 0%, #66b3ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #code-collective-events-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cc-event-card {
        animation: ccFloat 8s ease-in-out infinite;
    }
}

.calendar-legend {
    position: fixed !important;
    left: 16px !important;
    bottom: 16px !important;
    z-index: 2000;
    display: grid;
    gap: 10px;
    align-items: stretch;
    margin: 0;
    padding: 12px;
    width: min(92vw, 720px);
    max-height: min(84vh, 820px);
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.94);
    border-radius: 12px;
    border: 2px solid #ffe600;
    backdrop-filter: blur(6px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

.legend-hidden .calendar-legend {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.legend-toggle-button {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #000;
    color: #ffe600;
    border: 2px solid #ffe600;
    border-radius: 999px;
    padding: 0;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.36);
}

.legend-hidden .legend-toggle-button {
    display: inline-flex;
}

.legend-toggle-button:hover,
.legend-toggle-button:focus-visible,
.legend-close-button:hover,
.legend-close-button:focus-visible {
    background: #ffe600;
    color: #000;
    outline: none;
}

.legend-panel-header {
    position: sticky;
    top: -12px;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0 10px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.98), rgba(0, 0, 0, 0.88));
    border-bottom: 1px solid rgba(255, 230, 0, 0.28);
}

.legend-title {
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.02em;
}

.legend-subtitle,
.legend-section-title {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
}

.legend-section-title {
    grid-column: 1 / -1;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.legend-close-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(255, 230, 0, 0.82);
    background: transparent;
    color: #ffe600;
    cursor: pointer;
}

.legend-section {
    border-radius: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.legend-primary-controls {
    display: grid;
    grid-template-columns: minmax(9rem, auto) minmax(16rem, 1fr);
    gap: 8px;
    align-items: center;
}

.legend-primary-controls .calendar-control {
    min-width: 0;
}

.legend-primary-controls .calendar-search,
.legend-primary-controls .timezone-controls,
.legend-primary-controls .calendar-freshness {
    grid-column: span 2;
}

.legend-primary-controls .calendar-download-menu {
    width: max-content;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.legend-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 10px;
}

.legend-map-picker {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.legend-map-picker select {
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 6px 10px;
}

.day-backgrounds-disabled .fc-day-background {
    display: none !important;
}

.legend-actions {
    display: inline-flex;
    justify-content: flex-start;
    gap: 6px;
    grid-column: 1 / -1;
}

@media (max-width: 720px) {
    .calendar-legend {
        left: 8px !important;
        right: 8px !important;
        bottom: 8px !important;
        width: auto;
        max-width: none;
        padding: 10px;
        max-height: 86vh;
    }

    .legend-toggle-button {
        left: 12px;
        bottom: 12px;
    }

    .legend-primary-controls,
    .legend-controls,
    .legend-list {
        grid-template-columns: 1fr;
    }

    .legend-primary-controls .calendar-search,
    .legend-primary-controls .timezone-controls,
    .legend-primary-controls .calendar-freshness {
        grid-column: auto;
    }

    .legend-map-picker {
        grid-template-columns: 1fr;
    }

    .legend-actions {
        flex-wrap: wrap;
    }

    .legend-primary-controls .calendar-download-menu,
    .legend-primary-controls .download-button {
        width: 100%;
    }
}

.legend-action {
    background: transparent;
    color: #ffe600;
    border: 1px solid #ffe600;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.legend-action:hover {
    background: #ffe600;
    color: #000;
}

.legend-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
}

.legend-tag-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-tag-search input {
    min-width: 0;
    flex: 1;
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    padding: 7px 12px;
}

.legend-tag-search input:focus {
    outline: 2px solid #ffe600;
    outline-offset: 2px;
}

.legend-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: min(42vh, 360px);
    overflow-y: auto;
    padding-right: 4px;
}

.legend-item.legend-tag-chip {
    position: relative;
    border-radius: 999px;
    padding: 6px 11px;
    background: var(--tag-chip-bg, #6b7280);
    color: var(--tag-chip-fg, #ffffff);
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
    transition: opacity 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.legend-item.legend-tag-chip:hover {
    transform: translateY(-1px);
}

.legend-tag-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.legend-tag-chip .legend-swatch {
    display: none;
}

.legend-tag-chip .legend-text {
    color: inherit;
    font-weight: 700;
}

.legend-item.legend-tag-chip:has(input:not(:checked)) {
    opacity: 0.42;
    filter: grayscale(0.7);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.legend-item.legend-tag-chip:has(input:focus-visible) {
    outline: 2px solid #ffe600;
    outline-offset: 2px;
}

.legend-list.maslow-hierarchy {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.legend-row {
    display: flex;
    justify-content: center;
    gap: 8px 12px;
    flex-wrap: wrap;
    width: 100%;
}

.legend-row-1 .legend-item {
    min-width: 42%;
    justify-content: center;
}

.legend-row-2 .legend-item,
.legend-row-3 .legend-item,
.legend-row-4 .legend-item,
.legend-row-5 .legend-item {
    min-width: 50%;
    justify-content: center;
}

.legend-row-6 .legend-item {
    justify-content: center;
}

.legend-row-aux {
    margin-top: 6px;
    opacity: 0.85;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #fff;
}

.legend-card {
    position: relative;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease, opacity 120ms ease, transform 120ms ease;
}

.legend-card:hover {
    transform: translateY(-1px);
}

.legend-toggle {
    margin: 0;
}

.legend-excluded-toggle {
    background: rgba(107, 114, 128, 0.18);
    padding: 6px 10px;
    border-radius: 10px;
}

.legend-item input[type="checkbox"] {
    margin: 0;
}

.legend-card input[type="checkbox"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.legend-card .legend-swatch {
    width: 100%;
    height: 100%;
    min-height: 44px;
    border-radius: 12px;
    position: absolute;
    inset: 0;
    opacity: 0.95;
    border: none;
}

.legend-card .legend-text {
    position: relative;
    z-index: 1;
    font-weight: 700;
    text-align: center;
    color: #ffffff;
}

.legend-card input[type="checkbox"]:not(:checked) + .legend-swatch {
    background: #4b5563 !important;
    opacity: 0.7;
}

.legend-card input[type="checkbox"]:not(:checked) ~ .legend-text {
    color: #d1d5db;
}

.legend-card input[type="checkbox"]:checked + .legend-swatch {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15), 0 6px 18px rgba(0, 0, 0, 0.2);
}

.legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.fc-event-title.excluded-from-map,
.card-content.excluded-from-map,
.card-content.excluded-from-map .card-title {
    background: #4b5563 !important;
    color: #f3f4f6 !important;
}

.card-content.excluded-from-map {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.fc-event-title.excluded-from-map {
    border-radius: 6px;
}

.tags-disabled .fc-event-title.tagged {
    background-color: #000;
    color: #fff;
}

.tags-disabled .card-title.tagged {
    background-color: transparent;
    color: #fff;
    padding: 0;
    border-radius: 0;
    display: block;
}

.tags-disabled .card-content.tagged {
    background-color: #000;
}

.tags-disabled .fc-event-title.tagged,
.tags-disabled .card-content.tagged .card-title {
    background-color: #000;
    color: #fff;
}

.event-hover-panel {
    position: fixed;
    top: 4vh;
    bottom: 4vh;
    width: min(40vw, 640px);
    z-index: 12000;
    pointer-events: none;
    opacity: 0;
    transform: translateX(12px);
    transition: opacity 120ms ease, transform 120ms ease;
}

.event-hover-panel.align-right {
    right: 2vw;
    left: auto;
    transform: translateX(12px);
}

.event-hover-panel.align-left {
    left: 2vw;
    right: auto;
    transform: translateX(-12px);
}

.event-hover-panel.visible {
    opacity: 1;
    transform: translateX(0);
}

.event-hover-inner {
    height: 100%;
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    border-radius: 24px;
    background: rgba(10, 15, 28, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
}

.event-hover-media-wrap {
    max-height: 34vh;
    min-height: 180px;
    background: #111827;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-hover-media {
    width: 100%;
    height: 100%;
    max-height: 34vh;
    object-fit: contain;
    display: block;
}

.event-hover-copy {
    padding: 22px 24px 26px;
    overflow-y: auto;
    color: #f8fafc;
}

.event-hover-kicker {
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #93c5fd;
    margin-bottom: 10px;
    font-weight: 700;
}

.event-hover-title {
    margin: 0 0 10px;
    font-size: clamp(1.5rem, 1.9vw, 2.2rem);
    line-height: 1.06;
    color: #ffffff;
    text-wrap: balance;
}

.event-hover-source {
    font-size: 0.96rem;
    color: #cbd5e1;
    font-weight: 600;
}

.event-hover-source-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.event-hover-location {
    font-size: 0.9rem;
    color: #cbd5e1;
    margin-bottom: 14px;
}

.event-hover-source-icon-wrap {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    overflow: hidden;
    flex: 0 0 34px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.event-hover-source-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.event-hover-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.event-hover-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    background: var(--tag-chip-bg, #334155);
    color: var(--tag-chip-fg, #ffffff);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.event-hover-description {
    font-size: 0.98rem;
    line-height: 1.62;
    color: #e2e8f0;
}

.event-hover-description p:first-child {
    margin-top: 0;
}

.event-hover-description p:last-child {
    margin-bottom: 0;
}

.event-hover-description a {
    color: #7dd3fc;
}

.event-hover-description ul,
.event-hover-description ol {
    padding-left: 1.2rem;
}

.event-info-modal-open {
    overflow: hidden;
}

.event-info-modal {
    position: fixed;
    inset: 0;
    z-index: 13000;
    display: grid;
    place-items: center;
}

.event-info-modal[hidden] {
    display: none;
}

.event-info-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.74);
    backdrop-filter: blur(8px);
}

.event-info-modal-dialog {
    position: relative;
    width: min(860px, 92vw);
    max-height: 88vh;
    overflow: hidden;
    border-radius: 24px;
    background: rgba(10, 15, 28, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
    z-index: 1;
    display: grid;
    grid-template-rows: auto 1fr;
}

.event-info-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 2;
}

.event-info-modal-media-wrap {
    max-height: 34vh;
    min-height: 180px;
    background: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.event-info-modal-media-wrap[hidden] {
    display: none;
}

.event-info-modal-media {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.event-info-modal-copy {
    overflow-y: auto;
    padding: 24px 26px 28px;
    color: #f8fafc;
}

.event-info-modal-kicker {
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #93c5fd;
    margin-bottom: 10px;
    font-weight: 700;
}

.event-info-modal-title {
    margin: 0 0 10px;
    font-size: clamp(1.6rem, 2vw, 2.4rem);
    line-height: 1.08;
    color: #fff;
}

.event-info-modal-source {
    margin-bottom: 12px;
    font-size: 0.96rem;
    color: #cbd5e1;
    font-weight: 600;
}

.event-info-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.event-info-modal-description {
    font-size: 0.98rem;
    line-height: 1.62;
    color: #e2e8f0;
}

.event-info-modal-description a {
    color: #7dd3fc;
}

.event-info-modal-actions {
    margin-top: 20px;
}

.event-agenda {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.event-agenda h4 {
    margin: 0 0 8px;
    font-size: 0.95rem;
}

.event-agenda ul {
    margin: 0;
    padding-left: 18px;
}

.event-agenda li {
    margin: 0 0 8px;
}

.event-agenda-hosts {
    opacity: 0.82;
    font-size: 0.88rem;
}

.event-info-modal-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

@media (max-width: 900px) {
    .event-hover-panel {
        display: none;
    }
}
