:root {
  --accent: #f59e0b;           
  --text: #0f172a;             
  --muted: #64748b;
  --menu-icon-color: #f59e0b;  
  --nav-height: 60px;
  --close-red: #b91c1c;        
}

a {
  color: inherit;
  text-decoration: none;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  background: #f5f7fb;
  color: var(--text);
  line-height: 1.6;
}

.navbar {
  height: var(--nav-height);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border-bottom: 1px solid #ddd;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 2000;
  direction: ltr !important; 
}

.nav-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 30px;
  font-weight: 900;
  color: var(--accent); 
  letter-spacing: 2px;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.05);
}

.logo-link {
  display: block;
  z-index: 1001;
}

.logo-svg {
  height: 75px;
  width: auto;
  display: block;
  transform: translateY(6px);
}

.menu-btn {
  margin-left: auto;
  cursor: pointer;
  z-index: 5000;
  display: flex;
  align-items: center;
}

.menu-btn .material-symbols-outlined {
  font-size: 30px;
  color: var(--accent); 
}

.menu-btn.close-mode .material-symbols-outlined {
  color: var(--close-red);
}

.side-menu {
  position: fixed;
  top: 65px;
  right: 15px !important; 
  left: auto !important;  
  width: 180px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  border-radius: 8px;
  padding: 8px;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: 0.25s;
  z-index: 2001;
  direction: ltr;
}

html[dir="rtl"]:not(.translated-ltr) .side-menu {
  direction: rtl; 
}

.side-menu.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  border-radius: 6px;
  transition: 0.2s;
  cursor: pointer;
}

html[dir="rtl"]:not(.translated-ltr) .menu-link {
  flex-direction: row; 
  justify-content: flex-start;
}

.menu-link:hover {
  background: #fef3c7; 
  color: #92400e;      
}

.menu-link .material-symbols-outlined {
  font-size: 20px;
  color: var(--accent); 
}

.lang-menu {
  display: none;
  position: absolute;
  top: 0;
  right: 105%;
  width: 150px;
  max-height: 350px;
  overflow-y: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
  border: 1px solid #e2e8f0;
  z-index: 2002;
  direction: ltr;
}

html[dir="rtl"]:not(.translated-ltr) .lang-menu {
  right: 105% !important;
  left: auto !important;
  direction: rtl;
}

.lang-menu.active {
  display: block;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  transition: 0.2s;
  text-decoration: none; 
}

html[dir="rtl"]:not(.translated-ltr) .lang-item {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.lang-item:hover {
  background: #f1f5f9;
  color: var(--accent);
}

.lang-item.selected {
  background: #fef3c7; 
  color: #92400e;      
  border-bottom: none !important;
  text-decoration: none !important;
}

.lang-item .check-icon {
  font-size: 18px !important;
  color: var(--accent);
  visibility: hidden;
}

.lang-item.selected .check-icon {
  visibility: visible;
}

.lang-box {
  position: relative;
}

.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.1);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 1000;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

.container { 
  max-width: 1000px; 
  margin: 90px auto 0; 
  padding: 20px; 
}

.search-box { 
  display: flex; 
  gap: 10px; 
  margin-bottom: 20px; 
}

html[dir="rtl"]:not(.translated-ltr) .search-box {
  flex-direction: row-reverse; 
}

.search-box input { 
  flex: 1; 
  padding: 12px; 
  border-radius: 8px; 
  border: 1px solid #ddd; 
  font-family: inherit;
}

html[dir="rtl"]:not(.translated-ltr) .search-box input {
  text-align: right;
  direction: rtl;
}

.search-box button { 
  padding: 12px 18px; 
  border: none; 
  background: var(--accent); 
  border-radius: 8px; 
  cursor: pointer; 
  font-weight: 600; 
  color: #fff; 
}

.blog-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
  gap: 20px; 
}

.blog-card { 
  background: #fff; 
  border: 1px solid #e2e8f0; 
  display: flex; 
  flex-direction: column; 
  text-decoration: none;
  transition: 0.3s; 
  border-radius: 8px;
  overflow: hidden;
}

.blog-card:hover { 
  transform: translateY(-4px); 
  box-shadow: 0 10px 20px rgba(0,0,0,0.06); 
}

.blog-card img { 
  width: 100%; 
  height: 200px; 
  object-fit: cover; 
}

.blog-content { 
  padding: 14px; 
  display: flex; 
  flex-direction: column; 
  gap: 8px; 
  flex-grow: 1; 
}

.blog-title { 
  font-size: 15px; 
  font-weight: 600; 
  color: var(--text); 
  word-break: normal !important;
  line-break: normal !important;
  overflow-wrap: break-word;
}

html[dir="rtl"]:not(.translated-ltr) .blog-title {
  text-align: right;
  direction: rtl !important;
  unicode-bidi: plaintext;
}

.blog-desc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
  word-break: normal !important;
  line-break: normal !important;
  overflow-wrap: break-word;
}

html[dir="rtl"]:not(.translated-ltr) .blog-desc {
  text-align: right;
  direction: rtl !important;
  unicode-bidi: plaintext;
}

.read-btn { 
  margin-top: auto; 
  text-decoration: none; 
  color: var(--accent); 
  font-weight: 600; 
  font-size: 13px; 
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  direction: ltr !important; 
}

html[dir="rtl"]:not(.translated-ltr) .read-btn {
  direction: rtl !important; 
  margin-right: 0;
  margin-left: auto;
}

html[dir="rtl"]:not(.translated-ltr) .read-btn .read-arrow {
  display: inline-block;
  transform: scaleX(-1); 
}

.load-more { 
  text-align: center; 
  margin-top: 25px; 
}

.load-more button { 
  padding: 12px 30px; 
  border: none; 
  background: var(--accent); 
  border-radius: 8px; 
  cursor: pointer; 
  font-weight: 600; 
  color: #fff; 
  direction: ltr !important;
}

html[dir="rtl"]:not(.translated-ltr) .load-more button {
  direction: rtl !important;
}

@media (max-width: 400px) {
  .lang-menu {
    right: 0;
    top: 100%;
    margin-top: 5px;
  }
  html[dir="rtl"]:not(.translated-ltr) .lang-menu {
    right: 0 !important;
    left: auto !important;
  }
}

.footer { 
  margin-top: 60px; 
  padding: 40px 20px; 
  background: #fff; 
  border-top: 1px solid #e2e8f0; 
}

.footer .f-flex-container {
  display: flex;
  justify-content: space-between; 
  align-items: flex-start;
  max-width: 1000px; 
  margin: 0 auto;
  width: 100%;
}

html[dir="rtl"]:not(.translated-ltr) .footer .f-flex-container {
  flex-direction: row-reverse;
}

.footer-links { 
  display: flex; 
  gap: 0 40px; 
}

html[dir="rtl"]:not(.translated-ltr) .footer-links {
  flex-direction: row-reverse;
}

.footer-links .f-col {
  display: flex;
  flex-direction: column;
  gap: 12px; 
}

html[dir="rtl"]:not(.translated-ltr) .footer-links .f-col {
  align-items: flex-end;
}

.footer-links a { 
  text-decoration: none; 
  color: var(--text);      
  font-weight: 600; 
  font-size: 14px;         
  white-space: nowrap;     
  display: inline-block;
  width: fit-content;      
  transition: color 0.2s;
}

.footer-links a:hover { 
  color: var(--accent);    
}

.footer-text { 
  font-size: 13px; 
  color: #94a3b8; 
  text-align: right;       
  line-height: 1.5;
  direction: ltr;
}

html[dir="rtl"]:not(.translated-ltr) .footer-text {
  text-align: left;
  direction: rtl;
}

@media (max-width: 768px) {
  .footer {
    padding-bottom: 50px;  
  }
  .footer .f-flex-container {
    flex-direction: column; 
    align-items: flex-start;
    gap: 24px;              
  }
  html[dir="rtl"]:not(.translated-ltr) .footer .f-flex-container {
    flex-direction: column;
    align-items: flex-end;
  }
  .footer-links {
    gap: 0 50px;           
    width: 100%;
  }
  html[dir="rtl"]:not(.translated-ltr) .footer-links {
    justify-content: flex-end;
  }
  .footer-text { 
    text-align: left;       
    width: 100%;
  }
  html[dir="rtl"]:not(.translated-ltr) .footer-text {
    text-align: right;
  }
}

html.translated-ltr, 
html.translated-ltr body {
  direction: ltr !important;
  text-align: left !important;
}

html.translated-rtl, 
html.translated-rtl body {
  direction: rtl !important;
  text-align: right !important;
}
