:root {
  --primary-color: #2c3e50;
  --secondary-color: #34495e;
  --accent-color: #3498db;
  --light-color: #ecf0f1;
  --dark-color: #1a1a2e;
  --hover-color: #2980b9;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  padding-top: 80px;
  background-color: #f8f9fa;
}

/* NAVBAR */
.navbar {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: white;
  padding: 0.5rem 1rem;
}
.navbar-brand {
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 1px;
}
.navbar-brand span {
  color: var(--accent-color);
}
.nav-link {
  color: var(--primary-color) !important;
  font-weight: 500;
  padding: 0.8rem 1.2rem !important;
  transition: all 0.3s ease;
  position: relative;
}
.nav-link:hover {
  color: var(--accent-color) !important;
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}
.nav-link:hover::after {
  width: 70%;
}

/* HERO SECTION */
.hero {
  position: relative;
  height: 400px;
  overflow: hidden;
}
.hero-video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}
.hero-video-embed {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 177.78%; /* cover 16:9 */
  height: 177.78%;
  transform: translate(-50%, -50%);
}
.hero .overlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  text-align: center;
  color: #fff;
}

/* TOPIC CARDS */
.topic-card {
  min-width: 140px;
  text-align: center;
  padding: 20px 10px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  background-color: white;
  transition: all 0.3s ease;
}
.topic-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Penelitian–Pelatihan–Lainnya */
section h2 {
  font-weight: 700;
  margin-bottom: 1.5rem;
}
section h5 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
section ul {
  padding-left: 0;
}
section ul li {
  list-style: none;
  margin-bottom: 0.75rem;
}
section ul li a {
  text-decoration: none;
  color: var(--primary-color);
}
section ul li a:hover {
  text-decoration: underline;
}
section ul li small {
  font-size: 0.9rem;
  color: #6c757d;
}

/* CONTENT & news-cards */
.content {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}
.section-title {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-weight: 700;
}
.news-card {
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}
.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.news-img {
  height: 200px;
  object-fit: cover;
}

/* RESPONSIVE */
@media (max-width: 576px) {
  .navbar-logo {
    height: 35px;
  }
  .navbar-brand {
    font-size: 0.9rem;
  }
}
@media (max-width: 992px) {
  .navbar {
    padding: 0.8rem 1rem;
  }
  /* ---------- Login Page Overrides ---------- */
  .admin-login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px); /* kompensasi padding-top pada body */
    background: linear-gradient(135deg, #e3eefc 0%, #cfdffb 100%);
  }

  .login-card {
    width: 100%;
    max-width: 380px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    background: #fff;
  }

  /* Header dengan gradient */
  .login-card .card-header {
    background: linear-gradient(
      135deg,
      var(--accent-color) 0%,
      var(--primary-color) 100%
    );
    color: #fff;
    text-align: center;
    padding: 2.5rem 1rem;
    position: relative;
  }
  .login-card .card-header .icon-circle {
    background: rgba(255, 255, 255, 0.2);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
  }
  .login-card .card-header .icon-circle i {
    font-size: 2rem;
  }

  /* Form body */
  .login-card .card-body {
    padding: 2rem 1.5rem;
  }
  .login-card .form-label {
    font-weight: 500;
  }

  /* Input group dengan ikon */
  .login-card .input-group-text {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-right: none;
  }
  .login-card .form-control {
    border-radius: 0 0.5rem 0.5rem 0;
    border: 1px solid #ddd;
  }
  .login-card .form-control:focus {
    border-color: var(--accent-color);
    box-shadow: none;
  }

  /* Toggle password eye */
  .login-card .toggle-password {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-left: none;
    cursor: pointer;
  }

  /* Tombol submit */
  .login-card .btn-login {
    width: 100%;
    padding: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
  }

  /* Footer link */
  .login-card .card-footer {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-top: 1px solid #ddd;
  }
  .login-card .card-footer a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
  }
  .login-card .card-footer a:hover {
    text-decoration: underline;
  }
  /* Hero Section */
  .product-hero {
    background: linear-gradient(135deg, #007bff 0%, #2863d8 100%);
    position: relative;
    overflow: hidden;
  }
  .product-hero::before {
    content: "";
    position: absolute;
    top: -10%;
    right: -5%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
  }
  .product-hero::after {
    content: "";
    position: absolute;
    bottom: -15%;
    left: -5%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
  }

  /* Search Container */
  .search-container {
    position: relative;
    z-index: 2;
    max-width: 600px;
  }

  /* Category Items */
  .category-item {
    color: var(--bs-dark);
    background-color: #f8f9fa;
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: 1px solid transparent;
  }
  .category-item:hover {
    background-color: #e9ecef;
    transform: translateX(3px);
  }
  .category-item.active {
    background-color: var(--bs-primary);
    color: #fff;
    font-weight: 500;
  }

  /* Active Filters */
  .active-filter-item {
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
  }

  /* Product Card */
  .product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    position: relative;
    overflow: hidden;
  }
  .product-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
  }

  /* Image Container */
  .product-img-container {
    height: 220px;
    overflow: hidden;
    position: relative;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
  }
  .product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
  }
  .product-card:hover .product-img {
    transform: scale(1.08);
  }

  /* Overlay */
  .product-img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.3) 0%,
      rgba(0, 0, 0, 0) 50%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
  }
  .product-card:hover .product-img-overlay {
    opacity: 1;
  }

  /* Category Badge */
  .product-category {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
  }

  /* Title & Description */
  .product-title {
    font-size: 1.1rem;
    min-height: 2.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.5rem;
  }
  .product-description {
    min-height: 3rem;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Ribbon */
  .ribbon {
    position: absolute;
    top: 15px;
    left: -35px;
    transform: rotate(-45deg);
    background-color: #ffc107;
    color: #000;
    padding: 5px 40px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 3;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  /* Empty State */
  .empty-state {
    background-color: #f8f9fa;
    border-radius: 1rem;
    padding: 3rem 2rem;
  }

  /* Pagination */
  .pagination .page-link {
    border: none;
    margin: 0 3px;
    color: var(--bs-dark);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  }
  .pagination .page-item.active .page-link {
    background-color: var(--bs-primary);
    color: #fff;
    box-shadow: 0 5px 15px rgba(var(--bs-primary-rgb), 0.3);
  }

  /* Responsive */
  @media (max-width: 767.98px) {
    .product-img-container {
      height: 180px;
    }
    .product-hero {
      text-align: center;
      padding: 2rem 0;
    }
  }
}
