/* =========================================
   PROGRAMS PAGE
   ========================================= */

/* =========================================
   PAGE HERO
   ========================================= */
.pg-hero {
  position: relative;
  padding: 140px 0 80px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  overflow: hidden;
}
.pg-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(255,180,210,0.18), transparent 55%),
    radial-gradient(ellipse at 85% 70%, rgba(255,77,126,0.25), transparent 60%);
  pointer-events: none;
}
.pg-hero__shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.pg-hero__shape--1 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(255,180,210,0.35), transparent 70%);
  top: -80px;
  right: -60px;
}
.pg-hero__shape--2 {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255,77,126,0.4), transparent 70%);
  bottom: -60px;
  left: 10%;
}

.pg-hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 760px;
}
.pg-hero__inner .section-tag { margin-bottom: 16px; }

.pg-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 24px;
}
.pg-breadcrumb a {
  color: rgba(255,255,255,0.85);
  transition: color var(--transition);
}
.pg-breadcrumb a:hover { color: #fff; }
.pg-breadcrumb__sep { color: rgba(255,255,255,0.4); }
.pg-breadcrumb__current { color: #fff; font-weight: 600; }

.pg-hero__title {
  font-size: clamp(30px, 4.6vw, 52px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 18px;
}
.pg-hero__sub {
  font-size: 17px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 32px;
  line-height: 1.55;
}
.pg-hero__ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.pg-hero__stats {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 16px 28px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
}
.pg-hero__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.pg-hero__stat strong {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.pg-hero__stat span {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}
.pg-hero__stat-divider {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.25);
}

/* =========================================
   CATALOG
   ========================================= */
.catalog {
  padding: 72px 0 96px;
  background: var(--bg-light);
}

.catalog__mobile-bar {
  display: none;
  gap: 12px;
  margin-bottom: 20px;
}
.catalog__filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
}
.catalog__filter-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.catalog__filter-count {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.catalog__filter-count.is-active { display: inline-flex; }

.catalog__sort {
  flex: 1;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%238B8096' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 40px;
}
.catalog__sort--desktop {
  max-width: 260px;
  flex: none;
}

.catalog__layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: flex-start;
}

.catalog__main { min-width: 0; }

.catalog__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 12px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.catalog__result-count {
  font-size: 14px;
  color: var(--text-secondary);
}
.catalog__result-count strong {
  color: var(--text-primary);
  font-weight: 800;
  font-size: 16px;
}

/* =========================================
   FILTERS (sidebar)
   ========================================= */
.filters {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.filters::-webkit-scrollbar { width: 6px; }
.filters::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 6px; }

.filters__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.filters__header h3 {
  flex: 1;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.filters__reset {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-pale);
  border-radius: var(--radius-full);
  transition: all var(--transition);
}
.filters__reset:hover {
  background: var(--brand);
  color: #fff;
}
.filters__close {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: 50%;
}
.filters__close:hover { background: var(--bg-light); color: var(--text-primary); }

.filters__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 20px;
}
.filters__chips:empty { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 12px;
  background: var(--brand-pale);
  color: var(--brand);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}
.chip__remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  transition: all var(--transition);
}
.chip__remove:hover { transform: scale(1.15); }

.filter-group {
  padding: 20px 0;
  border-top: 1px solid var(--border);
}
.filter-group:first-of-type { border-top: none; padding-top: 4px; }
.filter-group__title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.filter-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
  user-select: none;
  transition: color var(--transition);
}
.filter-opt:hover { color: var(--brand); }
.filter-opt input { position: absolute; opacity: 0; pointer-events: none; }

.filter-opt__box {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-dark);
  border-radius: 5px;
  position: relative;
  transition: all var(--transition);
}
.filter-opt__box--radio { border-radius: 50%; }

.filter-opt input:checked + .filter-opt__box {
  background: var(--brand);
  border-color: var(--brand);
}
.filter-opt input[type="checkbox"]:checked + .filter-opt__box::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 6l2.5 2.5 4.5-5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
.filter-opt input[type="radio"]:checked + .filter-opt__box::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.filter-opt__label {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.filter-opt:hover .filter-opt__label,
.filter-opt input:checked ~ .filter-opt__label {
  color: var(--text-primary);
}

.filters__apply-mobile { display: none; margin-top: 16px; }

/* =========================================
   PROGRAM CARDS GRID
   ========================================= */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.program-tile {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  opacity: 0;
  transform: translateY(16px);
  animation: tileIn 0.45s ease forwards;
}
@keyframes tileIn {
  to { opacity: 1; transform: translateY(0); }
}
.program-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.program-tile__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--brand-pale);
}
.program-tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.program-tile:hover .program-tile__media img {
  transform: scale(1.05);
}
.program-tile__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15,10,20,0.45) 100%);
  pointer-events: none;
}

.program-tile__badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 1;
}
.program-tile__badge {
  padding: 4px 10px;
  background: rgba(255,255,255,0.95);
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
}
.program-tile__badge--accent {
  background: var(--accent);
  color: #fff;
}

.program-tile__body {
  display: flex;
  flex-direction: column;
  padding: 22px;
  gap: 10px;
  flex: 1;
}

.program-tile__title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.3;
}
.program-tile__positioning {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.program-tile__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.program-tile__meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}
.program-tile__meta-item strong {
  color: var(--text-primary);
  font-weight: 700;
}
.program-tile__meta-icon {
  font-size: 14px;
  opacity: 0.75;
}

.program-tile__result {
  margin-top: 4px;
  padding: 10px 12px;
  background: var(--brand-pale);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--brand);
  font-weight: 600;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.program-tile__cta {
  margin-top: auto;
  padding-top: 14px;
}
.program-tile__cta .btn { width: 100%; }

/* =========================================
   EMPTY STATE
   ========================================= */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  background: #fff;
  border: 1px dashed var(--border-dark);
  border-radius: var(--radius-lg);
}
.empty-state__icon {
  font-size: 42px;
  margin-bottom: 12px;
  opacity: 0.85;
}
.empty-state h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.empty-state p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.empty-state__actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* =========================================
   HELP BLOCK
   ========================================= */
.help-block {
  padding: 80px 0;
  background: #fff;
}
.help-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.help-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition);
}
.help-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.help-card__media {
  position: relative;
  aspect-ratio: 16 / 8;
  overflow: hidden;
}
.help-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.help-card__media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139,15,62,0.55), rgba(255,77,126,0.35));
}

.help-card__body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.help-card__tag {
  align-self: flex-start;
  padding: 5px 12px;
  background: var(--brand-pale);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-full);
}
.help-card--consult .help-card__tag {
  background: #eef6ff;
  color: #2563eb;
}
.help-card__body h3 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.help-card__body > p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.help-card__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 8px;
}
.help-card__list li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  color: var(--text-secondary);
}
.help-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 14px;
  height: 14px;
  background: var(--brand-pale);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 6l2.5 2.5 4.5-5' stroke='%238B0F3E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
.help-card__body .btn { align-self: flex-start; margin-top: 6px; }

/* =========================================
   FORMATS COMPARISON
   ========================================= */
.formats {
  padding: 80px 0;
  background: var(--bg-light);
}
.formats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.format-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}
.format-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.format-card--highlight {
  border-color: var(--brand);
  background: linear-gradient(180deg, #fff, var(--brand-pale));
}

.format-card__badge {
  position: absolute;
  top: -10px;
  left: 20px;
  padding: 4px 12px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(139,15,62,0.3);
}
.format-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-pale);
  border-radius: 14px;
  font-size: 24px;
  margin-bottom: 4px;
}
.format-card h3 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.format-card__lead {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.format-card__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  flex: 1;
}
.format-card__list li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.format-card__list strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.format-card__price {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
}

/* =========================================
   MOBILE FILTERS BACKDROP
   ========================================= */
.filters-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,10,20,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.filters-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .formats__grid { grid-template-columns: repeat(2, 1fr); }
  .catalog__layout { grid-template-columns: 240px 1fr; gap: 24px; }
}

@media (max-width: 900px) {
  .pg-hero { padding: 110px 0 60px; }

  .catalog__layout { grid-template-columns: 1fr; }
  .catalog__mobile-bar { display: flex; }
  .catalog__sort--desktop { display: none; }

  .catalog__toolbar {
    padding: 10px 16px;
    margin-bottom: 16px;
  }

  /* Filters become a slide-in drawer */
  .filters {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 92%;
    max-width: 380px;
    max-height: 100vh;
    border-radius: 20px 0 0 20px;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 1001;
    box-shadow: -20px 0 60px rgba(0,0,0,0.25);
    padding-bottom: 100px;
  }
  .filters.is-open { transform: translateX(0); }
  .filters__close { display: flex; }
  .filters__apply-mobile {
    display: block;
    position: sticky;
    bottom: 0;
    padding: 16px 0 0;
    background: linear-gradient(180deg, transparent, #fff 20%);
  }
  .filters__apply-mobile .btn { width: 100%; }

  .help-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .pg-hero { padding: 80px 0 48px; }
  .pg-hero__title { font-size: clamp(26px, 7vw, 34px); line-height: 1.15; }
  .pg-hero__sub { font-size: 15px; }
  .pg-hero__stats {
    gap: 14px;
    padding: 12px 16px;
    flex-wrap: wrap;
  }
  .pg-hero__stat strong { font-size: 18px; }
  .pg-hero__stat span { font-size: 12px; }
  .pg-hero__ctas { flex-direction: column; gap: 10px; }
  .pg-hero__ctas .btn { width: 100%; justify-content: center; }
  .pg-breadcrumb { font-size: 12px; flex-wrap: wrap; gap: 4px; }

  .formats__grid { grid-template-columns: 1fr; }
  .programs-grid { grid-template-columns: 1fr; gap: 16px; }

  .catalog { padding: 52px 0; }
  .catalog__toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .catalog__mobile-bar .btn { width: 100%; justify-content: center; }

  .program-card { padding: 22px 18px; }
  .program-card__title { font-size: 18px; }

  .filters { width: 100%; max-width: 100%; border-radius: 0; }

  .help-grid { gap: 14px; }
  .help-card { padding: 22px 18px; }
}

@media (max-width: 420px) {
  .pg-hero { padding: 64px 0 36px; }
  .pg-hero__title { font-size: 22px; }
}
