@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

html, body, html[lang='ar'], [dir='rtl'] body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  margin: 0;
  font-family: 'Cairo', 'Montserrat', Arial, sans-serif;
  background: #f7fafd;
  color: #26326e;
  min-height: 100vh;
  font-size: 16px;
  padding-top: 64px;
  direction: rtl;
}

html[lang='ar'], [dir='rtl'] body {
  font-family: 'Cairo', Arial, Tahoma, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Remove all background images from previous classes */
.ensia-bg, .nhsm-bg, .enscs-bg, .nano-bg, .autonomous-bg {
  background: #fff !important;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2000;
  background: #fff;
  box-shadow: 0 2px 8px rgba(26,35,126,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 2rem;
  min-height: 64px;
}
.logo {
  font-family: 'Cairo', Arial, Tahoma, sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: #1976d2;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding-left: 0.7rem;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  align-items: center;
  width: 100%;
  min-width: 0;
  max-width: 100vw;
}
.nav-links > li:last-child {
  margin-right: 0;
}
.nav-links a, .nav-links button {
  text-decoration: none;
  color: #1a237e;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Cairo', Arial, sans-serif;
  display: block;
}
.nav-links a:hover, .nav-links a:focus, .nav-links button:hover, .nav-links button:focus {
  background: #e3f0fc;
  color: #1976d2;
  box-shadow: 0 2px 8px rgba(25,118,210,0.08);
}

/* Dropdown menu */
.dropdown {
  position: relative;
}
.dropdown-content {
  display: none;
  position: absolute;
  top: 110%;
  left: 0;
  background: #fff;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(25,118,210,0.13);
  border-radius: 10px;
  z-index: 1002;
  flex-direction: column;
  padding: 0.5rem 0;
  width: 100%;
  min-width: 0;
  max-width: 100vw;
}
.dropdown-content a {
  font-weight: 600;
  font-size: 1.1rem;
  color: #2196f3;
  padding: 0.7rem 1.5rem;
  display: block;
  border-radius: 0;
  background: none;
  transition: background 0.2s, color 0.2s;
}
.dropdown-content a:hover, .dropdown-content a:focus {
  background: #e3f0fc;
  color: #1976d2;
}
.dropdown-content a:active,
.dropdown-content a.selected,
.dropdown-content a:focus {
  background: #e0f2ff;
  color: #1565c0;
  font-weight: 700;
  transition: background 0.2s, color 0.2s;
}
.dropdown:hover .dropdown-content, .dropdown:focus-within .dropdown-content, .dropdown.open .dropdown-content {
  display: flex;
}

/* Mobile Navbar */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  margin-left: 1rem;
}
.menu-toggle span {
  height: 3px;
  width: 28px;
  background: #1976d2;
  margin: 4px 0;
  border-radius: 2px;
  transition: 0.3s;
}
@media (max-width: 900px) {
  .navbar {
    padding: 0.5rem 0.5rem;
  }
  body {
    padding-top: 64px;
  }
  .nav-links {
    position: absolute;
    top: 64px;
    right: 0;
    background: #fff;
    flex-direction: column;
    width: 90vw;
    max-width: 320px;
    box-shadow: 0 8px 24px rgba(25,118,210,0.13);
    gap: 0;
    z-index: 1001;
    align-items: flex-start;
    border-radius: 0 0 12px 12px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-16px);
    pointer-events: none;
    transition: max-height 1.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1), transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
  }
  .nav-links.open {
    max-height: 900px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition: max-height 1.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1), transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .nav-links > li {
    width: 100%;
  }
  .nav-links a, .nav-links button, .dropdown-content a {
    width: 100%;
    text-align: left;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: none;
    color: #1a237e;
    border-radius: 0;
    box-shadow: none;
  }
  .dropdown-content {
    position: static;
    min-width: 100%;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }
  .menu-toggle {
    display: flex;
  }
  .hero {
    padding: 2rem 0.5rem 1.2rem 0.5rem;
    margin-bottom: 1.2rem;
    max-width: 98vw;
  }
  .carousel-section {
    padding: 1rem;
    max-width: 98vw;
  }
  .carousel {
    height: 180px;
    min-height: 120px;
  }
  .carousel-img {
    height: 180px;
    min-height: 120px;
  }
  .flexbox {
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    max-width: 98vw;
  }
  .overview-card {
    max-width: 98vw;
    min-width: 0;
    padding: 1.2rem 0.7rem;
    font-size: 1rem;
  }
}
@media (max-width: 600px) {
  .logo {
    font-size: 1.1rem;
    letter-spacing: 1px;
  }
  .hero-content h1 {
    font-size: 1rem;
  }
  .hero-content h2 {
    font-size: 0.85rem;
  }
  .carousel-section h3 {
    font-size: 1rem;
  }
  .school-logo-frame, .dev-photo-frame {
    max-width: 120px;
    max-height: 120px;
    padding: 4px;
  }
  .overview-card {
    font-size: 0.95rem;
    padding: 0.5rem 0.2rem;
  }
  .carousel {
    height: 100px;
    min-height: 60px;
  }
  .carousel-img {
    height: 100px;
    min-height: 60px;
  }
  .carousel-controls button {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
  footer {
    font-size: 0.9rem;
    padding: 1rem 0;
  }
  .flexbox {
    gap: 0.7rem;
  }
  .site-logo {
    max-height: 56px !important;
    margin-top: -6px !important;
  }
  .hero {
    padding-top: 0 !important;
  }
  .home-logo-large {
    margin-top: 0 !important;
  }
  .menu-toggle {
    margin-right: 1rem;
  }
  .dropdown-content a {
    color: #2196f3 !important;
  }
}

.hero, .carousel-section, .flexbox {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.overview-card {
  max-width: 250px;
  margin-left: auto;
  margin-right: auto;
}
.hero {
  background: rgba(255,255,255,0.95);
  padding: 4rem 2rem 2rem 2rem;
  text-align: center;
  margin-bottom: 2rem;
  border-radius: 1.5rem;
  box-shadow: 0 2px 12px rgba(26,35,126,0.07);
  width: 100%;
  max-width: 100vw;
  min-width: 0;
}
.hero-content h1 {
  font-size: 2.8rem;
  color: #1976d2;
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.hero-content h2 {
  font-size: 1.6rem;
  color: #1a237e;
  margin-bottom: 1rem;
  font-weight: 600;
}
.hero-content p {
  font-size: 1.2rem;
  color: #333;
  font-weight: 400;
}

.carousel-section {
  background: #f8fbff;
  padding: 2.5rem;
  border-radius: 1.5rem;
  max-width: 1100px;
  margin: 0 auto 2.5rem auto;
  box-shadow: 0 2px 16px rgba(26,35,126,0.09);
  width: 100%;
  max-width: 100vw;
  min-width: 0;
}
.carousel-section h3 {
  font-size: 1.5rem;
  color: #1976d2;
  margin-bottom: 1.5rem;
  font-weight: 600;
}
.carousel {
  position: relative;
  width: 100%;
  height: 480px;
  overflow: hidden;
  border-radius: 1.2rem;
  margin-bottom: 1.2rem;
  background: #e3f0fc;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100vw;
  min-width: 0;
}
.carousel-img {
  width: 100%;
  height: 480px;
  object-fit: contain;
  display: none;
  transition: opacity 0.5s;
  background: #e3f0fc;
  width: 100%;
  max-width: 100vw;
  min-width: 0;
}
.carousel-img.active {
  display: block;
  opacity: 1;
}
.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}
.carousel-controls button {
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 2rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(25,118,210,0.08);
}
.carousel-controls button:hover {
  background: #1565c0;
  transform: scale(1.08);
}

.flexbox {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: center;
  margin: 2.5rem auto;
  max-width: 1200px;
  width: 100%;
  max-width: 100vw;
  min-width: 0;
}
.overview-card {
  background: #fff;
  border-radius: 1.2rem;
  box-shadow: 0 2px 12px rgba(26,35,126,0.09);
  padding: 2.2rem 2rem;
  flex: 1 1 300px;
  min-width: 280px;
  max-width: 370px;
  transition: transform 0.2s, box-shadow 0.2s;
  font-size: 1.08rem;
  font-family: 'Cairo', Arial, sans-serif;
  width: 100%;
  max-width: 100vw;
  min-width: 0;
}
.overview-card h4 {
  font-family: 'Cairo', Arial, Tahoma, sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0.04em;
  color: #0d47a1;
  margin-bottom: 0.7rem;
}
.overview-card p, .overview-card ul, .overview-card li {
  font-family: 'Cairo', Arial, Tahoma, sans-serif;
  font-size: 1.13rem;
  font-weight: 400;
  color: #1a237e;
}
.overview-card:hover {
  transform: translateY(-8px) scale(1.04);
  box-shadow: 0 8px 32px rgba(25,118,210,0.13);
}
footer {
  background: linear-gradient(90deg, #1976d2 60%, #0d47a1 100%);
  color: #fff;
  padding: 3.5rem 2rem 2rem 2rem;
  border-radius: 2.5rem 2.5rem 0 0;
  margin-top: 3rem;
  text-align: center;
  font-size: 1.15rem;
  box-shadow: 0 -8px 32px #1976d23a;
  border-top: 4px solid #42a5f5;
  position: relative;
  overflow: hidden;
}
footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 1.7rem;
}
footer .footer-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.13rem;
  padding: 0.3rem 1.2rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.07);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px #1976d21a;
  margin: 0 0.2rem;
  display: inline-block;
}
footer .footer-links a:hover {
  background: #fff;
  color: #1976d2;
  box-shadow: 0 4px 16px #1976d23a;
}
footer .footer-brand {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin-bottom: 0.8rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
}
footer .footer-brand img {
  height: 2.2rem;
  width: auto;
  vertical-align: middle;
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.2rem 0.4rem;
}
footer .footer-contact {
  font-size: 1.08rem;
  opacity: 0.93;
  margin-bottom: 0.7rem;
}
footer .footer-contact a {
  color: #fff;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s;
}
footer .footer-contact a:hover {
  color: #42a5f5;
}
footer .footer-bottom {
  text-align: center;
  font-size: 1.05rem;
  opacity: 0.85;
  margin-top: 2.5rem;
  letter-spacing: 0.02em;
}
@media (max-width: 900px) {
  footer {
    padding: 2.2rem 1rem 1.2rem 1rem;
    font-size: 1.05rem;
    border-radius: 1.2rem 1.2rem 0 0;
  }
  footer .footer-links {
    flex-direction: column;
    gap: 1.2rem;
  }
  footer .footer-brand {
    font-size: 1.2rem;
  }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .carousel-section, .flexbox { max-width: 98vw; }
}
@media (max-width: 900px) {
  .flexbox { flex-direction: column; align-items: center; }
  .overview-card { max-width: 95vw; }
  .carousel { height: 300px; }
  .carousel-img { height: 300px; }
  .hero { padding: 2.5rem 1rem 1.5rem 1rem; }
}
@media (max-width: 600px) {
  .carousel-section { padding: 1rem; }
  .carousel { height: 180px; }
  .carousel-img { height: 180px; }
  .hero-content h1 { font-size: 1.5rem; }
  .hero-content h2 { font-size: 1.1rem; }
  .school-logo-frame, .dev-photo-frame {
    max-width: 180px;
    max-height: 180px;
    padding: 8px;
  }
}

.school-logo-frame, .dev-photo-frame {
  display: block;
  margin: 0 auto 1.5rem auto;
  max-width: 320px;
  max-height: 320px;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #fff;
  border: 4px solid #1976d2;
  border-radius: 18px;
  box-shadow: 0 6px 32px rgba(25,118,210,0.13);
  padding: 18px;
}

input, textarea, button {
  font-size: 1rem;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

.site-logo {
  max-height: 80px;
  width: auto;
  vertical-align: bottom;
  display: inline-block;
  margin-left: 2px;
  margin-top: -10px;
}
@media (max-width: 600px) {
  .site-logo {
    max-height: 56px !important;
    margin-top: -6px !important;
  }
}

.home-logo-large {
  max-width: 480px;
  width: 100%;
  display: block;
  margin: 0 auto 2rem auto;
}
.about-logo {
  max-width: 220px;
  width: 100%;
  display: block;
}
.about-photos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
@media (max-width: 600px) {
  .home-logo-large {
    max-width: 180px;
    margin-bottom: 1rem;
  }
  .about-logo {
    max-width: 100px;
  }
  .about-photos {
    gap: 0.3rem;
  }
}

.about-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
@media (max-width: 800px) {
  .about-main {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  .dev-photo-frame {
    margin-bottom: 0.5rem;
  }
  .hero-content {
    text-align: center;
  }
}
.overview-card h4 {
  display: inline-block;
  vertical-align: middle;
}
.about-logo {
  vertical-align: middle;
}

@media (max-width: 800px) {
  .hero, .carousel-section, .flexbox {
    max-width: 98vw;
  }
  .overview-card {
    max-width: 95vw;
  }
  .home-logo-large {
    max-width: 220px;
  }
  .about-logo {
    max-width: 120px;
  }
}

.contact-logo-large {
  max-width: 480px;
  width: 100%;
  display: block;
  margin: 0 auto 2rem auto;
}
@media (max-width: 600px) {
  .contact-logo-large {
    max-width: 90vw;
    margin-bottom: 1rem;
  }
}

.contact-hero-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .contact-hero-flex {
    flex-direction: column-reverse;
    gap: 1rem;
  }
  .contact-hero-flex .hero-content {
    margin-left: 0;
  }
}

.contact-hero-flex .hero-content {
  margin-left: 6rem;
}
@media (max-width: 600px) {
  .contact-hero-flex .hero-content {
    margin-left: 0;
  }
}

/* Language dropdown specific tweaks */
.lang-dropdown > button {
  min-width: 100px;
}
.lang-dropdown .dropdown-content {
  min-width: 120px;
  right: 0;
  left: auto;
}
[dir="rtl"] .lang-dropdown .dropdown-content {
  left: 0;
  right: auto;
}

/* General improvements */
.main-content {
  width: 100%;
  box-sizing: border-box;
}

/* Hero Section */
.hero-research {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto 2.5rem auto;
  padding: 3.5rem 1.5rem 2.5rem 1.5rem;
  background: linear-gradient(120deg, #e3f0fc 60%, #f7fafd 100%);
  border-radius: 32px;
  box-shadow: 0 4px 32px #1976d21a;
  min-height: 340px;
  transition: box-shadow 0.2s;
}
.hero-research:hover {
  box-shadow: 0 8px 40px #1976d23a;
}
.hero-research-text {
  flex: 1 1 350px;
  min-width: 260px;
  text-align: right;
}
.hero-research-title {
  font-size: 2.7rem;
  font-weight: 800;
  color: #1976d2;
  margin-bottom: 1.1rem;
  line-height: 1.2;
}
.hero-research-desc {
  font-size: 1.25rem;
  color: #26326e;
  margin-bottom: 2.2rem;
  line-height: 1.7;
}
.hero-research-btn {
  display: inline-block;
  background: #1976d2;
  color: #fff;
  font-size: 1.18rem;
  font-weight: 700;
  padding: 1rem 2.7rem;
  border-radius: 16px;
  box-shadow: 0 2px 12px #1976d21a;
  transition: background 0.2s, transform 0.2s;
  letter-spacing: 0.03em;
  text-decoration: none;
  margin-top: 0.5rem;
  border: none;
  cursor: pointer;
}
.hero-research-btn:focus {
  outline: 2px solid #1976d2;
  outline-offset: 2px;
}
.hero-research-btn:hover {
  background: #0d47a1;
  transform: translateY(-2px) scale(1.03);
}
.hero-research-img {
  flex: 1 1 340px;
  min-width: 260px;
  max-width: 420px;
  height: 260px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 2px 12px #1976d21a;
  object-fit: cover;
  display: block;
  transition: box-shadow 0.2s, transform 0.2s;
}
.hero-research-img:hover {
  box-shadow: 0 6px 24px #1976d23a;
  transform: scale(1.03);
}

/* Highlights Row */
.highlights-row {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin: 2.5rem auto 1.5rem auto;
  max-width: 1100px;
  flex-wrap: wrap;
}
.highlight-card {
  background: #e3f0fc;
  border-radius: 18px;
  box-shadow: 0 2px 12px #1976d21a;
  padding: 1.5rem 1.2rem;
  min-width: 200px;
  max-width: 260px;
  flex: 1 1 200px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.highlight-card:hover {
  box-shadow: 0 6px 24px #1976d23a;
  transform: translateY(-4px) scale(1.04);
}
.highlight-icon {
  font-size: 2.2rem;
  color: #1976d2;
  margin-bottom: 0.3rem;
}
.highlight-title {
  font-size: 1.13rem;
  font-weight: 700;
  color: #1976d2;
}
.highlight-desc {
  font-size: 1rem;
  color: #26326e;
  opacity: 0.92;
}

/* Alternating Features */
.alt-feature-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  max-width: 1100px;
  margin: 3.2rem auto;
  padding: 2.2rem 1.2rem;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 2px 12px #1976d21a;
  flex-wrap: wrap;
  transition: box-shadow 0.2s;
}
.alt-feature-section:hover {
  box-shadow: 0 8px 32px #1976d23a;
}
.alt-feature-section.reverse {
  flex-direction: row-reverse;
}
.alt-feature-img {
  flex: 1 1 320px;
  min-width: 220px;
  max-width: 400px;
  height: 200px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 2px 12px #1976d21a;
  margin: 0 auto;
  background: #e3f0fc;
  display: block;
  transition: box-shadow 0.2s, transform 0.2s;
}
.alt-feature-img:hover {
  box-shadow: 0 6px 24px #1976d23a;
  transform: scale(1.03);
}
.alt-feature-text {
  flex: 2 1 320px;
  min-width: 220px;
  padding: 0 1.2rem;
  text-align: right;
}
.alt-feature-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1976d2;
  margin-bottom: 0.7rem;
}
.alt-feature-desc {
  font-size: 1.13rem;
  color: #26326e;
  margin-bottom: 0.7rem;
  line-height: 1.7;
}

/* Footer (keep as is, but ensure responsive) */
footer {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 2.2rem 1.2rem 1.2rem 1.2rem;
  border-radius: 24px 24px 0 0;
  margin-top: 3rem;
  text-align: center;
  font-size: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 1.2rem;
}
footer .footer-links a {
  color: #fff;
  text-decoration: underline;
  font-weight: 600;
  font-size: 1.08rem;
  transition: color 0.2s;
}
footer .footer-links a:hover {
  color: #e3f0fc;
}

/* Responsive Design */
@media (max-width: 1100px) {
  .hero-research, .alt-feature-section {
    max-width: 98vw;
  }
  .highlights-row {
    max-width: 98vw;
  }
}
@media (max-width: 900px) {
  .hero-research {
    flex-direction: column-reverse;
    gap: 1.2rem;
    padding: 2rem 0.5rem 1.5rem 0.5rem;
    min-height: unset;
  }
  .hero-research-img {
    width: 100%;
    max-width: 98vw;
    height: 180px;
  }
  .hero-research-text {
    text-align: center;
  }
  .alt-feature-section, .alt-feature-section.reverse {
    flex-direction: column !important;
    gap: 1.2rem;
    padding: 1.2rem 0.5rem;
  }
  .alt-feature-img {
    width: 100%;
    max-width: 98vw;
    height: 150px;
  }
  .alt-feature-text {
    text-align: center;
    padding: 0;
  }
  .highlights-row {
    flex-direction: column;
    gap: 1.2rem;
  }
  .highlight-card {
    max-width: 95vw;
    min-width: 0;
    width: 100%;
  }
  footer .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}
@media (max-width: 600px) {
  .hero-research-title {
    font-size: 2rem;
  }
  .hero-research-desc {
    font-size: 1.05rem;
  }
  .alt-feature-title {
    font-size: 1.15rem;
  }
  .alt-feature-desc {
    font-size: 0.98rem;
  }
  .highlight-title {
    font-size: 1rem;
  }
  .highlight-desc {
    font-size: 0.95rem;
  }
  .hero-research-btn {
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
  }
  .alt-feature-section, .hero-research {
    padding: 1rem 0.2rem;
  }
  footer {
    font-size: 0.98rem;
    padding: 1.2rem 0.5rem 0.7rem 0.5rem;
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  filter: blur(5px) brightness(0);
  opacity: 0;
  pointer-events: none;
}
body {
  position: relative;
  z-index: 1;
  background: none !important;
}
nav, .main-content, footer, .hero-research, .alt-feature-section, .highlights-row, .about-container, .orientation-container, .contact-container {
  position: relative;
  z-index: 1;
}

.schools-container, .schools-main-content {
  position: relative;
  z-index: 1;
}

@media (max-width: 700px) {
  .hero-research, .alt-feature-section, .highlights-row,
  .about-section-card, .orientation-section, .contact-card,
  .schools-container, .about-container, .orientation-container, .contact-container {
    margin-left: 1.2rem !important;
    margin-right: 1.2rem !important;
    max-width: calc(100vw - 2.4rem);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
    min-height: unset !important;
    height: auto !important;
    box-sizing: border-box;
  }
  .alt-feature-section > *:last-child,
  .about-section-card-content > *:last-child,
  .orientation-section > *:last-child,
  .contact-card > *:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  .school-detail-container {
    margin-left: 1.2rem;
    margin-right: 1.2rem;
  }
}

.school-detail-container {
  position: relative !important;
  z-index: 1 !important;
  background: rgba(255, 255, 255, 0.97) !important;
  color: #1a237e !important;
  box-shadow: 0 4px 32px #1976d23a !important;
  margin-top: 0.1rem !important;
  margin-bottom: 0.1rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 1300px !important;
  padding-left: 5rem !important;
  padding-right: 5rem !important;
}
.school-detail-container * {
  color: #1a237e !important;
}
@media (max-width: 700px) {
  .school-detail-container {
    margin-left: 1.2rem !important;
    margin-right: 1.2rem !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}

.back-btn {
  color: #fff !important;
}
.back-btn:hover {
  color: #fff !important;
}

.school-detail-info-row .school-detail-req {
  margin-bottom: 1.2rem !important;
}
.school-detail-info-row .school-detail-req:last-child {
  margin-bottom: 0 !important;
}

.school-detail-info-row {
  flex-direction: column !important;
  align-items: stretch !important;
  display: block !important;
  overflow: auto !important;
}

.school-detail-info-row .school-detail-req {
  border: 2px solid rgb(0, 149, 255) !important;
}

.filter-bar button {
  font-family: 'Cairo', Arial, Tahoma, sans-serif !important;
}

button[type='submit'] {
  font-family: 'Cairo', Arial, Tahoma, sans-serif !important;
}  

@media (max-width: 700px) {
  .about-section-card, .about-section-card.goals, .about-section-card.notes {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.7rem !important;
    margin-bottom: 2.2rem !important;
  }
  .about-img-rect {
    display: block !important;
    max-width: 90vw;
    width: 100%;
    margin: 0.5rem auto 0.2rem auto;
    height: auto;
    order: 2;
  }
  .about-section-card-content {
    order: 1;
  }
  .about-img-mobile {
    display: none !important;
  }
}

@media (max-width: 700px) {
  .contact-card {
    margin-bottom: 1.5rem !important;
  }
}

/* === Chatbot Styles === */
#chatbot-button {
  transition: all 0.3s ease;
}
#chatbot-button:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(25,118,210,0.4);
}
#chatbot-box {
  transition: all 0.3s ease;
  animation: chatbot-fade-in 0.3s ease-out;
}
@keyframes chatbot-fade-in {
  from { 
    opacity: 0; 
    transform: translateY(20px) scale(0.95); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
  }
}
#chatbot-messages {
  scrollbar-width: thin;
  scrollbar-color: #1976d2 #f8fafc;
  overflow-y: auto;
  overflow-x: hidden;
  word-wrap: break-word;
  white-space: pre-wrap;
}
#chatbot-messages::-webkit-scrollbar {
  width: 6px;
}
#chatbot-messages::-webkit-scrollbar-thumb {
  background: #1976d2;
  border-radius: 10px;
}
#chatbot-messages::-webkit-scrollbar-track {
  background: #f8fafc;
  border-radius: 10px;
}
#chatbot-form button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(25,118,210,0.3);
}
#chatbot-form button[type="submit"]:active {
  transform: translateY(0);
}
#chatbot-box input[type="text"]::placeholder {
  color: #999;
  opacity: 1;
}
#chatbot-box input[type="text"]:focus {
  border-color: #1976d2;
  box-shadow: 0 0 0 3px rgba(25,118,210,0.1);
}
#chatbot-close:hover {
  background: rgba(255,255,255,0.2) !important;
  border-radius: 50%;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  #chatbot-box {
    top: 15% !important;
    left: 50% !important;
    transform: translate(-50%, 0) !important;
    right: auto !important;
    bottom: auto !important;
    width: 95vw !important;
    max-width: 400px !important;
    z-index: 10000 !important;
    border-radius: 16px;
  }
  #chatbot-button {
    width: 68px !important;
    height: 68px !important;
    right: 16px !important;
    bottom: 35px !important;
  }
  #chatbot-button img {
    width: 36px !important;
    height: 36px !important;
  }
  #chatbot-messages {
    height: 250px !important;
    padding: 1rem !important;
  }
  #chatbot-form {
    padding: 0.8rem !important;
  }
  #chatbot-input {
    font-size: 17px !important;
  }
  #chatbot-form button[type="submit"] {
    padding: 0.8rem 1rem !important;
    font-size: 0.95rem !important;
  }
}

/* Mobile-only floating chatbot button */
@media (max-width: 600px) {
  #chatbot-mobile-btn {
    display: flex;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 16px rgba(25,118,210,0.25);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
  }
  #chatbot-mobile-btn:active {
    background: #1565c0;
    box-shadow: 0 2px 8px rgba(25,118,210,0.18);
  }
}

/* Hide mobile button on desktop */
@media (min-width: 601px) {
  #chatbot-mobile-btn {
    display: none !important;
  }
}

@media (max-width: 600px) {
  #chatbot-mobile-btn {
    display: flex !important;
    position: fixed;
    bottom: 120px !important;
    right: 20px !important;
    z-index: 99999 !important;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50% !important;
    width: 60px !important;
    height: 60px !important;
    align-items: center;
    justify-content: center;
    font-size: 2rem !important;
    box-shadow: 0 4px 16px rgba(25,118,210,0.25);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
  }
  #chatbot-mobile-btn:active {
    background: #1565c0 !important;
  }
  #chatbot-box {
    left: 50% !important;
    transform: translateX(-50%) !important;
    right: auto !important;
  }
}

@media (min-width: 601px) {
  #chatbot-box {
    top: 22% !important;
    left: auto !important;
    right: 32px !important;
    transform: none !important;
    bottom: auto !important;
    width: 400px !important;
    max-width: 98vw !important;
  }
}

#chatbot-messages p {
  margin: 0 0 0.3em 0 !important;
  line-height: 1.7;
}
#chatbot-messages div {
  white-space: normal !important;
}

@media (max-width: 600px) {
  .hero-research {
    border-radius: 24px;
    padding: 2.2rem 0.7rem 2.5rem 0.7rem;
    box-shadow: 0 4px 24px #1976d21a;
  }
  .hero-research-btn {
    width: 100%;
    font-size: 1.15rem;
    padding: 1.3rem 0;
    margin-bottom: 1.1rem;
    border-radius: 18px;
  }
  .hero-research-btn:last-child {
    margin-bottom: 0;
  }
  .hero-research-text {
    padding-bottom: 1.2rem;
  }
}

@media (min-width: 900px) {
  .hero-research-img {
    max-width: 420px;
    min-width: 260px;
    height: 220px;
    object-fit: contain;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 2px 12px #1976d21a;
    display: block;
    margin: 0 auto;
    transition: box-shadow 0.2s, transform 0.2s;
  }
  .hero-research-img:hover {
    box-shadow: 0 6px 24px #1976d23a;
    transform: scale(1.03);
  }
}

@media (min-width: 1200px) {
  .hero-research-img {
    max-width: 1000px !important;
    min-width: 320px !important;
    height: 300px !important;
  }
}

/* Desktop Navbar Styles - Transparent with white text */
@media (min-width: 901px) {
  .navbar {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 2px 20px rgba(255, 255, 255, 0.1) !important;
    min-height: 65px !important;
    padding: 0.7rem 2rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    transition: transform 0.3s ease-in-out !important;
  }
  
  .navbar.navbar-hidden {
    transform: translateY(-100%) !important;
  }
  
  .navbar .logo a img {
    content: url('foot.png');
    height: 45px;
    width: auto;
  }
  
  .nav-links a, .nav-links button {
    color: #fff !important;
    font-weight: 800 !important;
    font-size: 1.2rem !important;
    padding: 0.8rem 1.5rem !important;
    text-shadow: 0 8px 32px rgba(0,0,0,0.85), 0 2px 16px rgba(0,0,0,0.65), 0 1px 2px rgba(0,0,0,0.45) !important;
  }
  
  .nav-links a:hover, .nav-links a:focus, .nav-links button:hover, .nav-links button:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2) !important;
  }
  
  .menu-toggle span {
    background: #fff !important;
  }
}

/* Responsive video background for mobile */
#bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 0;
  opacity: 0.7;
  pointer-events: none;
}
@media (max-width: 700px) {
  #bg-video {
    display: none !important;
  }
  body {
    background: url('backo.jpg') !important ;
  }
  #bg-overlay {
    display: none !important;
  }
}

#bg-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(13, 71, 163, 0.8) !important;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: multiply;
}

body, main, nav, footer, .school-detail-container {
  position: relative;
  z-index: 2;
}

/* === Custom Navbar Link Styles (User Request) === */
.navbar .nav-links {
  display: flex;
  gap: 0.5rem; /* adjust spacing between links */
  flex-wrap: nowrap; /* prevent wrapping */

}

.navbar .nav-links a {
  font-size: 1.3rem !important;
  font-weight: 600 !important;
  white-space: nowrap; /* force each title to stay in one line */
}

