/* =========================================
   RIZENTV CHANNELS
   CSS خاص بصفحة /channels/ فقط
========================================= */

:root {
  --ch-ink: #101a36;
  --ch-blue: #168cff;
  --ch-purple: #653cff;
  --ch-muted: #74809a;
  --ch-border: #e8edf6;
  --ch-bg: #f7f9fe;
  --ch-white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ch-ink);
  background: var(--ch-bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Arial, sans-serif;
  line-height: 1.5;
}

.ch-header,
.ch-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px clamp(18px, 5vw, 76px);
  background: var(--ch-white);
}

.ch-header {
  border-bottom: 1px solid var(--ch-border);
}

.ch-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ch-ink);
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.7px;
}

.ch-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--ch-blue), var(--ch-purple));
  box-shadow: 0 6px 18px #653cff25;
}

.ch-blue {
  color: var(--ch-blue);
}

.ch-home,
.ch-footer > a:last-child {
  color: var(--ch-ink);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.ch-home:hover,
.ch-footer > a:last-child:hover {
  color: var(--ch-blue);
}

.ch-main {
  width: min(1320px, calc(100% - 36px));
  margin: 0 auto;
  padding: 38px 0 64px;
}

.ch-hero {
  padding: 38px 12px 32px;
  text-align: center;
}

.ch-kicker {
  margin: 0 0 9px;
  color: var(--ch-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

.ch-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 850;
  letter-spacing: -2.5px;
  line-height: 1.12;
}

.ch-hero h1 em {
  color: var(--ch-purple);
  font-style: normal;
}

.ch-muted {
  color: var(--ch-muted);
  font-size: 14px;
}

.ch-hero > .ch-muted {
  margin: 18px 0 25px;
}

.ch-search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 0 17px;
  border: 1px solid var(--ch-border);
  border-radius: 15px;
  background: var(--ch-white);
  box-shadow: 0 8px 28px #172b4d08;
}

.ch-search span {
  color: var(--ch-blue);
  font-size: 27px;
}

.ch-search input {
  width: 100%;
  min-width: 0;
  height: 52px;
  border: 0;
  outline: none;
  color: var(--ch-ink);
  background: transparent;
  font: inherit;
  font-size: 14px;
}

.ch-search:focus-within {
  border-color: var(--ch-blue);
  box-shadow: 0 0 0 4px #168cff13;
}

.ch-featured {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 10px 0 30px;
  padding: 25px 30px;
  border: 1px solid #dce7ff;
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 90% 10%, #dcd6ff8a, transparent 42%),
    linear-gradient(110deg, #edf6ff, #f5f1ff 75%, #fff);
}

.ch-featured small {
  color: var(--ch-purple);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 1.8px;
}

.ch-featured h2 {
  margin: 5px 0;
  font-size: 25px;
  letter-spacing: -0.7px;
}

.ch-featured p {
  margin: 0;
  color: var(--ch-muted);
  font-size: 13px;
}

.ch-featured button {
  flex-shrink: 0;
  padding: 13px 18px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: linear-gradient(110deg, var(--ch-blue), var(--ch-purple));
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ch-featured button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px #653cff30;
}

.ch-featured button b {
  margin-left: 10px;
  font-size: 17px;
}

.ch-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}

.ch-panel {
  min-width: 0;
  border: 1px solid var(--ch-border);
  border-radius: 20px;
  background: var(--ch-white);
  box-shadow: 0 8px 30px #172b4d05;
}

.ch-sidebar {
  padding: 22px;
}

.ch-side-title,
.ch-results-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ch-side-title h2,
.ch-results-top h2 {
  margin: 0;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.7px;
}

.ch-side-title .ch-kicker,
.ch-results-top .ch-kicker {
  margin-bottom: 5px;
}

.ch-count {
  padding: 5px 9px;
  border-radius: 8px;
  color: var(--ch-blue);
  background: #edf6ff;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.ch-label {
  margin: 25px 0 10px;
  color: var(--ch-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
}

.ch-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ch-filter {
  padding: 8px 10px;
  border: 1px solid var(--ch-border);
  border-radius: 9px;
  color: #59657e;
  background: white;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  transition: 0.18s;
}

.ch-filter:hover {
  border-color: #b9d9ff;
  color: var(--ch-blue);
}

.ch-filter.active {
  border-color: var(--ch-blue);
  color: white;
  background: var(--ch-blue);
}

.ch-country-list {
  display: grid;
  gap: 5px;
  max-height: 550px;
  margin-top: 18px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d5dced transparent;
}

.ch-country {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--ch-ink);
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: 0.18s;
}

.ch-country:hover {
  background: #f5f8ff;
}

.ch-country.active {
  border-color: #dce8ff;
  background: #edf5ff;
}

.ch-country-flag {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  flex-shrink: 0;
  border: 1px solid #edf0f6;
  border-radius: 9px;
  background: white;
  font-size: 20px;
}

.ch-country-name {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
}

.ch-country-arrow {
  color: #a1abc0;
  font-size: 17px;
}

.ch-results {
  padding: 27px;
}

.ch-results-top {
  align-items: flex-start;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--ch-border);
}

.ch-results-top h2 {
  font-size: clamp(22px, 3vw, 30px);
}

.ch-results-top .ch-muted {
  margin: 8px 0 0;
}

.ch-pill {
  padding: 7px 10px;
  border: 1px solid #e4ddff;
  border-radius: 9px;
  color: var(--ch-purple);
  background: #f6f2ff;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 1px;
  white-space: nowrap;
}

.ch-channel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 23px 0 15px;
}

.ch-channel-heading h3 {
  margin: 0;
  font-size: 16px;
}

.ch-channel-heading span {
  color: var(--ch-muted);
  font-size: 12px;
}

.ch-channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ch-channel-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 91px;
  padding: 14px;
  border: 1px solid var(--ch-border);
  border-radius: 14px;
  background: white;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.ch-channel-card:hover {
  transform: translateY(-2px);
  border-color: #cbdcff;
  box-shadow: 0 8px 20px #172b4d09;
}

.ch-logo-box {
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid #edf0f6;
  border-radius: 12px;
  background: #fafbff;
}

.ch-logo-box img {
  width: 29px;
  height: 29px;
  object-fit: contain;
}

.ch-logo-fallback {
  color: var(--ch-purple);
  font-size: 16px;
  font-weight: 850;
}

.ch-channel-info {
  min-width: 0;
}

.ch-channel-info h4 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 750;
}

.ch-channel-info p {
  margin: 4px 0 0;
  color: var(--ch-muted);
  font-size: 11px;
}

.ch-empty {
  grid-column: 1 / -1;
  padding: 25px;
  border: 1px dashed #dce3f0;
  border-radius: 14px;
  color: var(--ch-muted);
  text-align: center;
  font-size: 13px;
}

.ch-welcome {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 25px;
}

.ch-welcome article {
  padding: 23px;
  border: 1px solid var(--ch-border);
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, #f8faff);
}

.ch-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--ch-blue);
  background: #eaf5ff;
  font-size: 23px;
}

.ch-icon.purple {
  color: var(--ch-purple);
  background: #f1edff;
}

.ch-welcome h3 {
  margin: 16px 0 7px;
  font-size: 15px;
}

.ch-welcome p {
  margin: 0;
  color: var(--ch-muted);
  font-size: 12px;
  line-height: 1.7;
}

.ch-note {
  margin: 24px 0 0;
  padding-top: 17px;
  border-top: 1px solid var(--ch-border);
  color: var(--ch-muted);
  font-size: 11px;
  line-height: 1.7;
}

.ch-footer {
  flex-wrap: wrap;
  border-top: 1px solid var(--ch-border);
  color: var(--ch-muted);
  font-size: 12px;
}

.ch-footer .ch-brand {
  font-size: 18px;
}

.ch-footer .ch-mark {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  font-size: 16px;
}

@media (max-width: 950px) {
  .ch-layout {
    grid-template-columns: 245px minmax(0, 1fr);
    gap: 15px;
  }

  .ch-sidebar {
    padding: 16px;
  }

  .ch-results {
    padding: 20px;
  }

  .ch-channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .ch-header,
  .ch-footer {
    padding: 16px 18px;
  }

  .ch-brand {
    font-size: 19px;
  }

  .ch-home {
    font-size: 12px;
  }

  .ch-main {
    width: calc(100% - 24px);
    padding-top: 15px;
  }

  .ch-hero {
    padding: 32px 4px 25px;
  }

  .ch-hero h1 {
    letter-spacing: -1.5px;
  }

  .ch-featured {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px;
  }

  .ch-featured h2 {
    font-size: 22px;
  }

  .ch-layout {
    grid-template-columns: 1fr;
  }

  .ch-country-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    max-height: 330px;
  }

  .ch-country {
    gap: 7px;
    padding: 8px 6px;
  }

  .ch-country-flag {
    width: 29px;
    height: 29px;
    font-size: 17px;
  }

  .ch-country-name {
    font-size: 11px;
  }

  .ch-country-arrow {
    display: none;
  }

  .ch-results {
    padding: 17px;
  }

  .ch-results-top {
    gap: 8px;
  }

  .ch-pill {
    font-size: 9px;
  }

  .ch-channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .ch-channel-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
    padding: 11px;
  }

  .ch-channel-info h4 {
    font-size: 12px;
  }

  .ch-welcome {
    grid-template-columns: 1fr;
  }

  .ch-footer {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 370px) {
  .ch-channel-grid {
    grid-template-columns: 1fr;
  }
}