/**
 * Enhanced Events Listing Styles
 * Modern, responsive design with smooth animations
 * Updated to match wireframes v3
 */

/* ========================================
   Category Filter Buttons
   ======================================== */
.nsia-event-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 40px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
}

.nsia-event-filters__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  cursor: pointer;
  background: #fff;
  color: #333;
}

.nsia-event-filters__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nsia-event-filters__btn.nsia-event-filters__btn--active {
  border: 3px solid #333 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
  transform: scale(1.08) !important;
  font-weight: 700 !important;
  position: relative;
}

.nsia-event-filters__btn.nsia-event-filters__btn--active::after {
  content: "✓";
  font-size: 11px;
  margin-left: 6px;
  font-weight: bold;
}

.nsia-event-filters__btn--all {
  background: #1a5f2a;
  color: #fff;
}

.nsia-event-filters__btn--all:hover,
.nsia-event-filters__btn--all.nsia-event-filters__btn--active {
  background: #0d3d18;
}

.nsia-event-filters__btn--religious {
  background: #e8f5e9;
  color: #2e7d32;
}

.nsia-event-filters__btn--religious:hover,
.nsia-event-filters__btn--religious.nsia-event-filters__btn--active {
  background: #2e7d32;
  color: #fff;
}

.nsia-event-filters__btn--family {
  background: #fff3e0;
  color: #ef6c00;
}

.nsia-event-filters__btn--family:hover,
.nsia-event-filters__btn--family.nsia-event-filters__btn--active {
  background: #ef6c00;
  color: #fff;
}

.nsia-event-filters__btn--youth {
  background: #e3f2fd;
  color: #1565c0;
}

.nsia-event-filters__btn--youth:hover,
.nsia-event-filters__btn--youth.nsia-event-filters__btn--active {
  background: #1565c0;
  color: #fff;
}

.nsia-event-filters__btn--education {
  background: #fce4ec;
  color: #c2185b;
}

.nsia-event-filters__btn--education:hover,
.nsia-event-filters__btn--education.nsia-event-filters__btn--active {
  background: #c2185b;
  color: #fff;
}

.nsia-event-filters__btn--social {
  background: #f3e5f5;
  color: #7b1fa2;
}

.nsia-event-filters__btn--social:hover,
.nsia-event-filters__btn--social.nsia-event-filters__btn--active {
  background: #7b1fa2;
  color: #fff;
}

.nsia-event-filters__btn--kids {
  background: #ffebee;
  color: #c62828;
}

.nsia-event-filters__btn--kids:hover,
.nsia-event-filters__btn--kids.nsia-event-filters__btn--active {
  background: #c62828;
  color: #fff;
}

.nsia-event-filters__icon {
  font-size: 16px;
}

/* Search Input */
.nsia-event-search {
  display: flex;
  gap: 10px;
  max-width: 400px;
  margin: 0 auto 30px;
}

.nsia-event-search__input {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.2s ease;
}

.nsia-event-search__input:focus {
  outline: none;
  border-color: #1a5f2a;
}

.nsia-event-search__btn {
  padding: 12px 24px;
  background: #1a5f2a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.nsia-event-search__btn:hover {
  background: #0d3d18;
}

/* Category Badge on Event Cards - Now positioned under title */
.event-category-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
  margin-bottom: 12px;
}

.event-category-badge--religious {
  background: #e8f5e9;
  color: #2e7d32;
}

.event-category-badge--family {
  background: #fff3e0;
  color: #ef6c00;
}

.event-category-badge--youth {
  background: #e3f2fd;
  color: #1565c0;
}

.event-category-badge--education {
  background: #fce4ec;
  color: #c2185b;
}

.event-category-badge--social {
  background: #f3e5f5;
  color: #7b1fa2;
}

.event-category-badge--kids {
  background: #ffebee;
  color: #c62828;
}

/* ========================================
   Events Page Container
   ======================================== */
.view-events {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
}

.view-events .view-header {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.view-events .view-header h1 {
  color: #1a5f2a;
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.view-events .view-header h1::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #1a5f2a, #2d8a3e);
  border-radius: 2px;
}

.view-events .view-header p {
  color: #64748B;
  font-size: 18px;
  max-width: 600px;
  margin: 25px auto 0;
  line-height: 1.6;
}

/* ========================================
   Events Grid Layout
   ======================================== */
.view-events .view-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
  margin-bottom: 50px;
}

/* ========================================
   Event Card Base Styles
   ======================================== */
.node--type-event.node--view-mode-teaser {
  background: #FFFFFF !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  position: relative !important;
  padding: 0 !important;
  border: 1px solid rgba(27, 156, 133, 0.1) !important;
}

.node--type-event.node--view-mode-teaser:hover {
  transform: translateY(-10px) !important;
  box-shadow: 0 20px 40px rgba(27, 156, 133, 0.15) !important;
  border-color: rgba(27, 156, 133, 0.3) !important;
}

.node--type-event.node--view-mode-teaser::after {
  display: none !important;
}

/* Olivero Theme Structure Fixes */
.node--type-event.node--view-mode-teaser .teaser__top {
  display: block !important;
  position: static !important;
  margin: 0 !important;
}

.node--type-event.node--view-mode-teaser header {
  display: contents;
}

.node--type-event.node--view-mode-teaser .teaser__meta {
  display: none !important;
}

.node--type-event.node--view-mode-teaser .teaser__content {
  padding: 24px !important;
  flex-grow: 1;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}

/* ========================================
   Event Image Styles
   ======================================== */
.node--type-event.node--view-mode-teaser .teaser__image,
.node--type-event.node--view-mode-teaser .field--name-field-event-image {
  position: relative !important;
  width: 100% !important;
  height: 220px !important;
  overflow: hidden !important;
  margin: 0 !important;
  background: linear-gradient(135deg, #1a5f2a 0%, #2d8a3e 50%, #0d3d18 100%);
}

/* Event placeholder when no image */
.node--type-event.node--view-mode-teaser .teaser__image::before,
.node--type-event.node--view-mode-teaser .field--name-field-event-image:empty::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='1.5'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.5;
}

.node--type-event.node--view-mode-teaser .teaser__image a,
.node--type-event.node--view-mode-teaser .field--name-field-event-image a {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

.node--type-event.node--view-mode-teaser .teaser__image img,
.node--type-event.node--view-mode-teaser .field--name-field-event-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 0 !important;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.node--type-event.node--view-mode-teaser:hover .teaser__image img,
.node--type-event.node--view-mode-teaser:hover .field--name-field-event-image img {
  transform: scale(1.08) !important;
}

/* ========================================
   Event Content Area
   ======================================== */
.node--type-event.node--view-mode-teaser .node__content {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* ========================================
   Event Title
   ======================================== */
.node--type-event.node--view-mode-teaser h2,
.node--type-event.node--view-mode-teaser .node__title {
  margin: 0 0 16px 0 !important;
}

.node--type-event.node--view-mode-teaser h2 a,
.node--type-event.node--view-mode-teaser .node__title a {
  color: #0F172A !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  text-decoration: none !important;
  transition: color 0.3s ease !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.node--type-event.node--view-mode-teaser h2 a:hover,
.node--type-event.node--view-mode-teaser .node__title a:hover {
  color: #1a5f2a !important;
}

/* ========================================
   Event Summary
   ======================================== */
.node--type-event.node--view-mode-teaser .field--name-field-event-summary {
  color: #64748B;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 20px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================================
   Event Meta Information
   ======================================== */
.node--type-event.node--view-mode-teaser .event-meta-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  padding: 16px;
  background: #F8FAFC;
  border-radius: 12px;
}

.node--type-event.node--view-mode-teaser .field--name-field-event-date,
.node--type-event.node--view-mode-teaser .field--name-field-event-location {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
}

.node--type-event.node--view-mode-teaser .field--name-field-event-date::before {
  content: "";
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a5f2a' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  flex-shrink: 0;
}

.node--type-event.node--view-mode-teaser .field--name-field-event-location::before {
  content: "";
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a5f2a' stroke-width='2'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'%3E%3C/path%3E%3Ccircle cx='12' cy='10' r='3'%3E%3C/circle%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  flex-shrink: 0;
}

/* ========================================
   Event Price
   ======================================== */
.node--type-event.node--view-mode-teaser .field--name-field-event-price {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  color: #047857;
  padding: 8px 16px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 16px;
  margin-top: auto;
  align-self: flex-start;
  border: 1px solid #A7F3D0;
}

.node--type-event.node--view-mode-teaser .field--name-field-event-price::before {
  content: "";
  width: 16px;
  height: 16px;
  margin-right: 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23047857' stroke-width='2'%3E%3Cline x1='12' y1='1' x2='12' y2='23'%3E%3C/line%3E%3Cpath d='M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

/* ========================================
   Event Action Buttons
   ======================================== */
.event-teaser-actions {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #E2E8F0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.event-register-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: linear-gradient(135deg, #1a5f2a 0%, #0d3d18 100%);
  color: #FFFFFF !important;
  text-decoration: none !important;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(27, 156, 133, 0.25);
  flex: 1;
  min-width: 140px;
}

.event-register-btn:hover {
  background: linear-gradient(135deg, #2d8a3e 0%, #1a5f2a 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(27, 156, 133, 0.35);
  color: #FFFFFF !important;
  text-decoration: none !important;
}

.event-register-btn:active {
  transform: translateY(0);
}

.event-register-btn.btn-secondary {
  background: #FFFFFF;
  color: #1a5f2a !important;
  border: 2px solid #1a5f2a;
  box-shadow: none;
}

.event-register-btn.btn-secondary:hover {
  background: #ECFDF5;
  color: #0d3d18 !important;
  border-color: #0d3d18;
  box-shadow: 0 4px 12px rgba(27, 156, 133, 0.15);
}

/* View Details Button */
.event-details-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: #FFFFFF;
  color: #1a5f2a !important;
  text-decoration: none !important;
  border: 2px solid #1a5f2a;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex: 1;
  min-width: 120px;
}

.event-details-btn:hover {
  background: #f0f9f1;
  color: #0d3d18 !important;
  border-color: #0d3d18;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(27, 156, 133, 0.15);
  text-decoration: none !important;
}

/* Read More Link */
.node--type-event.node--view-mode-teaser .node__links {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #E2E8F0;
}

.node--type-event.node--view-mode-teaser .node__links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a5f2a 0%, #0d3d18 100%);
  color: #FFFFFF;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  text-align: center;
  width: 100%;
  box-shadow: 0 4px 14px rgba(27, 156, 133, 0.25);
}

.node--type-event.node--view-mode-teaser .node__links a:hover {
  background: linear-gradient(135deg, #2d8a3e 0%, #1a5f2a 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(27, 156, 133, 0.35);
}

/* ========================================
   Status Badges
   ======================================== */
.event-status-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 14px;
  border-radius: 24px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
  backdrop-filter: blur(10px);
}

.event-status-badge.upcoming {
  background: rgba(27, 156, 133, 0.95);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(27, 156, 133, 0.3);
}

.event-status-badge.full,
.event-status-badge.sold-out {
  background: rgba(239, 68, 68, 0.95);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.3);
}

.event-status-badge.low-tickets {
  background: rgba(245, 158, 11, 0.95);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.event-status-badge.free {
  background: rgba(16, 185, 129, 0.95);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

/* ========================================
   Empty State
   ======================================== */
.view-events .view-empty,
.nsia-no-events-message {
  text-align: center;
  padding: 80px 30px;
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
  border-radius: 20px;
  margin: 50px 0;
  border: 2px dashed #E2E8F0;
}

.view-events .view-empty::before {
  content: "";
  display: block;
  width: 100px;
  height: 100px;
  margin: 0 auto 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a5f2a' stroke-width='1.5'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.5;
}

.view-events .view-empty p {
  color: #64748B;
  font-size: 18px;
  margin: 0;
  line-height: 1.6;
}

/* Custom No Events Message for Category Filters */
.nsia-no-events-message::before {
  display: none;
}

.nsia-no-events-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.6;
}

.nsia-no-events-title {
  font-size: 26px;
  font-weight: 700;
  color: #1a5f2a;
  margin: 0 0 15px;
}

.nsia-no-events-text {
  font-size: 18px;
  color: #475569;
  margin: 0 0 10px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.nsia-no-events-subtext {
  font-size: 15px;
  color: #64748B;
  margin: 0 0 25px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.nsia-no-events-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, #1a5f2a 0%, #0d3d18 100%);
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(27, 156, 133, 0.25);
}

.nsia-no-events-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(27, 156, 133, 0.35);
  color: #fff !important;
  text-decoration: none !important;
}

.nsia-no-events-btn::before {
  content: "\2190";
  font-size: 18px;
}

/* ========================================
   Pagination
   ======================================== */
.view-events .pager {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 50px;
  flex-wrap: wrap;
}

.view-events .pager__item {
  list-style: none;
}

.view-events .pager__item a,
.view-events .pager__item.is-active span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 16px;
  background: #FFFFFF;
  border: 2px solid #E2E8F0;
  border-radius: 10px;
  color: #475569;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

.view-events .pager__item a:hover {
  background: #1a5f2a;
  color: #FFFFFF;
  border-color: #1a5f2a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(27, 156, 133, 0.25);
}

.view-events .pager__item.is-active span {
  background: linear-gradient(135deg, #1a5f2a 0%, #0d3d18 100%);
  color: #FFFFFF;
  border-color: #1a5f2a;
  box-shadow: 0 4px 12px rgba(27, 156, 133, 0.25);
}

/* ========================================
   Loading Animation
   ======================================== */
.view-events.ajax-loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.view-events.ajax-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  margin: -25px 0 0 -25px;
  border: 4px solid #E2E8F0;
  border-top-color: #1a5f2a;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ========================================
   Featured Event
   ======================================== */
.node--type-event.node--view-mode-teaser.featured {
  border: 2px solid #1a5f2a !important;
  position: relative;
}

.node--type-event.node--view-mode-teaser.featured::before {
  content: "Featured";
  position: absolute;
  top: 16px;
  left: 16px;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #FFFFFF;
  padding: 6px 14px;
  border-radius: 24px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1200px) {
  .view-events .view-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .view-events {
    padding: 30px 16px;
  }

  .view-events .view-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .view-events .view-header {
    margin-bottom: 35px;
  }

  .view-events .view-header h1 {
    font-size: 28px;
  }

  .view-events .view-header p {
    font-size: 16px;
  }

  .node--type-event.node--view-mode-teaser .teaser__image,
  .node--type-event.node--view-mode-teaser .field--name-field-event-image {
    height: 180px !important;
  }

  .node--type-event.node--view-mode-teaser .teaser__content,
  .node--type-event.node--view-mode-teaser .node__content {
    padding: 20px !important;
  }

  .node--type-event.node--view-mode-teaser h2 a,
  .node--type-event.node--view-mode-teaser .node__title a {
    font-size: 18px !important;
  }

  .event-teaser-actions {
    flex-direction: column;
  }

  .event-register-btn {
    width: 100%;
  }

  .view-events .pager {
    gap: 6px;
  }

  .view-events .pager__item a,
  .view-events .pager__item.is-active span {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .view-events .view-header h1 {
    font-size: 24px;
  }

  .node--type-event.node--view-mode-teaser {
    border-radius: 12px !important;
  }

  .node--type-event.node--view-mode-teaser .teaser__image,
  .node--type-event.node--view-mode-teaser .field--name-field-event-image {
    height: 160px !important;
  }

  .node--type-event.node--view-mode-teaser .teaser__content,
  .node--type-event.node--view-mode-teaser .node__content {
    padding: 16px !important;
  }

  .event-status-badge {
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    font-size: 10px;
  }
}

/* ========================================
   Animation for Cards on Load
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.view-events .views-row {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

.view-events .views-row:nth-child(1) { animation-delay: 0.1s; }
.view-events .views-row:nth-child(2) { animation-delay: 0.15s; }
.view-events .views-row:nth-child(3) { animation-delay: 0.2s; }
.view-events .views-row:nth-child(4) { animation-delay: 0.25s; }
.view-events .views-row:nth-child(5) { animation-delay: 0.3s; }
.view-events .views-row:nth-child(6) { animation-delay: 0.35s; }
.view-events .views-row:nth-child(7) { animation-delay: 0.4s; }
.view-events .views-row:nth-child(8) { animation-delay: 0.45s; }
.view-events .views-row:nth-child(9) { animation-delay: 0.5s; }

/* ========================================
   Print Styles
   ======================================== */
@media print {
  .view-events .view-content {
    display: block;
  }

  .node--type-event.node--view-mode-teaser {
    break-inside: avoid;
    margin-bottom: 20px;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }

  .event-teaser-actions,
  .event-status-badge {
    display: none !important;
  }
}

/* ========================================
   NSIA Events Page Layout
   ======================================== */

/* Events Page Container */
.nsia-events-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* Page Header */
.nsia-events-header {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, #1a5f2a 0%, #2d8a3e 50%, #1a5f2a 100%);
  margin: 0 -20px 40px;
  position: relative;
  overflow: hidden;
}

.nsia-events-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}

.nsia-events-header__inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.nsia-events-header__title {
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 15px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nsia-events-header__subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  line-height: 1.6;
}

/* Section Headers */
.nsia-section-header {
  margin-bottom: 30px;
}

.nsia-section-header__title {
  font-size: 28px;
  font-weight: 700;
  color: #1a5f2a;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nsia-section-header__icon {
  font-size: 28px;
}

.nsia-section-header__subtitle {
  font-size: 16px;
  color: #64748B;
  margin: 0;
}

/* Events Layout - Side by Side */
.nsia-events-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: start;
}

/* Featured Events Section - Left Column */
.nsia-featured-events {
  padding: 25px;
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
  border-radius: 16px;
  border: 1px solid #E2E8F0;
  position: sticky;
  top: 20px;
}

.nsia-featured-events .nsia-section-header {
  margin-bottom: 20px;
}

.nsia-featured-events .nsia-section-header__title {
  font-size: 22px;
}

.nsia-featured-events__list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nsia-featured-events__list .node--type-event.node--view-mode-teaser {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}

/* All Events Section - Right Column */
.nsia-all-events {
  min-width: 0;
}

.nsia-all-events .nsia-events-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

/* Pager inside All Events section */
.nsia-events-pager {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #E2E8F0;
}

/* Legacy Top Events (keep for backward compatibility) */
.nsia-top-events {
  margin-bottom: 60px;
  padding: 40px;
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
  border-radius: 20px;
  border: 1px solid #E2E8F0;
}

.nsia-top-events__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* Event Image Wrapper for Category Badge */
.event-image-wrapper {
  position: relative;
}

/* Override the view content grid */
.nsia-events-page .view-content.nsia-events-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .nsia-events-layout {
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
  }

  .nsia-top-events__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .nsia-events-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .nsia-featured-events {
    position: static;
  }

  .nsia-featured-events__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 992px) {
  .nsia-events-header__title {
    font-size: 32px;
  }

  .nsia-events-header {
    padding: 40px 20px;
  }

  .nsia-top-events {
    padding: 30px;
  }

  .nsia-section-header__title {
    font-size: 24px;
  }
}

@media (max-width: 768px) {
  .nsia-events-page {
    padding: 0 15px 40px;
  }

  .nsia-events-header {
    margin: 0 -15px 30px;
    padding: 30px 15px;
  }

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

  .nsia-events-header__subtitle {
    font-size: 15px;
  }

  .nsia-events-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .nsia-featured-events {
    padding: 20px;
  }

  .nsia-featured-events__list {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .nsia-top-events__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .nsia-top-events {
    padding: 25px 20px;
    margin-bottom: 40px;
  }

  .nsia-event-filters {
    gap: 8px;
    padding: 15px;
  }

  .nsia-event-filters__btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .nsia-section-header__title {
    font-size: 22px;
  }

  .nsia-all-events .nsia-events-grid,
  .nsia-events-page .view-content.nsia-events-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .nsia-events-pager {
    margin-top: 30px;
    padding-top: 20px;
  }
}

@media (max-width: 480px) {
  .nsia-events-header__title {
    font-size: 24px;
  }

  .nsia-event-filters__btn {
    padding: 6px 12px;
    font-size: 12px;
    gap: 5px;
  }

  .nsia-event-filters__icon {
    font-size: 14px;
  }

  .nsia-section-header__title {
    font-size: 20px;
  }
}
