/* ===================================
   PALE BLUE MAGAZINE - EVENTS CALENDAR
   Glassmorphism aesthetic with transparency
   =================================== */

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base Styles */
body {
    font-family: 'Diatype', sans-serif;
    background-color: #E9EFF4;
    color: #434649;
    line-height: 1.6;
    min-height: 100vh;
    overflow: hidden;
}

/* Site Header (from game) */
.ticss-21666eb5 {
    z-index: 7;
    position: fixed;
    width: 100%;
    background: rgba(233, 239, 244, .7);
    box-shadow: 0 2px 4px 0 rgba(31, 38, 135, 0.1);
    border: 0px solid rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticss-bee8b810 {
    margin-top: 0;
    margin-left: 2.5%;
    mix-blend-mode: difference;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    text-transform: uppercase;
    color: #636363;
}

.ticss-bee8b810 a {
    color: inherit;
    text-decoration: none;
}

.has-diatype-plus-variabl-font-family {
    font-family: 'Diatype', sans-serif !important;
}

.ticss-7ae99920 {
    margin-right: 2.5%;
    flex-shrink: 0;
    display: flex;
    gap: 2rem;
}

.ticss-7ae99920 a {
    color: #636363;
    text-decoration: none;
    font-family: 'Diatype', sans-serif;
    font-weight: 500;
}

.mobile-nav {
    display: none;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: #E9EFF4;
    padding: 30px 40px 40px 40px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.mobile-menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-close {
    position: fixed;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    width: 20px;
    height: 20px;
    color: #333;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    font-weight: normal;
}

.mobile-menu-items {
    background: none;
    gap: 0;
    flex-direction: column;
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.mobile-menu-items li {
    margin: 0;
    border: none;
    padding: 0;
    background: none;
    width: 100%;
}

.mobile-menu-items li a {
    color: #636363;
    font-weight: 400;
    text-decoration: none;
    padding: 8px 0;
    display: block;
    font-size: 14px;
    transition: opacity 0.3s ease;
    background: none;
    width: 100%;
    text-align: left;
}

.mobile-menu-items li:first-child a {
    font-size: 14px;
    font-weight: 700;
    color: #636363;
    text-transform: uppercase;
    border-bottom: 1px solid #636363;
    padding: 0 60px 12px 0;
    margin-bottom: 8px;
    line-height: 20px;
    display: inline-block;
    width: auto;
}

.mobile-menu-items li:nth-child(5) a {
    padding-left: 20px;
}

.mobile-menu-items li a:hover {
    opacity: 0.7;
}

@media only screen and (max-width: 800px) {
    .ticss-21666eb5 {
        justify-content: flex-start;
    }

    .ticss-bee8b810 {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin-left: 0;
        text-align: center;
    }

    .ticss-7ae99920 {
        display: none;
    }

    .mobile-nav {
        display: block;
        margin-left: 4%;
        order: -1;
    }

    .hamburger {
        background: none;
        border: none;
        font-size: 18px;
        color: #636363;
        cursor: pointer;
        width: 20px;
        height: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hamburger-lines {
        position: relative;
        width: 18px;
        height: 2px;
        background: #636363;
        top: 1px;
    }

    .hamburger-lines::before {
        content: '';
        position: absolute;
        top: -5px;
        left: 0;
        width: 18px;
        height: 2px;
        background: #636363;
    }
}

/* Main Container - Two Column Layout */
.calendar-container {
    display: flex;
    height: 100vh;
    padding-top: 70px; /* Account for fixed header */
    gap: 2rem;
    padding-left: calc(2% + 6rem); /* Extra padding for vertical title */
    padding-right: 2%;
    overflow-x: visible;
    position: relative;
}

/* Vertical Page Title - centered between edge and line, accounting for header */
.calendar-container::before {
    content: 'THE DESIGN CALENDAR';
    position: fixed;
    left: calc(1% + 1rem);
    top: 50%;
    margin-top: 35px;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: left center;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #888;
    white-space: nowrap;
}

/* Vertical Line - to the right of the title */
.calendar-container::after {
    content: '';
    position: fixed;
    left: calc(2% + 2rem);
    top: 70px;
    bottom: 0;
    width: 1px;
    background: #434649;
}

/* LEFT SIDEBAR - Increased width to compensate for calendar bleeding */
.sidebar-left {
    width: 45%;
    max-width: 600px;
    min-width: 350px;
    height: calc(100vh - 90px);
    overflow-y: auto;
    overflow-x: visible;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 0.5rem 0;
    padding-left: 3rem;
    margin-left: -3rem;
    flex-shrink: 0;
    /* Hide scrollbar but keep functionality */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-left::-webkit-scrollbar {
    display: none;
}

/* RIGHT CONTENT - Reduced width to give left sidebar more room */
.content-right {
    width: 55%;
    flex-grow: 1;
    height: calc(100vh - 90px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 0 1rem 2rem;
    border-left: none;
    /* Hide scrollbar but keep functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.content-right::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

/* Widget containers - transparent, no boxes, aligned */
.location-widget,
.type-filter {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 1.5rem;
    max-width: 600px;
    padding-left: 3rem;
    padding-right: 3rem;
    margin-left: -3rem;
    margin-right: -3rem;
}

/* Filter Titles */
.filter-title {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #434649;
    margin-bottom: 1rem;
}

/* =======================
   MONTHLY CALENDAR WIDGET
   ======================= */

.calendar-widget {
    margin-bottom: 2rem;
    position: relative;
    max-width: 600px;
    overflow: visible;
    padding-left: 3rem;
    padding-right: 3rem;
    margin-left: -3rem;
    margin-right: -3rem;
}

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

.current-month {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
}

.month-nav {
    background: transparent;
    border: none;
    padding: 0.5rem;
    font-size: 18px;
    font-weight: 400;
    color: #888;
    cursor: pointer;
    transition: all 0.4s ease;
}

.month-nav:hover {
    color: #888;
    opacity: 0.7;
}

/* Calendar wrapper */
.calendar-wrapper {
    position: relative;
    overflow: visible;
}

/* Heat overlay - positioned outside calendar grid to allow free bleeding */
.heat-overlay {
    position: absolute;
    top: -4.5rem;
    left: -15rem;
    right: -15rem;
    bottom: -3rem;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
}

.heat-spot {
    position: absolute;
    border-radius: 50%;
    filter: blur(25px);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
    width: 100%;
    position: relative;
    z-index: 2;
}

.calendar-grid.fade-out {
    opacity: 0;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 500;
    color: #434649;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: transparent;
    border: none;
}

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

/* Keep all calendar days with consistent transparent background */
.calendar-day[data-event-count] {
    background: transparent;
}

.calendar-day:hover {
    background: rgba(99, 99, 99, 0.6);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    transform: scale(1.05);
}

.calendar-day.selected {
    background: rgba(67, 70, 73, 0.5);
    color: #ffffff;
    font-weight: 700;
}

.calendar-day.selected:hover {
    font-size: 11px;
    font-weight: 700;
    transform: scale(1.05);
}

.calendar-day.today {
    border: 1px solid #434649;
}

.calendar-day.other-month {
    opacity: 0.3;
    pointer-events: none;
}

.calendar-day-name {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #636363;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =======================
   CONDENSED FILTER CHIPS
   ======================= */

.filter-chips {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-row-sub {
    margin-top: 0.25rem;
}

.filter-chip {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    padding: 0.3rem 0.6rem;
    font-family: 'Diatype', sans-serif;
    font-size: 9px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #434649;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 0.7);
}

.filter-chip.active {
    background: rgba(99, 99, 99, 0.8);
    color: #ffffff;
}

.filter-chip-city {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    padding: 0.3rem 0.6rem;
    font-family: 'Diatype', sans-serif;
    font-size: 9px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #434649;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-chip-city:hover {
    background: rgba(255, 255, 255, 0.7);
}

.filter-chip-city.active {
    background: rgba(99, 99, 99, 0.8);
    color: #ffffff;
}

/* =======================
   EVENTS LIST (RIGHT COLUMN)
   ======================= */

.events-header {
    margin-bottom: 2rem;
    display: none; /* Hide the header - using vertical title instead */
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: #434649;
    margin-bottom: 0.5rem;
}

.event-count {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #636363;
}

.events-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem 3rem;
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
    position: relative;
}

.events-list.fade-out {
    opacity: 0;
}

/* Event Card - Vertical Layout */
.event-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    margin: 0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.event-card:hover {
    transform: translateY(-2px);
}

/* Event image - no margin to make tight */
.event-image {
    width: 100%;
    height: 24rem;
    overflow: hidden;
    position: relative;
    margin-bottom: 0;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

/* Event content - add padding only to content area */
.event-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #434649;
    flex: 1;
}

.event-meta {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.event-meta-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.event-date {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #434649;
}

.event-type-label {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #434649;
}

.event-text-large {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    color: #434649;
    text-transform: uppercase;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Badge with type-based shapes */
.event-badge {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: block;
}

.event-badge svg {
    width: 100%;
    height: 100%;
    display: block;
    flex-shrink: 0;
}

.event-badge svg circle,
.event-badge svg rect,
.event-badge svg polygon {
    fill: transparent;
    stroke: #434649;
    stroke-width: 0.5;
    transition: fill 0.3s ease, stroke 0.3s ease;
}

.event-type,
.event-location {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 5px 10px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #434649;
    box-shadow: 0 2px 4px 0 rgba(31, 38, 135, 0.1);
}

.event-title {
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #434649;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.event-organization {
    font-size: 14px;
    font-weight: 500;
    font-style: italic;
    color: #636363;
    margin-bottom: 1rem;
}

.event-date-time {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.event-date,
.event-time {
    font-size: 12px;
    font-weight: 500;
    color: #636363;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.event-description {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: #434649;
    margin-bottom: 1.5rem;
}

.event-link {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #434649;
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.event-link:hover {
    opacity: 0.7;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 4rem 2rem;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #636363;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results h3 {
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #636363;
    margin-bottom: 0.5rem;
}

.no-results p {
    font-size: 14px;
    font-weight: 400;
    color: #888;
}

/* Event Card Hover Effects - Subtle minimal effect */
.event-card:hover {
    transform: translateY(-4px);
}

.event-card:hover .event-content {
    background: #fafafa;
}

.event-card:hover .event-badge svg circle,
.event-card:hover .event-badge svg rect,
.event-card:hover .event-badge svg polygon {
    stroke: #000;
    stroke-width: 1;
}

/* =======================
   ANIMATIONS (From store page)
   ======================= */

.animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fadeIn {
    animation-name: fadeIn;
}

.delay-200ms {
    animation-delay: 0.2s;
}

.delay-400ms {
    animation-delay: 0.4s;
}

.delay-600ms {
    animation-delay: 0.6s;
}

/* =======================
   RESPONSIVE (Mobile)
   ======================= */

@media (max-width: 1024px) {
    .calendar-container {
        flex-direction: column;
        height: auto;
        overflow-y: auto;
    }

    .sidebar-left {
        width: 100%;
        max-width: none;
        height: auto;
        overflow-y: visible;
        padding: 1rem 0;
        gap: 1.5rem;
    }

    .content-right {
        width: 100%;
        height: auto;
        overflow-y: visible;
        padding: 1rem 0;
    }

    .event-card {
        flex-direction: column;
        min-height: auto;
    }

    .event-image {
        width: 100%;
        min-width: auto;
        height: 300px;
    }

    .event-details {
        padding: 1.5rem;
    }
}
