* { box-sizing: border-box; }

:root {
  --about-primary: #1e40af;       
  --about-accent: #3b82f6;        
  --about-bg-light: #eff6ff;      
  
  --text: #0f172a;               
  --muted: #64748b;
  --nav-height: 60px;
  --close-red: #b91c1c;
}

body { 
  margin: 0; 
  font-family: Arial, sans-serif; 
  background: #f8fafc; 
  color: var(--text);
  overflow-x: hidden; 
}

.navbar {
  height: var(--nav-height); 
  background: #fff;
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  padding: 0 15px; 
  border-bottom: 1px solid #e2e8f0;
  position: fixed; top: 0; left: 0; right: 0; 
  z-index: 2000;
}

.logo-link { display: flex; align-items: center; text-decoration: none; }
.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(--about-primary); }
.menu-btn.close-mode .material-symbols-outlined { color: var(--close-red); }

.side-menu {
  position: fixed; top: 65px; right: 15px; 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;
}
.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;
}
.menu-link:hover { background: var(--about-bg-light); color: var(--about-primary); }
.menu-link .material-symbols-outlined { font-size: 20px; color: var(--about-primary); }

.lang-menu {
  display: none; position: absolute; top: 0; right: 105%; width: 150px; max-height: 280px; 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;
}
.lang-menu.active { display: block; }

.lang-item { 
  display: flex; 
  align-items: center; 
  gap: 6px; 
  padding: 6px 12px; 
  cursor: pointer; 
  font-size: 13px; 
  color: var(--text); 
  font-weight: 500; 
  text-decoration: none !important; 
}
.lang-item:hover { background: #f1f5f9; color: var(--about-primary); text-decoration: none !important; }
.lang-item.selected { background: var(--about-bg-light); color: var(--about-primary); text-decoration: none !important; }

.lang-item .check-icon { font-size: 16px; color: var(--about-primary); 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; }

.about-container {
  max-width: 850px;
  width: 95%; 
  margin: 90px auto 40px; 
  padding: 0; 
}
.about-card {
  background: #fff; 
  padding: clamp(20px, 5vw, 40px); 
  border-radius: 12px; 
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}
.about-card h1 {
  font-size: clamp(24px, 6vw, 34px);
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--about-primary); 
}
.last-update {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 25px;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 15px;
  font-weight: 500;
}
.about-text h2 {
  font-size: 18px;
  color: var(--about-primary);
  margin-top: 25px;
  margin-bottom: 12px;
  font-weight: 700;
}

.about-text p {
  font-size: 16px;
  line-height: 1.7;
  color: #334155;
  margin-bottom: 20px;
  margin-top: 0;
  white-space: normal;
  text-align: justify;
  word-break: normal !important;
  line-break: normal !important;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
  overflow-wrap: break-word; 
}

.about-text ul {
  margin: 0 0 20px 0;
  padding-left: 20px;
}
.about-text ul li {
  font-size: 16px;
  line-height: 1.7;
  color: #334155;
  margin-bottom: 8px;
}

.about-text .highlight-box {
  background: var(--about-bg-light);
  border-left: 4px solid var(--about-accent);
  padding: 15px;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  text-align: justify;
  word-break: normal !important;
  line-break: normal !important;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
  overflow-wrap: break-word;
}

.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: 850px; margin: 0 auto; width: 100%;
}
.footer-links { display: flex; gap: 0 40px; }
.footer-links .f-col { display: flex; flex-direction: column; gap: 12px; }
.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(--about-primary); }

.footer-links a.active-footer-link {
  color: var(--about-primary);
  border-bottom: 2px solid var(--about-accent);
  padding-bottom: 2px;
}

.footer-text { font-size: 13px; color: #94a3b8; text-align: right; line-height: 1.5; }

@media (max-width: 768px) {
  .footer { padding-bottom: 50px; }
  .footer .f-flex-container { flex-direction: column; align-items: flex-start; gap: 24px; }
  .footer-links { gap: 0 50px; width: 100%; }
  .footer-text { text-align: left; width: 100%; }
}

html[dir="rtl"]:not(.translated-ltr) body {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"]:not(.translated-ltr) .navbar {
  direction: ltr !important;
  display: block !important; 
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
}

html[dir="rtl"]:not(.translated-ltr) .logo-link {
  position: absolute !important;
  left: 15px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  direction: ltr !important;
  pointer-events: auto !important;
  z-index: 5002 !important;
}

html[dir="rtl"]:not(.translated-ltr) .logo-svg text {
  direction: ltr !important;
  unicode-bidi: isolate;
}

html[dir="rtl"]:not(.translated-ltr) .menu-btn {
  position: absolute !important;
  right: 15px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
  direction: ltr !important;
  pointer-events: auto !important;
  z-index: 5005 !important;
}

html[dir="rtl"]:not(.translated-ltr) .side-menu {
  left: auto !important;
  right: 15px !important;
}

html[dir="rtl"]:not(.translated-ltr) .lang-menu {
  left: auto !important;
  right: 102% !important;
}

html[dir="rtl"]:not(.translated-ltr) .lang-item {
  flex-direction: row-reverse;
  justify-content: space-between;
}

html[dir="rtl"]:not(.translated-ltr) .about-card h1,
html[dir="rtl"]:not(.translated-ltr) .about-text h2 {
  text-align: right;
}

html[dir="rtl"]:not(.translated-ltr) .about-text p {
  text-align: justify;
}

html[dir="rtl"]:not(.translated-ltr) .about-text ul {
  padding-left: 0;
  padding-right: 20px;
}

html[dir="rtl"]:not(.translated-ltr) .about-text .highlight-box {
  border-left: none;
  border-right: 4px solid var(--about-accent);
  border-radius: 8px 0 0 8px;
}

html[dir="rtl"]:not(.translated-ltr) .footer .f-flex-container {
  flex-direction: row-reverse;
}

html[dir="rtl"]:not(.translated-ltr) .footer-links {
  flex-direction: row;
}

html[dir="rtl"]:not(.translated-ltr) .footer-text {
  text-align: left;
}

@media (max-width: 768px) {
  html[dir="rtl"]:not(.translated-ltr) .footer .f-flex-container {
    flex-direction: column;
    align-items: flex-start;
  }
  html[dir="rtl"]:not(.translated-ltr) .footer-text {
    text-align: right;
    width: 100%;
  }
}

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;
}
