/* ============================================================
   Layout: one content width for sections + breadcrumbs (UI/UX)
   ============================================================ */
:root {
  --layout-max-width: 1200px;
  --layout-padding-inline: 16px;
  /* Vertical rhythm — sections, tag/hub pages, cards */
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
}
@media (min-width: 901px) {
  :root {
    --layout-padding-inline: 24px;
  }
}

/**
 * Universal content width — use on any full-width strip that should align
 * with main column (header, breadcrumbs, sections, footer inner, etc.)
 */
.container-main {
  max-width: var(--layout-max-width);
  margin-inline: auto;
  padding-inline: var(--layout-padding-inline);
  padding-block: 0;
  box-sizing: border-box;
  width: 100%;
}

/* Align KVS .content shell with cards/sections (was 1260px + 10px) */
.container .content {
  max-width: var(--layout-max-width);
  padding-left: var(--layout-padding-inline);
  padding-right: var(--layout-padding-inline);
  box-sizing: border-box;
}

/* ============================================================
   KVS theme: reduce huge .box / .headline gaps (all-responsive-white)
   ============================================================ */
.main-container .box {
  margin: 0 0 var(--space-lg);
}
.main-container .headline {
  padding: var(--space-md) 0 0;
  margin: 0 0 var(--space-sm);
}
.main-container .pagination {
  padding: var(--space-sm) 0 0;
}
/* SEO / legal paragraphs under lists (theme used 2.5rem bottom) */
.content p.text {
  margin: var(--space-md) auto var(--space-lg);
  padding: 0 var(--layout-padding-inline);
  max-width: var(--layout-max-width);
  box-sizing: border-box;
  font-size: 15px;
  line-height: 1.65;
}
@media screen and (max-width: 785px) {
  .main-container .box {
    padding: var(--space-md) 0 0;
  }
  .main-container .headline {
    padding: var(--space-md) 0 0;
  }
}

/* ============================================================
   Home: block categories (فئات الفيديو) — grid, RTL
   ============================================================ */
.home-categories {
	max-width: var(--layout-max-width);
	margin: 0 auto var(--space-lg);
	padding: 0 var(--layout-padding-inline);
	direction: rtl;
	text-align: right;
}

.home-categories__header {
	margin-bottom: var(--space-md);
}

.home-categories__title {
	font-size: 1.35rem;
	font-weight: 700;
	margin: 0 0 0.5rem;
	color: #1a1a1a;
}

.home-categories__intro {
	font-size: 0.9rem;
	line-height: 1.5;
	color: #555;
	margin: 0;
	max-width: 56em;
}

.home-categories__grid {
	background: #f5f6f8;
	border-radius: 10px;
	padding: var(--space-md) var(--space-sm);
	border: 1px solid #e4e6ea;
}

.home-categories__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 0.4rem 1.25rem;
}

/* ============================================================
   Homepage components (ARCHITECTURE.md)
   - section-title + horizontal rows
   - minimal card DOM: thumb/duration/title/views
   ============================================================ */
.content-section {
  margin-top: var(--space-md);
  width: 100%;
  max-width: var(--layout-max-width);
  padding: 0 var(--layout-padding-inline);
  margin-inline: auto;
  box-sizing: border-box;
  direction: rtl;
  text-align: right;
}
@media (min-width: 901px) {
  .content-section { padding: 0 var(--layout-padding-inline); }
}
/* First homepage/list section under header: less top air (not tag layout — own stack) */
.main-container > :first-child:not(.tag-page) .content-section:first-of-type {
  margin-top: var(--space-sm);
}
.section-title {
  background: linear-gradient(135deg, #0f2433 0%, #1a3d55 100%);
  border-radius: 12px;
  padding: var(--space-xs) var(--space-sm);
  margin-bottom: var(--space-sm);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  color: #ffffff;
  margin: 0 0 var(--space-sm);
}

/* Section header bar (mobile-first). Used only when template enables it. */
.section-header-bar {
  padding: var(--space-sm) var(--space-md);
  margin: 0 0 var(--space-sm);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(15, 36, 51, 0.92) 0%, rgba(26, 61, 85, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.section-header-bar .section-title {
  background: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  text-align: center;
  font-size: 18px;
  line-height: 1.25;
}
.section-description {
  margin: var(--space-xs) 0 0;
  color: rgba(214, 225, 234, 0.78);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

/* Hero: mobile scroll-snap, desktop 1+4 grid */
.hero-scroll {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--layout-padding-inline);
  padding-bottom: var(--space-xs);
  -webkit-overflow-scrolling: touch;
}
.hero-scroll .video-card { flex: 0 0 85%; min-width: 0; scroll-snap-align: start; }
@media (min-width: 901px) {
  .hero-scroll {
    display: grid;
    /* Desktop hero: 2 big (right) + 3 small (left), equal overall height */
    grid-template-columns: 1fr 1.8fr; /* left small / right big (visual) */
    grid-template-rows: repeat(6, minmax(0, 1fr)); /* 3 small=2 rows each, 2 big=3 rows each */
    gap: var(--space-md);
    overflow: visible;
    scroll-snap-type: none;
    align-items: stretch;
    align-content: stretch;
  }
  .hero-scroll .video-card { flex: none; height: 100%; min-height: 0; }
  /* Make stretched cards keep dark info (no white gap) */
  .hero-scroll .video-card-info { flex: 1 1 auto; }

  /* Place 2 big cards in the right column */
  .hero-scroll .video-card:nth-child(1) { grid-column: 2; grid-row: 1 / span 3; }
  .hero-scroll .video-card:nth-child(2) { grid-column: 2; grid-row: 4 / span 3; }

  /* Place 3 small cards in the left column */
  .hero-scroll .video-card:nth-child(3) { grid-column: 1; grid-row: 1 / span 2; }
  .hero-scroll .video-card:nth-child(4) { grid-column: 1; grid-row: 3 / span 2; }
  .hero-scroll .video-card:nth-child(5) { grid-column: 1; grid-row: 5 / span 2; }
}

/* Video row: 2 cards visible on mobile (~48%) */
.video-row {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--layout-padding-inline);
  padding-bottom: var(--space-xs);
  -webkit-overflow-scrolling: touch;
}
.video-row .video-card { flex: 0 0 48%; min-width: 0; scroll-snap-align: start; }
@media (min-width: 901px) {
  .video-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-md);
    overflow: visible;
    scroll-snap-type: none;
  }
  .video-row .video-card { flex: none; }
}

/* Card */
.video-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #f9fafb;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(15,36,51,0.08);
  box-shadow: 0 1px 0 rgba(15,36,51,0.04);
}
.video-card-info {
  background: #0f2433;
  color: #d6e1ea;
  padding: 10px 10px 12px;
}
.video-card-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #e5e7eb;
  overflow: hidden;
  border-radius: 8px;
}
.video-card-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-card-duration {
  padding: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: #d6e1ea;
}
.video-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.35;
  color: #ffffff;
  text-align: right;
  min-height: calc(1.35em * 2);
}
.video-card-category {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: #d6e1ea;
  text-decoration: none;
  margin-top: var(--space-xs);
  background: rgba(255,255,255,0.10);
  padding: 6px 10px;
  border-radius: 10px;
}
.video-card-category:hover { text-decoration: underline; }
@media (min-width: 901px) {
  .video-card:hover .video-card-thumb { transform: scale(1.02); }
  .video-card-thumb { transition: transform 0.2s ease; }
  .video-card:hover { box-shadow: 0 10px 24px rgba(15,36,51,0.10); border-color: rgba(77,163,255,0.22); }
}

/* Tags row: compact discovery */
.tags-row {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-xs);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--layout-padding-inline);
  padding-bottom: var(--space-xs);
  -webkit-overflow-scrolling: touch;
}
.tags-row a {
  flex-shrink: 0;
  scroll-snap-align: start;
  padding: 6px 12px;
  font-size: 13px;
  background: #0f2433;
  color: #d6e1ea;
  text-decoration: none;
  border-radius: 6px;
}
.tags-row a:hover { color: #4da3ff; }

/* Popular keywords: 3 columns, fill top-to-bottom per column (RTL) */
.tags-keywords-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: row;
  gap: 10px 14px;
  padding: 4px 0 8px;
}
.tags-keywords-grid a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.35;
  background: #0f2433;
  color: #d6e1ea;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid rgba(77, 163, 255, 0.12);
  text-align: right;
  word-break: break-word;
}
.tags-keywords-grid a:hover {
  color: #4da3ff;
  border-color: rgba(77, 163, 255, 0.28);
}

/* Homepage SEO tags: fixed 2-row pill grid */
.tags-home-seo-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  grid-auto-columns: minmax(140px, 1fr);
  gap: 10px 12px;
  overflow-x: auto;
  padding: 4px 0 8px;
  -webkit-overflow-scrolling: touch;
}
.tags-home-seo-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #1c2e3a;
  color: #d6e1ea;
  text-decoration: none;
  border: 1px solid rgba(77, 163, 255, 0.15);
  white-space: nowrap;
  font-size: 13px;
}
.tags-home-seo-pill small {
  color: rgba(214, 225, 234, 0.75);
  font-size: 11px;
}
.tags-home-seo-pill:hover {
  color: #ffffff;
  border-color: rgba(77, 163, 255, 0.35);
  background: #234055;
}

/* Category quick links (under Hero) */
.category-links-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  padding: 4px 0 8px;
}
@media (min-width: 901px) {
  .category-links-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.category-links-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.25;
  background: #0f2433;
  color: #d6e1ea;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid rgba(77, 163, 255, 0.12);
  text-align: center;
  word-break: break-word;
}
.category-links-grid a:hover {
  color: #4da3ff;
  border-color: rgba(77, 163, 255, 0.28);
}

/* Categories as video cards (homepage) */
.category-video-row .video-card-duration {
  font-size: 12px;
  font-weight: 700;
  color: rgba(214, 225, 234, 0.85);
}
@media (min-width: 901px) {
  /* Desktop: 2 rows x 4 cards (like Sex Stories) */
  .category-video-row.video-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-md);
    overflow: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
  }
  .category-video-row.video-row .video-card {
    flex: none;
  }
}

/* Categories row: 8 cards, 2 visible on mobile */
.category-row {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--layout-padding-inline);
  padding-bottom: var(--space-xs);
  -webkit-overflow-scrolling: touch;
}
.category-card {
  flex: 0 0 48%;
  min-width: 0;
  scroll-snap-align: start;
  display: block;
  text-decoration: none;
  color: inherit;
  background: #f9fafb;
  border-radius: 8px;
  overflow: hidden;
}
.category-card-img {
  aspect-ratio: 16 / 9;
  background: #e5e7eb;
  object-fit: cover;
  width: 100%;
  display: block;
}
.category-card-name { font-weight: 700; padding: 8px 10px 2px; font-size: 14px; color: #1f2937; }
.category-card-count { padding: 0 10px 10px; font-size: 12px; color: #6b7280; }

/* Categories page only: portrait thumbs (240x360) without distortion */
.categories-page .category-card-img {
  aspect-ratio: 2 / 3;
  object-fit: contain;
  background: #0f2433;
}
.categories-page .content-section {
  padding: 0 var(--layout-padding-inline);
}
.categories-page .category-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
  overflow: visible;
  scroll-snap-type: none;
  padding-bottom: 0;
}
.categories-page .category-card {
  flex: none;
  width: auto;
}
@media (min-width: 768px) {
  .categories-page .category-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-md);
  }
}
@media (min-width: 901px) {
  .categories-page .content-section {
    padding: 0 var(--layout-padding-inline);
  }
  .categories-page .category-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-md);
  }
}
/* Sex stories: mobile should be 2 rows of previews */
@media (max-width: 900px) {
  .home-stories .category-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 48%;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 16px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .home-stories .category-card {
    flex: none;
    width: auto;
    scroll-snap-align: start;
  }
}
@media (min-width: 901px) {
  .category-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    overflow: visible;
    scroll-snap-type: none;
  }
  .category-card { flex: none; }
}

.home-categories__list a {
	display: block;
	padding: 0.4em 0.5em;
	font-size: 0.9rem;
	color: #2c5282;
	text-decoration: none;
	border-radius: 6px;
	transition: background 0.15s, color 0.15s;
}

.home-categories__list a:hover {
	background: rgba(0, 0, 0, 0.06);
	color: #1a365d;
}

@media (max-width: 600px) {
	.home-categories__list {
		grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
		gap: 0.35rem 0.85rem;
	}
	.home-categories__intro {
		font-size: 0.85rem;
	}
}

/* родитель под видео — дать полную ширину колонки */
.block-video .sponsor { width:100% !important; max-width:none !important; }

/* 3-2-1 сетка баннеров */
.ad-banner-wrapper{
  direction:ltr;
  display:grid;
  gap:12px;
  justify-content:center;
  margin:0 auto;
  grid-auto-rows:250px;
}

/* >=1024px — три в ряд */
@media (min-width:1024px){
  .ad-banner-wrapper{ grid-template-columns:repeat(3,300px); }
}

/* 680–1023px — два в ряд */
@media (min-width:680px) and (max-width:1023px){
  .ad-banner-wrapper{ grid-template-columns:repeat(2,300px); }
}

/* <680px — один в колонку */
@media (max-width:679px){
  .ad-banner-wrapper{ grid-template-columns:300px; }
}

.l-thumb {
    display: block;
    position: static;
    max-width: 100%;
    height: auto;
}

/* Header/menu (clean): moved from critical CSS, old .navigation/.logo overrides removed. */
.header .header-inner {
  max-width: var(--layout-max-width);
  margin-inline: auto;
  padding-left: var(--layout-padding-inline);
  padding-right: var(--layout-padding-inline);
  box-sizing: border-box;
}
.header-burger-check { display: none; }
.header-burger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin: 0 -8px 0 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: #d6e1ea;
}
.header-burger span { display: block; width: 22px; height: 2px; background: currentColor; }
.header-nav {
  display: none;
  position: fixed;
  top: 56px;
  inset-inline: 0;
  bottom: 0;
  z-index: 99;
  background: #0f2433;
  border-top: 1px solid #2a3640;
  padding: 24px 16px;
  overflow-y: auto;
}
.header-burger-check:checked ~ .header-nav {
  display: flex;
  flex-direction: column;
}
.header-nav ul { list-style: none; margin: 0; padding: 0; }
.header-nav a {
  display: block;
  padding: 12px 0;
  font-size: 14px;
  color: #d6e1ea;
  text-decoration: none;
  border-bottom: 1px solid #2a3640;
}
.header-nav a:hover { color: #4da3ff; }
.header-nav-link-cat { color: #4da3ff; box-shadow: 0 1px 0 0 currentColor; }
.menu-banner {
  width: 100%;
  min-height: 140px; /* reserve height, no CLS */
  margin-top: 20px;
  padding: 10px;
  background: #0f2433;
  border: 1px dashed #3a5568;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8ba3b5;
  font-size: 14px;
}
.menu-banner a,
.menu-banner picture {
  display: block;
  width: 100%;
  height: 100%;
}
.menu-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover; /* fill banner frame */
}
.menu-banner__link {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  overflow: hidden;
}
.menu-banner__media {
  display: block;
  width: 100%;
  height: 100%;
}
.menu-banner__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.menu-banner__caption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 8px 10px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.72) 100%);
}
.menu-banner__title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}
.menu-banner__sub {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.2;
  opacity: .95;
}

/* Video player click-init UX hint (keeps lazy player behavior). */
.player-wrap--click-init {
  position: relative;
  cursor: pointer;
}
.player-start-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0,0,0,.14), rgba(0,0,0,.44));
  color: #fff;
  cursor: pointer;
}
.player-start-overlay__icon {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.8);
  position: relative;
}
.player-start-overlay__icon::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 19px;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 18px solid #fff;
}
.player-wrap--active .player-start-overlay {
  display: none;
}
@media (min-width: 901px) {
  .header-inner { height: 60px; padding: 0 var(--layout-padding-inline); max-width: var(--layout-max-width); margin-inline: auto; }
  .header-logo { margin-inline-start: 0; margin-inline-end: auto; }
  .header-burger { display: none; }
  .header-nav {
    display: flex;
    flex-direction: row;
    position: static;
    background: transparent;
    border: none;
    padding: 0;
    overflow: visible;
    min-width: 0;
  }
  .header-nav .menu-banner { display: none; }
  .header-nav ul { display: flex; flex-wrap: wrap; gap: 4px 20px; direction: rtl; }
  .header-nav a { padding: 8px 0; border-bottom: none; }
  .header-nav-link-cat { box-shadow: 0 2px 0 0 currentColor; }
}

/************************************************************
 BREADCRUMBS — bar (RTL), aligned with --layout-max-width
************************************************************/

.breadcrumbs-bar {
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(135deg, rgba(15, 36, 51, 0.97) 0%, rgba(26, 61, 85, 0.95) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin: 0;
}

.breadcrumbs-bar__inner {
  padding-block: 10px;
}

.breadcrumbs {
  margin: 0;
  padding: 0;
}

.breadcrumbs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px 4px;
  direction: rtl;
  justify-content: flex-start;
  font-size: 13px;
  line-height: 1.45;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  white-space: nowrap;
}

.breadcrumbs__list::-webkit-scrollbar {
  height: 4px;
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  flex-shrink: 0;
}

.breadcrumbs__item--truncate {
  min-width: 0;
  flex: 1 1 auto;
  flex-shrink: 1;
  max-width: 100%;
}

.breadcrumbs__sep {
  color: rgba(214, 225, 234, 0.35);
  -select: none;
  padding: 0 2px;
  font-weight: 300;
  white-space: nowrap;
}

.breadcrumbs__link {
  color: #9fc4de;
  text-decoration: none;
  border-radius: 6px;
  padding: 4px 6px;
  margin: -4px -6px;
  transition: color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.breadcrumbs__link:hover {
  color: #ffffff;
  background: rgba(77, 163, 255, 0.12);
  text-decoration: none;
}

.breadcrumbs__link:focus-visible {
  outline: 2px solid rgba(77, 163, 255, 0.6);
  outline-offset: 2px;
}

.breadcrumbs__current {
  color: #e8f0f6;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

@media (min-width: 769px) {
  .breadcrumbs__list {
    font-size: 14px;
    gap: 8px 6px;
  }
  .breadcrumbs-bar__inner {
    padding-block: 12px;
  }
}

/* ============================================================
   Footer — RTL, 3 columns, سكساوي (scope: .footer.site-footer)
   ============================================================ */
.footer.site-footer {
  background-color: #0f2433;
  border-top: 1px solid #2a3640;
  padding-top: 60px;
  padding-bottom: 40px;
}

.footer.site-footer--rtl {
  direction: rtl;
  text-align: right;
}

.footer .site-footer__container {
  max-width: var(--layout-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--layout-padding-inline);
  padding-right: var(--layout-padding-inline);
  box-sizing: border-box;
}

.footer .site-footer__brand {
  margin-bottom: 48px;
  text-align: right;
}

.footer .site-footer__logo a,
.footer .site-footer__logo-link {
  font-size: 20px;
  font-weight: 700;
  color: #d6e1ea;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.footer .site-footer__logo a:hover,
.footer .site-footer__logo-link:hover {
  color: #4da3ff;
}

.footer .site-footer__tagline {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: #9fb2c3;
  max-width: 360px;
}

.footer .site-footer__nav {
  margin-bottom: 40px;
}

.footer .site-footer__nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer .site-footer__col {
  margin: 0;
  padding: 0;
}

.footer .site-footer__col-summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 0;
  border-bottom: 1px solid #2a3640;
  -select: none;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #9fb2c3;
  font-weight: 600;
}

.footer .site-footer__col-summary::-webkit-details-marker {
  display: none;
}

.footer .site-footer__col-summary::after {
  content: " ▼";
  font-size: 10px;
  opacity: 0.8;
}

.footer .site-footer__col[open] .site-footer__col-summary::after {
  content: " ▲";
}

.footer .site-footer__col-summary:hover {
  color: #d6e1ea;
}

@media (min-width: 901px) {
  .footer .site-footer__col-summary {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    white-space: nowrap;
  }
  .footer .site-footer__col-summary::after {
    content: none;
  }
}

.footer .site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer .site-footer__links li { margin: 0; padding: 0; }

.footer .site-footer__links a {
  display: block;
  font-size: 14px;
  color: #d6e1ea;
  text-decoration: none;
  padding: 6px 0;
}

.footer .site-footer__links a:hover {
  color: #4da3ff;
}

.footer .site-footer__seo {
  margin-bottom: 32px;
  padding-top: 28px;
  border-top: 1px solid #2a3640;
}

.footer .site-footer__seo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 4px;
  margin-bottom: 12px;
  direction: rtl;
  flex-direction: row;
  justify-content: flex-start;
}

.footer .site-footer__seo-row:last-child { margin-bottom: 0; }

.footer .site-footer__seo-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #6b7f8f;
  flex-shrink: 0;
}

.footer .site-footer__seo-links {
  font-size: 13px;
  color: #8a9baa;
  direction: rtl;
}

.footer .site-footer__seo-links a {
  color: #8a9baa;
  text-decoration: none;
}

.footer .site-footer__seo-links a:hover {
  color: #4da3ff;
}

.footer .site-footer__seo-links a:not(:last-child)::after {
  content: " • ";
  color: #5a6b7a;
  pointer-events: none;
}

.footer .site-footer__copyright {
  text-align: center;
  font-size: 13px;
  color: #6b7f8f;
}

.footer .site-footer__copyright a {
  color: inherit;
  text-decoration: none;
}

.footer .site-footer__copyright a:hover {
  color: #4da3ff;
}

@media (max-width: 900px) {
  .footer.site-footer {
    padding-top: 40px;
    padding-bottom: 32px;
  }
  .footer .site-footer__container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .footer .site-footer__brand { margin-bottom: 24px; }
  .footer .site-footer__tagline { max-width: none; }
  .footer .site-footer__nav-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .footer .site-footer__col-summary {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    padding: 12px 0;
    overflow: visible;
    clip: auto;
    border-bottom: 1px solid #2a3640;
  }
  .footer .site-footer__col-summary::after { content: " ▼"; }
  .footer .site-footer__col[open] .site-footer__col-summary::after { content: " ▲"; }
  .footer .site-footer__col {
    border-bottom: 1px solid #2a3640;
  }
  .footer .site-footer__col:first-of-type {
    border-top: 1px solid #2a3640;
  }
  .footer .site-footer__col .site-footer__links {
    padding-bottom: 12px;
  }
  .footer .site-footer__seo {
    padding-top: 20px;
    margin-bottom: 24px;
  }
  .footer .site-footer__seo-row {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }
}

/* Footer brand layout (RTL page): desktop text left, logo right */
@media (min-width: 901px) {
  .footer .site-footer__brand {
    display: flex;
    flex-direction: row-reverse; /* logo stays visually right */
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
  }
  .footer .site-footer__tagline {
    direction: rtl;       /* keep Arabic shaping/order */
    text-align: right;    /* RTL text alignment */
    max-width: 520px;
  }
}
.footer .site-footer__logo img {
  display: block;
  height: 40px;
  width: auto;
  object-fit: contain;
}
@media (min-width: 901px) {
  .footer .site-footer__logo img { height: 80px; } /* desktop 2x, mobile unchanged */
}
@media (max-width: 900px) {
  .footer .site-footer__logo img { height: 36px; }
}

/* Tag page redesign: unified with homepage cards */
/* Beat .main-container h1 from theme (2.4rem + old gradient) — was blowing up bar + gaps */
.main-container .tag-page .tag-page__header h1.tag-page__h1 {
  margin: 0;
  padding: var(--space-xs) var(--space-sm);
  border-radius: 12px;
  background: linear-gradient(135deg, #0f2433 0%, #1a3d55 100%);
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}
.tag-page__header {
  margin: 0 0 0;
  padding: 0 var(--layout-padding-inline);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tag-page__description {
  margin: 0;
  color: #5a6570;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

/* Tight stack: description → grid (no extra wrapper air) */
.tag-page__videos {
  margin: 0;
  padding: 0;
}
.tag-page__videos > div[id] {
  margin: 0;
  padding: 0;
}
.tag-page__videos .content-section:first-of-type {
  margin-top: 0;
}

/* Use homepage-like video-card grid for tags */
.tag-page__videos .content-section {
  padding: 0 var(--layout-padding-inline);
}
.tag-page__videos .video-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
  overflow: visible;
  scroll-snap-type: none;
  padding-bottom: 0;
}
.tag-page__videos .video-row .video-card {
  flex: none;
  width: auto;
}
@media (min-width: 768px) {
  .tag-page__videos .video-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-md);
  }
}
@media (min-width: 901px) {
  .tag-page__videos .content-section {
    padding: 0 var(--layout-padding-inline);
  }
  .tag-page__videos .video-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-md);
  }
}

/* Tag page SEO section */
.tag-page__seo {
  padding: var(--space-sm) var(--layout-padding-inline) 0;
  max-width: var(--layout-max-width);
  margin-inline: auto;
  box-sizing: border-box;
}
.tag-page__seo-h2 {
  text-align: center;
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: #1a1a1a;
}
.tag-page__seo-text {
  color: #5a6570;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
.tag-page__related {
  margin-top: var(--space-sm);
}
.tag-page__related-title {
  color: #1f2937;
  font-weight: 800;
  text-align: right;
  margin: 0 0 6px;
}
.tag-page__related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xs);
}
.tag-page__related-list a {
  display: block;
  text-decoration: none;
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid rgba(77, 163, 255, 0.18);
  border-radius: 10px;
  background: rgba(15, 36, 51, 0.55);
  color: #d6e1ea;
  font-size: 13px;
  line-height: 1.2;
  text-align: center;
}
.tag-page__related-list a:hover {
  color: #4da3ff;
  border-color: rgba(77, 163, 255, 0.38);
}

/* Tags hub redesign (/tags/) */
.tags-hub-page .main-container {
  width: 100%;
}
.tags-hub {
  padding: 0 var(--layout-padding-inline) var(--space-sm);
  max-width: var(--layout-max-width);
  margin-inline: auto;
  box-sizing: border-box;
}
.tags-hub__intro {
  margin: 0 0 var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: 12px;
  background: rgba(15, 36, 51, 0.72);
  border: 1px solid rgba(77, 163, 255, 0.16);
}
.tags-hub__intro p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: #d6e1ea;
}
.tags-hub__search-wrap {
  margin: 0 0 var(--space-sm);
}
.tags-hub__search {
  width: 100%;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(77, 163, 255, 0.2);
  background: #102737;
  color: #d6e1ea;
  padding: 0 var(--space-sm);
}
.tags-featured h2,
.tag-group h2 {
  margin: 0 0 var(--space-xs);
  font-size: 18px;
  color: #ffffff;
}
.tags-featured {
  margin: 0 0 var(--space-md);
}
.tags-featured__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xs);
}
.tag-card {
  display: block;
  text-decoration: none;
  border-radius: 12px;
  padding: var(--space-sm);
  background: linear-gradient(135deg, #0f2433 0%, #1a3d55 100%);
  border: 1px solid rgba(77, 163, 255, 0.18);
  transition: transform .2s ease, border-color .2s ease;
}
.tag-card__name {
  display: block;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
}
.tag-card__meta {
  display: block;
  margin-top: 6px;
  color: rgba(214, 225, 234, 0.84);
  font-size: 12px;
}
.tags-groups {
  display: grid;
  gap: var(--space-md);
}
.tag-group {
  background: rgba(15, 36, 51, 0.45);
  border: 1px solid rgba(77, 163, 255, 0.12);
  border-radius: 12px;
  padding: var(--space-sm);
}
.tag-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  background: #1c2e3a;
  color: #d6e1ea;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.tag:hover,
.tag-card:hover {
  transform: scale(1.02);
  background: #234055;
  color: #ffffff;
  border-color: rgba(77, 163, 255, 0.34);
}
.tags-index {
  margin-top: var(--space-md);
  border: 1px solid rgba(77, 163, 255, 0.14);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15, 36, 51, 0.45);
}
.tags-index > summary {
  cursor: pointer;
  padding: var(--space-sm) var(--space-md);
  color: #ffffff;
  font-weight: 700;
}
.tags-index__letters {
  padding: 0 var(--space-sm) var(--space-sm);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}
.tags-index__letters a {
  color: #9fc4de;
  text-decoration: none;
  font-size: 13px;
}
.tags-index__scroll {
  max-height: 420px;
  overflow: auto;
  padding: 0 var(--space-sm) var(--space-sm);
}
.tags-index__scroll h3 {
  margin: var(--space-xs) 0 var(--space-xs);
  color: #ffffff;
  font-size: 14px;
}
.tags-index__scroll .tag {
  margin: 0 6px 6px 0;
}
@media (min-width: 768px) {
  .tags-featured__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tag-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .tags-hub { padding: 0 var(--layout-padding-inline) var(--space-md); }
  .tags-featured__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tag-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

