/* Import base contact-us styles */
@import url('../contact-us/contact-us.css');

/* Blog-specific styles */
.blog-section {
  padding: 4rem 2rem;
  position: relative;
}

.blog-section .container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3rem;
  align-items: start;
}

/* Sidebar Styles */
.blog-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid var(--card-border);
  padding: 2rem;
  transition: all 0.3s ease;
}

.sidebar-card:hover {
  border-color: rgba(var(--particle-color), 0.3);
  box-shadow: 0 8px 32px var(--shadow-color);
}

.sidebar-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--fire-red);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Bricolage Grotesque', sans-serif;
}

.sidebar-title i {
  font-size: 1rem;
}

/* Search Box */
.search-box {
  display: flex;
  gap: 0.5rem;
}

.search-input {
  flex: 1;
  padding: 0.875rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--fire-red);
  box-shadow: 0 0 0 3px rgba(var(--particle-color), 0.1);
}

.search-btn {
  padding: 0.875rem 1.25rem;
  background: var(--gradient-fire);
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-red);
}

/* Category List */
.category-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-muted);
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.category-item:hover,
.category-item.active {
  background: rgba(var(--particle-color), 0.08);
  border-color: var(--fire-red);
  color: var(--fire-red);
}

.category-item .count {
  background: var(--card-bg);
  padding: 0.25rem 0.625rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.category-item.active .count {
  background: var(--fire-red);
  color: white;
}

/* Popular Posts */
.popular-posts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.popular-post {
  display: flex;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.popular-post:hover {
  border-color: var(--fire-red);
  transform: translateX(4px);
}

.popular-post-img {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.popular-post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popular-post-content h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.popular-post-date {
  font-size: 0.75rem;
  color: var(--text-dimmed);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Newsletter Card */
.newsletter-card {
  background: var(--gradient-fire);
  text-align: center;
  color: white;
}

.newsletter-card .sidebar-title {
  color: white;
  justify-content: center;
}

.newsletter-card p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
}

.newsletter-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.newsletter-input {
  padding: 0.875rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 0.875rem;
  backdrop-filter: blur(10px);
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.newsletter-input:focus {
  outline: none;
  border-color: white;
  background: rgba(255, 255, 255, 0.15);
}

.newsletter-btn {
  padding: 0.875rem 1.5rem;
  background: white;
  color: var(--fire-red);
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
}

.newsletter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Main Content */
.blog-main {
  min-height: 100vh;
}

.blog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.blog-main-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  font-family: 'Bricolage Grotesque', sans-serif;
  background: var(--gradient-fire);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-filter {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.625rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 100px;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-btn:hover {
  border-color: var(--fire-red);
  color: var(--fire-red);
}

.filter-btn.active {
  background: var(--gradient-fire);
  border-color: var(--fire-red);
  color: white;
  box-shadow: var(--glow-red);
}

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.article-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid var(--card-border);
  overflow: hidden;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-8px);
  border-color: rgba(var(--particle-color), 0.3);
  box-shadow: var(--glow-red), 0 16px 40px var(--shadow-color);
}

.article-image {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .article-image img {
  transform: scale(1.1);
}

.article-category {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  background: var(--gradient-fire);
  color: white;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(var(--particle-color), 0.4);
}

.article-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-meta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  color: var(--text-dimmed);
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.article-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.4;
  color: var(--text-primary);
  font-family: 'Bricolage Grotesque', sans-serif;
}

.article-excerpt {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
  font-size: 0.9375rem;
}

.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--card-border);
}

.article-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.article-author img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--card-border);
}

.article-author span {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.article-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--fire-red);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 700;
  transition: all 0.3s ease;
}

.article-link:hover {
  gap: 0.75rem;
}

.article-link i {
  transition: transform 0.3s ease;
}

.article-link:hover i {
  transform: translateX(4px);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.pagination-btn {
  padding: 0.875rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--gradient-fire);
  border-color: var(--fire-red);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--glow-red);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-numbers {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.page-number {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-number:hover {
  border-color: var(--fire-red);
  color: var(--fire-red);
}

.page-number.active {
  background: var(--gradient-fire);
  border-color: var(--fire-red);
  color: white;
  box-shadow: 0 4px 12px rgba(var(--particle-color), 0.3);
}

.pagination-dots {
  color: var(--text-dimmed);
  font-weight: 700;
}

/* Responsive */
@media (max-width: 1024px) {
  .blog-section .container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .blog-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }

  .blog-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .pagination {
    flex-direction: column;
  }

  .pagination-numbers {
    order: -1;
  }
}

@media (max-width: 480px) {
  .article-content {
    padding: 1.5rem;
  }

  .sidebar-card {
    padding: 1.5rem;
  }

  .filter-btn {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
  }
}


/* Lang switcher (blog nav) */
.lang-switch{display:inline-flex;align-items:center;gap:.25rem;margin-inline-start:.5rem;padding:.2rem;border:1px solid rgba(255,255,255,.14);border-radius:999px;background:rgba(255,255,255,.04);vertical-align:middle}
.lang-switch a{color:#d7dde8;text-decoration:none;font-size:.72rem;font-weight:700;letter-spacing:.04em;padding:.28rem .55rem;border-radius:999px;line-height:1}
.lang-switch a:hover{color:#fff}
.lang-switch a[aria-current="true"]{color:#111827;background:linear-gradient(135deg,#ffb703,#fb8500)}
html[data-theme="light"] .lang-switch{border-color:rgba(17,24,39,.14);background:rgba(17,24,39,.03)}
html[data-theme="light"] .lang-switch a{color:#374151}
html[data-theme="light"] .lang-switch a[aria-current="true"]{color:#111827}

/* Arabic / RTL */
html[lang="ar"] body{font-family:"Noto Sans Arabic","Inter",system-ui,sans-serif}
html[dir="rtl"] .blog-section .container{direction:rtl}
html[dir="rtl"] .article-link i,html[dir="rtl"] .sidebar-shop i{transform:scaleX(-1)}
html[dir="rtl"] .search-box{flex-direction:row-reverse}
html[dir="rtl"] .article-meta,html[dir="rtl"] .article-footer{direction:rtl}
html[dir="rtl"] .pagination-btn i.fa-chevron-left,html[dir="rtl"] .pagination-btn i.fa-chevron-right{transform:scaleX(-1)}

/* Mecaprograms-style rich footer */
.footer-brand p{margin:.5rem 0 1rem;font-size:.9rem;line-height:1.6}
.footer-contact-list li a{display:inline-flex;align-items:center;gap:.5rem}
.footer-social{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:.25rem}
.footer-social a{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);color:var(--mercury,#d1d5db);text-decoration:none;transition:all .25s ease}
.footer-social a:hover{color:#fff;background:var(--fire-red,#ff2a2a);border-color:var(--fire-red,#ff2a2a);transform:translateY(-2px)}
.footer-payments{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.75rem;list-style:none;margin:1rem 0 0;padding:0}
.footer-payments img{height:22px;width:auto;max-width:64px;object-fit:contain;filter:brightness(1.05);opacity:.92}
.footer.footer--meca{background-color:#070a12;background-size:cover;background-position:center}
@media (min-width:1024px){.footer.footer--meca{background-position:right top}}
html[dir="rtl"] .footer-contact-list li a{flex-direction:row-reverse}
/* Imported social SVG icons from mecaprograms.com */
.footer-social a img{width:26px;height:26px;display:block;opacity:.95;transition:opacity .25s ease}
.footer-social a:hover img{opacity:1}
