:root {
  --nust-blue: #004284;
  --nust-gold: #f1a400;
  --nust-dark: #282828;
  --nust-light: #f3f3f3;
}

body {
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  color: #333;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: Tahoma, sans-serif;
  font-weight: 700 !important;
}

/* Header Styles */
.top-bar {
  background-color: var(--nust-blue);
  padding: 8px 0;
  font-size: 14px;
}

.main-bar {
  background-color: rgba(0, 66, 132, 0.9);
  padding: 10px 0;
}

.top-menu .menu-link,
.main-menu .menu-link {
  color: white !important;
  text-decoration: none;
  padding: 0 10px;
}

.top-menu .menu-link:hover,
.main-menu .menu-link:hover {
  color: var(--nust-gold) !important;
}

.search-form {
  position: relative;
}

.search-form .input-group-text {
  background: var(--nust-gold);
  border: none;
}

/* Hero Section */
.hero-section {
  height: 100vh;
  background: url('../img/banner.jpg') no-repeat center center;
  background-size: cover;
  position: relative;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-section::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 40%;
  bottom: 0;
  left: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.banner-bottom-section {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.banner-bottom-section a {
  color: white;
  text-decoration: none;
  font-size: 18px;
}

/* Content Sections */
.section-title {
  color: var(--nust-dark);
  margin-bottom: 30px;
  text-align: center;
}

.news-item {
  box-shadow: 0 0 4px 1px rgba(0, 0, 0, 0.2);
  background: white;
  height: 100%;
  transition: transform 0.3s;
}

.news-item:hover {
  transform: translateY(-5px);
}

.news-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.news-details {
  padding: 15px;
}

.news-category {
  color: var(--nust-blue);
  font-size: 18px;
  font-weight: 500;
  font-family: Tahoma, sans-serif;
}

.news-title {
  color: #3C3530;
  font-size: 16px;
  opacity: 0.67;
}

.featured-news {
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 250px;
}

.featured-details {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 20px;
  background: transparent;
}

.featured-details .news-category,
.featured-details .news-title {
  color: white;
  opacity: 1;
}

/* Events Section */
.event-item {
  box-shadow: 0 3px 6px #00000029;
  height: 100%;
}

.event-image {
  height: 200px;
  overflow: hidden;
}

.event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-detail {
  position: relative;
  padding: 40px 15px 15px 15px;
  background: #F9F7F1;
  height: 100%;
}

.event-date {
  background: #f1a400f0;
  position: absolute;
  padding: 10px 5px;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  top: -50px;
  right: 15px;
  height: 75px;
  line-height: 1;
  width: 75px;
  box-shadow: -1px 3px 5px #000000cf;
  text-shadow: 2px 2px 3px #fff;
  border-top-left-radius: 35px;
}

/* Rector's Message */
.rector-message {
  background: #e4e3e3;
  padding: 50px 0;
}

.rect-message-content p {
  color: #282828;
  font-size: 1.5rem;
  font-weight: 500;
  font-style: italic;
  position: relative;
  line-height: 1.7;
  padding: 0 20px;
}

.rect-message-content i {
  color: #004879;
  font-size: 2rem;
  padding: 0 10px;
}

/* Admissions Section */
.post-box {
  height: 100%;
  box-shadow: 0 2px 1px #0001011F;
  background: #f3f3f3;
  margin-bottom: 20px;
  transition: transform 0.3s;
}

.post-box:hover {
  transform: translateY(-5px);
}

.post-box-image {
  height: 200px;
  overflow: hidden;
}

.post-box-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-box-details {
  padding: 20px;
}

.post-box-details h3 {
  color: #282828;
  font-size: 24px;
  text-transform: uppercase;
}

.section_button a {
  color: #333;
  background: #f2a300;
  font-family: Roboto;
  font-size: 18px;
  font-weight: 500;
  padding: 10px 20px;
  border: 1px solid #f2a300;
  border-radius: 3px;
  text-decoration: none;
  display: inline-block;
}

.section_button a:hover {
  color: #000;
  background: white;
}

/* Announcements */
.announcements {
  background: #0d4877;
  height: 100%;
  overflow: hidden;
}

.announcements_title {
  color: #000;
  background: #f1a41f;
  font-family: Poppins, sans-serif;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  margin: 0;
  padding: 20px;
}

.ticker_title {
  color: #fff;
  font-size: 18px;
  text-decoration: none;
  display: block;
  padding: 10px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.ticker_title:hover {
  color: #f1a41f;
}

/* Institutes Section */
.institutes-section {
  background: #e4e3e3;
  padding: 50px 0;
}

.tab-link {
  color: #807e7e;
  background: transparent;
  font-family: Roboto;
  font-size: 24px;
  font-weight: 400;
  text-align: left;
  border: none;
  border-bottom: 1px solid #3c3530;
  border-radius: 0;
  padding: 25px 0;
  width: 100%;
  display: flex;
  align-items: center;
}

.tab-link:hover,
.tab-link.active {
  color: #0d4877;
  background: transparent;
  font-weight: 800;
}

.tab-link .icon {
  width: 46px;
  height: 46px;
  border: 1px solid #282828;
  border-radius: 50%;
  padding: 5px;
  margin-right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-link:hover .icon {
  border: 1px solid #0d4877;
}

.institute-btn {
  color: #0d4877;
  background: #fff;
  font-family: Roboto;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  border: 1px solid #0d4877;
  border-radius: 0;
  padding: 10px;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.institute-btn:hover {
  color: #fff;
  background: #0d4877;
}

/* Research Section */
.research-section {
  background: transparent url('https://nust.edu.pk/wp-content/uploads/2021/04/Research1.jpg') center center/cover no-repeat fixed;
  padding: 50px 0;
  color: white;
}

.counter_box {
  text-align: center;
  padding: 20px;
}

.number_up {
  color: #f1a41f;
  font-family: Tahoma;
  font-size: 36px;
  font-weight: 800;
}

.counter_box h3 {
  color: #fff;
  font-size: 20px;
  font-weight: 400;
  text-transform: uppercase;
}

/* Footer */
.top-footer {
  background: var(--nust-blue);
  color: white;
  padding: 40px 0;
}

.top-widget {
  margin-bottom: 30px;
}

.footer-divider {
  background: #f1a400;
  padding: 15px 0;
}

.footer-divider h4 {
  color: white;
  margin: 0;
}

.footer-main {
  background: #1a517d;
  color: white;
  padding: 40px 0;
}

.footer-widget h4 {
  color: white;
  border-bottom: 1px solid #f1a400;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.footer-widget ul {
  list-style: none;
  padding: 0;
}

.footer-widget ul li {
  margin-bottom: 8px;
}

.footer-widget a {
  color: white;
  text-decoration: none;
}

.footer-widget a:hover {
  color: #f1a400;
}

.footer-bottom {
  background: #0d4877;
  color: white;
  padding: 20px 0;
}

.social-menu {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
}

.social-menu li {
  margin: 0 10px;
}

.social-menu a {
  color: white;
  font-size: 20px;
}

/* Social Icons */
.stick-social-icons {
  position: fixed;
  right: 0;
  top: calc(50vh - 115px);
  z-index: 999;
  padding: 0;
  list-style: none;
}

.stick-social-icons a {
  font-size: 24px;
  display: block;
  text-align: center;
  padding: 5px 10px;
  color: #fff;
  text-decoration: none;
}

.stick-social-icons .facebook-icon {
  background: #3b5998;
}

.stick-social-icons .linkedin-icon {
  background: #0e76a8;
}

.stick-social-icons .twitter-icon {
  background: #00acee;
}

.stick-social-icons .youtube-icon {
  background: #c4302b;
}

.stick-social-icons .instagram-icon {
  background: #C13584;
}

/* Navbar */
.nav-link {
  color: white !important;
}

/* Logo text styles */
.logo-text {
  font-family: Tahoma, sans-serif;
  font-weight: 700;
  color: white;
  margin-left: 10px;
}

.footer-logo-text {
  font-family: Tahoma, sans-serif;
  font-weight: 700;
  color: white;
  margin-left: 10px;
}

/* Mobile Menu Improvements */
@media (max-width: 1199.98px) {
  .navbar-collapse {
    background-color: var(--nust-blue);
    padding: 15px;
    margin-top: 10px;
    border-radius: 5px;
  }

  .nav-item {
    margin: 5px 0;
  }

  .logo-text {
    font-size: 1rem;
  }
}

/* Responsive Adjustments */
@media (max-width: 1199.98px) {
  .hero-section {
    height: 70vh;
  }

  .tab-link {
    font-size: 20px;
    padding: 20px 0;
  }

  .tab-link .icon {
    width: 40px;
    height: 40px;
    margin-right: 15px;
  }

  .footer-logo-text {
    font-size: 1rem;
  }
}

@media (max-width: 991.98px) {
  .hero-section {
    height: 60vh;
  }

  .rect-message-content p {
    font-size: 1.2rem;
  }

  .featured-news {
    min-height: 200px;
  }

  .tab-link {
    font-size: 18px;
    padding: 15px 0;
  }

  .tab-link .icon {
    width: 36px;
    height: 36px;
    margin-right: 12px;
  }

  .institute-btn {
    font-size: 14px;
  }

  .footer-widget {
    margin-bottom: 30px;
  }

  .logo-text {
    font-size: 0.9rem;
  }

  .footer-logo-text {
    font-size: 0.9rem;
  }
}

@media (max-width: 767.98px) {
  .hero-section {
    height: 50vh;
  }

  .display-4 {
    font-size: 2.5rem;
  }

  .rect-message-content p {
    font-size: 1rem;
    padding: 0 10px;
  }

  .rect-message-content i {
    font-size: 1.5rem;
  }

  .news-category {
    font-size: 16px;
  }

  .news-title {
    font-size: 14px;
  }

  .event-date {
    font-size: 20px;
    width: 65px;
    height: 65px;
    top: -40px;
  }

  .tab-link {
    font-size: 16px;
    padding: 12px 0;
  }

  .tab-link .icon {
    width: 32px;
    height: 32px;
    margin-right: 10px;
  }

  .institute-btn {
    font-size: 12px;
    padding: 8px;
  }

  .number_up {
    font-size: 28px;
  }

  .counter_box h3 {
    font-size: 16px;
  }

  .stick-social-icons {
    display: none;
  }

  .footer-divider h4 {
    font-size: 1.2rem;
  }

  .footer-bottom .copy-right {
    font-size: 0.9rem;
    margin: 10px 0;
  }

  .logo-text {
    font-size: 0.8rem;
  }

  .footer-logo-text {
    font-size: 0.8rem;
  }
}

@media (max-width: 575.98px) {
  .hero-section {
    height: 40vh;
    min-height: 300px;
  }

  .display-4 {
    font-size: 2rem;
  }

  .lead {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .featured-news {
    min-height: 180px;
  }

  .featured-details {
    padding: 10px;
  }

  .rect-message-content p {
    font-size: 0.9rem;
  }

  .tab-link {
    font-size: 14px;
    padding: 10px 0;
  }

  .tab-link .icon {
    width: 28px;
    height: 28px;
    margin-right: 8px;
  }

  .institute-btn {
    font-size: 11px;
  }

  .event-detail {
    padding: 30px 10px 10px 10px;
  }

  .post-box-details h3 {
    font-size: 20px;
  }

  .footer-widget h4 {
    font-size: 1.2rem;
  }

  .logo-text {
    font-size: 0.7rem;
  }

  .footer-logo-text {
    font-size: 0.7rem;
  }

  /* Stack footer content on mobile */
  .footer-bottom .row {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom .col-md-4 {
    margin-bottom: 15px;
  }
}