.esp-event-calendar-wrapper {
    font-family: "Urbanist", "Segoe UI", "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
    max-width: 1740px; /* Limits the width */
    width: 100%;       /* Forces it to fill the screen until it hits 1440px */
    margin: 0 auto;    /* Centers it if the screen is wider than 1440px */
    padding: 0;
    color: #1c1c1c;
    background: #e6e6e6;
    border-radius: 0;   /* Removed radius for edge-to-edge look */
    box-shadow: none;   /* Removed shadow to prevent "floating" effect */
    height: 367px;
    overflow: hidden;
}

.esp-two-column-layout {
    display: grid;
    grid-template-columns: 38% 62%;
    gap: 0;            /* Ensures the two sides touch perfectly */
    align-items: stretch;
    height: 367px;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

@media (max-width: 1200px) {
    .esp-two-column-layout {
        grid-template-columns: 40% 60%;
    }
    
    .esp-calendar-card {
        padding: 0 2px;
    }
    
    .esp-month-nav {
        margin: 0 2px;
        width: 36px;
        height: 36px;
    }
    
    .esp-month-nav.esp-prev {
        margin-right: 3px;
        margin-left: 3px;
    }
    
    .esp-month-nav.esp-next {
        margin-left: 3px;
        margin-right: 3px;
    }
    
    .esp-month-name {
        font-size: 30px;
    }
    
    .esp-year-number {
        font-size: 21px;
    }
    
    .esp-weekdays {
        gap: 5px;
    }
    
    .esp-days-grid {
        gap: 5px;
    }
}

@media (max-width: 1100px) {
    .esp-two-column-layout {
        grid-template-columns: 42% 58%;
    }
    
    .esp-calendar-card {
        padding: 0 1px;
    }
    
    .esp-calendar-header {
        gap: 2px;
        margin-bottom: 14px;
    }
    
    .esp-month-label {
        gap: 2px;
    }
    
    .esp-month-nav {
        margin: 0 1px;
        width: 32px;
        height: 32px;
    }
    
    .esp-month-nav.esp-prev {
        margin-right: 2px;
        margin-left: 2px;
    }
    
    .esp-month-nav.esp-next {
        margin-left: 2px;
        margin-right: 2px;
    }
    
    .esp-month-name {
        font-size: 24px;
    }
    
    .esp-year-number {
        font-size: 18px;
    }
    
    .esp-weekdays {
        font-size: 10px;
        gap: 2px;
    }
    
    .esp-weekdays > span {
        min-width: 20px;
    }
    
    .esp-days-grid {
        gap: 2px;
    }
    
    .esp-day {
        height: 20px;
        min-width: 20px;
        font-size: 9px;
    }
    
    .esp-day.today {
        width: 20px;
        height: 20px;
        min-width: 20px;
    }
    
    .esp-events-section {
        padding: 26px 36px;
    }
    
    .esp-section-title {
        font-size: 20px;
    }
    
    .esp-tab-headers button {
        font-size: 0.85rem;
        padding: 0 16px;
    }
}

@media (max-width: 1000px) {
    .esp-two-column-layout {
        grid-template-columns: 45% 55%;
    }
    
    .esp-calendar-card {
        padding: 0 1px;
    }
    
    .esp-calendar-header {
        gap: 1px;
        margin-bottom: 12px;
    }
    
    .esp-month-label {
        gap: 1px;
    }
    
    .esp-month-nav {
        margin: 0 1px;
        width: 30px;
        height: 30px;
    }
    
    .esp-month-nav.esp-prev {
        margin-right: 1px;
        margin-left: 1px;
    }
    
    .esp-month-nav.esp-next {
        margin-left: 1px;
        margin-right: 1px;
    }
    
    .esp-month-name {
        font-size: 22px;
    }
    
    .esp-year-number {
        font-size: 17px;
    }
    
    .esp-weekdays {
        font-size: 9px;
        gap: 1px;
    }
    
    .esp-weekdays > span {
        min-width: 18px;
    }
    
    .esp-days-grid {
        gap: 1px;
    }
    
    .esp-day {
        height: 18px;
        min-width: 18px;
        font-size: 9px;
    }
    
    .esp-day.today {
        width: 18px;
        height: 18px;
        min-width: 18px;
    }
    
    .esp-events-section {
        padding: 22px 30px;
    }
    
    .esp-section-title {
        font-size: 19px;
    }
}

/* Calendar panel */
.esp-calendar-panel {
    width: 100%;
    height: 367px;
    display: flex;
    align-items: center;
    gap: 0;
    background: #121212;
    border-radius: 0;   /* Sit flush against the wrapper corner */
    box-shadow: none;   /* Shadow is no longer needed if flush */
    overflow: hidden;
    box-sizing: border-box;
    min-width: 0;
}

.esp-calendar-card {
    color: #ffffff;
    height: 367px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 3px;
    box-sizing: border-box;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

.esp-calendar-card > * {
    max-width: 100%;
}

.esp-calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    margin-bottom: 20px;
    max-width: 100%;
    flex-shrink: 1;
}

.esp-month-label {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    flex: 1;
    min-width: 0;
    gap: 4px;
}

.esp-month-name {
    font-family: "Urbanist", sans-serif;
    font-size: 35px;
    font-weight: 500;
    line-height: 100%;
    letter-spacing: 0%;
    color: #BA1B1B;
}

.esp-year-number {
    font-family: "Urbanist", sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 100%;
    letter-spacing: 0%;
    color: #FFFFFF;
}

.esp-month-nav {
    border: none;
    background: transparent;
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
    margin: 0 5px;
}

.esp-month-nav:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.1);
}

.esp-month-nav.esp-prev {
    margin-right: 5px;
    margin-left: 5px;
    padding: 0;
}

.esp-month-nav.esp-next {
    margin-left: 5px;
    margin-right: 5px;
    padding: 0;
}

.esp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 6px;
    font-family: "Urbanist", sans-serif;
    font-weight: 400;
    font-size: 12px;
    text-transform: uppercase;
    color: #FFFFFF;
    letter-spacing: 0%;
    text-align: center;
}

.esp-weekdays > span {
    min-width: 28px;
}

.esp-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.esp-day {
    position: relative;
    background: transparent;
    color: #FFFFFF;
    border-radius: 8px;
    height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Urbanist", sans-serif;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0%;
    border: none;
}

.esp-day.muted {
    opacity: 0.35;
}

.esp-day.today {
    border: none;
    background: #ffffff;
    color: #1c1c1c;
    font-weight: 600;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    justify-self: center;
    margin: 0 auto;
}

.esp-day.has-event::after {
    content: "";
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #c62828;
}

.esp-day.past.has-event::after {
    background: #838383;
}

/* Events list panel */
.esp-events-section {
    background: transparent;
    padding: 29px 53px;
    color: #1b1b1b;
    border-radius: 0;   /* Sit flush against the wrapper corner */
    box-shadow: none;
    height: 367px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    min-width: 0;
}

.esp-section-title {
    font-family: "Urbanist", sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0;
    margin: 0;
    color: #1b1b1b;
}

.esp-tabs {
    margin-top: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.esp-tab-headers {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.esp-tab-headers button {
    font-family: "Urbanist", sans-serif;
    background: transparent;
    border: 1px solid #1b1b1b;
    color: #1b1b1b !important;
    border-radius: 50px;
    padding: 0 20px;
    height: 32px;
    cursor: pointer;
    font-weight: 400;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.esp-tab-headers button:hover {
    background: rgba(0, 0, 0, 0.05);
}

.esp-tab-headers button.active {
    background: #1b1b1b;
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.esp-tab-panel {
    display: none;
    flex: 1;
    overflow-y: auto;
}

.esp-tab-panel.active {
    display: flex;
    flex-direction: column;
}

.esp-events-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.esp-detail-card {
    background: #f2f2f2;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    position: relative;
}

.esp-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.esp-detail-date {
    font-family: "Urbanist", sans-serif;
    font-weight: 600;
    font-size: 26px;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: center;
    color: #000000;
    margin-right: 6px;
    flex-shrink: 0;
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.esp-date-day {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    color: #000000;
}

.esp-date-month {
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    color: #000000;
    text-transform: uppercase;
}

.esp-detail-title {
    margin: 0;
    font-family: "Urbanist", sans-serif;
    font-size: 36px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0;
    color: #111;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.esp-detail-body {
    position: relative;
    min-height: 120px;
}

.esp-detail-body p:empty,
.esp-detail-body br {
    display: none;
}

.esp-detail-body > p {
    margin: 0;
}

.esp-detail-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #222;
}

.esp-detail-meta > div {
    display: block;
}

.esp-detail-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 151px;
    height: 45px;
    border-radius: 60px;
    background: #838383;
    color: #fff !important;
    font-family: "Urbanist", sans-serif;
    font-weight: 400;
    font-size: 16px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
    position: absolute;
    bottom: 0;
    right: 0;
}

.esp-detail-button:hover {
    background: #6a6a6a;
    transform: translateY(-1px);
}

.esp-compact-event-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

.esp-compact-event-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.esp-compact-date {
    background: white;
    color: #333;
    padding: 10px 12px;
    border-radius: 8px;
    text-align: center;
    min-width: 62px;
    flex-shrink: 0;
}

.esp-compact-day {
    font-size: 1.6em;
    font-weight: 800;
    line-height: 1;
}

.esp-compact-month {
    font-size: 0.85em;
    font-weight: 700;
    margin-top: 3px;
}

.esp-compact-details {
    flex-grow: 1;
}

.esp-compact-title {
    font-family: "Urbanist", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0;
    margin-bottom: 8px;
    color: #1b1b1b;
}

.esp-compact-meta {
    font-family: "Urbanist", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0;
    color: #1b1b1b;
    opacity: 0.95;
}

.esp-compact-meta em {
    font-style: normal;
    font-weight: 600;
}

.esp-bullet {
    display: inline-block;
    margin: 0 6px;
    opacity: 0.7;
}

@media (max-width: 900px) {
    .esp-two-column-layout {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto;
        height: auto;
    }
    
    .esp-event-calendar-wrapper {
        height: auto;
        min-height: 400px;
    }
    
    .esp-calendar-panel {
        height: auto;
        padding: 20px 0;
    }
    
    .esp-calendar-card {
        height: auto;
        padding: 0 20px;
    }
    
    .esp-calendar-header {
        gap: 4px;
        margin-bottom: 20px;
    }
    
    .esp-month-label {
        gap: 4px;
    }
    
    .esp-month-nav {
        margin: 0 15px;
        width: 36px;
        height: 36px;
    }
    
    .esp-month-name {
        font-size: 28px;
    }
    
    .esp-year-number {
        font-size: 20px;
    }
    
    .esp-weekdays {
        font-size: 12px;
        gap: 4px;
    }
    
    .esp-days-grid {
        gap: 4px;
    }
    
    .esp-day {
        font-size: 12px;
        height: 26px;
        min-width: 26px;
    }
    
    .esp-day.today {
        width: 26px;
        height: 26px;
    }
    
    .esp-events-section {
        height: auto;
        min-height: 300px;
        padding: 20px 24px;
    }
    
    .esp-section-title {
        font-size: 18px;
        margin-bottom: 4px;
    }
    
    .esp-tabs {
        margin-top: 8px;
    }
    
    .esp-tab-headers {
        gap: 6px;
        margin-bottom: 14px;
    }
    
    .esp-tab-headers button {
        font-size: 0.8rem;
        padding: 0 14px;
        height: 28px;
    }
    
    .esp-detail-card {
        padding: 20px;
    }
    
    .esp-detail-title {
        font-size: 22px;
        white-space: normal;
    }
    
    .esp-detail-body {
        min-height: 90px;
        font-size: 14px;
    }
}

@media (max-width: 640px) {
    .esp-event-calendar-wrapper {
        font-size: 13px;
    }

    .esp-calendar-card {
        padding: 20px 16px 22px;
    }

    .esp-month-name {
        font-size: 24px;
    }

    .esp-year-number {
        font-size: 18px;
    }
    
    .esp-month-nav {
        margin: 0 10px;
        width: 34px;
        height: 34px;
    }

    .esp-events-section {
        padding: 20px 24px;
    }
    
    .esp-section-title {
        font-size: 18px;
    }
    
    .esp-tab-headers {
        gap: 6px;
        margin-bottom: 14px;
    }
    
    .esp-tab-headers button {
        font-size: 0.8rem;
        padding: 0 14px;
        height: 28px;
    }
    
    .esp-detail-card {
        padding: 20px;
    }
    
    .esp-detail-title {
        font-size: 20px;
    }
    
    .esp-detail-body {
        min-height: 90px;
        font-size: 14px;
    }
    
    .esp-detail-meta {
        font-size: 13px;
    }
    
    .esp-detail-button {
        width: 130px;
        height: 40px;
        font-size: 14px;
    }

    .esp-compact-event-item {
        flex-direction: column;
        gap: 10px;
    }

    .esp-compact-date {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .esp-calendar-panel {
        padding: 16px 0;
    }
    
    .esp-month-name {
        font-size: 22px;
    }
    
    .esp-year-number {
        font-size: 16px;
    }
    
    .esp-month-nav {
        margin: 0 8px;
        width: 32px;
        height: 32px;
    }
    
    .esp-events-section {
        padding: 18px 20px;
    }
    
    .esp-section-title {
        font-size: 16px;
    }
    
    .esp-tab-headers button {
        font-size: 0.75rem;
        padding: 0 12px;
        height: 26px;
    }
    
    .esp-detail-card {
        padding: 18px;
    }
    
    .esp-detail-title {
        font-size: 18px;
    }
    
    .esp-detail-body {
        min-height: 80px;
        font-size: 13px;
    }
    
    .esp-detail-meta {
        font-size: 12px;
    }
    
    .esp-detail-button {
        width: 120px;
        height: 38px;
        font-size: 13px;
    }
    
    .esp-weekdays {
        font-size: 11px;
    }
    
    .esp-day {
        font-size: 11px;
        height: 26px;
    }
    
    .esp-day.today {
        width: 26px;
        height: 26px;
    }
}
