/* General styling */
html,
body {
  height: 100%;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

body {
  font-family: "Roboto", Arial, sans-serif;
  color: #333;
  line-height: 1.6;
}
.major-description,
.modal-title,
.modal-body,
.card-title,
.card-text {
  font-family: "Kantumruy Pro", sans-serif;
  font-weight: normal; /* Changed to normal to allow for more specific weight control */
}

body.lang-kh,
body.lang-kh h1,
body.lang-kh h2,
body.lang-kh h3,
body.lang-kh h4,
body.lang-kh h5,
body.lang-kh h6,
body.lang-kh p,
body.lang-kh span,
body.lang-kh a,
body.lang-kh li,
body.lang-kh div,
body.lang-kh .modal-title,
body.lang-kh .modal-body,
body.lang-kh .card-title,
body.lang-kh .card-text {
  font-family: "Kantumruy Pro", sans-serif;
  font-weight: normal; /* Changed to normal to allow for more specific weight control */
}

/* Header styling */
.navbar {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky !important;
  top: 0 !important;
  z-index: 1020 !important; /* Ensure it stays above other content */
  width: 100%; /* Ensure it spans the full width */
}

.navbar-brand img {
  max-height: 50px;
}

/* Footer styling */
footer {
  background-color: #dc3545;
  color: white;
  padding: 2rem 0;
  width: 100%;
}

footer a {
  color: white;
  text-decoration: none;
}

footer a:hover {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
}

/* Card styling */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 1.5rem;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-img-top {
  height: 200px;
  object-fit: cover;
}

/* Button styling */
.btn-primary {
  background-color: #dc3545;
  border-color: #dc3545;
}

.btn-primary:hover {
  background-color: #c82333;
  border-color: #bd2130;
}

/* Admin dashboard */
.dashboard-card {
  border-radius: 10px;
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.dashboard-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* Form styling */
.form-control:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Pagination */
.pagination .page-item.active .page-link {
  background-color: #dc3545;
  border-color: #dc3545;
  color: white;
}

.pagination .page-link {
  color: #dc3545;
}

.pagination .page-link:hover {
  color: #fff;
  background-color: #dc3545;
  border-color: #dc3545;
}

/* Alert styling */
.alert-danger {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.alert-success {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

/* Responsive images */
.img-fluid {
  max-width: 100%;
  height: auto;
}

/* Hero section */
.hero-section {
  background-color: #f8f9fa;
  padding: 4rem 0;
  margin-bottom: 2rem;
}

.hero-section h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-section p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

/* Popular sections */
.popular-section {
  padding: 3rem 0;
}

.popular-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.popular-section h2:after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  background-color: #dc3545;
  margin: 0.5rem auto;
}

/* Team members */
.team-member {
  text-align: center;
  margin-bottom: 2rem;
}

.team-member img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 5px solid #f8f9fa;
}

.team-member h5 {
  margin-bottom: 0.5rem;
}

.team-member p {
  color: #6c757d;
}

/* Media queries */
@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 0;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .card-img-top {
    height: 180px;
  }
}

@media (max-width: 576px) {
  .hero-section h1 {
    font-size: 1.8rem;
  }

  .card-img-top {
    height: 160px;
  }
}

/* Dashboard sidebar */
.sidebar {
  min-height: calc(100vh - 56px);
  background-color: #343a40;
  padding-top: 20px;
}

.sidebar .nav-link {
  color: rgba(255, 255, 255, 0.75);
  padding: 0.75rem 1rem;
  border-left: 3px solid transparent;
}

.sidebar .nav-link:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #dc3545;
}

.sidebar .nav-link.active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #dc3545;
}

.sidebar .nav-link i {
  margin-right: 0.5rem;
}

/* TinyMCE editor */
.tox-tinymce {
  border-radius: 0.25rem;
}

/* File upload */
.custom-file-label::after {
  content: "Browse";
}

/* Job, Major, Career cards */
.job-card,
.major-card,
.career-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.job-card .card-body,
.major-card .card-body,
.career-card .card-body {
  flex: 1;
}

.salary-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(220, 53, 69, 0.9);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: bold;
}

/* Detail pages */
.detail-header {
  background-color: #f8f9fa;
  padding: 2rem 0;
  margin-bottom: 2rem;
}

.detail-image {
  max-height: 400px;
  object-fit: cover;
  border-radius: 0.5rem;
}

.detail-info {
  margin-bottom: 2rem;
}

.detail-info h1 {
  margin-bottom: 1rem;
}

.detail-info .badge {
  font-size: 1rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.detail-content {
  margin-bottom: 2rem;
}

.related-items {
  padding: 2rem 0;
  background-color: #f8f9fa;
}

.application-form {
  background-color: #f8f9fa;
  padding: 2rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
}

/* Explore pages */
.explore-header {
  background-color: #f8f9fa;
  padding: 2rem 0;
  margin-bottom: 2rem;
  text-align: center;
}

.explore-header h1 {
  margin-bottom: 1rem;
}

.explore-header p {
  max-width: 800px;
  margin: 0 auto;
}

.filter-bar {
  margin-bottom: 2rem;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 0.5rem;
}

/* Language switcher */
.language-switcher {
  margin-left: 1rem;
}

.language-switcher .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* Add these styles to your existing CSS file */

/* Hero Slider Section */
.hero-slider {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.slider-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.slides-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 1;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

.slide-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.slide-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.1) 100%
  );
}

.slide-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 2rem;
  color: #fff;
}

.slide-text {
  max-width: 600px;
  padding: 2rem;
  animation: fadeInUp 1s ease-out;
}

.slide-text h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-text p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.slide-text .btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.slide-text .btn-primary {
  background-color: #3498db;
  border: none;
}

.slide-text .btn-primary:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Slider Navigation */
.slider-nav {
  position: absolute;
  bottom: 30px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.slider-prev,
.slider-next {
  background: rgba(255, 255, 255, 0.3);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  margin: 0 10px;
  transition: all 0.3s ease;
}

.slider-prev:hover,
.slider-next:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.slider-dots {
  display: flex;
  gap: 10px;
  margin: 0 20px;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider-dot.active {
  background: white;
  transform: scale(1.2);
}

/* Placeholder slide when no slides are available */
.no-slides {
  width: 100%;
  height: 100%;
}

.placeholder-slide {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #3498db, #8e44ad);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-slider {
    height: 450px;
  }

  .slide-text {
    max-width: 100%;
    padding: 1rem;
  }

  .slide-text h2 {
    font-size: 2rem;
  }

  .slide-text p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-slider {
    height: 350px;
  }

  .slide-text h2 {
    font-size: 1.5rem;
  }

  .slide-text .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .slider-prev,
  .slider-next {
    width: 30px;
    height: 30px;
  }
}
