.tceb-events-page {
  margin: 2rem 0;
}
.tceb-month-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.tceb-month-nav-item {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #ccc;
  text-decoration: none;
}
.tceb-month-nav-item.is-active {
  background: #0371c1;
  color: #fff;
  border-color: #0371c1;
}
.tceb-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.tceb-filter-group {
  display: flex;
  flex-direction: column;
  min-width: 160px;
}
.tceb-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.tceb-event-card {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.tceb-event-thumb img {
  display: block;
  width: 100%;
  height: auto;
}
.tceb-event-title {
  font-size: 1rem;
  margin: 0;
  padding: 0.75rem 1rem 1rem;
}
.tceb-pagination {
  text-align: center;
  margin-top: 1.5rem;
}


/* Wrapper */
.tceb-events-page {
    font-family: inherit;
    color: #333;
}

/* HERO */
.tceb-hero {
    position: relative;
    padding: 60px 20px;
    background-size: cover;
    background-position: center;
    background-image: url('https://via.placeholder.com/1600x400'); /* เปลี่ยนเป็นรูปจริงในธีม หรือ override ผ่าน CSS theme */
    color: #fff;
}
.tceb-hero-overlay {
    position:absolute;
    inset:0;
    background:linear-gradient(180deg,rgba(0,0,0,0.7),rgba(0,0,0,0.3));
}
.tceb-hero-inner {
    position:relative;
    max-width:1200px;
    margin:0 auto;
}
.tceb-breadcrumb {
    font-size:12px;
    margin-bottom:10px;
    opacity:0.8;
}
.tceb-breadcrumb a {
    color:#fff;
    text-decoration:none;
}
.tceb-hero-title {
    font-size:32px;
    margin:0 0 10px;
    letter-spacing:1px;
}
.tceb-hero-subtitle {
    max-width:640px;
    font-size:14px;
    line-height:1.6;
}

/* MONTH NAV */
.tceb-month-nav-wrapper {
    background:#f5f5f5;
    padding:10px 0;
}
.tceb-month-nav {
    max-width:1200px;
    margin:0 auto;
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    justify-content:flex-start;
}
.tceb-month-nav-item {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:6px 10px;
    font-size:12px;
    border-radius:20px;
    background:#fff;
    border:1px solid #ddd;
    text-decoration:none;
    color:#555;
}
.tceb-month-nav-item.is-active {
    background:#0371c1;
    border-color:#0371c1;
    color:#fff;
}

/* FILTER BAR */
.tceb-filter-bar-wrapper {
    background:#f5f5f5;
    border-top:1px solid #e0e0e0;
    border-bottom:1px solid #e0e0e0;
}
.tceb-filter-bar {
    max-width:1200px;
    margin:0 auto;
    padding:12px 20px;
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    align-items:flex-end;
}
.tceb-filter-group {
    display:flex;
    flex-direction:column;
    min-width:160px;
}
.tceb-filter-group label {
    font-size:11px;
    text-transform:uppercase;
    color:#777;
    margin-bottom:4px;
}
.tceb-filter-group select,
.tceb-filter-group input[type="text"] {
    height:34px;
    border-radius:4px;
    border:1px solid #ccc;
    padding:4px 8px;
    font-size:13px;
}
.tceb-filter-search {
    flex:1 1 200px;
}
.tceb-filter-actions {
    margin-left:auto;
}
.tceb-btn {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:8px 18px;
    border-radius:4px;
    border:none;
    text-decoration:none;
    cursor:pointer;
    font-size:13px;
}
.tceb-btn-primary {
    background:#333;
    color:#fff;
}
.tceb-btn-primary:hover {
    background:#000;
}

/* GRID */
.tceb-events-grid-wrapper {
    max-width:1200px;
    margin:20px auto 40px;
    padding:0 20px;
}
.tceb-events-grid {
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
    gap:20px;
}
.tceb-event-card {
    display:flex;
    flex-direction:column;
    background:#fff;
    border:1px solid #eee;
    border-radius:3px;
    overflow:hidden;
    box-shadow:0 1px 2px rgba(0,0,0,0.05);
}
.tceb-event-card-link {
    text-decoration:none;
    color:inherit;
}
.tceb-event-thumb {
    position:relative;
    padding-top:130%;
    overflow:hidden;
}
.tceb-event-thumb img {
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
}
.tceb-event-thumb-placeholder {
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#ddd;
    font-size:12px;
}
.tceb-event-meta {
    padding:8px 10px 0;
}
.tceb-event-date {
    font-size:11px;
    color:#999;
    margin-bottom:4px;
}
.tceb-event-title {
    font-size:13px;
    margin:0 0 4px;
    min-height:32px;
}
.tceb-event-location {
    font-size:11px;
    color:#777;
    margin-bottom:6px;
}
.tceb-event-card-footer {
    margin-top:auto;
    padding:6px 10px 10px;
}
.tceb-btn-view {
    width:100%;
    border-radius:2px;
    border:1px solid #ccc;
    background:#f7f7f7;
    color:#555;
}
.tceb-btn-view:hover {
    background:#e9e9e9;
}

/* Pagination */
.tceb-pagination {
    margin-top:20px;
    text-align:center;
}
.tceb-pagination .page-numbers {
    display:inline-block;
    padding:4px 8px;
    margin:0 2px;
    border-radius:3px;
    border:1px solid #ddd;
    font-size:12px;
    text-decoration:none;
    color:#555;
}
.tceb-pagination .current {
    background:#0371c1;
    border-color:#0371c1;
    color:#fff;
}

/* CTA Sections */
.tceb-cta {
    position:relative;
    padding:40px 20px;
    color:#fff;
}
.tceb-cta-submission {
    background:linear-gradient(120deg,#0371c1,#004c88);
}
.tceb-cta-support {
    background:linear-gradient(120deg,#333,#111);
}
.tceb-cta-inner {
    max-width:900px;
    margin:0 auto;
    text-align:center;
}
.tceb-cta-inner h2 {
    margin:0 0 10px;
    font-size:22px;
}
.tceb-cta-inner p {
    margin:0 0 20px;
    font-size:13px;
    line-height:1.6;
}
.tceb-btn-light {
    background:#fff;
    color:#0371c1;
}
.tceb-btn-outline {
    border:1px solid #fff;
    color:#fff;
    background:transparent;
}
.tceb-btn-outline + .tceb-btn-outline {
    margin-left:10px;
}
.tceb-cta-buttons {
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:8px;
}

/* Upcoming Events */
.tceb-upcoming-wrapper {
    background:#f5f5f5;
    padding:30px 20px 40px;
}
.tceb-upcoming-inner {
    max-width:1200px;
    margin:0 auto;
}
.tceb-section-title {
    font-size:20px;
    margin:0 0 16px;
}
.tceb-upcoming-row {
    display:flex;
    overflow-x:auto;
    gap:16px;
    padding-bottom:10px;
}
.tceb-upcoming-row .tceb-event-card {
    min-width:180px;
}

/* Misc */
.tceb-no-results {
    font-size:14px;
    text-align:center;
    padding:20px 0;
}

/* Responsive */
@media (max-width:768px) {
    .tceb-filter-bar {
        flex-direction:column;
        align-items:stretch;
    }
    .tceb-filter-actions {
        margin-left:0;
    }
    .tceb-month-nav {
        justify-content:flex-start;
        padding:0 20px;
    }
}
