/* The_89_Blog - Modern Premium Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&family=Amiri+Quran&family=Amiri&display=swap');

:root {
  --bg-dark: #fcfdfe;
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-sidebar: rgba(248, 250, 252, 0.9);
  --accent: #059669;
  --accent-hover: #10b981;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: rgba(226, 232, 240, 0.6);
  --glass-border: rgba(16, 185, 129, 0.15);
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --gradient: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(circle at 0% 0%, rgba(16, 185, 129, 0.04) 0, transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(59, 130, 246, 0.04) 0, transparent 40%);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
.site-title {
  font-family: 'Outfit', sans-serif;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header */
.site-header {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1.25rem 0;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: -0.02em;
}

.site-title span {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

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

/* Layout Grid */
.layout-wrapper {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  padding: 3rem 0;
}

/* Main Content */
.site-main {
  min-width: 0;
  /* Prevents overflow in grid */
}

/* Hero Section */
.hero {
  margin-bottom: 3rem;
  padding: 4rem 2rem;
  background: #fff;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.03) 0, transparent 70%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.calligraphy-text {
  font-family: 'Amiri', serif !important;
  font-size: 5rem !important;
  font-weight: 400 !important;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem !important;
  line-height: 1.6 !important;
  padding-top: 1.5rem !important;
  text-shadow: 0 10px 25px rgba(16, 185, 129, 0.1);
  display: block;
}

.tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* Post Cards */
.post-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
  box-shadow: var(--shadow);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
  border-color: rgba(56, 189, 248, 0.3);
}

.post-card h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.post-card h2 a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

.post-excerpt {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  gap: 0.5rem;
  transition: gap 0.2s ease;
}

.read-more:hover {
  gap: 0.75rem;
  color: var(--accent-hover);
}

/* Sidebar */
.site-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-widget {
  background: var(--bg-sidebar);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.widget-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.widget-posts-list {
  list-style: none;
}

.widget-post-item {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.widget-post-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.widget-post-link {
  display: block;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  transition: color 0.2s ease;
}

.widget-post-link:hover {
  color: var(--accent);
}

.widget-post-date {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Single Post */
.single-post {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 3rem;
}

.post-header {
  margin-bottom: 3rem;
}

.post-header h1 {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.markdown-body {
  color: #334155;
  font-size: 1.125rem;
  line-height: 1.8;
}

.markdown-body h2 {
  font-size: 2rem;
  margin: 3rem 0 1.5rem;
  color: var(--text-main);
}

.markdown-body h3 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--text-main);
}

.markdown-body p {
  margin-bottom: 1.5rem;
}

.markdown-body blockquote {
  border-left: 4px solid var(--accent);
  background: rgba(56, 189, 248, 0.1);
  padding: 1.5rem 2rem;
  margin: 2.5rem 0;
  border-radius: 0 16px 16px 0;
  font-style: italic;
}

.markdown-body pre {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  margin: 2rem 0;
  overflow-x: auto;
}

.markdown-body img {
  border-radius: 16px;
  max-width: 100%;
}

/* Action Items */
.action-item {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1) 0%, rgba(129, 140, 248, 0.1) 100%);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 20px;
  padding: 2rem;
  margin: 3rem 0;
}

.action-item h3 {
  color: var(--accent);
  margin-top: 0 !important;
}

/* Arabic Verse */
.arabic-verse {
  font-family: 'Amiri', serif;
  font-size: 2.5rem;
  text-align: center;
  direction: rtl;
  padding: 3rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  margin: 2.5rem 0;
  color: #0f172a;
  line-height: 1.8;
  box-shadow: var(--shadow);
}

.arabic-translation {
  font-style: italic;
  color: var(--text-muted);
  text-align: center;
  margin-top: -1.5rem;
  margin-bottom: 3rem;
  padding: 0 2rem;
  font-size: 1rem;
  line-height: 1.6;
}

.verse-section {
  margin: 3rem 0;
  text-align: center;
}

.verse-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: -1rem;
}

/* Footer */
.site-footer {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .layout-wrapper {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .site-sidebar {
    position: static;
    margin-top: 3rem;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .post-header h1 {
    font-size: 2.25rem;
  }

  .single-post {
    padding: 1.5rem;
  }

  .container {
    padding: 0 1rem;
  }
}