/* Design fixes layered on the Mentor theme (main.css). Loaded after it. */

:root {
  --default-font: "Cairo", "Open Sans", system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  --heading-font: "Cairo", "Raleway", system-ui, sans-serif;
  --nav-font: "Cairo", "Poppins", system-ui, sans-serif;
  --accent-color: #2e9e5b;          /* slightly deeper green: readable text/links on white */
  --nav-hover-color: #2e9e5b;
  --nav-dropdown-hover-color: #2e9e5b;
  --card-radius: 14px;
  --card-shadow: 0 6px 24px rgba(20, 40, 30, .08);
}
body { font-family: var(--default-font); line-height: 1.75; }
.is-ltr { --default-font: "Poppins", "Cairo", system-ui, sans-serif; --heading-font: "Poppins", "Cairo", sans-serif; }
img { max-width: 100%; }
.main { min-height: 60vh; }

/* ---------- Header ---------- */
.header { padding: 10px 0; background: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .06); }
.header .logo { gap: .6rem; line-height: 1.2; flex-shrink: 0; }
.header .logo img { margin: 0; max-height: 44px; width: auto; border-radius: 6px; }
.header .logo .sitename {
  font-size: 1.25rem; font-weight: 700; color: var(--accent-color);
  text-transform: none; letter-spacing: 0; white-space: nowrap;
}
.header .btn-getstarted { margin: 0; padding: 8px 22px; font-weight: 600; white-space: nowrap; }
.header .navmenu { margin-inline-start: auto; }
.header .navmenu a { font-family: var(--nav-font); font-weight: 600; font-size: .95rem; }
.header .navmenu .active, .header .navmenu a:hover { color: var(--nav-hover-color); }

.lang-switch { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: #f1f4f2; flex-shrink: 0; }
.lang-switch a {
  padding: 3px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600;
  color: #44514a; line-height: 1.6;
}
.lang-switch a.active { background: var(--accent-color); color: #fff; }
.lang-switch a:not(.active):hover { background: #e2e9e5; color: #1f2a24; }

@media (max-width: 1199.98px) {
  .header .container-xl { flex-wrap: nowrap; }
  .header .logo .sitename { font-size: 1.05rem; white-space: normal; }
  .header .navmenu { order: 3; margin-inline-start: 0; }
  .header .navmenu .mobile-nav-toggle { color: var(--nav-color); font-size: 32px; margin: 0 4px; }
  .lang-switch { margin-inline-start: auto; }
  /* keep the menu toggle in the header row instead of floating over the language switch */
  .mobile-nav-active .mobile-nav-toggle { position: static; top: auto; right: auto; left: auto; margin: 0 4px; z-index: 9999; }
  .header .navmenu { display: flex; align-items: center; }
}
@media (max-width: 575.98px) {
  .header .container-xl { gap: .5rem !important; padding-inline: 12px; }
  .header .logo img { max-height: 36px; }
  .header .logo .sitename { font-size: .9rem; line-height: 1.3; }
  .lang-switch a { padding: 2px 9px; font-size: .78rem; }
}

/* RTL dropdown/menu fixes */
html[dir="rtl"] .navmenu .dropdown ul { left: auto; right: 0; }
@media (min-width: 1200px) {
  html[dir="rtl"] .navmenu .dropdown ul { right: 14px; }
}

/* ---------- Hero ---------- */
.hero { min-height: 520px; padding: 0; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.hero:before { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, rgba(0, 0, 0, .45), rgba(0, 0, 0, .6)); }
.hero .container { position: relative; z-index: 3; padding-block: 90px; }
.hero h2 { color: #fff; font-size: clamp(1.8rem, 4.5vw, 3.2rem); font-weight: 700; line-height: 1.35; }
.hero p { color: rgba(255, 255, 255, .92); font-size: clamp(1rem, 2vw, 1.25rem); max-width: 760px; margin-inline: auto; }
.hero .btn-get-started { padding: 11px 34px; border-radius: 999px; font-weight: 700; }

/* ---------- Slideshow (home) ---------- */
.slideshow .carousel-indicators [data-bs-target] { width: 10px; height: 10px; border-radius: 50%; }

/* ---------- Sections ---------- */
.section { padding-block: 64px; }
.section-title { text-align: center; padding-bottom: 36px; }
.section-title h2 { font-size: 2rem; font-weight: 700; margin-bottom: .25rem; }
.section-title h2:before, .section-title h2:after { content: none; }
.section-title p { color: #6b776f; margin: 0; }
.about .about-img { border-radius: var(--card-radius); box-shadow: var(--card-shadow); width: 100%; max-height: 460px; object-fit: cover; }
.about .content ul li { align-items: flex-start; }
.stats-item span { font-family: var(--heading-font); }

/* ---------- Cards: equal height, uniform images, clamped text ---------- */
.course-item, .news-item, .member {
  display: flex; flex-direction: column; width: 100%; overflow: hidden;
  background: #fff; border-radius: var(--card-radius); box-shadow: var(--card-shadow);
  transition: transform .25s ease, box-shadow .25s ease; border: 0; padding: 0;
}
.course-item:hover, .news-item:hover, .member:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(20, 40, 30, .14); }
.card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #eef2ef; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.course-item:hover .card-media img, .news-item:hover .card-media img, .member:hover .card-media img { transform: scale(1.04); }
.course-content, .news-content, .member-content {
  display: flex; flex-direction: column; gap: .4rem; flex: 1; padding: 18px 20px 22px; text-align: start; position: static;
}
.course-content h3, .news-content h3, .member-content h4 {
  font-size: 1.15rem; font-weight: 700; line-height: 1.5; margin: 0; padding: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.course-content h3 a, .news-content h3 a, .member-content h4 a { color: var(--heading-color); }
.course-content h3 a:hover, .news-content h3 a:hover, .member-content h4 a:hover { color: var(--accent-color); }
.course-content .description, .member-content span, .news-content .description {
  color: #5d6a62; font-size: .95rem; margin: 0; font-style: normal; display: -webkit-box;
  -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.member-content span { background: none; padding: 0; position: static; font-weight: 400; }
.news-item .news-date, .news-date { color: #7b877f; font-size: .85rem; margin: 0; }
.news-item .read-more { margin-top: auto; padding-top: .5rem; font-weight: 600; display: inline-flex; gap: .35rem; align-items: center; }
.btn-outline-accent {
  display: inline-block; padding: 9px 30px; border: 2px solid var(--accent-color); color: var(--accent-color);
  border-radius: 999px; font-weight: 700;
}
.btn-outline-accent:hover { background: var(--accent-color); color: #fff; }

/* ---------- Inner page title banner ---------- */
.page-title .heading { padding: 56px 0 40px; background: linear-gradient(135deg, #17382a, #2e9e5b); color: #fff; border: 0; }
.page-title .heading h1 { color: #fff; font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; }
.page-title .heading p { color: rgba(255, 255, 255, .9); }
.page-title nav.breadcrumbs { background: #f4f7f5; padding: 12px 0; }
.page-title nav.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.page-title nav.breadcrumbs ol li + li::before { content: "/"; padding-inline: .5rem; color: #98a39c; }
html[dir="rtl"] .page-title nav.breadcrumbs ol li + li::before { padding-inline: .5rem; }

/* ---------- Admin-authored detail content ---------- */
.details-title { font-weight: 700; margin-bottom: .5rem; }
.rich-content { line-height: 1.95; font-size: 1.05rem; overflow-wrap: anywhere; }
.rich-content img { max-width: 100%; height: auto !important; border-radius: 10px; }
.rich-content table { max-width: 100%; display: block; overflow-x: auto; }
.rich-content iframe, .rich-content video { max-width: 100%; }
.rich-content p, .rich-content li { text-align: start; }

/* ---------- Contact ---------- */
.map-wrap iframe { border: 0; width: 100%; height: 320px; display: block; }
.contact .info-item { gap: 1rem; margin-bottom: 1.25rem; }
.contact .form-control { padding: .7rem 1rem; border-radius: 10px; }
.contact .btn-primary { background: var(--accent-color); border-color: var(--accent-color); padding: .6rem 2.4rem; border-radius: 999px; font-weight: 700; }

/* ---------- Footer ---------- */
.footer .sitename { font-weight: 700; font-size: 1.3rem; color: var(--accent-color); }
.footer .footer-links ul li { padding: 6px 0; }
.footer .copyright p { margin: 0; }
.footer .copyright a { color: var(--accent-color); }

/* ---------- Misc ---------- */
.error-page h1 { font-size: 5rem; font-weight: 800; color: var(--accent-color); }
.scroll-top { inset-inline-end: 15px; right: auto; }
html[dir="ltr"] .scroll-top { right: 15px; left: auto; }
html[dir="rtl"] .scroll-top { left: 15px; right: auto; }

/* AOS must never hide content if the script fails to load */
html:not(.aos-ready) [data-aos] { opacity: 1 !important; transform: none !important; }

@media (max-width: 575.98px) {
  .section { padding-block: 44px; }
  .hero { min-height: 420px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
