/*
Theme Name: Akhbar Economy
Theme URI: https://akhbarelaktsad.com
Author: Codex
Description: Responsive Arabic news theme for اخبار الاقتصاد.
Version: 1.0.0
Requires at least: 6.0
Text Domain: akhbar-economy
*/

:root {
  --petrol: #b91c1c;
  --petrol-dark: #7f111b;
  --petrol-deep: #3f0710;
  --mint: #ffe3e3;
  --gold: #f4b000;
  --coral: #dc2626;
  --ink: #211416;
  --muted: #7a6467;
  --line: #ead7d8;
  --paper: #fff7f7;
  --white: #ffffff;
  --shadow: 0 16px 40px rgba(127, 17, 27, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.8;
}

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

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

.site-shell {
  min-height: 100vh;
}

.container {
  margin-inline: auto;
  max-width: 1180px;
  padding-inline: 20px;
}

.topbar {
  background: var(--petrol-deep);
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

.topbar__inner {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 38px;
}

.topbar__inner span:last-child {
  color: #fff2f2;
  font-weight: 800;
}

.brand-header {
  background:
    radial-gradient(circle at 14% 22%, rgba(244, 176, 0, 0.18), transparent 28%),
    linear-gradient(135deg, var(--petrol-deep), var(--petrol-dark) 48%, var(--petrol));
  color: var(--white);
  padding-block: 24px;
}

.brand-header__inner {
  align-items: center;
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr minmax(260px, 460px);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.brand__name {
  font-size: clamp(30px, 5vw, 54px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
}

.brand__logo {
  background: var(--white);
  border-radius: 8px;
  max-height: 118px;
  object-fit: contain;
  padding: 8px 12px;
  width: min(430px, 100%);
}

.brand__tagline {
  color: var(--mint);
  font-size: 16px;
  font-weight: 600;
}

.ad-slot {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px dashed rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  display: flex;
  justify-content: center;
  min-height: 90px;
  padding: 14px;
  text-align: center;
}

.ad-slot--wide {
  background: #ecf5f3;
  border-color: #b8cfca;
  color: var(--petrol);
  margin-block: 26px;
  min-height: 96px;
}

.nav-wrap {
  background: #fffafa;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(127, 17, 27, 0.08);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav-inner {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: center;
  min-height: 58px;
}

.menu-toggle {
  background: var(--petrol);
  border: 0;
  border-radius: 8px;
  color: var(--white);
  cursor: pointer;
  display: none;
  font-family: inherit;
  font-weight: 800;
  padding: 9px 14px;
}

.primary-menu,
.primary-menu ul {
  display: flex;
  gap: 6px;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-menu a {
  border-radius: 8px;
  color: var(--petrol-dark);
  display: block;
  font-size: 15px;
  font-weight: 800;
  padding: 12px 15px;
  white-space: nowrap;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
  background: var(--mint);
  color: var(--petrol-dark);
}

.ticker-bar {
  background: linear-gradient(90deg, #fff1f1, #fffafa);
  border-bottom: 1px solid var(--line);
}

.ticker {
  align-items: center;
  display: flex;
  gap: 10px;
  overflow: hidden;
  white-space: nowrap;
}

.ticker__label {
  background: var(--gold);
  border-radius: 8px;
  color: var(--petrol-deep);
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 900;
  padding: 5px 10px;
}

.ticker__text {
  color: var(--petrol-dark);
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  margin-block: 28px;
}

.slider {
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.slide {
  display: none;
  min-height: 440px;
  position: relative;
}

.slide.is-active {
  display: block;
}

.slide img {
  height: 440px;
  object-fit: cover;
  width: 100%;
}

.slide__content {
  background: linear-gradient(0deg, rgba(63, 7, 16, 0.94), rgba(127, 17, 27, 0.12));
  inset: 0;
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 34px;
  position: absolute;
}

.badge {
  align-self: flex-start;
  background: var(--gold);
  border-radius: 999px;
  color: var(--petrol-deep);
  font-size: 13px;
  font-weight: 900;
  padding: 4px 12px;
}

.slide h2 {
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.25;
  margin: 14px 0 8px;
}

.slider-dots {
  display: flex;
  gap: 8px;
  inset-block-end: 18px;
  inset-inline-start: 34px;
  position: absolute;
  z-index: 3;
}

.slider-dot {
  background: rgba(255, 255, 255, 0.55);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  height: 10px;
  padding: 0;
  width: 28px;
}

.slider-dot.is-active {
  background: var(--gold);
}

.side-news {
  display: grid;
  gap: 14px;
}

.side-card,
.post-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.side-card:hover,
.post-card:hover {
  box-shadow: 0 16px 40px rgba(127, 17, 27, 0.16);
  transform: translateY(-2px);
}

.side-card a {
  display: grid;
  gap: 12px;
  grid-template-columns: 118px 1fr;
  min-height: 108px;
}

.side-card img {
  height: 100%;
  min-height: 108px;
  object-fit: cover;
  width: 118px;
}

.side-card__body {
  padding: 12px 12px 12px 0;
}

.side-card h3,
.post-card h3 {
  font-size: 18px;
  line-height: 1.45;
  margin: 6px 0;
}

.meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.section {
  margin-block: 34px;
}

.section__head {
  align-items: end;
  border-bottom: 2px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 10px;
}

.section__title {
  color: var(--petrol-deep);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
  position: relative;
}

.section__title::after {
  background: var(--gold);
  border-radius: 999px;
  bottom: -12px;
  content: "";
  height: 4px;
  inset-inline-start: 0;
  position: absolute;
  width: 72px;
}

.section__link {
  color: var(--petrol);
  font-size: 14px;
  font-weight: 900;
}

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

.post-card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
}

.post-card__body {
  padding: 13px;
}

.post-card h3 {
  font-size: 16px;
  margin: 8px 0;
}

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

.opinion-card {
  background: linear-gradient(180deg, #fffafa, #fff2f2);
  border: 1px solid #efc8ca;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(127, 17, 27, 0.08);
  overflow: hidden;
}

.opinion-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.opinion-card__image {
  background: #f9dede;
  padding: 12px 12px 0;
}

.opinion-card__image img {
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  border: 4px solid #ffffff;
  box-shadow: 0 10px 24px rgba(127, 17, 27, 0.16);
  object-fit: cover;
  width: 100%;
}

.opinion-card__body {
  padding: 14px;
}

.opinion-card__label {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.opinion-card h3 {
  color: var(--petrol-deep);
  font-size: 17px;
  line-height: 1.45;
  margin: 6px 0;
}

.opinion-card__writer {
  color: var(--petrol);
  display: block;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 6px;
}

.opinion-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
}

.site-footer {
  background: linear-gradient(135deg, var(--petrol-deep), #6e1423);
  color: rgba(255, 255, 255, 0.86);
  margin-top: 44px;
  padding-block: 34px;
}

.footer-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr 1fr;
}

.footer-title {
  color: var(--white);
  font-size: 24px;
  font-weight: 900;
  margin: 0 0 8px;
}

.single-layout {
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(0, 1fr) 320px;
  margin-block: 34px;
}

.article-main,
.archive-main {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.article-main h1,
.archive-main h1 {
  color: var(--petrol-deep);
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.25;
  margin: 0 0 14px;
}

.article-main .featured {
  border-radius: 8px;
  margin-block: 18px;
  width: 100%;
}

.sidebar {
  display: grid;
  gap: 18px;
}

.widget-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

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

@media (max-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .opinion-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-grid,
  .single-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .brand-header__inner,
  .footer-grid,
  .archive-grid {
    grid-template-columns: 1fr;
  }

  .brand-header {
    padding-block: 18px;
  }

  .brand__logo {
    max-height: 92px;
    width: min(330px, 100%);
  }

  .menu-toggle {
    display: none;
  }

  .primary-menu {
    display: flex !important;
    visibility: visible;
    gap: 6px;
    justify-content: flex-start;
    overflow-x: auto;
    padding-block: 8px;
    scrollbar-width: thin;
    width: 100%;
  }

  .primary-menu li {
    flex: 0 0 auto;
  }

  .primary-menu a {
    background: #fffafa;
    border: 1px solid #efc8ca;
    font-size: 14px;
    padding: 9px 12px;
  }

  .nav-inner {
    display: block;
    justify-content: flex-start;
    min-height: 54px;
    overflow-x: auto;
  }

  .ticker {
    min-height: 42px;
  }

  .slide,
  .slide img {
    min-height: 360px;
    height: 360px;
  }

  .slide__content {
    padding: 24px;
  }

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

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

@media (max-width: 520px) {
  .container {
    padding-inline: 14px;
  }

  .topbar__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding-block: 8px;
  }

  .posts-grid,
  .opinion-grid,
  .archive-grid {
    grid-template-columns: 1fr;
  }

  .side-card a {
    grid-template-columns: 96px 1fr;
  }

  .side-card img {
    width: 96px;
  }
}
