/* ========================================
   TCC Events Page — Topanga Chamber
   Matches Divi theme: Open Sans, #2EA3F2 accent
   ======================================== */

/* Reset & Wrapper */
.tcc-events-wrapper {
    font-family: 'Open Sans', 'Source Sans Pro', -apple-system, sans-serif;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
    color: #333;
}

.tcc-events-wrapper *,
.tcc-events-wrapper *::before,
.tcc-events-wrapper *::after {
    box-sizing: border-box;
}

/* Force full-width layout on events page — hide sidebar and its border */
.page-id-26709 #sidebar {
    display: none !important;
}
.page-id-26709 #left-area {
    width: 100% !important;
    padding-right: 0 !important;
    border-right: none !important;
}
.page-id-26709 #content-area {
    border-right: none !important;
    border: none !important;
    box-shadow: none !important;
}
.page-id-26709 .entry-title.main_title {
    display: none; /* Our hero handles the title */
}

/* Hero Section — flat background for readability */
.tcc-events-hero {
    background-color: #e4eef6;
    background-image: none;
    margin: 0 -20px 32px;
    padding: 48px 20px 44px;
    border-radius: 12px;
}

.tcc-events-hero__inner {
    max-width: 1080px;
    margin: 0 auto;
    text-align: center;
}

.tcc-events-header__title {
    font-family: 'Open Sans', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px;
    letter-spacing: -0.3px;
}

.tcc-events-header__subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
    font-weight: 400;
}

.tcc-events-header__disclaimer {
    font-size: 13px;
    color: #999;
    margin: 10px 0 0;
    font-style: italic;
    font-weight: 400;
}

/* Filter Bar */
.tcc-events-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    background: #f7f9fc;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 32px;
}

.tcc-events-filters__group {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tcc-events-filters__group label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
}

.tcc-events-filters__select {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    padding: 10px 36px 10px 14px;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    color: #333;
    transition: border-color 0.2s;
}

.tcc-events-filters__select:focus {
    outline: none;
    border-color: #2EA3F2;
    box-shadow: 0 0 0 3px rgba(46, 163, 242, 0.15);
}

/* Search & Date Inputs */
.tcc-events-filters__input {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    padding: 10px 14px;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    background: #fff;
    color: #333;
    transition: border-color 0.2s;
}

.tcc-events-filters__input:focus {
    outline: none;
    border-color: #2EA3F2;
    box-shadow: 0 0 0 3px rgba(46, 163, 242, 0.15);
}

.tcc-events-filters__input::placeholder {
    color: #999;
}

.tcc-events-filters__search-row {
    display: flex;
    gap: 0;
}

.tcc-events-filters__search-row .tcc-events-filters__input {
    flex: 1;
    border-radius: 6px 0 0 6px;
    border-right: none;
}

.tcc-events-filters__search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    background: #2EA3F2;
    color: #fff;
    border: 1px solid #2EA3F2;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    transition: background 0.2s;
}

.tcc-events-filters__search-btn:hover {
    background: #1a8fd6;
    border-color: #1a8fd6;
}

.tcc-events-filters__group--search {
    flex: 2 1 280px;
}

/* Calendar Button & Popup */
.tcc-events-filters__group--calendar {
    flex: 0 0 auto;
    position: relative;
}

.tcc-events-filters__calendar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: #fff;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    cursor: pointer;
    color: #2EA3F2;
    transition: border-color 0.2s, background 0.2s;
}

.tcc-events-filters__calendar-btn:hover {
    border-color: #2EA3F2;
    background: #f0f8ff;
}

.tcc-calendar-popup {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 16px;
    width: 300px;
    user-select: none;
    -webkit-user-select: none;
}

.tcc-calendar-popup__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.tcc-calendar-popup__title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
}

.tcc-calendar-popup__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    transition: border-color 0.2s, color 0.2s;
}

.tcc-calendar-popup__nav:hover {
    border-color: #2EA3F2;
    color: #2EA3F2;
}

.tcc-calendar-popup__days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 4px;
}

.tcc-calendar-popup__days span {
    font-size: 11px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    padding: 4px 0;
}

.tcc-calendar-popup__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.tcc-cal-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 34px;
    font-size: 13px;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    margin: 0 auto;
}

.tcc-cal-cell:hover {
    background: #e8f4fd;
}

.tcc-cal-cell--empty {
    cursor: default;
}

.tcc-cal-cell--empty:hover {
    background: none;
}

.tcc-cal-cell--selected {
    background: #2EA3F2 !important;
    color: #fff;
    font-weight: 700;
}

.tcc-cal-cell--in-range {
    background: #d4edfc;
    border-radius: 2px;
}

.tcc-calendar-popup__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.tcc-calendar-popup__range {
    font-size: 12px;
    color: #666;
}

.tcc-calendar-popup__clear {
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #2EA3F2;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
}

.tcc-calendar-popup__clear:hover {
    text-decoration: underline;
}

.tcc-events-filters__reset {
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #2EA3F2;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 4px;
    white-space: nowrap;
    transition: color 0.2s;
}

.tcc-events-filters__reset:hover {
    color: #1a7abf;
    text-decoration: underline;
}

/* Events List — background matches homepage "Upcoming Mixers" section */
.tcc-events-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background-color: #efefef;
    background-image: linear-gradient(180deg, rgba(98, 167, 219, 0.29) 0%, rgba(0, 0, 0, 0) 100%);
    margin: 0 -20px;
    padding: 32px 20px;
    border-radius: 12px;
}

/* Event Card */
.tcc-event-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.25s, transform 0.25s;
}

.tcc-event-card__top {
    display: flex;
}

.tcc-event-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Card Image */
.tcc-event-card__image {
    position: relative;
    flex: 0 0 220px;
    min-height: 180px;
    overflow: hidden;
}

.tcc-event-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tcc-event-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #2EA3F2;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 4px;
}

/* Card Body */
.tcc-event-card__body {
    flex: 1;
    display: flex;
    padding: 24px;
    gap: 20px;
}

/* Date Block */
.tcc-event-card__date-block {
    flex: 0 0 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 2px;
}

.tcc-event-card__month {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #2EA3F2;
}

.tcc-event-card__day {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
    color: #333;
}

/* Details */
.tcc-event-card__details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tcc-event-card__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.3;
}

.tcc-event-card__title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.tcc-event-card__title a:hover {
    color: #2EA3F2;
}

/* Meta */
.tcc-event-card__meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.tcc-event-card__meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.tcc-event-card__meta-item svg {
    flex-shrink: 0;
    color: #2EA3F2;
}

.tcc-event-card__meta-item a {
    color: #2EA3F2;
    text-decoration: none;
}

.tcc-event-card__meta-item a:hover {
    text-decoration: underline;
}

/* Card without image */
.tcc-event-card--no-image {
    border-left: 4px solid #2EA3F2;
}

/* Inline badge (when no image) */
.tcc-event-card__badge--inline {
    position: static;
    display: inline-block;
    margin: 0 0 6px 0;
    font-size: 10px;
    padding: 3px 8px;
}

/* Button */
.tcc-event-card__btn {
    display: inline-block;
    margin-top: auto;
    align-self: flex-start;
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #2EA3F2;
    text-decoration: none;
    padding: 8px 20px;
    border: 2px solid #2EA3F2;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.tcc-event-card__btn:hover {
    background: #2EA3F2;
    color: #fff;
}

/* Accordion Toggle */
.tcc-event-card__toggle {
    cursor: pointer;
    border: 2px solid #2EA3F2;
    background: none;
}

.tcc-event-card__toggle.tcc-active {
    background: #2EA3F2;
    color: #fff;
}

/* Expanded Event Details */
.tcc-event-card__expanded {
    padding: 20px 24px;
    border-top: 1px solid #e1e8ed;
    background: #f9fafb;
}

.tcc-event-card__description {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    max-height: 300px;
    overflow-y: auto;
}

.tcc-event-card__description p {
    margin-bottom: 12px;
}

.tcc-event-card__description a {
    color: #2EA3F2;
    text-decoration: underline;
}

.tcc-event-card__external-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: #2EA3F2;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.tcc-event-card__external-link:hover {
    background: #1a8fd6;
}

/* Empty State */
.tcc-events-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.tcc-events-empty h3 {
    font-size: 20px;
    color: #333;
    margin: 16px 0 8px;
}

.tcc-events-empty p {
    font-size: 14px;
    margin: 0;
}

/* Pagination */
.tcc-events-pagination {
    text-align: center;
    margin-top: 32px;
}

.tcc-events-pagination__btn {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: #2EA3F2;
    border: none;
    border-radius: 6px;
    padding: 14px 36px;
    cursor: pointer;
    transition: background 0.2s;
}

.tcc-events-pagination__btn:hover {
    background: #1a8fd6;
}

.tcc-events-pagination__btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Loading Spinner */
.tcc-events-loading {
    text-align: center;
    padding: 40px 0;
}

.tcc-spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 3px solid #e1e8ed;
    border-top-color: #2EA3F2;
    border-radius: 50%;
    animation: tcc-spin 0.7s linear infinite;
}

@keyframes tcc-spin {
    to { transform: rotate(360deg); }
}

/* Social Follow */
.tcc-events-social {
    text-align: center;
    margin-top: 40px;
    padding: 32px 20px;
    background: linear-gradient(180deg, rgba(165, 206, 199, 0.6) 0%, #151f33 100%);
    border-radius: 12px;
}

.tcc-events-social__label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tcc-events-social__links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.tcc-events-social__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    transition: background 0.2s, border-color 0.2s;
}

.tcc-events-social__link:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.tcc-events-social__link--instagram:hover {
    background: rgba(225, 48, 108, 0.3);
    border-color: #E1306C;
}

.tcc-events-social__link--facebook:hover {
    background: rgba(24, 119, 242, 0.3);
    border-color: #1877F2;
}

/* Notice */
.tcc-events-notice {
    background: #fff8e1;
    border-left: 4px solid #f9a825;
    padding: 16px 20px;
    border-radius: 4px;
    font-size: 14px;
}

/* ===================
   Responsive
   =================== */

/* Allow hero to extend full-width via negative calc margins */
.tcc-events-wrapper {
    overflow-x: visible;
    max-width: 100%;
}

.tcc-event-card__details {
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.tcc-event-card__meta-item {
    min-width: 0;
    overflow-wrap: break-word;
}

.tcc-event-card__title a {
    word-break: break-word;
}

@media (max-width: 768px) {
    .tcc-events-hero {
        padding: 36px 16px 32px;
        margin: 0 auto 24px;
    }

    .tcc-events-header__title {
        font-size: 26px;
    }

    .tcc-events-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
    }

    .tcc-events-filters__group {
        flex: 1 1 100%;
        align-items: center;
    }

    .tcc-events-filters__select,
    .tcc-events-filters__input {
        width: 100%;
    }

    .tcc-events-filters__group--search {
        flex: 1 1 100%;
    }

    .tcc-events-filters__group--calendar {
        flex: 0 0 auto;
        align-self: flex-end;
    }

    .tcc-calendar-popup {
        right: auto;
        left: 0;
        width: calc(100vw - 64px);
        max-width: 300px;
    }

    .tcc-events-filters__reset {
        align-self: center;
    }

    .tcc-events-social {
        margin-top: 24px;
        padding: 24px 16px;
        margin-left: 0;
        margin-right: 0;
    }

    .tcc-events-social__links {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .tcc-events-social__link {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }

    .tcc-event-card__top {
        flex-direction: column;
    }

    .tcc-event-card__image {
        flex: 0 0 auto;
        height: 200px;
    }

    .tcc-event-card__body {
        padding: 16px;
        gap: 12px;
    }

    .tcc-event-card__date-block {
        flex: 0 0 44px;
    }

    .tcc-event-card__day {
        font-size: 24px;
    }

    .tcc-event-card__title {
        font-size: 16px;
    }

    /* Badge alignment fix */
    .tcc-event-card__badge--inline {
        display: block;
        text-align: left;
        width: fit-content;
        margin: 0 0 8px 0;
    }

    /* Expanded details mobile fix */
    .tcc-event-card__expanded {
        padding: 16px;
    }

    .tcc-event-card__description {
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .tcc-events-wrapper {
        padding: 0 10px;
    }

    .tcc-event-card__body {
        flex-direction: column;
        gap: 8px;
        padding: 14px;
    }

    .tcc-event-card__date-block {
        flex-direction: row;
        gap: 8px;
    }

    .tcc-event-card__day {
        font-size: 20px;
    }

    .tcc-event-card__title {
        font-size: 15px;
    }

    .tcc-event-card__meta-item {
        font-size: 12px;
    }

    .tcc-event-card__btn {
        font-size: 12px;
        padding: 6px 14px;
        width: 100%;
        text-align: center;
    }

    .tcc-event-card__expanded {
        padding: 12px;
    }

    .tcc-events-filters__select,
    .tcc-events-filters__input {
        font-size: 13px;
        padding: 8px 32px 8px 10px;
    }

    .tcc-events-filters__input {
        padding: 8px 10px;
    }
}
