/*
Theme Name: 7md.tech Seven
Theme URI: https://7md.tech
Author: 7md.tech
Description: قالب عربي تقني جديد بألوان أكثر وضوحًا وشعار 7 مستقل، متوافق مع بوت المقالات والفيديوهات والتطبيقات.
Version: 1.0.9
Text Domain: sevenmd-seven
*/

:root {
  color-scheme: light;
  --ink: #13221d;
  --muted: #617067;
  --line: #dce5df;
  --surface: #ffffff;
  --surface-strong: #fdfefb;
  --soft: #f3f7f1;
  --teal: #0d8f75;
  --teal-dark: #075f50;
  --green: #24755b;
  --coral: #ff6b4a;
  --blue: #2f6fed;
  --gold: #d59a28;
  --shadow: 0 16px 38px rgba(19, 34, 29, 0.08);
  --shadow-strong: 0 26px 62px rgba(19, 34, 29, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(18, 168, 134, 0.16), transparent 260px),
    linear-gradient(180deg, #fbfdf8 0, #f5f8f1 420px, var(--soft) 100%);
  color: var(--ink);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(220, 229, 223, 0.9);
  background: rgba(253, 254, 251, 0.9);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  min-height: 74px;
  display: grid;
  grid-template-columns: auto 1fr minmax(190px, 310px);
  gap: 24px;
  align-items: center;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}

.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(7, 95, 80, 0.22);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #fff;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.main-nav,
.category-nav {
  display: flex;
  gap: 18px;
  align-items: center;
  color: var(--muted);
  font-weight: 800;
}

.main-nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 10px;
}

.main-nav a:hover {
  background: #eaf7f2;
}

.main-nav a:hover,
.category-nav a:hover,
.article-card h2 a:hover {
  color: var(--teal);
}

.search-form {
  height: 42px;
  border: 1px solid rgba(220, 229, 223, 0.95);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 0 8px 0 12px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(19, 34, 29, 0.05);
}

.search-form input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-form button,
.button {
  border: 0;
  cursor: pointer;
  min-height: 38px;
  border-radius: 8px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #fff;
  font-weight: 900;
  white-space: nowrap;
}

.button:hover,
.search-form button:hover {
  filter: brightness(0.96);
}

.category-strip {
  border-bottom: 1px solid var(--line);
  background: rgba(253, 254, 251, 0.78);
}

.category-nav {
  min-height: 50px;
  overflow-x: auto;
  gap: 10px;
}

.category-nav a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
}

.category-nav a:hover {
  border-color: #bfe4d8;
  background: #eaf7f2;
}

.newsroom-band {
  padding: 28px 0 24px;
}

.newsroom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: stretch;
}

.section-kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--teal);
  font-size: 14px;
  font-weight: 900;
}

.headline-area,
.quick-column,
.article-card,
.app-card,
.empty-state {
  border: 1px solid rgba(220, 229, 223, 0.96);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.headline-area {
  padding: 14px;
  overflow: hidden;
}

.quick-column {
  display: grid;
  gap: 16px;
  padding: 14px;
  align-content: start;
}

.article-card {
  overflow: hidden;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.article-card:hover,
.app-card:hover {
  transform: translateY(-3px);
  border-color: #bcded1;
  box-shadow: var(--shadow-strong);
}

.headline-area .article-card {
  margin-top: 14px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  position: static;
  background: var(--surface);
}

.headline-area .article-card::after {
  display: none;
}

.article-card img,
.article-card .content-fallback-image,
.post-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #dbe8df;
}

.headline-area .article-card img,
.headline-area .article-card .content-fallback-image,
.headline-area .post-placeholder {
  min-height: 0;
}

.article-card-large img,
.article-card-large .content-fallback-image,
.article-card-large .post-placeholder {
  aspect-ratio: 2 / 1;
}

.article-card-body {
  padding: 16px;
}

.headline-area .article-card-body {
  position: static;
  padding: 18px 0 0;
  color: var(--ink);
}

.headline-area .meta-row {
  color: var(--muted);
}

.headline-area .meta-row span:first-child {
  color: var(--coral);
}

.headline-area .article-card p {
  color: var(--muted);
  max-width: 720px;
}

.meta-row,
.post-meta,
.app-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.content-badge {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 10px;
  background: #eaf7f2;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.content-badge-video {
  background: #fff0ea;
  color: #b9442a;
}

.content-badge-comparison {
  background: #edf3ff;
  color: #2357c7;
}

.content-badge-list {
  background: #fff7df;
  color: #9a6810;
}

.content-badge-safety {
  background: #eaf8f0;
  color: #1d7048;
}

.content-badge-limited-free {
  background: #fff5e8;
  color: #a84f16;
}

.meta-row span:first-child,
.post-meta span:first-child {
  color: var(--coral);
}

.meta-row .content-badge,
.post-meta .content-badge {
  color: inherit;
}

.article-card h2 {
  margin: 10px 0;
  font-size: 22px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.article-card-large h2 {
  font-size: 42px;
  line-height: 1.25;
}

.article-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.sevenmd-store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.sevenmd-store-buttons .button {
  flex: 1;
  min-width: 128px;
  margin: 0;
}

.post-content > .sevenmd-store-buttons,
.sevenmd-store-buttons-bottom {
  margin: 24px 0 0;
}

.brief-list {
  display: grid;
  gap: 12px;
}

.brief-item {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  font-weight: 900;
  line-height: 1.55;
  transition: color 180ms ease;
}

.brief-item:hover {
  color: var(--teal);
}

.brief-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.brief-item img,
.brief-item .content-fallback-image,
.brief-placeholder {
  width: 82px;
  height: 62px;
  object-fit: cover;
  border-radius: 8px;
  background: #dbe8df;
}

.section-block {
  padding: 34px 0;
}

.home-template {
  padding-top: 10px;
}

.home-section {
  scroll-margin-top: 96px;
}

.home-section + .home-section {
  border-top: 1px solid rgba(220, 229, 223, 0.78);
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.section-title h1,
.section-title h2 {
  margin: 6px 0 0;
  font-size: 36px;
  letter-spacing: 0;
}

.article-grid,
.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

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

.app-card {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.app-card img,
.app-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #dbe8df;
}

.app-card-main {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.app-card h3 {
  margin: 0 0 8px;
  font-size: 21px;
  overflow-wrap: anywhere;
}

.app-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.app-card .button {
  margin: 0 16px 16px;
}

.button-secondary {
  background: #eef4ef;
  color: var(--ink);
}

.store-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 16px 16px;
}

.store-buttons .button {
  flex: 1;
  min-width: 128px;
  margin: 0;
}

.store-buttons-side {
  padding: 0;
}

.store-buttons-side .button {
  width: 100%;
}

.ad-slot {
  width: min(1180px, calc(100% - 32px));
  min-height: 82px;
  margin: 4px auto 18px;
  border: 1px dashed #b9c7d6;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.62);
  color: #6f7b73;
  font-weight: 900;
}

.ad-slot-compact {
  width: 100%;
  min-height: 92px;
  margin: 0;
}

.post-view {
  max-width: 860px;
  padding: 34px 0;
}

.post-cover {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #dbe8df;
}

.post-view h1 {
  margin: 12px 0;
  font-size: 42px;
  line-height: 1.24;
  overflow-wrap: anywhere;
}

.post-excerpt {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.9;
}

.post-content {
  margin-top: 22px;
  color: #272d38;
  font-size: 18px;
  line-height: 2;
}

.post-content h2 {
  margin: 30px 0 8px;
  font-size: 25px;
}

.post-content a {
  color: var(--teal);
  font-weight: 900;
}

.app-detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
  padding: 34px 0;
}

.app-hero-panel,
.app-side-panel,
.screenshots-panel {
  border: 1px solid rgba(220, 229, 223, 0.96);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.app-hero-panel {
  overflow: hidden;
}

.app-hero-media img,
.app-hero-placeholder {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  background: #dbe8df;
}

.app-hero-body {
  padding: 24px;
}

.app-hero-body h1 {
  margin: 8px 0 12px;
  font-size: 42px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.app-description {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}

.app-download-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.app-download-actions {
  padding: 0;
  margin: 18px 0 0;
}

.app-download-actions .button {
  min-height: 52px;
  margin: 0;
  font-size: 17px;
}

.app-side-panel {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.download-button {
  min-height: 54px;
  width: 100%;
  font-size: 18px;
}

.app-detail-list {
  display: grid;
  gap: 10px;
}

.app-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  color: var(--muted);
  font-weight: 800;
}

.app-detail-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.app-detail-row strong {
  color: var(--ink);
}

.screenshots-panel {
  margin-top: 24px;
  padding: 18px;
}

.screenshots-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

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

.screenshots-grid a {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #dbe8df;
}

.screenshots-grid img {
  width: 100%;
  aspect-ratio: 10 / 16;
  object-fit: cover;
  transition: transform 180ms ease;
}

.screenshots-grid a:hover img {
  transform: scale(1.03);
}

.empty-state {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

.pagination-nav,
.navigation.pagination {
  margin-top: 24px;
}

.pagination-nav ul,
.navigation.pagination .nav-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  direction: ltr;
  margin: 0;
  padding: 0;
}

.pagination-nav a,
.pagination-nav span,
.navigation.pagination .page-numbers {
  min-width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 900;
  direction: rtl;
}

.pagination-nav .current,
.pagination-nav a:hover,
.navigation.pagination .current,
.navigation.pagination a.page-numbers:hover {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.site-footer {
  margin-top: 34px;
  padding: 28px 0;
  background: #13221d;
  color: #f4f6f8;
}

.site-footer .shell {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #d6dce6;
}

@media (max-width: 920px) {
  .site-header-inner {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 0;
  }

  .newsroom-grid,
  .article-grid,
  .apps-grid {
    grid-template-columns: 1fr 1fr;
  }

  .article-card-large h2,
  .post-view h1 {
    font-size: 32px;
  }

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

@media (max-width: 640px) {
  body {
    background: linear-gradient(180deg, #fbfdf8 0, #f5f8f1 360px, var(--soft) 100%);
  }

  .shell,
  .ad-slot {
    width: min(100% - 18px, 1180px);
  }

  .site-header {
    position: static;
  }

  .site-header-inner {
    gap: 10px;
  }

  .brand {
    width: 100%;
  }

  .main-nav,
  .category-nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav a,
  .category-nav a {
    flex: 0 0 auto;
  }

  .search-form {
    width: 100%;
  }

  .section-block {
    padding: 24px 0;
  }

  .home-template {
    padding-top: 0;
  }

  .newsroom-grid,
  .article-grid,
  .apps-grid {
    grid-template-columns: 1fr;
  }

  .section-title,
  .site-footer .shell {
    align-items: start;
    flex-direction: column;
  }

  .article-card-large h2,
  .section-title h1,
  .section-title h2,
  .post-view h1 {
    font-size: 25px;
  }

  .article-card h2,
  .app-card h3 {
    font-size: 20px;
    line-height: 1.45;
  }

  .article-card-body,
  .app-card-main,
  .app-hero-body,
  .app-side-panel,
  .screenshots-panel {
    padding: 14px;
  }

  .article-card p,
  .app-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }

  .headline-area .article-card img,
  .headline-area .article-card .content-fallback-image,
  .headline-area .post-placeholder {
    min-height: 0;
  }

  .headline-area .article-card-body {
    padding: 14px 0 0;
  }

  .app-hero-body h1 {
    font-size: 27px;
  }

  .store-buttons .button {
    min-width: 0;
    width: 100%;
  }

  .app-detail-row {
    display: grid;
    gap: 4px;
  }

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