/* Project-specific fixes and additions on top of the delivered theme. */

html {
  scroll-behavior: smooth;
}

body.rtl {
  direction: rtl;
  text-align: right;
}

/* ---------- Header ---------- */
.main-header .navbar-brand img {
  max-height: 60px;
  width: auto;
}

@media only screen and (min-width: 992px) {
  .main-menu.desktop-menu {
    display: flex !important;
    flex-basis: auto;
    align-items: center;
    justify-content: flex-end;
    gap: 26px;
  }

  .main-menu.desktop-menu .nav-menu-wrapper > ul.navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 26px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .main-menu.desktop-menu .nav-menu-wrapper > ul.navbar-nav > li > a.nav-link {
    padding: 0;
    white-space: nowrap;
    font-size: 16px;
  }
}

.main-menu ul li a.nav-link {
  color: #4A2E82;
  text-decoration: none;
  transition: color 0.3s ease;
}

.main-menu ul li a.nav-link:hover,
.main-menu ul li a.active {
  color: var(--accent-color);
}

.nav-toggle-btn {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}

.nav-toggle-btn span {
  display: block;
  width: 26px;
  height: 2px;
  margin: 5px 0;
  background: #4A2E82;
  transition: all 0.3s ease;
}

.mobile-menu {
  display: none;
}

@media only screen and (max-width: 991px) {
  .main-menu.desktop-menu {
    display: none !important;
  }

  .nav-toggle-btn {
    display: block;
  }

  .header-sticky {
    background: #ffffff;
  }

  .mobile-menu {
    display: block;
    background: #ffffff;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    width: 100%;
  }

  .mobile-menu.open {
    max-height: 620px;
  }

  .mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 12px 0 20px;
  }

  .mobile-menu ul li a {
    display: block;
    padding: 12px 4px;
    color: #4A2E82;
    font-weight: 600;
    font-size: 17px;
    text-decoration: none;
    border-bottom: 1px solid rgba(74, 46, 130, 0.15);
  }

  .mobile-menu .btn-default {
    margin-top: 16px;
  }
}

/* ---------- Generic helpers ---------- */
.section-block {
  padding: 90px 0;
}

.media-frame {
  overflow: hidden;
  border-radius: 20px;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.empty-note {
  padding: 40px 0;
  color: var(--text-color);
}

/* ---------- Activity slider (replaces the jQuery slider) ---------- */
.activity-slider .testimonial-item {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
}

.activity-slider .testimonial-slider-image {
  flex: 1 1 320px;
  max-width: 480px;
}

.activity-slider .testimonial-slider-content {
  flex: 1 1 360px;
}

.activity-nav {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.activity-nav button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--divider-color);
  background: transparent;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s ease;
}

.activity-nav button:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--primary-color);
}

/* ---------- Cards ---------- */
.news-card {
  position: relative;
  display: block;
  min-height: 320px;
  border-radius: 20px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-color: var(--primary-color);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--white-color);
  text-decoration: none;
  margin-bottom: 30px;
}

.news-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 42, 45, 0.15) 0%, rgba(4, 42, 45, 0.85) 100%);
}

.news-card > * {
  position: relative;
  z-index: 2;
}

.news-card.featured {
  min-height: 460px;
}

.news-card h3 {
  color: var(--white-color);
  font-size: 26px;
  margin: 0 0 10px;
}

.news-card p {
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.news-card .news-date {
  color: var(--accent-color);
  font-size: 14px;
}

.news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.news-tags span {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  padding: 4px 14px;
  font-size: 13px;
}

.doc-card {
  background: var(--white-color);
  border: 1px solid var(--divider-color);
  border-radius: 20px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  margin-bottom: 30px;
}

.doc-card .doc-cover {
  aspect-ratio: 4 / 3;
  background: var(--secondary-color);
  overflow: hidden;
}

.doc-card .doc-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doc-card .doc-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.doc-card .doc-body h3 {
  margin: 0;
  font-size: 20px;
}

.doc-card .doc-body .btn-default {
  margin-top: auto;
  align-self: flex-start;
}

.team-card {
  background: var(--secondary-color);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 30px;
}

.team-card .team-photo {
  aspect-ratio: 1 / 1;
  background: var(--divider-color);
}

.team-card .team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card .team-body {
  padding: 20px;
}

.team-card .team-body h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: var(--white-color);
  border: 1px solid var(--divider-color);
  border-radius: 14px;
  min-height: 110px;
  margin-bottom: 24px;
}

.partner-logo img {
  max-width: 100%;
  max-height: 70px;
  object-fit: contain;
}

/* ---------- Article page ---------- */
.article-body {
  font-size: 18px;
  line-height: 1.9em;
  color: var(--primary-color);
}

.article-body p {
  margin-bottom: 22px;
}

/* ---------- Footer fixes ---------- */
.main-footer {
  background: var(--primary-color);
  padding: 80px 0 30px;
}

.main-footer,
.main-footer p,
.main-footer a {
  color: rgba(255, 255, 255, 0.8);
}

.main-footer h3 {
  color: var(--white-color);
  font-size: 20px;
  margin-bottom: 20px;
}

.main-footer .footermenu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-footer .footermenu li {
  margin-bottom: 10px;
}

.main-footer .footermenu li a {
  text-decoration: none;
  transition: color 0.3s ease;
}

.main-footer .footermenu li a:hover {
  color: var(--accent-color);
}

.main-footer .footer-logo img {
  max-height: 56px;
  margin-bottom: 20px;
}

.main-footer .footer-copyright {
  margin-top: 50px;
  padding-top: 24px;
  border-top: 1px solid var(--dark-divider-color);
}

.main-footer .footer-social-links ul {
  list-style: none;
  display: flex;
  gap: 12px;
  padding: 0;
  margin: 0;
}

.main-footer .footer-social-links ul li a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--dark-divider-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.main-footer .footer-social-links ul li a:hover {
  background: var(--accent-color);
  color: var(--primary-color);
  border-color: var(--accent-color);
}

.footer-copyright p {
  margin: 0;
}

/* ---------- Forms ---------- */
.form-message {
  margin-top: 16px;
  font-size: 15px;
}

.form-message.ok {
  color: var(--dark-color);
}

.form-message.error {
  color: var(--error-color);
}

/* ---------- Filter ---------- */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-pills button {
  border: 1px solid var(--divider-color);
  background: transparent;
  border-radius: 30px;
  padding: 8px 20px;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.3s ease;
  color: var(--primary-color);
}

.filter-pills button.active,
.filter-pills button:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white-color);
}

/* ---------- Hero spacing on small screens ---------- */
@media only screen and (max-width: 767px) {
  .hero-section .hero-content {
    padding-inline: 18px;
  }

  .hero-content .section-title h1 {
    font-size: 34px;
    line-height: 1.3;
  }
}

/* ---------- Brand colour overrides (no green hovers) ---------- */
:root {
  --accent-color: #4A2E82;
  --dark-color: #4A2E82;
}

/* ---------- Footer stays white ---------- */
.main-footer,
.main-footer p,
.main-footer a,
.main-footer .footermenu li a,
.main-footer li,
.main-footer .footer-social-links ul li a i {
  color: #ffffff;
}

.main-footer .footermenu li a:hover,
.main-footer a:hover {
  color: #ffffff;
  opacity: 0.75;
}

.main-footer .footer-social-links ul li a:hover {
  background: #ffffff;
  color: var(--primary-color);
  border-color: #ffffff;
}

.main-footer .footer-social-links ul li a:hover i {
  color: var(--primary-color);
}
