/* ======================= Programs Page ======================= */

/* ========== Layout ========== */
.programs-wrap {
  display: flex;
    gap: 40px;
    padding: 40px 20px;
    max-width: 1400px;
    margin: 20px auto 0;
    align-items: flex-start;
    font-family: "Inter", sans-serif;
}

/* ========== Sidebar ========== */
.programs-sidebar {
  position: sticky;
  top: 100px;
  width: 300px;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  height: max-content;
}

.sidebar-title { 
  font-size: 18px; 
  font-weight: 600; 
  margin-bottom: 12px; 
  text-align: center; 
}

.filter-block { margin-top: 20px; }
.filter-block label { display:block; margin-bottom:6px; font-weight:500; }
.filter-block select, .filter-block input {
  width: 100%; padding: 10px; border:1px solid #e2e6eb; border-radius:6px;
}

/* Search */
.search-wrap { display:flex; gap:8px; align-items:center; }
.search-wrap button {
  width:40px; height:40px; background:#11184A; color:#fff;
  border:none; border-radius:6px; cursor:pointer;
}
.search-clear {
  margin-top:8px; background:none; border:none; color:#666;
  cursor:pointer; font-size:16px;
}

/* Categories Grid */
.programs-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.program-item-link {
  background:#fff;
  border:1px solid #11184A;
  border-radius:10px;
  overflow:hidden;
  transition:all .3s ease;
  text-decoration:none;
  color:#11184A;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:15px;
  text-align:center;
  position: relative;
}

.program-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #FCE570;
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.program-link:hover::before {
  opacity: 1;
}

.program-link:hover {
  transform: translateY(-2px);
}


.program-thumb-wrap { width:100%; height:180px; overflow:hidden; border-radius:8px; }
.program-thumb { width:100%; height:100%; object-fit:cover; }
.program-thumb-placeholder { font-size:40px; margin-bottom:12px; }

.program-title-item { font-size:18px; font-weight:600; margin:10px 0 6px; text-align:center; }
.program-dates { color:#8a8f97; font-style:italic; margin:0; text-align:center; }

/* ========== Main ========== */
.programs-main {
  flex:1; 
  width:100%;
}

.programs-main-header {
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:24px;
}

.programs-title { font-size:40px; margin:0; letter-spacing:-1px; text-align:center; }

.view-btn {
  border:1px solid #ddd; background:#fff; padding:8px 10px;
  border-radius:6px; margin-left:6px; cursor:pointer;
  transition:all .2s ease;
}
.view-btn.active { background:#14264a; color:#fff; }

/* ========== Program Items List/Grid ========== */
.programs-list { display:grid; gap:20px; width:100%}
.programs-list.view-grid { grid-template-columns:repeat(auto-fill, minmax(300px,1fr)); }
.programs-list.view-list { display:flex; flex-direction:column; gap:20px; }

.program-item {
  background:#fff; 
  border:1px solid #11184A; 
  border-radius:10px;
  overflow:hidden; 
  transition:all .3s ease;
  width: 100%;
}

.program-link {
  text-decoration:none; 
  color:#11184A; 
  display:flex; 
  flex-direction:column;
  align-items:center;
  justify-content:center;
  position:relative; 
  transition:transform .2s ease;
  padding: 15px;
  text-align:center;
  width: 100%;
}

.program-text { padding:10px 0; }

/* ========== Calendar ========== */
.hidden { display:none; }
.programs-calendar {
  display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:20px;
}
.calendar-month {
  background:#f7f8fa; border-radius:10px; padding:12px; border:1px solid #ddd;
}
.calendar-month h3 {
  margin:0 0 10px; color:#14264a; border-bottom:2px solid #fce570; padding-bottom:6px;
}
.calendar-program {
  background:#fff; border-radius:6px; padding:8px 10px; margin-bottom:6px;
  border:1px solid #eee; font-size:14px;
}
.calendar-program a { color:#11184a; text-decoration:none; }
.calendar-program a:hover { text-decoration:underline; }

/* ========== Responsive ========== */
@media (max-width:980px) {
  .programs-wrap { flex-direction:column; margin-top:20px; } /* smaller top margin for mobile */
  .programs-sidebar { width:100%; position:relative; margin-bottom:20px; }
  .programs-main { padding-left:0; border-left:none; width:100%; }
}

/* List view adjustments */
.programs-list.view-list .program-thumb-wrap { display: none; }
.programs-list.view-list .program-item { display: flex; flex-direction:column; align-items:center; }
.programs-list.view-list .program-text { padding: 15px 0; }
/* MOBILE FILTER BUTTON */
.filter-toggle-btn {
  display: none; /* default hidden for desktop */
  width: 100%;
  padding: 14px 18px;
  background: #11184A;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 15px;
  cursor: pointer;
}

@media (max-width:980px) {
  .filter-toggle-btn {
    display: block; /* show button on mobile */
  }
  .programs-sidebar {
    display: none; /* hidden initially */
  }
  .programs-sidebar.active {
    display: block; /* shown when toggled */
  }
}


@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

