/* Global Styles - Jinan University Master CSS */
@import url("https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&family=Roboto+Slab:wght@400;700&family=Inter:wght@300;400;500;600;700&display=swap");

/* Import Design System Files */
@import url("theme-variables.css");
@import url("common-components.css");
@import url("pages-unified.css");

/* Legacy compatibility - will be gradually removed */
:root {
  --top-nav-height: 60px; /* Height of the middle nav when it becomes sticky */
  --border-radius: 4px;
  --box-shadow: 0 4px 12px rgba(49, 102, 103, 0.15); /* Changed to match the teal branding color */

  /* Override Bootstrap variables */
  --bs-primary: var(--jinan-teal);
  --bs-primary-rgb: 49, 102, 103;
}

* {
  font-family: "Lato", "Droid Arabic Kufi", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
}
body {
  font-family: "Lato", "Droid Arabic Kufi", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  font-weight: 400;
  color: var(--dark-charcoal);
  background-color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Lato", "Droid Arabic Kufi", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  font-weight: 700;
  color: var(--dark-teal);
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--dark-teal);
  text-decoration: none;
  transition: var(--transition-standard);
  font-weight: 500;
}

a:hover {
  color: var(--gold-accent);
}

.container {
  max-width: 1240px;
  padding: 0 20px;
}

/* Navbar Overrides */
.navbar-brand img {
  transition: transform 0.3s ease;
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

.nav-link {
  color: var(--dark-charcoal);
  margin: 0 10px;
  position: relative;
  padding: 0.6rem 0.2rem;
  font-weight: 500;
  font-size: 1rem;
  transition: var(--transition-standard);
  display: block; /* Ensure links are block elements to fill space */
}

.nav-link:after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--gold-accent);
  transition: var(--transition-standard);
  transform: translateX(-50%);
}

.nav-link:hover:after {
  width: calc(100% - 1.6rem);
}

/* Remove default Bootstrap dropdown arrow */
.dropdown-toggle::after {
  display: none;
}

/* Navigation Styles */
.top-nav {
  background-color: var(--dark-teal);
  color: var(--white);
  font-size: 0.85rem;
  padding: 0.5rem 0;
}

.top-nav a {
  color: var(--white);
  font-weight: 400;
}

.top-nav a:hover {
  color: var(--medium-grey);
}

/* Main Nav */
.navbar {
  box-shadow: var(--box-shadow);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
}

/* Override position for sticky nav - CRITICAL FIX */
/* When sticky, create space for content flow */
header {
  position: relative;
}

/* Sticky middle nav */
#middleNav.sticky-nav {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1020 !important;
}

/* Space compensation when sticky - NO ANIMATION */
#middleNav.sticky-nav + #bottomNav {
  margin-top: 80px; /* Adjust based on your middle nav height */
  transition: none !important; /* Prevent any animation when space is added */
}

/* Middle nav height constraints on desktop */
@media (min-width: 992px) {
  #middleNav {
    height: 80px;
    max-height: 80px;
  }
  
  #middleNav .container {
    height: 100%;
  }
  
  #middleNav .navbar-brand {
    padding: 10px 0;
    height: 100%;
    display: flex;
    align-items: center;
  }
  
  #middleNav .navbar-brand img {
    max-height: 60px;
    height: 60px;
    width: auto;
    object-fit: contain;
  }
  
  /* Ensure the university name also aligns properly */
  #middleNav .university-name {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
  }
  
  #middleNav .navbar-nav {
    height: 100%;
    margin: 0 auto !important; /* Center the nav items horizontally */
  }
  
  #middleNav .navbar-nav .nav-link {
    height: 80px;
    display: flex;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0 10px; /* Consistent spacing */
  }
  
  /* Ensure nav items fill their containers */
  #middleNav .navbar-nav .nav-item {
    height: 100%;
    display: flex;
    align-items: stretch;
  }
  
  /* Make ALL nav links fill the full height */
  #middleNav .navbar-nav .nav-item > .nav-link {
    height: 100%;
    display: flex;
    align-items: center;
  }
  
  /* Make sure dropdown toggles also fill the space */
  #middleNav .navbar-nav .dropdown-toggle {
    height: 100%;
  }
  
  /* Center the navbar collapse */
  #middleNav .navbar-collapse {
    height: 100%;
    justify-content: center !important;
  }
}

/* Ensure submenus appear above other elements */
.navbar .dropdown {
  position: relative;
}

.navbar .dropdown-menu {
  z-index: 1050;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  border: 1px solid var(--light-grey);
  padding: 0.5rem 0;
}

.navbar .dropdown-item {
  padding: 0.5rem 1.25rem;
  font-size: 0.95rem;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  background-color: var(--light-grey);
  color: var(--dark-teal);
}

.general-green {
  /* Mimicking the provided class */
  background-color: var(--dark-teal);
  color: var(--white);
}

.general-white {
  /* Mimicking the provided class */
  background-color: var(--white);
  color: var(--dark-charcoal);
}

.general-gold {
  /* Mimicking the provided class */
  background-color: var(--gold-accent);
  color: var(--white);
}

/* Mobile-First Styles */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
  /* Adjustments for small landscape phones */
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  /* Adjustments for tablets */
  .navbar-expand-lg .navbar-nav .nav-link {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
  }
  #middleNav .navbar-brand {
    margin-right: 2rem; /* Add space between logo and menu */
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  /* Adjustments for desktops */
  /* Show the separate menus */
  #middleNav,
  #bottomNav {
    display: flex !important; /* Override Bootstrap's mobile-first display: none */
  }

  /* Adjust spacing and alignment */
  #bottomNav .navbar-nav {
    margin-left: auto; /* Push bottom nav items to the right */
  }

  /* Sticky Nav Styles - Applied only on larger screens */
  #middleNav.sticky-nav,
  .navbar.sticky-nav {
    position: fixed !important;
    top: 0 !important; /* Stick to the very top */
    width: 100% !important;
    z-index: 1020 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    will-change: position, transform;
    backface-visibility: hidden; /* Prevent flicker in some browsers */
    transform: translateZ(0); /* Force hardware acceleration */
  }


  #bottomNav {
    position: relative;
    z-index: 1010; /* Ensure it stays below the middle nav */
  }

  .sticky-padding {
    will-change: padding-top;
  }

  /* Desktop menu dropdown indicator - only visible on desktop */
  .dropdown-toggle.show-arrow::after {
    display: inline-block;
    margin-left: 0.5em;
    vertical-align: 0.1em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
    opacity: 0.6;
    transition: var(--transition-standard);
  }

  .dropdown-toggle.show-arrow:hover::after {
    opacity: 1;
    color: var(--gold-accent);
  }

  /* Modern sleek dropdown icon alternative using Font Awesome */
  .dropdown-toggle.modern-arrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .dropdown-toggle.modern-arrow::after {
    display: none;
  }

  .dropdown-toggle.modern-arrow .arrow-icon {
    font-size: 0.7em;
    margin-left: 0.5em;
    opacity: 0.7;
    transition: var(--transition-standard);
  }

  .dropdown-toggle.modern-arrow:hover .arrow-icon {
    opacity: 1;
    color: var(--gold-accent);
    transform: translateY(2px);
  }

  /* Fix dropdown menu positioning and z-index */
  .dropdown-menu {
    z-index: 1050;
    margin-top: 0;
    border: none;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  /* Adjustments for large desktops */
}

/* Sticky Nav Styles */
/* REMOVED .sticky-top - it's not needed anymore */

/* Search Form */
.searchform {
  margin-left: 1rem;
}

.searchform span {
  display: flex;
  align-items: center;
  background-color: var(--white);
  border: 1px solid var(--dark-teal);
  border-radius: 4px;
}
.searchform input[type="text"] {
  border: none;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  flex-grow: 1;
}

.searchform a {
  color: var(--dark-teal);
  padding: 0.375rem 0.75rem;
}

/* Language Switch */
#setlang {
  cursor: pointer;
}

/* Language Toggle Styling */
.language-toggle {
  display: flex;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2px;
  margin-left: 1rem;
}

/* Calendar Section Styling */
.calendar-section {
  background-color: var(--light-grey);
  padding: 3.5rem 0;
}

.calendar-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.calendar-item {
  background-color: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition-standard);
  box-shadow: var(--box-shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.calendar-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(49, 102, 103, 0.2);
}

.calendar-date {
  background-color: var(--dark-teal);
  color: var(--white);
  padding: 1rem;
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.calendar-date .day {
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.calendar-date .month {
  font-size: 0.9rem;
}

.calendar-content {
  padding: 1.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.calendar-title {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  color: var(--dark-teal);
}

.calendar-details {
  color: var(--dark-grey);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.calendar-time {
  margin-top: 0.5rem;
  color: var(--dark-teal);
  font-weight: 500;
}

.calendar-location {
  display: flex;
  align-items: center;
  color: var(--dark-grey);
  font-size: 0.85rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--light-grey);
}

.calendar-location i {
  margin-right: 0.5rem;
  color: var(--dark-teal);
}

/* Date Picker Calendar Styling */
.date-picker-calendar {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.event-preview {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  height: 100%;
}

.event-preview-title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--dark-teal);
}

.event-preview-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--light-grey);
}

.event-preview-item:last-child {
  border-bottom: none;
}

/* Calendar Mobile Responsive */
@media (max-width: 768px) {
  .calendar-container {
    grid-template-columns: 1fr;
  }

  .calendar-section {
    padding: 2rem 0;
  }

  .date-picker-calendar,
  .event-preview {
    margin-bottom: 1rem;
  }
}

.language-btn {
  background: none;
  border: none;
  color: var(--white);
  padding: 4px 8px;
  border-radius: 18px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: var(--transition-standard);
  cursor: pointer;
  min-width: 28px;
}

.language-btn.active {
  background-color: var(--white);
  color: var(--dark-teal);
  font-weight: 600;
}

.language-btn:hover:not(.active) {
  background-color: rgba(255, 255, 255, 0.1);
}

/* University Name Styling */
.university-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--dark-teal);
}

.btn-primary {
  background-color: var(--dark-teal);
  border-color: var(--dark-teal);
  color: var(--white);
  transition: all 0.3s ease;
  font-weight: 600;
}

.btn-primary:hover {
  background-color: var(--gold-accent);
  border-color: var(--gold-accent);
  color: var(--white);
}

.btn-outline-primary {
  border-color: var(--dark-teal);
  color: var(--dark-teal);
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background-color: var(--dark-teal);
  color: var(--white);
}

.card {
  border: none;
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
}

.card-img-top {
  transition: transform 0.5s ease;
}

.card:hover .card-img-top {
  transform: scale(1.1);
}

/* News Ticker */
.ticker-wrap {
  width: 100%;
  overflow: hidden;
  background-color: var(--dark-teal);
  padding: 0;
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ticker-heading {
  background-color: var(--gold-accent);
  color: #000;
  padding: 0 1.5rem;
  position: relative;
  left: 0;
  height: 100%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  min-width: 150px;
  box-shadow: 4px 0 6px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  margin-right: 15px;
}

.ticker-heading::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 0;
  width: 0;
  height: 0;
  border-top: 20px solid transparent;
  border-bottom: 20px solid transparent;
  border-left: 10px solid var(--gold-accent);
}

.ticker-content {
  display: flex;
  padding-left: 30px;
  animation: ticker 25s linear infinite;
  height: 100%;
  align-items: center;
  width: max-content;
}

/* Add pseudo-element to duplicate content for seamless looping */
.ticker-content::after {
  content: attr(data-content);
  display: flex;
  align-items: center;
  white-space: nowrap;
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.ticker-item {
  white-space: nowrap;
  padding-right: 30px;
  font-size: 0.95rem;
  position: relative;
  display: inline-flex;
  align-items: center;
}

.ticker-item:after {
  content: "|";
  display: inline-block;
  margin: 0 15px;
  color: rgba(255, 255, 255, 0.4);
  vertical-align: middle;
  line-height: 1;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.ticker-item:last-child:after {
  display: none;
}

.ticker-item a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
}

.ticker-item a:hover {
  color: var(--gold-accent);
  text-decoration: underline;
}

/* New styles for submenus and dividers */
.devide-v-0 {
  width: 1px;
  height: 1rem;
  background-color: rgba(255, 255, 255, 0.5);
  display: inline-block;
  margin: 0 1rem;
}

.bulet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--gold-accent);
  display: inline-block;
  margin-right: 0.5rem;
}

.submenu {
  position: relative;
  display: inline-block;
}

.nav-hold {
  display: none;
  position: absolute;
  background-color: var(--white);
  min-width: 200px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
  left: 0;
  top: 100%;
}

.submenu:hover .nav-hold {
  display: block;
}

.nav-hold a {
  color: var(--dark-charcoal);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  white-space: nowrap;
}

.nav-hold a:hover {
  background-color: var(--light-grey);
}
.noborder {
  border: none !important;
}

/* Navbar Toggler Styling */
.navbar-toggler {
  border: none;
  padding: 0.25rem;
  background: none;
  position: relative;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-toggler-icon {
  width: 1.5em;
  height: 1.5em;
  background-image: none;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after,
.navbar-toggler-icon {
  background-color: var(--dark-teal);
  height: 2px;
  width: 1.5em;
  display: block;
  transition: all 0.3s ease;
  position: relative;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.navbar-toggler-icon::before {
  top: -8px;
}

.navbar-toggler-icon::after {
  top: 8px;
}

/* Mobile Navigation Styles - Oxford Inspired */
@media (max-width: 991.98px) {
  .desktop-nav {
    display: none !important;
  }

  .mobile-nav {
    display: block;
    background-color: var(--white);
    padding: 0;
    z-index: 1030;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--box-shadow);
  }

  .mobile-search-container {
    background-color: var(--light-grey);
    padding: 1rem;
    margin-bottom: 0.5rem;
  }

  .mobile-search-container .form-control {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 0.75rem 1rem;
  }

  .mobile-search-container .btn {
    padding: 0.75rem 1.25rem;
  }

  .nav-header {
    font-weight: 600;
    color: var(--dark-teal);
    padding: 1.25rem 1.25rem 0.5rem;
    margin-top: 0.75rem;
    border-bottom: 1px solid var(--light-grey);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
  }

  .mobile-menu .nav-link {
    border-bottom: 1px solid var(--light-grey);
    padding: 1rem 1.25rem;
    font-size: 1rem;
    color: var(--dark-charcoal);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
  }

  .mobile-menu .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.02);
  }

  .mobile-icon {
    width: 20px;
    margin-right: 12px;
    opacity: 0.7;
    text-align: center;
  }

  .mobile-menu .dropdown-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .mobile-menu .dropdown-toggle span {
    flex-grow: 1;
  }

  /* Mobile-specific dropdown indicator styling */
  .mobile-menu .dropdown-indicator {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    opacity: 0.7;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-grey);
    border-radius: 50%;
    margin-left: auto;
  }

  /* Make sure any desktop arrow icons are hidden on mobile */
  .mobile-menu .arrow-icon {
    display: none;
  }

  /* Only show the circular indicator in mobile view */
  .mobile-menu .dropdown-toggle::after,
  .mobile-menu .dropdown-toggle.modern-arrow::after,
  .mobile-menu .dropdown-toggle.show-arrow::after {
    display: none !important;
  }

  .dropdown-indicator.rotated,
  .mobile-menu .dropdown.show .dropdown-indicator {
    transform: rotate(180deg);
    background-color: var(--dark-teal);
    color: var(--white);
    opacity: 1;
  }

  .mobile-menu .dropdown-menu {
    border: none;
    background-color: var(--light-grey);
    padding: 0;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    display: none; /* Hide by default */
    position: static; /* Keep the dropdown in the normal flow */
    float: none; /* Prevent floating */
    transform: none !important; /* Prevent bootstrap transforms */
    transition: max-height 0.3s ease-in-out; /* Smooth accordion effect */
    max-height: 0;
    overflow: hidden;
  }

  .mobile-menu .dropdown.show .dropdown-menu {
    display: block; /* Show when parent has .show class */
    max-height: 1000px; /* Large enough to fit any submenu */
  }

  /* Accordion style effect for dropdown menus */
  .mobile-menu .dropdown-item {
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
    transition: all 0.2s ease;
  }

  .mobile-menu .dropdown-item:hover {
    background-color: rgba(49, 102, 103, 0.05);
    color: var(--dark-teal);
  }

  #combinedMobileNav {
    position: fixed;
    width: 100%;
    left: 0;
    top: 0px;
    background-color: var(--white);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    height: calc(100vh - 60px);
    overflow-y: auto;
    z-index: 1020;
  }

  .mobile-menu-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--light-grey);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--dark-teal);
    z-index: 10;
  }

  .mobile-menu-close:hover {
    background: var(--medium-grey);
  }

  .social-links-mobile {
    display: flex;
    justify-content: center;
    padding: 1.5rem 0;
    flex-wrap: wrap;
  }

  .social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--light-grey);
    color: var(--dark-teal);
    margin: 0 10px 10px 0;
    transition: var(--transition-standard);
  }

  .social-link:hover {
    background-color: var(--dark-teal);
    color: var(--white);
    transform: translateY(-3px);
  }

  /* Mobile view - hide Bootstrap arrows and use custom dropdown indicators instead */
  .dropdown-toggle::after,
  .dropdown-toggle.show-arrow::after {
    display: none !important;
  }
}

@media (min-width: 992px) {
  .mobile-nav,
  .mobile-search-container {
    display: none !important;
  }
}

/* Section styling */
.section {
  padding: var(--section-spacing) 0;
}

@media (max-width: 768px) {
  .section {
    padding: 3rem 0; /* Reduced spacing on mobile */
  }

  .section-title {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    width: 100%;
    text-align: center;
  }

  .section-subtitle {
    font-size: 1rem;
    margin-top: -1.5rem;
    margin-bottom: 2rem;
  }

  /* Make sure all titles are centered on mobile for consistency */
  .section-title.text-start {
    text-align: center;
  }

  .section-title.text-start::after,
  .section-title.text-start::before {
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Navigation menus - add separation */
#bottomNav {
  position: relative;
  z-index: 1010;
  /* REMOVED transition to prevent animation when sticky space is added */
  background-color: var(
    --light-grey
  ); /* Changed to light grey for separation */
  border-top: 1px solid var(--medium-grey);
  border-bottom: 1px solid var(--medium-grey);
}

/* Bottom navigation dropdown specific styles */
#bottomNav .dropdown-menu {
  z-index: 1022 !important; /* Higher than main dropdown menus */
  background-color: var(--white);
  border: 1px solid var(--light-grey);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-top: 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
}

#bottomNav .dropdown-item {
  padding: 0.5rem 1.25rem;
  font-size: 0.95rem;
  color: var(--dark-charcoal);
  transition: all 0.2s ease;
}

#bottomNav .dropdown-item:hover,
#bottomNav .dropdown-item:focus {
  background-color: var(--light-grey);
  color: var(--dark-teal);
}

/* Calendar date selector styles */
.calendar-selector-section {
  background-color: var(--light-grey);
  padding: 3rem 0;
  border-top: 1px solid var(--medium-grey);
}

.date-selector {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1.5rem;
}

.date-selector .form-control {
  border: 1px solid var(--medium-grey);
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
}

.events-display {
  padding: 1.5rem;
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  height: 100%;
}

.events-display h3 {
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--light-grey);
}

.event-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--light-grey);
}

.event-item:last-child {
  border-bottom: none;
}

.event-time {
  color: var(--dark-teal);
  font-weight: 600;
  font-size: 0.9rem;
}

.event-title {
  margin: 0.25rem 0 0.5rem;
  font-weight: 500;
}

.event-location {
  color: var(--dark-grey);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
}

.event-location i {
  margin-right: 0.5rem;
  color: var(--dark-teal);
}

/* Fix card shadows to match the branding */
.hover-card:hover,
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(49, 102, 103, 0.2); /* Changed to match branding color */
}

/* Calendar component styling overrides */
.calendar-section {
  padding: var(--section-spacing) 0;
  border-top: 1px solid var(--medium-grey);
}

@media (max-width: 768px) {
  .calendar-section {
    padding: 3rem 0;
  }

  .calendar-container {
    gap: 2rem;
  }
}

/* Override Bootstrap's default text-primary color with our brand color */
.text-primary {
  color: var(--dark-teal) !important;
}

/* Fix card heights for consistent appearance */
.card.h-100 {
  height: 100% !important;
  display: flex;
  flex-direction: column;
}

.card.h-100 .card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.card.h-100 .card-body .card-text {
  flex-grow: 1;
}

/* Fix image overflow on hover */
.card {
  border: none;
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.card-img-top-container {
  overflow: hidden;
  position: relative;
}

.card-img-top {
  transition: transform 0.5s ease;
  height: 200px;
  object-fit: cover;
  width: 100%;
}

.card:hover .card-img-top {
  transform: scale(1.1);
}

/* Event calendar selector styles */
.date-picker-calendar {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.date-picker-calendar .form-control {
  border: 1px solid var(--medium-grey);
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
}

.event-preview {
  background-color: var(--white);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--box-shadow);
}

.event-preview-title {
  color: var(--dark-teal);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--light-grey);
}

.event-preview-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--light-grey);
}

.event-preview-item:last-child {
  border-bottom: none;
}

/* Fix card shadows to match the branding */
.hover-card:hover,
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(49, 102, 103, 0.2); /* Changed to match branding color */
}

/* Section Title Styling - Updated for consistency */
.section-title {
  color: var(--dark-teal);
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
  font-weight: 700;
  font-size: 2.25rem;
  text-align: center;
  width: 100%;
}

.section-title::after {
  content: "";
  position: absolute;
  width: 80px;
  height: 3px;
  bottom: 0;
  background-color: var(--gold-accent);
  left: 50%;
  transform: translateX(-50%);
}

.section-title::before {
  content: "";
  position: absolute;
  width: 40px;
  height: 3px;
  bottom: -8px;
  background-color: var(--gold-accent);
  opacity: 0.5;
  left: 50%;
  transform: translateX(-50%);
}

/* Left-aligned section titles */
.section-title.text-start {
  text-align: left;
}

.section-title.text-start::after {
  left: 0;
  transform: none;
}

.section-title.text-start::before {
  left: 0;
  transform: none;
}

/* Fix section spacing */
.section {
  padding: var(--section-spacing) 0;
}

.section-sm {
  padding: calc(var(--section-spacing) / 2) 0;
}

.section .container > .section-title {
  margin-bottom: 3rem;
}

/* Section subtitle */
.section-subtitle {
  color: var(--dark-grey);
  text-align: center;
  margin-top: -2rem;
  margin-bottom: 3rem;
  font-size: 1.1rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Mobile adjustments for section titles */
@media (max-width: 768px) {
  .section-title {
    font-size: 1.75rem;
    margin-bottom: 2rem;
  }

  .section-subtitle {
    font-size: 1rem;
    margin-top: -1.5rem;
    margin-bottom: 2rem;
  }
}

/* Welcome Section Styling - Redesigned */
.welcome-section {
  padding-top: 5rem;
  padding-bottom: 6rem;
  background-color: var(--white);
  position: relative;
}

.welcome-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--medium-grey),
    transparent
  );
}

.welcome-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 100%;
  margin: 0 auto;
}

.welcome-image-container {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  height: 400px;
}

.welcome-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.welcome-image-container:hover .welcome-img {
  transform: scale(1.05);
}

.welcome-badge {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background-color: #a06900; /* Darker gold for better contrast */
  color: #ffffff;
  padding: 0.5rem 1.5rem;
  font-weight: 700; /* Increased from 600 */
  font-size: 0.9rem;
  z-index: 2;
  letter-spacing: 1px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.welcome-text-container {
  max-width: 100%;
  text-align: center;
  padding: 0 1rem;
}

.lead {
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--dark-charcoal);
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.highlight {
  color: var(--dark-teal);
  font-weight: 600;
  position: relative;
  display: inline-block;
}

.highlight:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--gold-accent);
  opacity: 0.4;
}

.welcome-stats-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 2.5rem auto;
  max-width: 90%;
}

.welcome-stat {
  text-align: center;
  padding: 1.25rem 1rem;
  position: relative;
  transition: all 0.3s ease;
}

.welcome-stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--light-grey);
  z-index: -1;
  transform: skewX(-5deg);
  transition: all 0.3s ease;
}

.welcome-stat:hover::before {
  background-color: var(--dark-teal);
  transform: skewX(-5deg) translateY(-5px);
  box-shadow: 0 8px 15px rgba(49, 102, 103, 0.15);
}

.welcome-stat:hover .stat-number,
.welcome-stat:hover .stat-label {
  color: var(--white);
}

.stat-number {
  display: block;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--dark-teal);
  line-height: 1.2;
  font-family: "Lato", "Droid Arabic Kufi", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  transition: color 0.3s ease;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dark-grey);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.5rem;
  transition: color 0.3s ease;
}

.welcome-action {
  margin-top: 2.5rem;
  text-align: center;
}

.welcome-action .btn {
  padding: 0.75rem 2.5rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  border-radius: 0;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.welcome-action .btn::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 200%;
  background-color: rgba(255, 255, 255, 0.2);
  top: -50%;
  left: -100px;
  transform: rotate(20deg);
  transition: all 0.7s cubic-bezier(0.19, 1, 0.22, 1);
}

.welcome-action .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.welcome-action .btn:hover::after {
  left: 120%;
}

@media (min-width: 992px) {
  .welcome-container {
    grid-template-columns: 5fr 7fr;
    gap: 0;
    align-items: center;
  }

  .welcome-image-container {
    height: 100%;
    margin-right: -50px;
    position: relative;
    z-index: 1;
    box-shadow: 15px 0 30px rgba(0, 0, 0, 0.1);
    clip-path: polygon(0 0, 100% 0, 92% 100%, 0% 100%);
  }

  .welcome-text-container {
    padding: 3rem 2rem 3rem 6rem;
    text-align: left;
    position: relative;
    z-index: 2;
  }

  .welcome-stats-container {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }

  .lead,
  p.mb-5 {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .welcome-action {
    text-align: left;
  }
}

@media (min-width: 1200px) {
  .welcome-text-container {
    padding-right: 4rem;
  }

  .welcome-stats-container {
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .welcome-image-container {
    height: 350px;
  }

  .welcome-text-container {
    padding: 0;
  }

  .stat-number {
    font-size: 1.75rem;
  }
}

/* Language Switcher Styling */
.language-toggle {
  display: flex;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  overflow: hidden;
  padding: 2px;
  margin-left: 10px;
}

.language-btn {
  background: transparent;
  border: 0;
  color: var(--white);
  padding: 4px 10px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 18px;
}

.language-btn.active {
  background-color: var(--white);
  color: var(--dark-teal);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.language-btn:hover:not(.active) {
  background-color: rgba(255, 255, 255, 0.1);
}

/* University Name Styling */
.university-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--dark-teal);
  display: none;
}

@media (min-width: 576px) {
  .university-name {
    display: inline-block;
  }
}

/* Mobile Menu Adjustments */
@media (max-width: 991.98px) {
  #combinedMobileNav {
    padding-top: 60px;
    z-index: 1030;
  }

  .mobile-menu-close {
    top: 15px;
  }
}

/* Modern Footer Styling - Jinan Branded Colors */
.footer {
  background-color: var(--dark-teal);
  color: #f8f9fa;
  margin-top: 0;
}

.footer-main {
  padding: 4rem 0 3rem;
}

.footer h5 {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 12px;
}

.footer h5::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: var(--gold-accent);
}

.footer-about p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
}

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

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 15px;
}

.footer-links a::before {
  content: "→";
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--gold-accent);
  padding-left: 20px;
}

.footer-links a:hover::before {
  color: var(--gold-accent);
}

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

.footer-contact li {
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
}

.footer-contact li i {
  margin-right: 10px;
  color: var(--gold-accent);
  width: 20px;
  text-align: center;
}

.footer .social-links {
  display: flex;
  gap: 10px;
}

.footer .social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  transition: all 0.3s ease;
}

.footer .social-link:hover {
  background-color: var(--gold-accent);
  color: var(--dark-teal);
  transform: translateY(-3px);
}

.footer-bottom {
  background-color: #1f5556;
  padding: 1.5rem 0;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0;
}

/* Ensure no extra space after footer */
html, body {
  margin-bottom: 0;
  padding-bottom: 0;
}

footer, .footer {
  margin-bottom: 0;
}

.footer-bottom-links {
  margin-top: 1rem;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.8);
  margin-left: 1.5rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-bottom-links a:hover {
  color: var(--gold-accent);
}

.footer .form-control {
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--white);
  border-radius: 4px;
}

.footer .form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.footer .btn-primary {
  background-color: var(--gold-accent);
  border-color: var(--gold-accent);
  color: var(--dark-teal);
  font-weight: 600;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

.footer .btn-primary:hover {
  background-color: #d4a94b;
  border-color: #d4a94b;
}

@media (min-width: 768px) {
  .footer-bottom-links {
    margin-top: 0;
  }
}

/* Footer University Name */
.footer-university-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--white);
  font-family: "Lato", "Droid Arabic Kufi", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
}

@media (max-width: 576px) {
  .footer-university-name {
    font-size: 1.2rem;
  }
}

/* Mobile Menu Adjustments */
@media (max-width: 991.98px) {
  #combinedMobileNav {
    top: 0;
    padding-top: 60px;
    z-index: 1030;
  }

  .mobile-menu-close {
    top: 15px;
  }
}

/* Mobile Menu Language Toggle */
.mobile-menu-language-toggle {
  width: 100%;
  background-color: rgba(49, 102, 103, 0.05);
  border-radius: 30px;
  padding: 3px;
  display: flex;
}

.mobile-menu-language-toggle .language-btn {
  flex: 1;
  color: var(--dark-teal);
  padding: 8px 12px;
  font-size: 0.95rem;
  border-radius: 30px;
  text-align: center;
}

.mobile-menu-language-toggle .language-btn.active {
  background-color: var(--dark-teal);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(49, 102, 103, 0.2);
}

/* Arabic RTL Support */
html[data-lang="ar"] {
  direction: rtl;
  text-align: right;
  font-family: "Lato", "Droid Arabic Kufi", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
}

html[data-lang="ar"] body,
html[data-lang="ar"] p,
html[data-lang="ar"] a,
html[data-lang="ar"] span,
html[data-lang="ar"] input,
html[data-lang="ar"] button,
html[data-lang="ar"] select,
html[data-lang="ar"] textarea,
html[data-lang="ar"] .nav-link,
html[data-lang="ar"] .dropdown-item,
html[data-lang="ar"] .btn {
  font-family: "Lato", "Droid Arabic Kufi", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
}

html[data-lang="ar"] h1,
html[data-lang="ar"] h2,
html[data-lang="ar"] h3,
html[data-lang="ar"] h4,
html[data-lang="ar"] h5,
html[data-lang="ar"] h6,
html[data-lang="ar"] .section-title {
  font-family: "Lato", "Droid Arabic Kufi", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  font-weight: 700;
}

/* RTL adjustments for the layout */
html[data-lang="ar"] .ms-auto {
  margin-right: auto !important;
  margin-left: 0 !important;
}

html[data-lang="ar"] .me-3 {
  margin-left: 1rem !important;
  margin-right: 0 !important;
}

html[data-lang="ar"] .ms-3 {
  margin-right: 1rem !important;
  margin-left: 0 !important;
}

html[data-lang="ar"] .me-2 {
  margin-left: 0.5rem !important;
  margin-right: 0 !important;
}

html[data-lang="ar"] .ms-2 {
  margin-right: 0.5rem !important;
  margin-left: 0 !important;
}

/* RTL ticker animation */
html[data-lang="ar"] .ticker-content {
  direction: rtl;
  animation: ticker-rtl 25s linear infinite;
  padding-right: 30px;
  padding-left: 0;
}

@keyframes ticker-rtl {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(50%);
  }
}

/* Flipping ticker heading background in RTL */
html[data-lang="ar"] .ticker-heading {
  padding-left: 15px;
  padding-right: 15px;
  margin-right: 0;
  margin-left: 15px;
  position: relative;
  z-index: 1;
}

/* Restore the arrow shape for Arabic by removing the transform rotation */
html[data-lang="ar"] .ticker-heading::after {
  content: "";
  left: -20px;
  right: auto;
  top: 0;
  bottom: 0;
  width: 20px;
  height: 100%;
  background-color: inherit;
  position: absolute;
  transform: none;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

/* Badge position fix for RTL in welcome section */
html[data-lang="ar"] .welcome-badge {
  left: 30px;
  right: auto;
  position: absolute;
}

/* Hide English content when Arabic is active */
html[data-lang="ar"] .english-content {
  display: none;
}

/* Hide Arabic content when English is active */
html[data-lang="en"] .arabic-content {
  display: none;
}

/* Quick Link Items styling */
.quick-link-item {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  height: 100%;
}

.quick-link-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
  border-bottom: 3px solid var(--gold-accent);
}

.quick-link-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.quick-link-icon {
  font-size: 2.5rem;
  color: var(--dark-teal);
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  background: rgba(49, 102, 103, 0.08);
  width: 80px;
  height: 80px;
  line-height: 80px;
  border-radius: 50%;
  display: inline-block;
}

.quick-link-item:hover .quick-link-icon {
  color: var(--gold-accent);
  transform: scale(1.1);
  background: rgba(205, 153, 51, 0.08);
}

.quick-link-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0;
  color: var(--dark-teal);
  transition: all 0.3s ease;
}

.quick-link-item:hover .quick-link-title {
  color: var(--gold-accent);
}

/* Background light section */
.bg-light {
  background-color: #f8f9fa !important;
}

/* RTL support for Quick Links section */
html[data-lang="ar"] .quick-link-item {
  direction: rtl;
}

/* Academic Programs Section Styles */
.program-card {
  transition: all 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
}

.program-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
}

.program-image-container {
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a472a 0%, #c9b037 100%);
}

.program-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.program-card:hover .program-image {
  transform: scale(1.05);
}

.program-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.program-placeholder .placeholder-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.8);
  z-index: 2;
}

.program-degree-badge {
  top: 10px;
  right: 10px;
  z-index: 3;
}

.program-degree-badge .badge {
  background: linear-gradient(135deg, #1a472a 0%, #c9b037 100%) !important;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
}

.program-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a472a;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.program-meta {
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

.program-description {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.program-details {
  margin-bottom: 1rem;
}

.program-details > div {
  margin-bottom: 0.25rem;
}

.program-details i {
  color: #c9b037;
}

.program-card .btn-outline-primary {
  border-color: #1a472a;
  color: #1a472a;
  font-weight: 500;
  transition: all 0.3s ease;
}

.program-card .btn-outline-primary:hover {
  background: linear-gradient(135deg, #1a472a 0%, #c9b037 100%);
  border-color: transparent;
  color: white;
  transform: translateY(-2px);
}

/* Responsive adjustments for Academic Programs */
@media (max-width: 768px) {
  .program-image-container {
    height: 180px;
  }

  .program-title {
    font-size: 1rem;
  }

  .program-description {
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .program-image-container {
    height: 160px;
  }

  .program-card {
    margin-bottom: 1.5rem;
  }
}

/* Academic Programs loading animation */
.academic-programs-loading {
  text-align: center;
  padding: 2rem;
}

.academic-programs-loading .spinner-border {
  color: #1a472a;
}

/* 
Academic Programs Section Title - Commented out to use unified styles from home-page.css
.academic-programs-section .section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: #1a472a;
  margin-bottom: 3rem;
  position: relative;
  text-align: center;
  width: 100%;
  display: block;
}

.academic-programs-section .section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #1a472a 0%, #c9b037 100%);
  margin: 1rem auto 0;
  border-radius: 2px;
}
*/

/* RTL Support for Academic Programs */
html[data-lang="ar"] .program-card .btn-outline-primary i {
  margin-left: 0;
  margin-right: 0.25rem;
}

html[data-lang="ar"] .program-meta i {
  margin-left: 0.25rem;
  margin-right: 0;
}

html[data-lang="ar"] .program-details i {
  margin-left: 0.25rem;
  margin-right: 0;
}

/* Hero Section - Modern & Cutting Edge */
.hero-section {
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding: 150px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.8) 100%
  );
  z-index: 1;
  opacity: 0; /* Hide when the overlay is present */
  pointer-events: none; /* Allow clicks to pass through */
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
  position: relative;
  display: inline-block;
  color: var(--white);
}

.hero-title::after {
  content: "";
  position: absolute;
  width: 80px;
  height: 4px;
  background-color: var(--gold-accent);
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  font-weight: 500;
  opacity: 1;
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.hero-buttons {
  margin-top: 2rem;
}

.hero-buttons .btn {
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-buttons .btn-primary {
  background-color: #b27e21;
  border-color: #b27e21;
  font-weight: 700;
}

.hero-buttons .btn-primary:hover {
  background-color: var(--gold-accent-hover);
  border-color: var(--gold-accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.hero-buttons .btn-outline-light {
  border-width: 2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-buttons .btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .hero-section {
    padding: 100px 0;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-buttons .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* ===============================
   REUSABLE SECTION HEADERS
   =============================== */

/* Non-clickable section headers (reusable across all pages) */
.section-header,
.card-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--jinan-teal, #316667);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--jinan-gold, #cd9933);
  align-items: center;
  gap: 0.5rem;
  cursor: default; /* Explicitly non-clickable */
}

.section-header i,
.card-title i {
  color: var(--jinan-gold, #cd9933);
  font-size: 1.2rem;
}

/* Clickable section headers (for collapsible content) */
.collapsible-header {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--jinan-teal, #316667);
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.collapsible-header:hover {
  background: rgba(49, 102, 103, 0.1);
}

.collapsible-header .collapse-icon {
  margin-left: auto;
  transition: transform 0.3s ease;
  font-size: 1.2rem;
  transform: rotate(-90deg); /* Start collapsed */
}

.collapsible-header:not(.collapsed) .collapse-icon {
  transform: rotate(0deg);
}

/* ===============================
   REUSABLE INFO CARD COMPONENTS
   =============================== */

/* Info Card - Shared across multiple pages */
.info-card {
  background: white;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Quick Actions - Shared component for action lists */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  background: #f8f9fa;
  color: var(--jinan-teal, #316667);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.action-link:hover {
  background: var(--jinan-teal, #316667);
  color: white;
  text-decoration: none;
  transform: translateX(5px);
}

.action-link i {
  color: var(--jinan-gold, #cd9933);
  font-size: 1.1rem;
}

.action-link:hover i {
  color: white;
}

/* Contact Form Styles - Modern Design */
.contactform {
  background: linear-gradient(135deg, var(--light-grey) 0%, var(--white) 100%);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(49, 102, 103, 0.1);
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}

.contactform::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--jinan-teal), var(--gold-accent));
}

.contactform h5#message {
  background: linear-gradient(135deg, var(--success-green), #22c55e);
  color: var(--white);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
  display: none;
}

.contactform h5#message.show {
  display: block;
  animation: slideInFromTop 0.5s ease-out;
}

.c_holder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

#maininput {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

#maininput input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--light-grey);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  background: var(--white);
  color: var(--dark-charcoal);
  transition: all 0.3s ease;
  position: relative;
}

#maininput input:focus {
  outline: none;
  border-color: var(--jinan-teal);
  box-shadow: 0 0 0 3px rgba(49, 102, 103, 0.1);
  transform: translateY(-2px);
}

#maininput input::placeholder {
  color: var(--medium-grey);
  font-weight: 400;
}

#msgholder {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

.msg {
  width: 100% !important;
  min-height: 120px;
  padding: 1rem 1.25rem;
  border: 2px solid var(--light-grey);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  background: var(--white);
  color: var(--dark-charcoal);
  resize: vertical;
  transition: all 0.3s ease;
  font-family: inherit;
  line-height: 1.5;
}

.msg:focus {
  outline: none;
  border-color: var(--jinan-teal);
  box-shadow: 0 0 0 3px rgba(49, 102, 103, 0.1);
  transform: translateY(-2px);
}

.msg::placeholder {
  color: var(--medium-grey);
  font-weight: 400;
}

.captcha {
  background: var(--white);
  border: 2px solid var(--light-grey);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.3s ease;
}

.captcha:hover {
  border-color: var(--jinan-teal);
  box-shadow: 0 4px 15px rgba(49, 102, 103, 0.1);
}

.captcha a {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--jinan-teal), var(--dark-teal));
  color: var(--white);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  box-shadow: 0 4px 12px rgba(49, 102, 103, 0.3);
}

.captcha a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(49, 102, 103, 0.4);
  background: linear-gradient(135deg, var(--dark-teal), var(--jinan-teal));
}

.captcha input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--light-grey);
  border-radius: 6px;
  font-size: 1rem;
  background: var(--white);
  transition: all 0.3s ease;
}

.captcha input:focus {
  outline: none;
  border-color: var(--jinan-teal);
  box-shadow: 0 0 0 2px rgba(49, 102, 103, 0.1);
}

.contactform .btn {
  background: linear-gradient(135deg, var(--jinan-teal), var(--dark-teal));
  color: var(--white);
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(49, 102, 103, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 1rem;
  align-self: flex-start;
}

.contactform .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(49, 102, 103, 0.4);
  background: linear-gradient(135deg, var(--dark-teal), var(--jinan-teal));
}

.contactform .btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(49, 102, 103, 0.3);
}

/* Google Maps Styling */
.contactform iframe {
  margin-top: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  border: 3px solid var(--white);
  transition: all 0.3s ease;
}

.contactform iframe:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Contact Page Header */
.contact-header {
  background: linear-gradient(
    135deg,
    var(--jinan-teal) 0%,
    var(--dark-teal) 100%
  );
  color: var(--white);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  animation: shimmer 3s infinite;
}

.contact-header .body-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 2;
}

.contact-header .body-title i {
  margin-right: 1rem;
  color: var(--gold-accent);
}

/* Responsive Design */
@media (max-width: 768px) {
  .c_holder {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .contactform {
    padding: 1.5rem;
    margin: 1rem 0;
  }

  .contact-header .body-title {
    font-size: 2rem;
  }

  #maininput input,
  .msg,
  .contactform .btn {
    font-size: 1rem;
  }

  .captcha {
    flex-direction: column;
    gap: 1rem;
  }

  .captcha a {
    min-width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .contactform {
    padding: 1rem;
  }

  .contact-header {
    padding: 1.5rem;
  }

  .contact-header .body-title {
    font-size: 1.75rem;
  }

  .contact-header .body-title i {
    margin-right: 0.5rem;
  }
}

/* Animations */
@keyframes slideInFromTop {
  0% {
    opacity: 0;
    transform: translateY(-30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Form Validation States */
.contactform input.error,
.contactform textarea.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.contactform input.success,
.contactform textarea.success {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Loading State */
.contactform .btn.loading {
  position: relative;
  color: transparent;
}

.contactform .btn.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--white);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Additional Contact Page Enhancements */

/* Page Title Styling */
.slice.general-white .contact-header + div img {
  filter: brightness(1.1) contrast(1.05);
  transition: all 0.3s ease;
}

.slice.general-white .contact-header + div:hover img {
  filter: brightness(1.2) contrast(1.1);
}

/* General Page Styles (Missing from original CSS) */
.slice {
  padding: 2rem 0;
  position: relative;
}

.col-general {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.body-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--dark-teal);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
}

.body-title.no-padding-bottom {
  padding-bottom: 0;
  margin-bottom: 0.5rem;
}

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

.body-title.ltr {
  text-align: left;
  direction: ltr;
}

.devide-dh {
  height: 2px;
  width: 100%;
  margin: 1rem 0 2rem;
  background-color: var(--border-light);
}

.devide-dh.b-gray {
  background-color: #e0e0e0;
}

#content.insub {
  padding: 1.5rem 0;
  line-height: 1.7;
  color: var(--text-gray);
}

#content.insub p {
  margin-bottom: 1rem;
}

#content.insub ul,
#content.insub ol {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

#content.insub h2,
#content.insub h3,
#content.insub h4 {
  color: var(--dark-teal);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

#content.insub img {
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
}

.clear {
  clear: both;
}

/* Enhanced Contact Form Grid Layout */
@media (min-width: 992px) {
  .c_holder {
    grid-template-columns: 1fr 1.2fr;
  }
}

/* Input Field Enhancements */
.contactform input,
.contactform textarea {
  position: relative;
  background: linear-gradient(135deg, var(--white) 0%, #f8f9fa 100%);
}

.contactform input:hover,
.contactform textarea:hover {
  border-color: rgba(49, 102, 103, 0.5);
  box-shadow: 0 2px 8px rgba(49, 102, 103, 0.1);
}

/* Success State Animation */
@keyframes checkmarkBounce {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.contactform input.success,
.contactform textarea.success {
  border-color: #22c55e;
  background: linear-gradient(135deg, var(--white) 0%, #f0fdf4 100%);
}

/* Error State Animation */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.contactform input.error,
.contactform textarea.error {
  animation: shake 0.5s ease-in-out;
  border-color: #ef4444;
  background: linear-gradient(135deg, var(--white) 0%, #fef2f2 100%);
}

/* CAPTCHA Enhancements */
.captcha {
  background: linear-gradient(135deg, var(--white) 0%, #f8f9fa 100%);
  position: relative;
  overflow: hidden;
}

.captcha::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  transition: left 0.5s ease;
}

.captcha:hover::before {
  left: 100%;
}

/* Submit Button Enhancements */
.contactform .btn {
  position: relative;
  overflow: hidden;
  font-family: inherit;
}

.contactform .btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.6s ease;
}

.contactform .btn:hover::before {
  left: 100%;
}

/* Loading spinner for button */
.contactform .btn.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--white);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Contact Information Cards */
.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.contact-info-card {
  background: linear-gradient(135deg, var(--white) 0%, #f8f9fa 100%);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(49, 102, 103, 0.1);
}

.contact-info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--jinan-teal);
}

.contact-info-card .icon {
  font-size: 2.5rem;
  color: var(--jinan-teal);
  margin-bottom: 1rem;
  display: block;
}

.contact-info-card h4 {
  color: var(--dark-teal);
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.contact-info-card p {
  color: var(--medium-grey);
  margin: 0;
}

/* RTL Support */
html[data-lang="ar"] .contactform {
  direction: rtl;
}

html[data-lang="ar"] .c_holder {
  grid-template-columns: 1.2fr 1fr;
}

html[data-lang="ar"] .captcha {
  flex-direction: row-reverse;
}

html[data-lang="ar"] .contact-header .body-title i {
  margin-right: 0;
  margin-left: 1rem;
}

/* Print Styles */
@media print {
  .contactform {
    box-shadow: none;
    background: white;
    border: 1px solid #ccc;
  }

  .contact-header {
    background: white;
    color: black;
  }

  .contactform iframe {
    display: none;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .contactform {
    border: 2px solid;
    background: white;
  }

  .contactform input,
  .contactform textarea {
    border: 2px solid;
    background: white;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .contactform *,
  .contactform *::before,
  .contactform *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus Visibility Enhancement */
.contactform input:focus-visible,
.contactform textarea:focus-visible,
.contactform .btn:focus-visible {
  outline: 3px solid var(--jinan-teal);
  outline-offset: 2px;
}

/* Accessibility Improvements */
.contactform label {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contactform input[aria-invalid="true"],
.contactform textarea[aria-invalid="true"] {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Touch Device Enhancements */
@media (hover: none) and (pointer: coarse) {
  .contactform input,
  .contactform textarea,
  .contactform .btn {
    min-height: 48px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .captcha a {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Debug Toolbar Positioning Fix */
#debug-icon {
  position: fixed !important;
  bottom: 0 !important;
  right: 0 !important;
  z-index: 9999 !important;
}

#debug-bar {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 10000 !important;
  max-height: 50vh !important;
  overflow-y: auto !important;
}

/* Ensure page content is not hidden behind debugbar - only when debugbar is present */
body.debug-bar-active {
  padding-bottom: 40px !important; /* Space for debug icon */
}

/* When debugbar is open, add more padding */
body.debug-bar-open {
  padding-bottom: 300px !important;
}

/* Ensure no extra padding on production */
body:not(.debug-bar-active) {
  padding-bottom: 0 !important;
}

/* ============================================
   ENHANCED HOVER EFFECTS FOR NAVIGATION
   ============================================ */

/* Top Nav - Subtle glow effect on hover */
.top-nav a {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-nav a:hover {
  color: var(--gold-accent) !important;
  text-shadow: 0 0 8px rgba(205, 153, 51, 0.5);
}

.top-nav a i {
  transition: transform 0.3s ease;
  margin-right: 0.4rem;
}

.top-nav a:hover i {
  transform: scale(1.2);
}

/* Main Nav Links - Enhanced underline with glow */
#middleNav .nav-link {
  position: relative;
  overflow: hidden;
}

#middleNav .nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-accent), var(--dark-teal));
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
  border-radius: 2px;
}

#middleNav .nav-link:hover::before {
  width: 80%;
  box-shadow: 0 2px 10px rgba(205, 153, 51, 0.4);
}

#middleNav .nav-link:hover {
  color: var(--dark-teal);
  transform: translateY(-2px);
}

/* Bottom Nav Links - Slide-up background effect */
#bottomNav .nav-link {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

#bottomNav .nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(to top, rgba(49, 102, 103, 0.1), transparent);
  transition: height 0.3s ease;
  z-index: -1;
}

#bottomNav .nav-link:hover::before {
  height: 100%;
}

#bottomNav .nav-link:hover {
  color: var(--dark-teal);
}

/* Dropdown Items - Enhanced hover with icon animation */
.dropdown-menu .dropdown-item {
  position: relative;
  padding-left: 1rem;
  transition: all 0.25s ease;
}

.dropdown-menu .dropdown-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleX(0);
  width: 4px;
  height: 60%;
  background: var(--gold-accent);
  border-radius: 0 2px 2px 0;
  transition: transform 0.25s ease;
}

.dropdown-menu .dropdown-item:hover::before {
  transform: translateY(-50%) scaleX(1);
}

.dropdown-menu .dropdown-item:hover {
  padding-left: 1.5rem;
  background-color: rgba(49, 102, 103, 0.05);
  color: var(--dark-teal);
}

/* Arrow icon rotation on dropdown hover */
.dropdown-toggle.modern-arrow:hover .arrow-icon,
.dropdown-toggle.modern-arrow[aria-expanded="true"] .arrow-icon {
  transform: rotate(180deg);
  color: var(--gold-accent);
}

/* Logo hover effect */
.navbar-brand:hover img {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 8px rgba(49, 102, 103, 0.3));
}

/* ============================================
   STICKY NAVIGATION - COMPACT MODE
   ============================================ */

/* Sticky menu wrapper - always present but hidden by default */
.sticky-menu-wrapper {
  display: none;
  position: relative;
}

/* Sticky burger menu for menu 3 (secondary menu) */
.sticky-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--dark-teal);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.sticky-menu-toggle:hover {
  background: var(--gold-accent);
  transform: scale(1.05);
}

.sticky-menu-toggle i {
  color: white;
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.sticky-menu-toggle:hover i {
  transform: rotate(90deg);
}

.sticky-menu-toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}

/* Desktop sticky behavior */
@media (min-width: 992px) {
  /* Ensure navbar allows dropdown overflow */
  #middleNav.sticky-nav {
    overflow: visible !important;
  }

  #middleNav.sticky-nav .container {
    overflow: visible !important;
  }

  /* Show burger menu wrapper when sticky */
  #middleNav.sticky-nav .sticky-menu-wrapper {
    display: block;
    margin-right: 1rem;
  }

  /* Hide logo image when sticky - but keep brand for spacing */
  #middleNav.sticky-nav .navbar-brand img {
    opacity: 0;
    visibility: hidden;
    width: 0 !important;
    height: 0 !important;
    margin: 0;
    padding: 0;
  }

  /* Hide university name when sticky */
  #middleNav.sticky-nav .university-name {
    display: none !important;
  }

  /* Keep navbar-brand minimal when sticky */
  #middleNav.sticky-nav .navbar-brand {
    margin-right: 0;
    padding: 0;
  }

  /* Hide bottomNav when middleNav is sticky */
  #middleNav.sticky-nav ~ #bottomNav {
    display: none !important;
  }
}

/* Sticky Secondary Menu Dropdown */
.sticky-secondary-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 280px;
  background: white;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
  max-height: 70vh;
  overflow-y: auto;
  margin-top: 8px;
  border: 1px solid rgba(0,0,0,0.1);
}

.sticky-secondary-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sticky-secondary-menu .menu-header {
  padding: 1rem 1.25rem;
  background: var(--dark-teal);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sticky-secondary-menu .menu-list {
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
}

.sticky-secondary-menu .menu-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sticky-secondary-menu .menu-item:last-child {
  border-bottom: none;
}

.sticky-secondary-menu .menu-link {
  display: flex;
  align-items: center;
  padding: 0.875rem 1.25rem;
  color: var(--dark-charcoal);
  font-size: 0.95rem;
  transition: all 0.25s ease;
  text-decoration: none;
}

.sticky-secondary-menu .menu-link:hover {
  background: rgba(49, 102, 103, 0.08);
  color: var(--dark-teal);
  padding-left: 1.5rem;
}

.sticky-secondary-menu .menu-link i {
  margin-right: 0.75rem;
  color: var(--dark-teal);
  font-size: 0.85rem;
  width: 20px;
  text-align: center;
}

/* Submenu in sticky dropdown */
.sticky-secondary-menu .has-submenu > .menu-link::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-left: auto;
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

.sticky-secondary-menu .has-submenu.open > .menu-link::after {
  transform: rotate(180deg);
}

.sticky-secondary-menu .submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.02);
  display: none;
}

.sticky-secondary-menu .has-submenu.open .submenu {
  display: block;
}

.sticky-secondary-menu .submenu .menu-link {
  padding-left: 2.5rem;
  font-size: 0.9rem;
}

/* Quick action buttons in sticky menu */
.sticky-secondary-menu .quick-actions {
  padding: 1rem 1.25rem;
  background: var(--light-grey);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sticky-secondary-menu .quick-action-btn {
  flex: 1;
  min-width: calc(50% - 0.25rem);
  padding: 0.625rem 0.75rem;
  background: white;
  border: 1px solid var(--dark-teal);
  border-radius: 6px;
  color: var(--dark-teal);
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  transition: all 0.25s ease;
  cursor: pointer;
  text-decoration: none;
}

.sticky-secondary-menu .quick-action-btn:hover {
  background: var(--dark-teal);
  color: white;
}

.sticky-secondary-menu .quick-action-btn i {
  margin-right: 0.375rem;
}
