/* ------------------------------------------------------------
   Division of Biomedical Engineering — overrides on top of the
   ChemLabs theme (assets/css/style.css)
------------------------------------------------------------- */

/* Karunya brand palette, sampled from img/logo/karunya-university-logo.avif
   red  #bc1823  wordmark      blue   #0c3a7a  head emblem
   gold #aa8d57  gear & torch  orange #f06f28  flame          */
:root {
  --color-primary: #bc1823;
  --color-secondary: #0c3a7a;
  --color-primary-rgb: 188, 24, 35;
  --color-secondary-rgb: 12, 58, 122;
  --color-accent: #082b5c;
  --color-gold: #aa8d57;
  --color-gold-light: #d9b46c;
  --color-flame: #f06f28;
  --color-green-100: #fbe8e9;
  --bs-primary: #bc1823;
  --bs-secondary: #0c3a7a;
  --bs-primary-rgb: 188, 24, 35;
  --bs-secondary-rgb: 12, 58, 122;
  --bs-link-color: #bc1823;
  --bs-link-color-rgb: 188, 24, 35;
  --bs-link-hover-color: #0c3a7a;
  --bs-link-hover-color-rgb: 12, 58, 122;
}
.preloader .loading span {
  border-color: var(--color-primary);
}
.bg-overlay-primary:before {
  background-color: rgba(var(--color-primary-rgb), 0.9);
}
.bg-overlay-secondary:before {
  background-color: rgba(var(--color-secondary-rgb), 0.93);
}
.footer .footer-primary {
  background-color: #071f45;
}

/* Gold accents where red would sit on the dark blue */
.heading-light .heading-subtitle.color-primary,
.bg-overlay-secondary-gradient .color-primary,
.fancybox-light .fancybox-icon,
.features-light .feature-icon,
.footer .footer-widget-contact .contact-list a,
.footer .footer-widget-contact .contact-icon {
  color: var(--color-gold-light) !important;
}
.banner-layout1 .promo-text {
  background-color: var(--color-gold);
}
.footer .footer-widget-nav li a:hover,
.footer .social-icons a:hover {
  color: var(--color-gold-light);
}

/* Header */
.header-topbar .row {
  min-height: 60px;
}
.header-topbar .contact-list li > i {
  color: var(--color-white);
}
.header-topbar .header-topbar-links li a {
  font-size: 13px;
}
.navbar .navbar-brand img {
  height: 64px;
  width: auto;
}
.is-sticky .navbar-brand img {
  height: 54px;
}
.navbar .nav-item .nav-item-link,
.navbar .dropdown-menu .nav-item > .nav-item-link {
  text-transform: none;
}
.navbar .navbar-brand {
  flex-shrink: 0;
  margin-right: 30px;
}
.navbar .btn-link {
  white-space: nowrap;
}
@media (min-width: 992px) {
  .navbar .navbar-nav > .nav-item:not(.has-dropdown) > .nav-item-link {
    padding-right: 0;
  }
}
/* "More" sits near the right edge, so its submenus open to the left */
@media (min-width: 992px) {
  .navbar .nav-item.has-dropdown.nav-more > .dropdown-menu {
    left: auto;
    right: 0;
    min-width: 320px;
  }
  .navbar .nav-item.has-dropdown.nav-more > .dropdown-menu > .nav-item.dropdown-submenu > .dropdown-menu {
    top: -25px;
    left: auto;
    right: 100%;
  }
  .navbar .nav-more .dropdown-submenu {
    position: relative;
  }
}
@media (min-width: 992px) and (max-width: 1399px) {
  .navbar .nav-item .nav-item-link {
    font-size: 14px;
    padding-right: 10px;
  }
  .navbar .navbar-nav > .nav-item {
    margin-right: 12px;
  }
  .navbar .ml-30 {
    margin-left: 16px !important;
  }
  .navbar .btn-link.mr-20 {
    margin-right: 14px !important;
  }
}
@media (min-width: 1400px) {
  .navbar .navbar-nav > .nav-item {
    margin-right: 24px;
  }
}
.navbar .navbar-nav > .nav-item:last-child {
  margin-right: 0;
}
/* Not enough room for the header brochure link beside 7 nav items; the hero has its own brochure button */
@media (max-width: 1499px) {
  .navbar .btn-link[href*="Brochure"] {
    display: none;
  }
}

/* Hero slider: wide banner, dark fade from the left, photo on the right */
.slider .slide-item {
  height: clamp(440px, 62vh, 560px);
  min-height: 0;
}
/* main.js sets background-position: center inline, so these need !important.
   The y value is where each photo's subjects sit in the short, wide banner. */
.slider .slide-item.hero-focus-care {
  background-position: center 25% !important;
}
.slider .slide-item.hero-focus-eeg {
  background-position: center 18% !important;
}
.slider .slide-item.hero-focus-fab {
  background-position: center 32% !important;
}
@media (max-width: 767px) {
  .slider .slide-item.hero-focus-care,
  .slider .slide-item.hero-focus-eeg,
  .slider .slide-item.hero-focus-fab {
    background-position: 70% center !important;
  }
}
.slider .slide-item.bg-overlay:before {
  opacity: 1;
  background-color: transparent;
  background-image: linear-gradient(90deg, rgba(7, 31, 69, 0.97) 0%, rgba(7, 31, 69, 0.9) 30%, rgba(7, 31, 69, 0.55) 55%, rgba(7, 31, 69, 0.1) 80%, rgba(7, 31, 69, 0) 100%);
}
.slider .slide-item.bg-overlay:after {
  display: none;
}
.slider .slide-item .slide-content {
  max-width: 620px;
}
.slider .slide-item .slide-subtitle.highlighted {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  margin-bottom: 18px;
  border-radius: 0;
  background-color: transparent;
  color: var(--color-gold-light);
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
}
.slider .slide-item .slide-subtitle i {
  font-size: 19px;
  letter-spacing: 0;
}
.slider .slide-item .slide-title {
  margin-bottom: 20px;
  font-size: 46px;
  font-weight: 700;
  line-height: 1.2;
}
.slider .slide-item .slide-desc {
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.75;
}
.slider .slide-item .btn {
  height: 50px;
  min-width: 0;
  padding: 0 28px;
  margin-right: 16px !important;
  font-size: 14px;
}
.slider .slide-item .btn-white:not(.btn-outlined) {
  border-color: var(--color-primary);
  background-color: var(--color-primary);
  color: var(--color-white);
}
.slider .slide-item .btn-white:not(.btn-outlined):hover {
  border-color: var(--color-white);
  background-color: var(--color-white);
  color: var(--color-secondary);
}
.slider .slide-item .btn-outlined {
  border-color: rgba(255, 255, 255, 0.55);
}
@media (max-width: 991px) {
  .slider .slide-item.bg-overlay:before {
    background-image: linear-gradient(90deg, rgba(7, 31, 69, 0.95) 0%, rgba(7, 31, 69, 0.8) 60%, rgba(7, 31, 69, 0.55) 100%);
  }
  .slider .slide-item .slide-title {
    font-size: 36px;
  }
}
@media (max-width: 767px) {
  .slider .slick-arrow {
    display: none !important;
  }
  .slider .slide-item {
    height: auto;
    min-height: 480px;
    padding: 60px 0 70px;
  }
  .slider .slide-item .slide-title {
    font-size: 30px;
  }
  .slider .slide-item .slide-subtitle.highlighted {
    font-size: 14px;
    letter-spacing: 1.5px;
  }
  .slider .slide-item .btn {
    margin-bottom: 12px;
  }
}

/* Industry partners strip (re-uses the theme's clients carousel) */
.partners .partners-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-white);
  font-family: var(--font-primary);
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
}
.partners .partners-label i {
  color: var(--color-gold-light);
  font-size: 19px;
}
.clients .partner-item {
  flex-direction: column;
  justify-content: flex-start;
  height: auto;
  padding: 0 12px;
  text-align: center;
}
.clients .partner-item .partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 110px;
  padding: 14px 20px;
  border-radius: 10px;
  background-color: var(--color-white);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.clients .partner-item img {
  max-width: 80%;
  max-height: 66px;
  padding: 0;
  object-fit: contain;
  opacity: 1;
  filter: none;
}
.clients .partner-item:hover img {
  transform: scale(1.05);
}
.clients .partner-item .partner-name {
  margin: 14px 0 0;
  color: var(--color-white);
  font-size: 14px;
  line-height: 1.4;
}
.clients .partner-item small {
  display: block;
  margin-top: 4px;
  color: var(--color-gold-light);
  font-size: 12px;
}

/* Programmes */
.fancybox-layout5 .row > [class*="col-"] {
  display: flex;
}
.fancybox-layout5 .fancybox-item {
  display: flex;
  width: 100%;
}
.fancybox-layout5 .fancybox-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}
.fancybox-layout5 .fancybox-body .btn {
  margin-top: auto;
}
.fancybox-layout5 .program-level {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 12px;
  border-radius: 20px;
  background-color: var(--color-green-100);
  color: var(--color-secondary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.fancybox-layout5 .program-specs {
  margin: 0 0 25px;
}
.fancybox-layout5 .program-specs li {
  position: relative;
  margin-bottom: 6px;
  padding-left: 22px;
  color: var(--color-secondary);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}
.fancybox-layout5 .program-specs li:before {
  content: "\f00c";
  position: absolute;
  top: 1px;
  left: 0;
  color: var(--color-primary);
  font-family: "Font Awesome 5 Free";
  font-size: 12px;
  font-weight: 900;
}

/* Why study */
.about-layout2 .about-img img {
  width: 100%;
}
.about-layout2 .about-thumb {
  width: 200px;
  height: auto;
}
.about-layout2 .features-list-layout2 .feature-item:last-child {
  margin-bottom: 0;
}

/* Vision, Mission & Outcomes */
.vision-mission .nav-tabs {
  flex-wrap: wrap;
  gap: 10px 0;
}
.vision-mission .nav-tabs .nav-link {
  font-size: 18px;
}
.po-switch {
  gap: 10px;
}
.po-switch .nav-link {
  padding: 8px 24px;
  border: 2px solid var(--color-secondary);
  border-radius: 30px;
  color: var(--color-secondary);
  font-weight: 700;
  font-size: 15px;
}
.po-switch .nav-link.active,
.po-switch .nav-link:hover {
  background-color: var(--color-secondary);
  color: var(--color-white);
}
.vision-quote {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 50px 60px;
  border-radius: 10px;
  background-color: var(--color-white);
  box-shadow: 0px 5px 83px 0px rgba(13, 14, 67, 0.08);
  text-align: center;
}
.vision-quote i {
  display: block;
  margin-bottom: 20px;
  font-size: 40px;
  color: var(--color-primary);
}
.vision-quote p {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 24px;
  line-height: 1.6;
  color: var(--color-secondary);
}
.vm-pane-title {
  margin-bottom: 30px;
  text-align: center;
  font-size: 22px;
}
.vm-card {
  height: calc(100% - 30px);
  margin-bottom: 30px;
  padding: 35px 30px;
  border-radius: 10px;
  border-top: 4px solid var(--color-primary);
  background-color: var(--color-white);
  box-shadow: 0px 5px 83px 0px rgba(13, 14, 67, 0.08);
  transition: transform 0.3s ease;
}
.vm-card:hover {
  transform: translateY(-5px);
}
.vm-card-icon {
  margin-bottom: 20px;
  font-size: 46px;
  line-height: 1;
  color: var(--color-primary);
}
.vm-card-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin-bottom: 20px;
  border-radius: 50%;
  background-color: var(--color-secondary);
  color: var(--color-white);
  font-family: var(--font-primary);
  font-weight: 700;
}
.vm-card-title {
  margin-bottom: 12px;
  font-size: 19px;
}
.po-card {
  height: calc(100% - 24px);
  margin-bottom: 24px;
  padding: 22px 20px;
  border-radius: 8px;
  background-color: var(--color-white);
  box-shadow: 0px 3px 30px 0px rgba(13, 14, 67, 0.06);
}
.po-card span {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 12px;
  border-radius: 30px;
  background-color: var(--color-green-100);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--color-primary);
}
.po-card h5 {
  margin-bottom: 6px;
  font-size: 15px;
}
.po-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}
.pso-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  padding: 25px;
  border-radius: 10px;
  background-color: var(--color-white);
  box-shadow: 0px 3px 30px 0px rgba(13, 14, 67, 0.06);
}
.pso-item span {
  display: inline-flex;
  flex: 0 0 46px;
  align-items: center;
  justify-content: center;
  height: 46px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-primary);
  font-weight: 700;
}
.pso-item p {
  margin: 0;
  font-size: 16px;
  color: var(--color-secondary);
}

/* Why Karunya */
.banner-layout6 {
  padding-bottom: 100px !important;
}
.banner-layout6 .banner-img img {
  aspect-ratio: 621 / 560;
  object-fit: cover;
}
.banner-layout6 .heading-title {
  font-size: 36px;
  line-height: 1.25;
}
@media (min-width: 1200px) {
  .banner-layout6 .banner-text {
    padding-right: 40px;
  }
}
@media (max-width: 1199px) {
  .banner-layout6 .heading-title {
    font-size: 30px;
  }
}
@media (max-width: 767px) {
  .banner-layout6 .heading-title {
    font-size: 24px;
  }
}

/* Laboratories */
.services-layout2 .service-img img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.services-layout2 .service-title {
  margin-bottom: 0;
}

/* Careers */
.work-process .process-item {
  min-height: 230px;
}

/* Testimonials */
@media (min-width: 1200px) {
  .biomed-testimonials {
    padding-top: 200px !important;
  }
}
.biomed-testimonials .testimonial-meta {
  padding-right: 70px;
  opacity: 1;
}
.biomed-testimonials .testimonial-item:before {
  bottom: 35px;
  right: 30px;
  font-size: 34px;
}
.biomed-testimonials .slick-slide {
  padding: 0 15px 60px;
}
.biomed-testimonials .slick-list {
  margin: 0 -15px;
}
.biomed-testimonials .testimonial-item {
  height: 100%;
  margin-bottom: 0;
  background-color: var(--color-white);
  box-shadow: 0px 5px 40px 0px rgba(13, 14, 67, 0.1);
}
.biomed-testimonials .testimonial-title {
  font-size: 18px;
  margin-bottom: 25px;
}
.biomed-testimonials .testimonial-thmb {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  padding: 3px;
  margin-right: 18px;
}
.biomed-testimonials .testimonial-thmb img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
}
.biomed-testimonials .testimonial-meta-title {
  font-size: 17px;
  font-weight: 600;
  white-space: normal;
}
.biomed-testimonials .testimonial-meta-desc {
  line-height: 1.45;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 16px;
}
.gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
}
.gallery-item-wide {
  grid-column: span 2;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item .plus-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  margin: 0;
  background-color: var(--color-primary);
  color: var(--color-white);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  transition: all 0.3s ease;
}
.gallery-item:after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(var(--color-secondary-rgb), 0.45);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-item:hover img {
  transform: scale(1.06);
}
.gallery-item:hover:after {
  opacity: 1;
}
.gallery-item:hover .plus-icon {
  z-index: 2;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
@media (max-width: 991px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }
}
@media (max-width: 575px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }
  .gallery-item-wide {
    grid-column: auto;
  }
  .vision-quote {
    padding: 35px 25px;
  }
  .vision-quote p {
    font-size: 19px;
  }
}

/* FAQ */
.faq .accordion-title {
  padding-right: 30px;
}

/* Footer */
.footer .footer-logo {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 8px;
  background-color: var(--color-white);
}
.footer .footer-logo img {
  height: 60px;
  width: auto;
}
.footer .footer-widget-about p {
  color: #b4bad0;
  line-height: 1.8;
}
.footer .footer-widget-nav li a {
  font-size: 14px;
}

/* ---------- Mobile fixes ---------- */
/* Research & Patents: smaller icons, lined up with the title */
.banner-layout1 .fancybox-layout2 .fancybox-item .fancybox-icon {
  flex: 0 0 56px;
  max-width: 56px;
  padding-top: 0;
  font-size: 32px;
  line-height: 1;
}
.banner-layout1 .fancybox-layout2 .fancybox-item .fancybox-body {
  flex: 0 0 calc(100% - 56px);
  max-width: calc(100% - 56px);
}
/* Careers: step icons were too faint */
.work-process .process-item .process-icon {
  color: rgba(var(--color-secondary-rgb), 0.45);
}
@media (max-width: 767px) {
  /* Hero: an inline script skips the carousel below 768px; show only the first slide */
  .slider .slide-item:not(:first-child) {
    display: none !important;
  }
  .slider .slide-item {
    display: flex;
    align-items: center;
    padding: 50px 0 55px;
  }
  .slider .slide-item .slide-content {
    text-align: center;
  }
  /* label as plain text so the icon sits right before the first word, even when it wraps */
  .slider .slide-item .slide-subtitle.highlighted {
    display: block;
  }
  .slider .slide-item .slide-subtitle i {
    margin-right: 8px;
  }
  .slider .slide-item .slide-content .d-flex {
    flex-direction: column;
    align-items: stretch !important;
    max-width: 280px;
    margin: 0 auto;
  }
  .slider .slide-item .btn {
    width: 100%;
    margin-right: 0 !important;
  }
  /* No carousel dots on phones */
  .services-layout3 .slick-dots,
  .services-layout2 .slick-dots,
  .biomed-testimonials .slick-dots {
    display: none !important;
  }
  .banner-layout1 .fancybox-layout2 .fancybox-item .fancybox-icon {
    flex: 0 0 44px;
    max-width: 44px;
    font-size: 26px;
  }
  .banner-layout1 .fancybox-layout2 .fancybox-item .fancybox-body {
    flex: 0 0 calc(100% - 44px);
    max-width: calc(100% - 44px);
  }
  /* FAQ: roomier questions */
  .faq .accordion-item {
    padding: 16px 14px;
  }
}
/* FAQ: the two columns stack below 992px, so only the very first item keeps the thick red top */
@media (max-width: 991px) {
  .faq #accordion2 .accordion-item:first-child {
    border-top: 2px solid #e7ebef;
  }
}
