/* ==========================================================================
   PERTINA - PROGRAM & EVENTS MODERN SHOWCASE
   Theme Colors: Primary #0B9B4B | Accent #FFD700 | Dark Charcoal
   ========================================================================== */

#program {
  position: relative;
  background: linear-gradient(180deg, rgba(8, 10, 12, 0.94) 0%, rgba(14, 17, 20, 0.97) 100%), url(../img/bg-main.jpg);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #e5e9f0;
}

.program-header-box {
  margin-bottom: 2.5rem;
}

.program-badge-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(11, 155, 75, 0.15);
  border: 1px solid rgba(11, 155, 75, 0.4);
  color: #38d374;
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.program-subtitle {
  color: #9aa4b2;
  font-size: 1.05rem;
  max-width: 650px;
  margin: 10px auto 0;
  line-height: 1.6;
}

/* --- Control Toolbar: Search & Filter Chips --- */
.program-toolbar {
  background: rgba(22, 27, 34, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 16px 20px;
  margin-bottom: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.program-search-wrap {
  position: relative;
  min-width: 260px;
}

.program-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #718096;
  font-size: 0.95rem;
  pointer-events: none;
}

.program-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #a0aec0;
  cursor: pointer;
  padding: 4px;
  display: none;
  transition: color 0.2s;
}

.program-search-clear:hover {
  color: #ffffff;
}

.program-search-input {
  width: 100%;
  padding: 9px 36px 9px 38px;
  background: rgba(13, 17, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  color: #ffffff;
  font-size: 0.9rem;
  transition: all 0.25s ease;
}

.program-search-input:focus {
  outline: none;
  background: rgba(13, 17, 23, 0.95);
  border-color: #0B9B4B;
  box-shadow: 0 0 0 3px rgba(11, 155, 75, 0.25);
  color: #ffffff;
}

.program-search-input::placeholder {
  color: #718096;
}

.program-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.prog-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.prog-filter-chip:hover {
  background: rgba(11, 155, 75, 0.18);
  border-color: rgba(11, 155, 75, 0.45);
  color: #ffffff;
  transform: translateY(-1px);
}

.prog-filter-chip.active {
  background: #0B9B4B;
  border-color: #0B9B4B;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(11, 155, 75, 0.4);
}

.prog-filter-count {
  background: rgba(0, 0, 0, 0.28);
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
}

/* --- Program Stream & Cards --- */
.program-stream {
  position: relative;
}

.program-card {
  position: relative;
  background: rgba(20, 24, 30, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 2rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
}

/* Refined craft: clean ambient card border without AI side-tab stripe */
.program-card::before {
  content: none;
}

.program-card:hover {
  transform: translateY(-4px);
  border-color: rgba(11, 155, 75, 0.45);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5), 0 0 25px rgba(11, 155, 75, 0.15);
}



/* Card Header */
.prog-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 20px;
}

.prog-card-title-group {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  min-width: 280px;
}

.prog-card-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(11, 155, 75, 0.25) 0%, rgba(11, 155, 75, 0.08) 100%);
  border: 1px solid rgba(11, 155, 75, 0.4);
  color: #38d374;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 4px 15px rgba(11, 155, 75, 0.2);
}

.program-card[data-category="intl"] .prog-card-icon {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.22) 0%, rgba(255, 180, 0, 0.06) 100%);
  border-color: rgba(255, 215, 0, 0.45);
  color: #FFD700;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.prog-card-badge-num {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #FFD700;
  margin-bottom: 4px;
}

.prog-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px 0;
  line-height: 1.35;
}

.prog-card-subtitle {
  font-size: 0.9rem;
  color: #94a3b8;
  margin: 0;
}

.prog-card-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.prog-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #e2e8f0;
}

.prog-meta-pill.pill-date {
  background: rgba(11, 155, 75, 0.12);
  border-color: rgba(11, 155, 75, 0.3);
  color: #4ade80;
}

.prog-meta-pill.pill-venue {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}

.prog-meta-pill.pill-status {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-weight: 600;
}

/* Card Specs / Key-Value Grid */
.prog-specs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prog-spec-row {
  display: flex;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 12px 18px;
  transition: all 0.2s ease;
}

.prog-spec-row:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(11, 155, 75, 0.5);
  padding-left: 15px;
}

.prog-spec-label {
  width: 220px;
  min-width: 180px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.prog-spec-label i {
  color: #0B9B4B;
  font-size: 0.9rem;
  width: 18px;
  text-align: center;
}

.prog-spec-value {
  flex: 1;
  font-size: 0.92rem;
  color: #f1f5f9;
  line-height: 1.55;
}

.prog-spec-value ul,
.prog-spec-value ol {
  padding-left: 20px;
  margin: 0;
}

.prog-spec-value li {
  margin-bottom: 4px;
}

/* Medal Spotlight Bar */
.medal-spotlight-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(22, 27, 34, 0.9) 0%, rgba(13, 17, 23, 0.9) 100%);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 14px;
  padding: 14px 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.medal-spotlight-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #FFD700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-right: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.medal-badge-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
}

.medal-badge-item.gold {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.22) 0%, rgba(230, 180, 0, 0.1) 100%);
  border: 1px solid rgba(255, 215, 0, 0.6);
  color: #FFD700;
}

.medal-badge-item.silver {
  background: linear-gradient(135deg, rgba(220, 225, 235, 0.2) 0%, rgba(180, 185, 195, 0.08) 100%);
  border: 1px solid rgba(200, 205, 215, 0.5);
  color: #e2e8f0;
}

.medal-badge-item.bronze {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.22) 0%, rgba(165, 95, 30, 0.08) 100%);
  border: 1px solid rgba(205, 127, 50, 0.55);
  color: #f59e0b;
}

/* Modern Dark Boxers Table */
.prog-table-box {
  background: rgba(13, 17, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 10px;
}

.prog-table {
  width: 100%;
  min-width: 500px;
  margin-bottom: 0;
  color: #e2e8f0;
  border-collapse: collapse;
}

.prog-table thead {
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.prog-table th {
  padding: 12px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #cbd5e1;
}

.prog-table td {
  padding: 12px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.prog-table tbody tr:last-child td {
  border-bottom: none;
}

.prog-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.035);
}

.medal-pill-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
}

.medal-pill-sm.gold {
  background: rgba(255, 215, 0, 0.18);
  color: #FFD700;
  border: 1px solid rgba(255, 215, 0, 0.45);
}

.medal-pill-sm.silver {
  background: rgba(220, 225, 235, 0.18);
  color: #e2e8f0;
  border: 1px solid rgba(200, 205, 215, 0.4);
}

.medal-pill-sm.bronze {
  background: rgba(205, 127, 50, 0.18);
  color: #f59e0b;
  border: 1px solid rgba(205, 127, 50, 0.45);
}

/* Weight Class Chips */
.weight-chips-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.weight-chip {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  transition: all 0.2s ease;
}

.weight-chip:hover {
  background: #0B9B4B;
  border-color: #0B9B4B;
  color: #ffffff;
  transform: scale(1.05);
}

.weight-group-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #FFD700;
  margin-bottom: 4px;
}

/* Accordion / Expand Button */
.btn-prog-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-top: 10px;
}

.btn-prog-toggle:hover {
  background: rgba(11, 155, 75, 0.2);
  border-color: rgba(11, 155, 75, 0.5);
  color: #ffffff;
}

.btn-prog-toggle i.fa-chevron-down {
  transition: transform 0.3s ease;
}

.btn-prog-toggle.active i.fa-chevron-down {
  transform: rotate(180deg);
}

.prog-expandable-content {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

/* Athlete Highlight Cards for Dubai */
.athlete-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.athlete-mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  transition: all 0.25s ease;
}

.athlete-mini-card:hover {
  background: rgba(11, 155, 75, 0.12);
  border-color: rgba(11, 155, 75, 0.35);
  transform: translateY(-2px);
}

.athlete-mini-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(11, 155, 75, 0.25);
  border: 1px solid rgba(11, 155, 75, 0.4);
  color: #38d374;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.athlete-mini-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.athlete-mini-weight {
  font-size: 0.78rem;
  color: #FFD700;
  margin: 0;
}

/* Empty search state */
.program-empty-state {
  display: none;
  text-align: center;
  padding: 60px 20px;
  background: rgba(20, 24, 30, 0.7);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 18px;
}

.program-empty-icon {
  font-size: 2.5rem;
  color: #718096;
  margin-bottom: 12px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .prog-card-header {
    flex-direction: column;
  }
  .prog-card-meta-pills {
    width: 100%;
  }
  .prog-spec-row {
    flex-direction: column;
    gap: 6px;
  }
  .prog-spec-label {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .program-card {
    padding: 20px 16px;
    border-radius: 16px;
  }
  .prog-card-title-group {
    min-width: 100%;
  }
  .prog-card-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    font-size: 1.15rem;
  }
  .prog-card-title {
    font-size: 1.15rem;
  }
  .program-toolbar {
    padding: 14px;
  }
  .program-filter-list {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .prog-table th,
  .prog-table td {
    padding: 10px 12px;
    font-size: 0.82rem;
  }
  .prog-filter-chip {
    white-space: nowrap;
    padding: 6px 14px;
    font-size: 0.8rem;
  }
}


/* --- Dynamic Upcoming Events Showcase from Database --- */
.upcoming-events-showcase {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(11, 155, 75, 0.35);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.upcoming-events-header {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.upcoming-events-badge {
  display: inline-flex;
  align-items: center;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #FFD700;
}

.upcoming-event-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  height: 100%;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.upcoming-event-card:hover {
  transform: translateY(-2px);
  border-color: rgba(11, 155, 75, 0.55);
}

.upcoming-event-date-box {
  background: rgba(11, 155, 75, 0.18);
  border: 1px solid rgba(11, 155, 75, 0.45);
  border-radius: 10px;
  min-width: 64px;
  padding: 8px 6px;
  text-align: center;
  flex-shrink: 0;
}

.upcoming-event-day {
  display: block;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  color: #FFD700;
}

.upcoming-event-mon {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #cbd5e1;
  margin-top: 3px;
}

.upcoming-event-info {
  min-width: 0;
}

.upcoming-event-title {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.upcoming-event-loc {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0;
}
