/* ==========================================
   MOUSTACHAREK GHOST THEME - Professional
   Design coherent avec le frontend React
   ========================================== */

:root {
  --primary-dark: #1a365d;
  --primary: #2c5282;
  --primary-light: #3182ce;
  --accent: #d69e2e;
  --text-dark: #1a202c;
  --text: #4a5568;
  --text-light: #64748b;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --border: #e2e8f0;
  --shadow: rgba(0, 0, 0, 0.08);
  --shadow-hover: rgba(0, 0, 0, 0.15);
  --gh-font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --gh-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--bg-white);
}

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

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

/* ==========================================
   HEADER
   ========================================== */
.site-header {
  background: var(--bg-white);
  box-shadow: 0 2px 10px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 1.3rem;
}

.logo-icon {
  color: var(--primary-dark);
}

.logo-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  color: #c53030;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-left: -0.25rem;
}

.nav {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: var(--bg-light);
}

.nav-cta {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white !important;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(26, 54, 93, 0.3);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 54, 93, 0.4);
}

/* ==========================================
   BLOG HERO WITH SEARCH
   ========================================== */
.blog-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 60px 20px 50px;
  text-align: center;
  color: white;
}

.blog-hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.blog-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}

.blog-hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.blog-hero h1 span {
  color: var(--accent);
}

.blog-hero p {
  font-size: 1rem;
  opacity: 0.9;
  line-height: 1.7;
  margin-bottom: 30px;
}

/* Search Button */
.blog-search {
  max-width: 400px;
  margin: 0 auto;
}

.search-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.search-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.search-btn svg {
  flex-shrink: 0;
}

.search-btn span {
  opacity: 0.8;
}

/* ==========================================
   BLOG FILTERS - Improved Tags Display
   ========================================== */
.blog-filters {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 15px 20px;
  position: sticky;
  top: 70px;
  z-index: 50;
}

.filters-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.filter-tags {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 5px 0;
  max-width: calc(100% - 120px);
  scrollbar-width: thin;
  scrollbar-color: var(--primary-light) transparent;
  -webkit-overflow-scrolling: touch;
}

.filter-tags::-webkit-scrollbar {
  height: 4px;
}

.filter-tags::-webkit-scrollbar-track {
  background: transparent;
}

.filter-tags::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 4px;
}

.filter-tag {
  padding: 6px 14px;
  background: var(--bg-light);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid transparent;
}

.filter-tag:hover {
  background: var(--primary-light);
  color: white;
  border-color: var(--primary-light);
}

.filter-tag.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.posts-count {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
}

.tag-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}

.tag-header h2 {
  font-size: 1.8rem;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.tag-header p {
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* ==========================================
   BLOG POSTS GRID
   ========================================== */
.blog-posts {
  padding: 50px 20px;
  background: var(--bg-light);
}

.posts-container {
  max-width: 1200px;
  margin: 0 auto;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

/* ==========================================
   POST CARD - Professional Design
   ========================================== */
.post-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 15px var(--shadow);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--shadow-hover);
}

.post-card-image {
  display: block;
  position: relative;
  height: 180px;
  overflow: hidden;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card:hover .post-card-image img {
  transform: scale(1.05);
}

.post-card-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
}

.post-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-card-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: var(--text-light);
}

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

.post-meta svg {
  color: var(--primary);
}

.post-title {
  font-size: 1.1rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

.post-title a {
  color: var(--text-dark);
  transition: color 0.3s ease;
}

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

.post-excerpt {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 15px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  margin-top: auto;
}

.post-link:hover {
  color: var(--primary-dark);
  gap: 10px;
}

/* ==========================================
   PAGINATION - Professional
   ========================================== */
.pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 50px;
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: white;
  border-radius: 10px;
  color: var(--text);
  box-shadow: 0 2px 8px var(--shadow);
  transition: all 0.3s ease;
}

.pagination-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.pagination-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: white;
  border-radius: 10px;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 2px 8px var(--shadow);
  transition: all 0.3s ease;
}

.pagination-number:hover {
  background: var(--primary-light);
  color: white;
}

.pagination-number.active {
  background: var(--primary);
  color: white;
}

.pagination-info {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ==========================================
   NEWSLETTER SECTION
   ========================================== */
.newsletter-section {
  padding: 60px 20px;
  background: white;
}

.newsletter-container {
  max-width: 550px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-content {
  margin-bottom: 25px;
}

.newsletter-icon {
  color: var(--primary);
  margin-bottom: 15px;
}

.newsletter-content h3 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.newsletter-content p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.newsletter-form .form-group {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid var(--border);
  border-radius: 50px;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.newsletter-form input[type="email"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

.newsletter-btn {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(26, 54, 93, 0.3);
  white-space: nowrap;
}

.newsletter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 54, 93, 0.4);
}

.newsletter-btn .btn-loading {
  display: none;
}

.newsletter-form.loading .btn-text {
  display: none;
}

.newsletter-form.loading .btn-loading {
  display: inline-flex;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.form-message {
  margin-top: 15px;
}

.form-message p {
  display: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.success-message {
  background: #d4edda;
  color: #155724;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
}

.newsletter-form.success .success-message,
.newsletter-form.error .error-message {
  display: block;
}

.newsletter-privacy {
  margin-top: 15px;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ==========================================
   BLOG CTA
   ========================================== */
.blog-cta {
  padding: 70px 20px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.cta-container {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
  color: white;
}

.cta-container h3 {
  font-size: 1.7rem;
  margin-bottom: 12px;
}

.cta-container p {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 25px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: white;
  color: var(--primary-dark);
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   SINGLE POST - Improved Layout
   ========================================== */
.post-full {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.post-header {
  text-align: center;
  padding: 50px 0 30px;
}

.post-tag-header {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.post-full-title {
  font-size: 2.2rem;
  color: var(--text-dark);
  margin-bottom: 20px;
  line-height: 1.3;
}

.post-full-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--text-light);
  font-size: 0.9rem;
}

.post-full-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-full-meta svg {
  color: var(--primary);
}

.post-author img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin-right: 5px;
}

/* Feature Image - Controlled Size */
.post-feature-image {
  margin-bottom: 35px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px var(--shadow);
  max-height: 400px;
}

.post-feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==========================================
   GHOST EDITOR CARD STYLES
   ========================================== */
.kg-width-wide {
  position: relative;
  width: 85vw;
  min-width: 100%;
  margin: 30px calc(50% - 42.5vw);
}

.kg-width-full {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.kg-width-full img {
  width: 100%;
}

.kg-image-card img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.kg-bookmark-card {
  width: 100%;
  background: var(--bg-light);
  border-radius: 12px;
  margin: 25px 0;
}

.kg-bookmark-container {
  display: flex;
  text-decoration: none;
  border-radius: 12px;
  overflow: hidden;
}

.kg-bookmark-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 20px;
}

.kg-bookmark-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
}

.kg-bookmark-description {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 8px;
}

.kg-bookmark-thumbnail {
  position: relative;
  flex-shrink: 0;
  width: 180px;
}

.kg-bookmark-thumbnail img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kg-gallery-container {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  margin: 25px 0;
}

.kg-gallery-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.kg-gallery-image img {
  display: block;
  margin: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================
   POST CONTENT - Clean Typography
   ========================================== */
.post-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}

.post-content h2 {
  font-size: 1.6rem;
  color: var(--text-dark);
  margin: 35px 0 18px;
  padding-top: 15px;
}

.post-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
}

.post-content h3 {
  font-size: 1.3rem;
  color: var(--text-dark);
  margin: 28px 0 12px;
}

.post-content p {
  margin-bottom: 18px;
}

.post-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content a:hover {
  color: var(--primary-dark);
}

.post-content ul,
.post-content ol {
  margin: 18px 0;
  padding-left: 25px;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 18px 25px;
  margin: 25px 0;
  background: var(--bg-light);
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: var(--text-dark);
}

.post-content img {
  border-radius: 10px;
  margin: 25px 0;
  max-height: 450px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.post-content code {
  background: var(--bg-light);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.9em;
}

.post-content pre {
  background: var(--text-dark);
  color: white;
  padding: 18px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 25px 0;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content strong {
  color: var(--text-dark);
  font-weight: 600;
}

/* ==========================================
   SOCIAL SHARE
   ========================================== */
.post-share {
  margin-top: 40px;
  padding: 25px;
  background: var(--bg-light);
  border-radius: 12px;
  text-align: center;
}

.share-label {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 15px;
  font-size: 1rem;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: white;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.share-facebook {
  background: #1877f2;
}

.share-facebook:hover {
  background: #166fe5;
}

.share-twitter {
  background: #000000;
}

.share-twitter:hover {
  background: #333333;
}

.share-linkedin {
  background: #0a66c2;
}

.share-linkedin:hover {
  background: #004182;
}

.share-whatsapp {
  background: #25d366;
}

.share-whatsapp:hover {
  background: #1ebe57;
}

.share-copy {
  background: var(--primary);
}

.share-copy:hover {
  background: var(--primary-dark);
}

.share-copy .icon-check {
  display: none;
}

.share-copy.copied .icon-copy {
  display: none;
}

.share-copy.copied .icon-check {
  display: block;
}

.share-copy.copied {
  background: #38a169;
}

/* ==========================================
   POST FOOTER
   ========================================== */
.post-footer {
  margin-top: 40px;
  padding-top: 25px;
  border-top: 1px solid var(--border);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.post-tags span {
  font-weight: 600;
  color: var(--text-dark);
}

.tag-link {
  background: var(--bg-light);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--primary);
  transition: all 0.3s ease;
}

.tag-link:hover {
  background: var(--primary);
  color: white;
}

/* ==========================================
   POST NAVIGATION
   ========================================== */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 40px;
  padding-top: 25px;
  border-top: 1px solid var(--border);
}

.nav-prev,
.nav-next {
  padding: 18px;
  background: var(--bg-light);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.nav-prev:hover,
.nav-next:hover {
  background: var(--primary);
  color: white;
}

.nav-next {
  text-align: right;
}

.nav-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 5px;
}

.nav-prev:hover .nav-label,
.nav-next:hover .nav-label {
  color: rgba(255, 255, 255, 0.7);
}

.nav-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.nav-prev:hover .nav-title,
.nav-next:hover .nav-title {
  color: white;
}

/* ==========================================
   POST CTA BOX
   ========================================== */
.post-cta {
  margin: 50px 0;
}

.cta-box {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 35px;
  border-radius: 14px;
  text-align: center;
  color: white;
}

.cta-box h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.cta-box p {
  opacity: 0.9;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
  background: var(--text-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 45px 20px 25px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand {
  text-align: center;
  margin-bottom: 25px;
}

.footer-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-brand p {
  max-width: 350px;
  margin: 0 auto;
  font-size: 0.9rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  font-size: 0.85rem;
}

.back-to-site {
  color: var(--accent);
  font-weight: 500;
  transition: color 0.3s ease;
}

.back-to-site:hover {
  color: white;
}

/* ==========================================
   PAGE (Static Pages)
   ========================================== */
.page-full {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-header {
  text-align: center;
  padding: 50px 0 30px;
}

.page-title {
  font-size: 2.2rem;
  color: var(--text-dark);
  margin-bottom: 20px;
  line-height: 1.3;
}

.page-feature-image {
  margin-bottom: 35px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px var(--shadow);
  max-height: 350px;
}

.page-feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}

.page-content h2 {
  font-size: 1.6rem;
  color: var(--text-dark);
  margin: 35px 0 18px;
}

.page-content h3 {
  font-size: 1.3rem;
  color: var(--text-dark);
  margin: 28px 0 12px;
}

.page-content p {
  margin-bottom: 18px;
}

.page-content a {
  color: var(--primary);
  text-decoration: underline;
}

.page-content ul,
.page-content ol {
  margin: 18px 0;
  padding-left: 25px;
}

.page-content li {
  margin-bottom: 8px;
}

/* ==========================================
   LANGUAGE SWITCHER
   ========================================== */
.language-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 25px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
  font-family: inherit;
}

.language-switcher:hover {
  border-color: var(--primary);
  background: white;
}

.lang-option {
  color: var(--text-light);
  transition: color 0.3s ease;
}

.lang-option.active {
  color: var(--primary);
}

.lang-separator {
  color: var(--border);
}

/* ==========================================
   RTL GLOBAL SUPPORT
   ========================================== */
html[dir="rtl"] {
  font-family: 'Noto Sans Arabic', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html[dir="rtl"] body {
  font-family: 'Noto Sans Arabic', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* RTL Header */
html[dir="rtl"] .header-container {
  flex-direction: row-reverse;
}

html[dir="rtl"] .nav {
  flex-direction: row-reverse;
}

html[dir="rtl"] .logo {
  flex-direction: row-reverse;
}

/* RTL Blog Hero */
html[dir="rtl"] .blog-hero-content {
  text-align: right;
}

html[dir="rtl"] .blog-hero h1 {
  direction: rtl;
}

/* RTL Filters */
html[dir="rtl"] .filters-container {
  flex-direction: row-reverse;
}

html[dir="rtl"] .filter-tags {
  flex-direction: row-reverse;
}

/* RTL Post Cards */
html[dir="rtl"] .post-card-content {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .post-meta {
  flex-direction: row-reverse;
}

html[dir="rtl"] .post-link {
  flex-direction: row-reverse;
}

html[dir="rtl"] .post-link svg {
  transform: rotate(180deg);
}

html[dir="rtl"] .post-tag {
  left: auto;
  right: 12px;
}

/* RTL Newsletter */
html[dir="rtl"] .newsletter-content {
  text-align: right;
}

html[dir="rtl"] .newsletter-form .form-group {
  flex-direction: row-reverse;
}

/* RTL CTA */
html[dir="rtl"] .cta-container {
  text-align: right;
}

html[dir="rtl"] .blog-cta .cta-container {
  text-align: center;
}

/* RTL Footer */
html[dir="rtl"] .footer-bottom {
  flex-direction: row-reverse;
}

html[dir="rtl"] .footer-brand {
  text-align: right;
}

/* RTL Pagination */
html[dir="rtl"] .pagination-numbers {
  flex-direction: row-reverse;
}

html[dir="rtl"] .pagination-prev svg {
  transform: rotate(180deg);
}

html[dir="rtl"] .pagination-next svg {
  transform: rotate(180deg);
}

/* RTL Post Navigation */
html[dir="rtl"] .post-navigation {
  direction: rtl;
}

html[dir="rtl"] .nav-prev {
  text-align: right;
}

html[dir="rtl"] .nav-next {
  text-align: left;
}

/* ==========================================
   RTL SUPPORT FOR ARABIC ARTICLES
   ========================================== */
.post-full[data-rtl="true"],
.post-full.rtl-content {
  direction: rtl;
  text-align: right;
}

.post-full[data-rtl="true"] .post-header,
.post-full.rtl-content .post-header {
  text-align: center;
}

.post-full[data-rtl="true"] .post-content,
.post-full.rtl-content .post-content {
  direction: rtl;
  text-align: right;
}

.post-full[data-rtl="true"] .post-content ul,
.post-full[data-rtl="true"] .post-content ol,
.post-full.rtl-content .post-content ul,
.post-full.rtl-content .post-content ol {
  padding-right: 25px;
  padding-left: 0;
}

.post-full[data-rtl="true"] .post-content blockquote,
.post-full.rtl-content .post-content blockquote {
  border-left: none;
  border-right: 4px solid var(--primary);
  border-radius: 10px 0 0 10px;
}

.post-full[data-rtl="true"] .post-tags,
.post-full.rtl-content .post-tags {
  justify-content: flex-end;
}

.post-full[data-rtl="true"] .post-full-meta,
.post-full.rtl-content .post-full-meta {
  direction: ltr;
}

.post-full[data-rtl="true"] .share-buttons,
.post-full.rtl-content .share-buttons {
  direction: ltr;
}

/* Arabic card styling */
.post-card.rtl-card .post-card-content {
  direction: rtl;
  text-align: right;
}

.post-card.rtl-card .post-link {
  flex-direction: row-reverse;
}

.post-card.rtl-card .post-link svg {
  transform: rotate(180deg);
}

/* Arabic tag badge */
.filter-tag.tag-arabic {
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  font-weight: 600;
}

.filter-tag.tag-arabic:hover {
  background: linear-gradient(135deg, #047857, #059669);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 15px;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .blog-hero {
    padding: 45px 20px 40px;
  }

  .blog-hero h1 {
    font-size: 1.7rem;
  }

  .blog-filters {
    position: relative;
    top: 0;
  }

  .filters-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-tags {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
  }

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

  .post-card-image {
    height: 200px;
  }

  .post-full-title {
    font-size: 1.7rem;
  }

  .post-full-meta {
    flex-direction: column;
    gap: 12px;
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .newsletter-form .form-group {
    flex-direction: column;
  }

  .newsletter-btn {
    width: 100%;
  }

  .pagination-numbers {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .blog-hero h1 {
    font-size: 1.5rem;
  }

  .post-card-content {
    padding: 16px;
  }

  .post-title {
    font-size: 1rem;
  }

  .post-full-title {
    font-size: 1.5rem;
  }

  .cta-box {
    padding: 25px 20px;
  }
}
