/* Grid */
.tui-events { max-width: 1140px; margin-left: auto; margin-right: auto; }
.tui-events__heading { text-align: center; color: #1B115C; margin: 0 0 10px; }
.tui-events--past .tui-events__heading { margin-top: 50px; }
.tui-events__more { margin-top: 10px; }
.tui-events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px; margin: 30px 0; }
@media (max-width: 768px) { .tui-events-grid { grid-template-columns: 1fr; } }

/* Card */
.tui-event-card { display: flex; flex-direction: column; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.08); transition: transform 0.2s, box-shadow 0.2s; height: 100%; }
.tui-event-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.12); }
.tui-event-past { opacity: 0.65; filter: grayscale(1); }
.tui-event-past:hover { opacity: 1; filter: grayscale(0); }

/* Card Image */
.tui-event-card-img { position: relative; display: block; aspect-ratio: 3/2; overflow: hidden; background: #eee; }
.tui-event-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.tui-event-card-placeholder { position: absolute; inset: 0; background: linear-gradient(135deg, #f3cb47 0%, #f8e3a0 100%); }
.tui-event-card:hover .tui-event-card-img img { transform: scale(1.05); }
.tui-event-card-cat { position: absolute; top: 16px; left: 16px; background: #000; color: #fff; padding: 4px 12px; font-size: 13px; font-weight: 700; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Card Content */
.tui-event-card-content { padding: 24px; display: flex; flex-direction: column; flex-grow: 1; }
.tui-event-card-date { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: #d60000; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tui-event-card-place { color: #555; display: inline-flex; align-items: center; gap: 4px; }
.tui-event-card-place::before { content: "•"; color: #ccc; }
.tui-event-card-title { margin: 0 0 12px; font-size: 20px; font-weight: 800; line-height: 1.3; }
.tui-event-card-title a { color: inherit; text-decoration: none; }
.tui-event-card-title a:hover { color: #d60000; }
.tui-event-card-excerpt { font-size: 15px; color: #555; line-height: 1.6; flex-grow: 1; }
.tui-event-card-excerpt p:last-child { margin-bottom: 0; }

/* Empty state */
.tui-events-empty { text-align: center; padding: 40px; background: #f9f9f9; border-radius: 8px; color: #666; font-style: italic; }


/* Event page */
.tui-event-page { padding-top: 170px; padding-bottom: 60px; }
@media (max-width: 1023px) { .tui-event-page { padding-top: 120px; } }
.tui-event-page .wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; box-sizing: border-box; }
.tui-event-header { padding-bottom: 24px; }
.tui-event-header__category { color: #d60000; font-size: 15px; margin: 0; padding: 0 !important; }
.tui-event-header__title { color: #1B115C; margin: 8px 0 12px; }
.tui-event-header__meta { display: flex; flex-wrap: wrap; gap: 8px 24px; color: #555; margin: 0; padding: 0 !important; }
.tui-event-hero { margin: 0 0 30px; }
.tui-event-hero img { width: 100%; max-height: 500px; object-fit: cover; object-position: center; display: block; border-radius: 12px; }
.tui-event-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; }
@media (min-width: 900px) { .tui-event-layout { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; } }

/* Boxes */
.tui-event-box { background: #fff; border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,0.04); padding: 36px 40px; margin-bottom: 24px; border: 1px solid #f2f2f2; }
@media (max-width: 768px) { .tui-event-box { padding: 24px; } }
.tui-event-box__title { color: #1B115C; font-size: 18px; line-height: 1.3; margin: 0 0 12px; padding: 0; font-weight: 700; }
.tui-event-sidebar__section + .tui-event-sidebar__section { margin-top: 24px; }
.tui-event-sidebar p { padding-top: 0; }

/* Article Content */
.tui-event-article-content { color: #4b5563; line-height: 1.7; font-size: 16px; }
.tui-event-article-content h2, .tui-event-section-title { color: #1B115C; font-size: 24px; font-weight: 700; margin: 0 0 16px; padding: 0; line-height: 1.3; }
.tui-event-article-content h3 { color: #1B115C; font-size: 20px; font-weight: 600; margin: 32px 0 12px; padding: 0; line-height: 1.3; text-transform: none; }
.tui-event-article-content p { margin: 0 0 16px; }
.tui-event-article-content ul { padding-left: 20px; margin: 0 0 24px; }
.tui-event-article-content li { margin-bottom: 8px; }

/* Agenda */
.tui-event-agenda { padding-top: 24px !important; }
.tui-event-agenda__tabs { display: flex; flex-wrap: wrap; justify-content: center; border-bottom: 2px solid #f2f2f2; margin-bottom: 30px; padding: 0 20px; }
.tui-event-agenda:not(.is-tabbed) .tui-event-agenda__tabs { display: none; }
.tui-event-agenda__tab { background: none; border: 0; padding: 12px 24px; cursor: pointer; text-align: center; color: #6b7280; font-family: inherit; position: relative; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.tui-event-agenda__tab:hover { color: #1B115C; }
.tui-event-agenda__tab[aria-selected="true"] { color: #1B115C; border-bottom-color: #545cff; }
.tui-event-agenda__tab[aria-selected="true"]::after { content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 6px solid #545cff; }
.tui-event-agenda__tab strong { display: block; font-size: 18px; font-weight: 700; }
.tui-event-agenda__tab span { display: block; font-size: 13px; font-weight: 500; margin-top: 2px; }

/* Sessions */
.tui-event-session { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 24px; padding: 24px 0; border-bottom: 1px solid #f2f2f2; align-items: center; }
.tui-event-session:last-child { border-bottom: 0; padding-bottom: 0; }
@media (max-width: 600px) { .tui-event-session { grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; } }
.tui-event-session__when { text-align: center; }
@media (max-width: 600px) { .tui-event-session__when { text-align: left; display: flex; align-items: center; gap: 12px; } }
.tui-event-session__time { display: inline-block; background: #eef2ff; color: #4338ca; border-radius: 999px; padding: 6px 16px; font-size: 13px; font-weight: 700; letter-spacing: 0.3px; }
.tui-event-session__place { display: block; color: #6b7280; font-size: 13px; margin-top: 8px; font-weight: 500; }
@media (max-width: 600px) { .tui-event-session__place { margin-top: 0; } }
.tui-event-session__title { color: #1B115C; font-size: 18px; font-weight: 700; margin: 0; padding: 0; line-height: 1.4; }

/* Sidebar Date & Time */
.tui-event-datetime { font-size: 15px; color: #4b5563; }
.tui-event-dt-row { padding: 12px 0; border-bottom: 1px solid #f2f2f2; }
.tui-event-dt-row:first-child { padding-top: 0; }
.tui-event-dt-row:last-child { border-bottom: none; padding-bottom: 0; }
.tui-event-dt-row strong { margin-right: 6px; }
.tui-event-dt-row strong { color: #1B115C; }

/* Sidebar Registration */
.tui-event-register-btn a { display: block; background: #f3cb47; color: #1B115C; text-align: center; padding: 12px 24px; border-radius: 6px; text-decoration: none; font-weight: 700; transition: background 0.2s, color 0.2s; }
.tui-event-register-btn a:hover { background: #1B115C; color: #fff; }
.tui-event-ended { background: #fee2e2; color: #991b1b; border-radius: 6px; padding: 12px 16px; text-align: center; font-weight: 600; font-size: 14px; margin: 0; }

/* Sidebar Calendar */
.tui-event-calendar-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tui-event-calendar-links li { margin: 0; padding: 0; }
.tui-event-calendar-links a { display: flex; align-items: center; gap: 10px; border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px 16px; color: #374151; text-decoration: none; font-weight: 600; font-size: 14px; transition: all 0.2s; background: #fafafa; }
.tui-event-calendar-links a i { font-size: 16px; width: 20px; text-align: center; }
.tui-event-calendar-links a:hover { border-color: #d1d5db; background: #f3f4f6; }
