/* ================================================
   SILOAM COLLEGE - Main Stylesheet
   Optimized for performance and maintainability
   ================================================ */

/* -------------------- Base Styles -------------------- */
html {
  scroll-behavior: smooth;
}

/* -------------------- Announcement Banner -------------------- */
.announcement-bar {
  overflow: hidden;
  white-space: nowrap;
}

.announcement-scroll {
  display: inline-block;
  padding-left: 100%;
  animation: scroll-announcement 20s linear infinite;
}

.announcement-scroll:hover {
  animation-play-state: paused;
}

.announcement-content {
  display: inline-block;
}

@keyframes scroll-announcement {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* -------------------- Navigation -------------------- */
.navbar-nav .nav-link {
  font-family: 'Playfair Display', Georgia, serif;
  color: red;
  transition: color 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: #0d6efd;
}

.nav-link.dropdown-toggle::after {
  display: none;
}

/* Show dropdown on hover (desktop only) */
@media (min-width: 992px) {
  .nav-item.dropdown:hover > .dropdown-menu {
    display: block;
    margin-top: 0;
  }
}

.dropdown-menu {
  margin-top: 0;
  border-top: 3px solid #0d6efd;
}

.dropdown-item {
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  color: red;
  background-color: #dde1e7;
  border-radius: 10px;
}

/* Mega menu positioning */
.dropdown-menu.w-100 {
  left: 0 !important;
  right: 0 !important;
}

.dropdown-menu .col {
  min-width: 200px;
}

/* -------------------- Hero Section -------------------- */
.hero-wrapper {
  height: 75vh;
  position: relative;
  overflow: hidden;
}

.hero-image {
  height: 75vh;
  object-fit: cover;
  filter: brightness(60%);
}

.hero-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 50;
  width: 90%;
  color: white;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.75);
  pointer-events: none;
}

.hero-overlay a,
.hero-overlay button {
  pointer-events: auto;
}

.hero-title {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: bold;
  letter-spacing: 2px;
}

.hero-header {
  height: 540px;
  background-image: linear-gradient(rgba(247, 245, 245, 0.5), rgba(99, 76, 76, 0.219));
  background-size: cover;
  background-position: center;
}

/* -------------------- Carousel -------------------- */
.carousel-inner,
.carousel-item,
.carousel-item img {
  height: 100%;
}

/* -------------------- Typography -------------------- */
.class-name {
  font-family: 'Patrick Hand', cursive;
}

.font {
  font-family: 'Patrick Hand', cursive;
}

.img-head {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(60px, 10vw, 140px);
  font-weight: 600;
  text-transform: capitalize;
  line-height: 1em;
  letter-spacing: -0.5px;
  color: #ffffff;
  left: 5%;
  top: 50%;
  transform: translateY(-50%);
}

/* -------------------- Images -------------------- */
.profile-img {
  width: 275px;
  height: 275px;
  object-fit: cover;
}

.img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.img-fluid {
  height: 250px;
  width: 100%;
  object-fit: cover;
}

/* -------------------- Cards & Boxes -------------------- */
.course-box {
  background: #ffffff;
  border-radius: 10px;
  padding: 20px;
  padding-left: 12px;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.course-box:hover {
  transform: translateY(-3px);
}

.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.column {
  transition: transform 0.3s ease;
}

.column:hover {
  transform: scale(1.03);
}

/* -------------------- Lists -------------------- */
.list-group-item {
  background-color: transparent;
  border: 0;
  transition: all 0.2s ease;
}

.list-link {
  color: #000;
  text-decoration: none;
  transition: all 0.2s ease;
  padding-left: 0;
}

.list-link:hover {
  color: #0d6efd;
  background-color: #e9f5ff;
  padding-left: 6px;
  border-radius: 5px;
}

/* -------------------- Buttons -------------------- */
.apply-btn {
  background-color: #198754;
  border-color: #198754;
  color: #ffffff;
  transition: all 0.3s ease;
}

.apply-btn:hover {
  background-color: #ffffff;
  border-color: #198754;
  color: #198754;
}

.ab {
  background-color: #0590ec;
  border-color: #0590ec;
  color: #ffffff;
  transition: all 0.3s ease;
}

.ab:hover {
  background-color: #2c2b2be0;
  border-color: #2c2b2be0;
  color: #d4af37;
}

/* -------------------- Tables -------------------- */
.table a {
  text-decoration: none !important;
  color: inherit;
}

.table a:hover {
  text-decoration: none !important;
  color: #ff0202;
}

/* -------------------- Responsive Styles -------------------- */
@media (max-width: 991.98px) {
  /* Mobile navbar adjustments */
  .dropdown-menu.w-100 {
    width: auto !important;
    position: static !important;
  }

  .hero-wrapper,
  .hero-image {
    height: 50vh;
  }

  .profile-img {
    width: 200px;
    height: 200px;
  }

  .img-fluid {
    height: 180px;
  }
}

@media (max-width: 575.98px) {
  .hero-wrapper,
  .hero-image {
    height: 40vh;
  }

  .profile-img {
    width: 150px;
    height: 150px;
  }

  .img-fluid {
    height: 150px;
  }

  .announcement-scroll {
    animation-duration: 15s;
  }
}

/* -------------------- Dark Mode Transitions -------------------- */
html {
  transition: background-color 0.3s ease, color 0.3s ease;
}

[data-bs-theme="dark"] .bg-light {
  background-color: #212529 !important;
}

[data-bs-theme="dark"] .navbar-nav .nav-link {
  color: #ff6b6b;
}

[data-bs-theme="dark"] .navbar-nav .nav-link:hover {
  color: #69b3ff;
}

[data-bs-theme="dark"] .dropdown-menu {
  background-color: #2d3238;
  border-color: #0d6efd;
}

[data-bs-theme="dark"] .dropdown-item {
  color: #e9ecef;
}

[data-bs-theme="dark"] .dropdown-item:hover {
  background-color: #3d4450;
  color: #ff6b6b;
}

[data-bs-theme="dark"] .card {
  background-color: #2d3238;
  border-color: #495057;
}

[data-bs-theme="dark"] .shadow-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(255, 255, 255, 0.075) !important;
}

/* -------------------- Accessibility Button -------------------- */
#accessibilityDropdown {
  border-radius: 50%;
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#accessibilityDropdown::after {
  display: none;
}

.dropdown-menu .form-switch {
  padding-left: 2.5em;
}

/* -------------------- Gallery & Scrolling -------------------- */
.dotted-card {
  border: 2px dotted !important;
  border-color: #0dcaf0 !important;
  border-radius: 0.5rem;
}

.scrolling-row {
  overflow: hidden;
  width: 100%;
}

.scrolling-images {
  display: flex;
  gap: 1rem;
  animation: scroll-left 25s linear infinite;
}

.scrolling-images:hover {
  animation-play-state: paused;
}

.scroll-item {
  position: relative;
  flex: 0 0 auto;
  transition: transform 0.3s ease, z-index 0s;
  z-index: 1;
}

.scroll-item:hover {
  transform: scale(1.15);
  z-index: 10;
}

.scroll-item img {
  height: 200px;
  width: auto;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: block;
  transition: box-shadow 0.3s ease;
}

.scroll-item:hover img {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.scroll-item .caption {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  text-align: center;
}

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

@media (max-width: 768px) {
  .scroll-item img { height: 150px; }
}

@media (max-width: 576px) {
  .scroll-item img { height: 120px; }
}

/* -------------------- Forms -------------------- */
.form-label::after {
  content: " *";
  color: red;
}

/* -------------------- Animations -------------------- */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.show {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------- Sign-in Form -------------------- */
.form-signin {
  max-width: 330px;
  padding: 1rem;
}

.form-signin .form-floating:focus-within {
  z-index: 2;
}

.form-signin input[type="email"] {
  margin-bottom: -1px;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.form-signin input[type="password"] {
  margin-bottom: 10px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
