/*
Theme Name: Shoof Motor Child
Theme URI: https://shoofmotor.com
Description: Child theme for Shoof Motor - Arabic Automotive Media
Author: Shoof Motor
Template: astra
Version: 1.0.0
Text Domain: shoofmotor-child
*/

/* ===========================
   RTL + Global Resets
   =========================== */
:root {
  --sm-black: #0a0a0a;
  --sm-dark: #111111;
  --sm-card-bg: #1a1a1a;
  --sm-red: #e8002d;
  --sm-red-hover: #c4001f;
  --sm-gold: #f0a500;
  --sm-white: #ffffff;
  --sm-gray: #888888;
  --sm-light-gray: #cccccc;
  --sm-border: #2a2a2a;
  --sm-font: 'Cairo', 'Tajawal', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  direction: rtl;
  text-align: right;
  font-family: var(--sm-font);
  background: var(--sm-black);
  color: var(--sm-white);
}

body {
  background-color: var(--sm-black) !important;
  color: var(--sm-white) !important;
}

/* Import Arabic font */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;900&family=Tajawal:wght@400;500;700;900&display=swap');

/* ===========================
   HEADER / NAVIGATION
   =========================== */
.site-header,
.ast-primary-header-bar,
#masthead {
  background: #000 !important;
  border-bottom: 2px solid var(--sm-red) !important;
  direction: rtl;
}

.ast-site-identity a,
.site-title a {
  color: var(--sm-white) !important;
  font-family: var(--sm-font);
  font-weight: 900;
  font-size: 1.6rem;
  text-decoration: none;
}

.ast-site-identity a span {
  color: var(--sm-red);
}

/* Navigation */
.main-navigation,
#site-navigation,
.ast-main-header-bar-wrap .main-header-menu,
.main-header-menu {
  direction: rtl;
}

.main-header-menu .menu-item a,
.ast-main-navigation ul li a {
  color: var(--sm-white) !important;
  font-family: var(--sm-font);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.main-header-menu .menu-item a:hover,
.ast-main-navigation ul li a:hover {
  color: var(--sm-red) !important;
}

.ast-main-navigation .current-menu-item > a {
  color: var(--sm-red) !important;
  border-bottom: 2px solid var(--sm-red);
}

/* ===========================
   HOMEPAGE HERO
   =========================== */
.sm-hero {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0a0a 50%, #0a0a0a 100%);
  padding: 100px 5% 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--sm-border);
}

.sm-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at center, rgba(232,0,45,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.sm-hero-eyebrow {
  display: inline-block;
  background: var(--sm-red);
  color: var(--sm-white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 6px 18px;
  border-radius: 2px;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.sm-hero h1 {
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 900;
  color: var(--sm-white);
  margin: 0 0 12px;
  line-height: 1;
  letter-spacing: -1px;
}

.sm-hero h1 span {
  color: var(--sm-red);
}

.sm-hero h2 {
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-weight: 600;
  color: var(--sm-light-gray);
  margin: 0 auto 20px;
  max-width: 700px;
  line-height: 1.5;
}

.sm-hero p {
  font-size: 1.05rem;
  color: var(--sm-gray);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.sm-hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.sm-btn {
  display: inline-block;
  padding: 14px 36px;
  font-family: var(--sm-font);
  font-size: 1rem;
  font-weight: 700;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.25s;
  cursor: pointer;
  border: none;
}

.sm-btn-primary {
  background: var(--sm-red);
  color: var(--sm-white);
}

.sm-btn-primary:hover {
  background: var(--sm-red-hover);
  color: var(--sm-white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(232,0,45,0.35);
}

.sm-btn-secondary {
  background: transparent;
  color: var(--sm-white);
  border: 2px solid var(--sm-white);
}

.sm-btn-secondary:hover {
  background: var(--sm-white);
  color: var(--sm-black);
  transform: translateY(-2px);
}

/* ===========================
   SECTION SHARED STYLES
   =========================== */
.sm-section {
  padding: 70px 5%;
  direction: rtl;
}

.sm-section-dark { background: var(--sm-dark); }
.sm-section-black { background: var(--sm-black); }
.sm-section-card { background: var(--sm-card-bg); }

.sm-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--sm-border);
  padding-bottom: 16px;
}

.sm-section-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--sm-white);
  position: relative;
  padding-right: 16px;
  margin: 0;
}

.sm-section-title::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 100%;
  background: var(--sm-red);
  border-radius: 2px;
}

.sm-see-all {
  color: var(--sm-red);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.sm-see-all:hover { text-decoration: underline; color: var(--sm-red); }

/* ===========================
   STORY CARDS (Latest Stories)
   =========================== */
.sm-stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.sm-story-card {
  background: var(--sm-card-bg);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  text-decoration: none;
  display: block;
  border: 1px solid var(--sm-border);
}

.sm-story-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  border-color: var(--sm-red);
  text-decoration: none;
}

.sm-story-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: #222;
}

.sm-story-card-image-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #1e1e1e, #2a2a2a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.sm-story-card-body {
  padding: 20px;
}

.sm-story-card-cat {
  display: inline-block;
  background: var(--sm-red);
  color: var(--sm-white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 2px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.sm-story-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sm-white);
  margin: 0 0 10px;
  line-height: 1.5;
}

.sm-story-card-excerpt {
  font-size: 0.88rem;
  color: var(--sm-gray);
  line-height: 1.7;
  margin: 0 0 14px;
}

.sm-story-card-meta {
  font-size: 0.78rem;
  color: #555;
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Featured story (large) */
.sm-story-card.featured {
  grid-column: span 2;
}

.sm-story-card.featured .sm-story-card-image,
.sm-story-card.featured .sm-story-card-image-placeholder {
  height: 280px;
}

.sm-story-card.featured .sm-story-card-title {
  font-size: 1.4rem;
}

/* ===========================
   CAR CATEGORIES SECTION
   =========================== */
.sm-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.sm-cat-card {
  background: var(--sm-card-bg);
  border: 1px solid var(--sm-border);
  border-radius: 8px;
  padding: 28px 20px;
  text-align: center;
  text-decoration: none;
  transition: all 0.25s;
  display: block;
}

.sm-cat-card:hover {
  border-color: var(--sm-red);
  background: #1e1e1e;
  transform: translateY(-3px);
  text-decoration: none;
}

.sm-cat-card-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
  display: block;
}

.sm-cat-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--sm-white);
  margin: 0;
}

/* ===========================
   SERIES SECTION
   =========================== */
.sm-series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}

.sm-series-card {
  background: var(--sm-card-bg);
  border: 1px solid var(--sm-border);
  border-radius: 8px;
  padding: 28px 24px;
  transition: all 0.25s;
  text-decoration: none;
  display: block;
}

.sm-series-card:hover {
  border-color: var(--sm-gold);
  transform: translateY(-4px);
  text-decoration: none;
}

.sm-series-number {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--sm-red);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 8px;
}

.sm-series-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sm-white);
  margin: 0 0 12px;
}

.sm-series-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sm-series-items li {
  font-size: 0.85rem;
  color: var(--sm-gray);
  padding: 4px 0;
  border-bottom: 1px solid #222;
}

.sm-series-items li:last-child { border: none; }

.sm-series-items li::before {
  content: '← ';
  color: var(--sm-red);
  font-size: 0.7rem;
}

/* ===========================
   DID YOU KNOW CARDS
   =========================== */
.sm-dyk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.sm-dyk-card {
  background: linear-gradient(135deg, #1a1a1a, #111);
  border: 1px solid var(--sm-border);
  border-right: 3px solid var(--sm-gold);
  border-radius: 8px;
  padding: 24px;
  text-decoration: none;
  display: block;
  transition: all 0.25s;
}

.sm-dyk-card:hover {
  border-right-color: var(--sm-red);
  transform: translateY(-3px);
  text-decoration: none;
}

.sm-dyk-card-icon {
  font-size: 1.5rem;
  margin-bottom: 12px;
  display: block;
}

.sm-dyk-card-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--sm-white);
  line-height: 1.7;
  margin: 0 0 14px;
}

.sm-dyk-card-link {
  font-size: 0.8rem;
  color: var(--sm-gold);
  font-weight: 600;
}

/* ===========================
   BUYER'S GUIDE
   =========================== */
.sm-guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.sm-guide-block {
  background: var(--sm-card-bg);
  border: 1px solid var(--sm-border);
  border-radius: 8px;
  padding: 28px;
}

.sm-guide-block h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sm-white);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--sm-border);
}

.sm-guide-block h3 span {
  color: var(--sm-red);
  margin-left: 8px;
}

.sm-guide-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sm-guide-list li {
  padding: 8px 0;
  border-bottom: 1px solid #222;
}

.sm-guide-list li:last-child { border: none; }

.sm-guide-list li a {
  color: var(--sm-light-gray);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sm-guide-list li a:before {
  content: '←';
  color: var(--sm-red);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.sm-guide-list li a:hover {
  color: var(--sm-white);
}

/* ===========================
   NEWSLETTER SECTION
   =========================== */
.sm-newsletter {
  background: linear-gradient(135deg, #1a0808, #0a0a0a);
  border: 1px solid var(--sm-border);
  border-top: 3px solid var(--sm-red);
  border-radius: 12px;
  padding: 60px 5%;
  text-align: center;
  margin: 0 5% 70px;
}

.sm-newsletter h2 {
  font-size: 2rem;
  font-weight: 900;
  color: var(--sm-white);
  margin: 0 0 12px;
}

.sm-newsletter p {
  color: var(--sm-gray);
  font-size: 1rem;
  margin: 0 auto 30px;
  max-width: 500px;
  line-height: 1.8;
}

.sm-newsletter-perks {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.sm-newsletter-perks span {
  color: var(--sm-light-gray);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sm-newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.sm-newsletter-form input[type="email"] {
  flex: 1;
  min-width: 240px;
  padding: 14px 18px;
  border: 1px solid var(--sm-border);
  background: #111;
  color: var(--sm-white);
  font-family: var(--sm-font);
  font-size: 0.95rem;
  border-radius: 4px;
  direction: rtl;
  outline: none;
  transition: border-color 0.2s;
}

.sm-newsletter-form input[type="email"]:focus {
  border-color: var(--sm-red);
}

.sm-newsletter-form input::placeholder {
  color: #555;
}

/* ===========================
   FOOTER
   =========================== */
.site-footer,
.ast-small-footer,
.footer-widget-area {
  background: #000 !important;
  border-top: 1px solid var(--sm-border) !important;
  direction: rtl;
}

.ast-small-footer-wrap {
  color: var(--sm-gray) !important;
  font-size: 0.85rem;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
  .sm-hero { padding: 70px 5% 60px; }
  .sm-hero h1 { font-size: 3rem; }
  .sm-stories-grid { grid-template-columns: 1fr; }
  .sm-story-card.featured { grid-column: span 1; }
  .sm-guide-grid { grid-template-columns: 1fr; }
  .sm-cat-grid { grid-template-columns: repeat(3, 1fr); }
  .sm-series-grid { grid-template-columns: 1fr; }
  .sm-dyk-grid { grid-template-columns: 1fr; }
  .sm-section { padding: 50px 5%; }
}

@media (max-width: 480px) {
  .sm-cat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===========================
   OVERRIDE ASTRA DEFAULTS
   =========================== */
.ast-page-builder-template .entry-content,
.entry-content, .page-content {
  color: var(--sm-white);
}

a { color: var(--sm-white); }
a:hover { color: var(--sm-red); }

.ast-pagination .nav-links a,
.ast-pagination .nav-links span {
  color: var(--sm-white);
  border-color: var(--sm-border);
  background: var(--sm-card-bg);
}

/* Hide Astra's default header widget areas we don't need */
.ast-hb-hamburger-icon,
.ast-mobile-header-wrap { color: var(--sm-white); }

/* Post/Article styles */
.entry-title { color: var(--sm-white) !important; }
.entry-meta { color: var(--sm-gray) !important; }
.entry-content p { color: var(--sm-light-gray); line-height: 1.9; font-size: 1.05rem; }
.entry-content h2, .entry-content h3 { color: var(--sm-white); }

/* ===========================
   HERO TEXT CONTRAST FIX
   =========================== */
.sm-hero h2 {
  color: #e8e8e8 !important;
  text-shadow: 0 2px 12px rgba(0,0,0,0.9) !important;
  font-weight: 700 !important;
}
.sm-hero p {
  color: #b5b5b5 !important;
  text-shadow: 0 1px 6px rgba(0,0,0,0.7) !important;
}
.sm-hero-eyebrow {
  letter-spacing: 1.5px !important;
}
.sm-hero h1 {
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
