/* Research Institute Website - Main Stylesheet */
/* RTL (Right-to-Left) Arabic Layout */

/* Import Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@200..1000&family=Tajawal:wght@200;300;400;500;700;800;900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap");

/* Global Styles and Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #003057;
  --secondary-color: #0d7c7c;
  --accent-color: #17a2b8;
  --text-dark: #1a1a1a;
  --text-light: #666;
  --bg-light: #f8f9fa;
  --bg-lighter: #e8f4f8;
  --white: #ffffff;
  --border-color: #e0e0e0;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
  --shadow-xl:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --radius-card: 2rem;
  --radius-pill: 9999px;
  --radius-medium: 1rem;
  --transition-all: all 0.3s ease;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  font-family: Inter, Tajawal, sans-serif;
  font-feature-settings: normal;
  font-variation-settings: normal;
  scroll-behavior: smooth;
}

body {
  font-family: Inter, Tajawal, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background: var(--white);
  overflow-x: hidden;
  font-weight: 500;
  margin: 0;
}

/* LTR overrides */
[dir="ltr"] body,
html[dir="ltr"] {
  direction: ltr;
  text-align: left;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

html[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography - Font Weights */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
}

h1 {
  font-weight: 800;
}

h2 {
  font-weight: 700;
}

.logo,
.nav a,
.btn,
.feature-card h3,
.article-card h3,
.team-card h3,
.project-card h3,
.department-card h3,
.section-title h2,
.footer-section h3,
.contact-details p,
.service-card h3,
.bio-content h2,
.read-more,
strong,
b {
  font-weight: 700;
}

p {
  font-weight: 500;
}

/* Container */
.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
.header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  background: var(--primary-color);
  color: var(--white);
  padding: 10px 0;
  font-size: 14px;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-info {
  display: flex;
  gap: 30px;
}

.header-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-info-item i {
  font-size: 16px;
}

.header-main {
  padding: 20px 0;
}

.header-main .container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.logo-section {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  max-height: 60px;
  width: auto;
  object-fit: contain;
}

.nav-section {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Navigation */
.nav {
  display: flex;
  gap: 35px;
  align-items: center;
}

.nav a {
  color: var(--text-dark);
  font-weight: 600;
  font-size: 15px;
  transition: color 0.3s ease;
}

.nav a:hover {
  color: var(--secondary-color);
}

.nav a.active {
  color: var(--secondary-color);
  font-weight: 700;
}

/* Dropdown Menu */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown .dropbtn {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--white);
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  border-radius: var(--radius-medium);
  top: 100%;
  right: 0;
  padding: 10px 0;
  padding: 10px 0;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  color: var(--primary-color);
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1050;
}

/* Responsive Navigation */
@media (max-width: 992px) {
  .header-main .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .logo-section {
    max-width: 80%;
    justify-content: flex-start;
  }

  .logo {
    max-width: 100%;
  }

  .nav-section {
    position: static;
  }

  .menu-toggle {
    display: block;
    z-index: 2000;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    /* Attach to right for RTL */
    width: 300px;
    max-width: 80%;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.77, 0.2, 0.05, 1);
    z-index: 1999;
    padding-top: 80px;
    /* Space for close button */
    display: flex !important;
    /* Always flex to allow sliding */
    align-items: stretch;
    overflow-y: auto;
    border-top: none;
  }

  /* LTR mobile nav */
  [dir="ltr"] .nav {
    right: auto;
    left: 0;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
  }

  [dir="ltr"] .nav.active {
    transform: translateX(0);
  }

  .nav.active {
    transform: translateX(0);
  }

  /* Menu Background Overlay / Backdrop */
  .nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 1998;
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.4s ease,
      visibility 0.4s ease;
  }

  body.nav-open {
    overflow: hidden;
    /* Prevent scrolling behind */
  }

  .nav a {
    padding: 18px 25px;
    border-bottom: 1px solid var(--bg-lighter);
    font-size: 16px;
  }

  .dropdown {
    width: 100%;
  }

  .dropdown .dropbtn {
    padding: 18px 25px;
    border-bottom: 1px solid var(--bg-lighter);
    justify-content: space-between;
    font-size: 16px;
  }

  .dropdown-content {
    position: static;
    display: none;
    box-shadow: none;
    background: #fdfdfd;
    border-radius: 0;
    opacity: 1;
    transform: none;
    padding: 0;
  }

  .dropdown.open .dropdown-content {
    display: block;
  }

  .dropdown-content a {
    padding: 15px 40px;
    font-size: 14px;
    background: transparent;
  }
}

.dropdown:hover .dropdown-content {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-content a {
  color: var(--text-dark);
  padding: 10px 20px;
  display: block;
  font-size: 14px;
  font-weight: 500;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.dropdown-content a:hover,
.dropdown-content a.active {
  background-color: var(--bg-lighter);
  color: var(--secondary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--primary-color);
  cursor: pointer;
  position: absolute;
  left: 20px;
}

[dir="ltr"] .menu-toggle {
  left: auto;
  right: 20px;
}

[dir="ltr"] .dropdown-content {
  right: auto;
  left: 0;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-dark);
}

.lang-switcher i {
  font-size: 18px;
}

/* Hero Section */
.hero {
  position: relative;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg,
      rgba(0, 48, 87, 0.85),
      rgba(13, 124, 124, 0.75));
  z-index: 1;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.3;
}

.hero p {
  font-size: 18px;
  margin-bottom: 30px;
  line-height: 1.8;
  opacity: 0.95;
  font-weight: 500;
}

.breadcrumb {
  font-size: 14px;
  margin-top: 20px;
  opacity: 0.9;
}

.breadcrumb a {
  color: var(--white);
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--secondary-color);
  color: var(--white);
}

.btn-primary:hover {
  background: #0a6363;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--secondary-color);
}

.btn-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Section Styles */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.section-title p {
  font-size: 18px;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto;
  font-weight: 500;
}

/* Feature Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.feature-card {
  background: var(--white);
  padding: 40px 30px;
  border-radius: var(--radius-card);
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition-all);
}

.feature-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

.feature-icon {
  width: 70px;
  height: 70px;
  background: var(--bg-lighter);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--secondary-color);
  font-size: 32px;
}

.feature-card h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.feature-card p {
  color: var(--text-light);
  line-height: 1.8;
  font-size: 15px;
}

/* News/Article Cards */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.article-card {
  background: var(--white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition-all);
}

.article-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

.article-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.article-content {
  padding: 25px;
}

.article-meta {
  display: flex;
  gap: 15px;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 15px;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-card h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: var(--primary-color);
  line-height: 1.4;
}

.article-card p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 20px;
}

.read-more {
  color: var(--secondary-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.read-more:hover {
  gap: 12px;
}

/* Team Cards */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.team-card {
  background: var(--white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition-all);
  text-align: center;
}

.team-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

.team-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.team-info {
  padding: 25px;
}

.team-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.team-card .position {
  color: var(--secondary-color);
  font-size: 14px;
  margin-bottom: 15px;
}

.team-card .bio {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.team-social {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  font-size: 16px;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: var(--secondary-color);
  color: var(--white);
}

/* Contact Form */
.contact-section {
  background: var(--bg-light);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 50px;
  align-items: start;
}

.contact-info {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  transition: var(--transition-all);
}

.contact-info:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 30px;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--bg-lighter);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  font-size: 22px;
  flex-shrink: 0;
}

.contact-details h4 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--text-light);
}

.contact-details p {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-color);
}

.contact-form {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  transition: var(--transition-all);
}

.contact-form:hover {
  box-shadow: var(--shadow-xl);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-medium);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary-color);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.submit-btn {
  width: 100%;
  padding: 15px;
  background: var(--secondary-color);
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  background: #0a6363;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.submit-btn i {
  margin-left: 10px;
}

/* Map */
.map-container {
  margin-top: 30px;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.map-container iframe {
  width: 100%;
  height: 400px;
  border: none;
}

/* Info Boxes */
.info-boxes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 50px;
}

.info-box {
  background: var(--bg-lighter);
  padding: 40px;
  border-radius: var(--radius-card);
  border-right: 4px solid var(--secondary-color);
  transition: var(--transition-all);
}

.info-box:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

.info-box h3 {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.info-box p {
  color: var(--text-light);
  line-height: 1.8;
}

/* Biography Section */
.managers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.bio-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 25px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bio-section:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.bio-image {
  width: 100%;
  border-radius: var(--radius-card);
  overflow: hidden;
}

.bio-image img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.bio-content h2 {
  font-size: 32px;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.bio-title {
  font-size: 18px;
  color: var(--secondary-color);
  margin-bottom: 30px;
}

.bio-text {
  color: var(--text-light);
  line-height: 1.9;
  font-size: 16px;
}

/* Projects Section */
.projects-filter {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 25px;
  background: var(--bg-light);
  color: var(--text-dark);
  border: none;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-all);
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--secondary-color);
  color: var(--white);
}

.project-card {
  background: var(--white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition-all);
}

.project-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

.project-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  position: relative;
}

.project-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--secondary-color);
  color: var(--white);
  padding: 5px 15px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
}

.project-content {
  padding: 25px;
}

.project-meta {
  display: flex;
  gap: 15px;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 15px;
}

.project-card h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.project-card p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 20px;
}

/* Department Cards */
.departments-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.department-card {
  background: var(--white);
  padding: 35px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  transition: var(--transition-all);
  position: relative;
  overflow: hidden;
}

.department-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: var(--secondary-color);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.department-card:hover::before {
  transform: scaleY(1);
}

.department-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

.department-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-medium);
  margin-bottom: 20px;
}

.department-card h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.department-card p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 20px;
}

.department-list {
  margin: 20px 0;
}

.department-list li {
  padding: 8px 0;
  padding-right: 20px;
  color: var(--text-light);
  position: relative;
}

.department-list li::before {
  content: "•";
  position: absolute;
  right: 0;
  color: var(--secondary-color);
  font-weight: bold;
}

/* Research Detail Page */
.research-detail {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.research-main img {
  width: 100%;
  border-radius: var(--radius-card);
  margin-bottom: 30px;
}

.research-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-box {
  background: var(--bg-light);
  padding: 25px;
  border-radius: var(--radius-card);
  margin-bottom: 20px;
  transition: var(--transition-all);
}

.sidebar-box:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.sidebar-box h4 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--primary-color);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--secondary-color);
}

.sidebar-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-item:last-child {
  border-bottom: none;
}

.sidebar-item strong {
  color: var(--text-dark);
}

.sidebar-item span {
  color: var(--text-light);
}

.doi-link {
  display: inline-block;
  margin-top: 15px;
  color: var(--secondary-color);
  font-weight: 600;
}

/* Service Tabs */
.service-tabs {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  border-bottom: 2px solid var(--border-color);
  flex-wrap: wrap;
}

.tab-btn {
  padding: 15px 30px;
  background: transparent;
  border: none;
  color: var(--text-dark);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.tab-btn::after {
  content: "";
  position: absolute;
  bottom: -2px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: width 0.3s ease;
}

.tab-btn.active::after,
.tab-btn:hover::after {
  width: 100%;
}

.tab-btn.active {
  color: var(--secondary-color);
}

.service-card {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  display: flex;
  gap: 30px;
  align-items: center;
  margin-bottom: 20px;
  transition: var(--transition-all);
}

.service-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

.service-icon-lg {
  width: 80px;
  height: 80px;
  background: var(--bg-lighter);
  border-radius: var(--radius-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  font-size: 36px;
  flex-shrink: 0;
}

.service-card h3 {
  font-size: 22px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.service-card p {
  color: var(--text-light);
  line-height: 1.8;
}

/* Footer */
.footer {
  background: var(--primary-color);
  color: var(--white);
  padding: 60px 0 20px;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 20px;
  margin-bottom: 20px;
}

.footer-section p {
  line-height: 1.8;
  opacity: 0.9;
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  opacity: 0.9;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  opacity: 1;
  padding-right: 5px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.9;
}

.footer-contact-item i {
  font-size: 18px;
  width: 24px;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .departments-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-main {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: 80px 30px 30px;
    box-shadow: var(--shadow-lg);
    transition: right 0.3s ease;
    z-index: 999;
    gap: 20px;
    align-items: flex-start;
  }

  .nav.active {
    right: 0;
  }

  .nav a {
    font-size: 18px;
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 16px;
  }

  .section-title h2 {
    font-size: 28px;
  }

  .features-grid,
  .team-grid,
  .departments-grid {
    grid-template-columns: 1fr;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .info-boxes {
    grid-template-columns: 1fr;
  }

  .managers-grid,
  .bio-section {
    grid-template-columns: 1fr;
  }

  .research-detail {
    grid-template-columns: 1fr;
  }

  .footer-main {
    grid-template-columns: 1fr;
  }

  .header-top .container {
    flex-direction: column;
    gap: 10px;
  }

  .header-info {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 24px;
  }

  .section {
    padding: 50px 0;
  }

  .btn-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
    text-align: center;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.mt-30 {
  margin-top: 30px;
}

.mb-30 {
  margin-bottom: 30px;
}

.pt-50 {
  padding-top: 50px;
}

.pb-50 {
  padding-bottom: 50px;
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 0.8s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Fade In Animation */
.fade-in {
  animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Background Patterns */
.bg-pattern {
  background-color: var(--bg-light);
  background-image:
    linear-gradient(30deg,
      var(--bg-lighter) 12%,
      transparent 12.5%,
      transparent 87%,
      var(--bg-lighter) 87.5%,
      var(--bg-lighter)),
    linear-gradient(150deg,
      var(--bg-lighter) 12%,
      transparent 12.5%,
      transparent 87%,
      var(--bg-lighter) 87.5%,
      var(--bg-lighter));
  background-size: 80px 140px;
}

/* --- Modern Profile UI Styles --- */

/* Profile Header & Cover */
.profile-header {
  position: relative;
  margin-bottom: 80px;
}

.profile-cover {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  box-shadow: var(--shadow);
}

/* Avatar overlapping the cover */
.profile-avatar-container {
  position: absolute;
  bottom: -60px;
  right: 50px;
  /* RTL alignment */
  width: 160px;
  height: 160px;
  border-radius: 50%;
  padding: 6px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  z-index: 10;
}

.profile-avatar-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Profile Layout Grid */
.profile-grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 40px;
  align-items: start;
  margin-top: 20px;
}

/* Profile Sidebar (Left side physically in LTR, Right side in RTL) */
.profile-sidebar {
  background: var(--white);
  padding: 30px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-name {
  font-size: 28px;
  color: var(--primary-color);
  margin-bottom: 5px;
  line-height: 1.2;
}

.profile-title {
  font-size: 16px;
  color: var(--secondary-color);
  font-weight: 600;
  margin-bottom: 15px;
}

/* Social Icon Row in Profile */
.profile-socials {
  display: flex;
  gap: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.profile-socials .social-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-lighter);
  color: var(--secondary-color);
}

.profile-socials .social-icon:hover {
  background: var(--secondary-color);
  color: var(--white);
}

/* Profile Main Content Area */
.profile-main {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Shared Card Style for Profile Sections */
.profile-section-card {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.profile-section-title {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid var(--bg-lighter);
  padding-bottom: 15px;
}

.profile-section-title i {
  color: var(--secondary-color);
}

.profile-about-text {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.8;
}

/* Experience/Education Timeline */
.timeline {
  position: relative;
  padding-right: 20px;
  /* RTL padding */
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 2px;
  background: var(--bg-lighter);
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

/* The dot on the timeline */
.timeline-dot {
  position: absolute;
  right: -26px;
  /* Positioned on the line */
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--secondary-color);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--bg-lighter);
}

.timeline-content {
  background: var(--bg-light);
  padding: 20px;
  border-radius: var(--radius-medium);
  margin-right: 20px;
}

.timeline-date {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary-color);
  color: var(--white);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}

.timeline-title {
  font-size: 18px;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.timeline-subtitle {
  font-size: 14px;
  color: var(--secondary-color);
  margin-bottom: 10px;
  font-weight: 600;
}

.timeline-desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

/* Badges for Research Interests */
.badges-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  padding: 8px 16px;
  background: var(--bg-lighter);
  color: var(--secondary-color);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.badge:hover {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

/* Responsive adjustments for Profile */
@media (max-width: 992px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-avatar-container {
    right: 50%;
    transform: translateX(50%);
  }

  .profile-sidebar {
    text-align: center;
    align-items: center;
    padding-top: 60px;
    /* Space for the avatar */
  }

  .profile-socials {
    justify-content: center;
    width: 100%;
  }
}