/*
Theme Name: Moharek AI Theme
Theme URI: https://mohark.ai/
Author: Moharek Team
Author URI: https://mohark.ai/
Description: Custom Modern GEO & SEO Theme for Moharek AI Platform.
Version: 1.1.0
Text Domain: moharek-ai
*/

:root {
  --p: #0F4246;
  --p-dark: #071f21;
  --p-card: rgba(255, 255, 255, 0.04);
  --p-card-hover: rgba(255, 255, 255, 0.07);
  --accent: #c8f04e;
  --accent-hover: #d7f574;
  --accent2: #5fd4dc;
  --white: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.75);
  --text-dim: rgba(255, 255, 255, 0.45);
  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(200, 240, 78, 0.25);
  --font: 'Cairo', 'Tajawal', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font);
  background-color: var(--p-dark);
  color: var(--white);
  direction: rtl;
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
}

/* Glowing Mesh Background */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 10% 10%, rgba(15, 66, 70, 0.85) 0%, transparent 45%),
    radial-gradient(circle at 90% 85%, rgba(95, 212, 220, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(200, 240, 78, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

/* Header & Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6vw;
  background: rgba(7, 31, 33, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.site-logo {
  display: flex;
  align-items: center;
}

.site-logo a {
  display: flex;
  align-items: center;
}

.site-logo img {
  height: 80px;
  width: auto;
  max-height: 85px;
  object-fit: contain;
  filter: brightness(1.2) contrast(1.1);
  transition: transform 0.3s ease;
}

.site-logo img:hover {
  transform: scale(1.03);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 700;
  position: relative;
  padding: 6px 0;
}

.nav-links a:hover {
  color: var(--accent);
}

.btn-nav-action {
  background: var(--accent);
  color: var(--p-dark) !important;
  font-weight: 900 !important;
  padding: 10px 26px;
  border-radius: 50px;
  box-shadow: 0 4px 18px rgba(200, 240, 78, 0.3);
  font-size: 0.92rem !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.btn-nav-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200, 240, 78, 0.5);
  background: var(--accent-hover);
}

/* Container */
.site-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 5vw;
}

/* Hero Section */
.blog-hero {
  padding: 5rem 0 3.5rem;
  text-align: center;
  position: relative;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(200, 240, 78, 0.08);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}

.badge-tag::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
}

.blog-hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 1.2rem;
}

.blog-hero h1 span {
  color: var(--accent);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-hero p {
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.85;
}

/* Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  margin: 2rem 0 5rem;
}

/* Post Card */
.post-card {
  background: var(--p-card);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.post-card:hover {
  background: var(--p-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(200, 240, 78, 0.08);
}

.post-card-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 66, 70, 0.4);
}

.post-card-body {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-cat {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent2);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.post-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.45;
  margin-bottom: 0.8rem;
}

.post-card-title a:hover {
  color: var(--accent);
}

.post-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex: 1;
}

.post-card-meta {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.post-card-meta .author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-card-meta .read-more {
  color: var(--accent);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.post-card:hover .read-more {
  gap: 8px;
}

/* Single Post View */
.single-post-header {
  padding: 4rem 0 2.5rem;
  text-align: center;
}

.single-post-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 1.5rem;
}

.single-post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.single-post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.single-post-meta span i {
  color: var(--accent);
}

.single-featured-image {
  margin: 2.5rem 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border-accent);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.single-featured-image img {
  width: 100%;
  height: auto;
  max-height: 540px;
  object-fit: cover;
  display: block;
}

.single-post-content {
  background: var(--p-card);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 3.5rem;
  font-size: 1.12rem;
  line-height: 2.1;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 4rem;
}

.single-post-content h2 {
  color: var(--white);
  font-size: 1.8rem;
  font-weight: 800;
  margin: 3rem 0 1.3rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.single-post-content h2::before {
  content: '';
  position: absolute;
  bottom: -1px;
  right: 0;
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.single-post-content h3 {
  color: var(--accent2);
  font-size: 1.4rem;
  font-weight: 800;
  margin: 2.2rem 0 1rem;
}

.single-post-content p {
  margin-bottom: 1.8rem;
}

.single-post-content ul,
.single-post-content ol {
  margin: 1.5rem 2rem 2.2rem 0;
}

.single-post-content li {
  margin-bottom: 0.8rem;
}

.single-post-content blockquote {
  background: rgba(200, 240, 78, 0.05);
  border-right: 4px solid var(--accent);
  padding: 1.8rem 2.2rem;
  border-radius: 0 18px 18px 0;
  margin: 2.5rem 0;
  color: var(--white);
  font-size: 1.15rem;
  line-height: 1.9;
}

.single-post-content code {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.92em;
}

/* ==============================================
   TABLE STYLING (Stripes with #183f41)
============================================== */
.wp-block-table {
  margin: 2.5rem 0;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
}

.wp-block-table th {
  background: rgba(200, 240, 78, 0.15) !important;
  color: var(--accent) !important;
  font-weight: 800;
  padding: 16px 20px !important;
  border-bottom: 2px solid var(--accent) !important;
  font-size: 1rem;
}

.wp-block-table td {
  padding: 16px 20px !important;
  border-bottom: 1px solid var(--border) !important;
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.9);
}

/* Odd rows with #183f41 */
.wp-block-table.is-style-stripes tbody tr:nth-child(odd),
.wp-block-table tbody tr:nth-child(odd) {
  background-color: #183f41 !important;
}

/* Even rows */
.wp-block-table.is-style-stripes tbody tr:nth-child(even),
.wp-block-table tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.02) !important;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 4rem 6vw;
  background: rgba(7, 31, 33, 0.98);
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-dim);
}

.site-footer-logo {
  margin-bottom: 1.5rem;
}

.site-footer-logo img {
  height: 68px;
  width: auto;
  filter: brightness(1.2) contrast(1.1);
}

.site-footer-links {
  display: flex;
  justify-content: center;
  gap: 2.2rem;
  margin: 1.8rem 0;
  flex-wrap: wrap;
}

.site-footer-links a {
  color: var(--text-muted);
  font-weight: 600;
}

.site-footer-links a:hover {
  color: var(--accent);
}

@media(max-width: 768px) {
  .site-header { padding: 0 4vw; height: 80px; }
  .site-logo img { height: 60px; }
  .single-post-content { padding: 1.8rem; font-size: 1rem; }
  .posts-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
