/* General Reset */
body, h1, h2, h3, p, ul, li, a, div, section {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.free-text {
  color: green;
  font-weight: bold;
}

/* Body Styling */
body {
  font-family: Arial, sans-serif;
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.6;
}

/* Header Styling */
header {
  background-color: #0044cc;
  color: white;
  text-align: center;
  padding: 20px 10px;
}

/* Navigation Bar */
nav {
  background-color: #333;
  position: relative;
}

/* Nav Links */
nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
}

nav ul li {
  margin: 0 15px;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 10px 15px;
  display: inline-block;
  border-radius: 5px;
}

nav ul li a.active {
  background-color: #0044cc;
  color: white;
}

nav ul li a:hover {
  background-color: #555;
}

/* Section Styling */
section {
  display: none;
  padding: 20px;
  margin: 20px auto;
  max-width: 800px;
  background: white;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

section.active {
  display: block;
}

/* Content Containers */
.university, .college {
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: #fdfdfd;
}

.university h3, .college h3 {
  font-size: 1.2rem;
  color: #0044cc;
  margin-bottom: 10px;
}

.university p, .college p {
  font-size: 1rem;
  margin-bottom: 10px;
}

/* Buttons */
.apply-button, .prospectus-button {
  display: inline-block;
  margin: 10px 5px;
  padding: 10px 15px;
  background-color: #0044cc;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
}

.apply-button:hover, .prospectus-button:hover {
  background-color: #003399;
}

.youtube-preview {
  display: block;
  width: 300px;
  height: 160px;
  margin-top: 15px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.youtube-preview:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.youtube-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Footer */
footer {
  text-align: center;
  padding: 10px 0;
  background-color: #333;
  color: white;
}

/* Social Media Links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
}

.social-icon img {
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.social-icon img:hover {
  transform: scale(1.2);
  opacity: 0.8;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  nav ul {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  nav ul::-webkit-scrollbar {
    display: none;
  }

  nav ul li {
    margin: 0 10px;
  }

  nav ul li a {
    padding: 10px 12px;
    font-size: 14px;
    white-space: nowrap;
  }
}

/* Dots Indicator */
.dots-container {
  text-align: center;
  margin: 20px 0;
}

.dots-container .dot {
  height: 12px;
  width: 12px;
  margin: 0 5px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.dots-container .active-dot {
  background-color: #0044cc;
}

/* Floating Bar */
#open-uni-bar {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: Arial, sans-serif;
  text-align: left;
  width: auto;
  max-width: 90vw;
}

#toggle-uni-bar {
  background-color: #0066cc;
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 12px 24px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  width: 100%;
}

#toggle-uni-bar:hover {
  transform: scale(1.05);
}

#uni-list {
  max-height: 300px;
  overflow-y: auto;
  width: 300px;
  margin-top: 10px;
  padding: 16px;
  background-color: #ffffff;
  border: 1px solid #ccc;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
  animation: slideUpFade 0.4s ease forwards;
  font-size: 16px;
}

#uni-list.hidden {
  display: none;
}

#uni-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#uni-list li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Tweaks */
@media (max-width: 480px) {
  #open-uni-bar {
    right: 10px;
    bottom: 15px;
    max-width: 95vw;
  }

  #toggle-uni-bar {
    font-size: 15px;
    padding: 12px 20px;
  }

  #uni-list {
    width: 95vw;
    max-height: 50vh;
    font-size: 15px;
  }

  #uni-list li {
    padding: 8px 0;
  }
}

.hidden {
  display: none;
}

@media (max-width: 480px) {
  .youtube-preview {
    width: 100%;
    height: auto;
    aspect-ratio: 15 / 8; /* Keeps the 300x160 ratio */
  }

  .youtube-preview img {
    height: 100%;
    object-fit: cover;
  }
}

/* Countdown timer style */
.countdown {
  font-size: 1rem;
  font-weight: 600;
  color: green;
  display: inline; /* keeps it inline with 'Applications Close:' */
  margin-left: 5px;
}

/* Less than or equal to 7 days left */
.countdown.red {
  color: red;
}

/* When application is closed */
.countdown.closed {
  color: red;
}
