/* Enhanced Multi-Level Dropdown Styles */
.navbar-nav .dropdown-menu {
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 8px 0;
    margin-top: 8px;
    min-width: 280px;
    animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin: 2px 8px;
    position: relative;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
    color: #1f2937;
    transform: translateX(4px);
}

.dropdown-item:focus {
    background-color: #e5e7eb;
    color: #1f2937;
}

/* Multi-level dropdown positioning */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu>.dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: 0;
    margin-left: 4px;
    display: none;
    z-index: 1050;
}

.dropdown-submenu:hover>.dropdown-menu {
    display: block;
}

.dropdown-submenu>.dropdown-item::after {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    float: right;
    margin-left: auto;
    font-size: 10px;
    color: #9ca3af;
    transition: all 0.2s ease;
}

.dropdown-submenu:hover>.dropdown-item::after {
    color: #6b7280;
    transform: translateX(2px);
}

/* Main navigation styling */
.navbar-dark .navbar-nav .nav-link {
    color: #f9fafb;
    font-weight: 500;
    padding: 12px 16px;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 0 2px;
    position: relative;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.navbar-dark .navbar-nav .nav-link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.15);
}

/* Dropdown toggle indicators */
.dropdown-toggle::after {
    margin-left: 8px;
    transition: transform 0.2s ease;
}

.dropdown.show .dropdown-toggle::after {
    transform: rotate(180deg);
}

/* Mobile responsive adjustments */
@media (max-width: 991.98px) {
    .navbar-nav .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none;
        border-left: 3px solid #3b82f6;
        border-radius: 0;
        margin: 8px 0 0 16px;
        background-color: rgba(59, 130, 246, 0.05);
    }

    .dropdown-submenu>.dropdown-menu {
        position: static !important;
        left: 0 !important;
        margin-left: 16px !important;
        border-left: 2px solid #6b7280;
        background-color: rgba(107, 114, 128, 0.05);
    }

    .dropdown-submenu>.dropdown-item::after {
        content: '\f078';
        transform: none;
    }

    .dropdown-item {
        padding: 10px 16px;
        margin: 1px 4px;
    }

    .navbar-toggler {
        border: none;
        padding: 6px 8px;
        border-radius: 6px;
        transition: all 0.2s ease;
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
}

/* Top header styling */
.top-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.language-switcher .btn {
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
    font-size: 12px;
    padding: 4px 8px;
}

.language-switcher .btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* Main header styling */
.main-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.institute-info h1 {
    color: #1e40af;
    font-weight: 700;
    font-size: 24px;
    line-height: 1.2;
}

.search-box input {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.search-box input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Navigation bar styling */
.navbar {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 0;
}

/* Rainbow zoom animation for special elements */
.rainbow-zoom {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    animation: zoomRainbow 4s infinite;
}

@keyframes zoomRainbow {
    0% {
        transform: scale(1);
        color: #ef4444;
    }

    14% {
        transform: scale(1.05);
        color: #f97316;
    }

    28% {
        transform: scale(1.08);
        color: #eab308;
    }

    42% {
        transform: scale(1.1);
        color: #22c55e;
    }

    57% {
        transform: scale(1.08);
        color: #3b82f6;
    }

    71% {
        transform: scale(1.05);
        color: #6366f1;
    }

    85% {
        transform: scale(1);
        color: #8b5cf6;
    }

    100% {
        transform: scale(1);
        color: #ef4444;
    }
}

/* Enhanced marquee styling */
marquee img {
    height: 300px !important;
    margin-right: 20px;
    width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

marquee img:hover {
    transform: scale(1.05);
}

/* Content boxes styling */
.content-box {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.3s ease;
}

.content-box:hover {
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.section-title {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 16px 20px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.content-body {
    padding: 20px;
}

/* ===============================
   Sidebar Styles (Static/Sticky)
   =============================== */
.dept-left-nav,
.dept-right-nav {
  box-sizing: border-box;
  background-color: #1f2937;
  color: white;
  padding: 20px;
  width: fit-content;
  min-width: 240px;
  white-space: nowrap;
  position: sticky;
  top: 60px;
  overflow-x: hidden;
  overflow-y: auto;
}
@media (max-width: 992px) {
  .dept-left-nav,
  .dept-right-nav {
    width: 100%;
    position: relative;
    top: 0;
    white-space: normal;
  }
}

.dept-left-nav h5,
.dept-right-nav h5 {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 15px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}
/* no mobile override needed */

.dept-left-nav ul,
.dept-right-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
/* no mobile override needed */

.dept-left-nav li,
.dept-right-nav li {
  margin-bottom: 10px;
}
/* no mobile override needed */

.dept-left-nav a,
.dept-right-nav a {
  display: block;
  padding: 6px 8px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
@media (max-width: 992px) {
  .dept-left-nav a,
  .dept-right-nav a {
    /* allow links to wrap if too long */
    white-space: normal;
  }
}

.dept-left-nav a:hover,
.dept-right-nav a:hover {
  background-color: #374151;
  color: #ffffff;
}
/* no mobile override needed */


/* ===============================
   Layout Wrapper & Main Content
   =============================== */
.dept-layout-wrapper {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  background-color: #f8f9fa;
}
@media (max-width: 992px) {
  .dept-layout-wrapper {
    flex-direction: column;
  }
}

.dept-main-content {
  flex-grow: 1;
  padding: 30px 15px;
  background-color: #ffffff;
  box-sizing: border-box;
}
@media (max-width: 992px) {
  .dept-main-content {
    padding: 20px 15px;
  }
}


/* ===============================
   Profile Template Styles
   =============================== */
.profile-template__header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}
@media (max-width: 992px) {
  .profile-template__header {
    flex-direction: column;
    align-items: center;
  }
}

.profile-template__img {
  width: 200px;
  height: 220px;
  object-fit: cover;
  border-radius: 4px;
}
@media (max-width: 992px) {
  .profile-template__img {
    margin-bottom: 1rem;
  }
}

.profile-template__info {
  flex: 1;
  margin-left: 1rem;
}
@media (max-width: 992px) {
  .profile-template__info {
    margin-left: 0;
    text-align: center;
  }
}

.profile-template__name {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.25rem;
}
/* no mobile override needed */

.profile-template__qual {
  font-size: 0.95rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}
/* no mobile override needed */

.profile-template__desc {
  font-size: 1rem;
  line-height: 1.6;
  color: #4b5563;
  margin-bottom: 1.5rem;
}
/* no mobile override needed */


/* ===============================
   Accordion FAQ Styles
   =============================== */
.accordion-button::after {
  display: none;
}
/* no mobile override needed */

.profile-template .accordion-body ul,
.profile-template .accordion-body ol {
  list-style: none;
  margin: 0;
  padding-left: 0;
}
.profile-template .accordion-body li {
  margin-bottom: 0.5rem;
}
/* no mobile override needed */

/* ===============================
   Dual-Image Card
   =============================== */
.dual-image-template {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.dual-image-template__img {
  width: 100%;
  max-width: 400px;        /* cap image width on larger screens */
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 4px;
  margin: 0 auto;          /* center if container is wider */
}

.dual-image-template__desc {
  font-size: 1rem;
  line-height: 1.6;
  color: #4b5563;
  margin: 0;
}
.dual-image-template__desc + .dual-image-template__desc {
  margin-top: 0.75rem;
}

/* Responsive: stack and allow full-width images on small screens */
@media (max-width: 992px) {
  .dual-image-template .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 0.75rem;
  }
  .dual-image-template__img {
    max-width: 100%;       /* fill available width on mobile */
  }
}



/* ===============================
   PDF Section Styles
   =============================== */
.pdf-section {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
/* no mobile override needed */

.pdf-section__name {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.75rem;
}
/* no mobile override needed */

.pdf-section__desc {
  font-size: 1rem;
  line-height: 1.6;
  color: #4b5563;
  margin-bottom: 1rem;
}
/* no mobile override needed */

.pdf-section__viewer {
  margin-top: 1.5rem;
}
.pdf-section__viewer iframe {
  width: 100%;
  height: 600px;
  border: none;
  border-radius: 4px;
}
@media (max-width: 768px) {
  .pdf-section__viewer iframe {
    height: 400px;
  }
}


/* === Text Block Base Styles === */
.text-block {
  max-width: 800px;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.text-block .card-body {
  padding: 2rem;
}

.text-block__heading {
  font-size: 2rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1.5rem;
}

.text-block__para {
  font-size: 1rem;
  line-height: 1.6;
  color: #4b5563;
  margin-bottom: 1.5rem;
}

/* === Mobile Overrides (≤ 576px) === */
@media (max-width: 576px) {
  .text-block .card-body {
    padding: 1rem;
  }

  .text-block__heading {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
  }

  .text-block__para {
    font-size: 0.95rem;
    margin-bottom: 1rem;
  }
}