/* OpoIku.com - Custom Styles with Bootstrap */

/* Import Bootstrap dari CDN - sudah di HTML, file ini untuk custom styles */

/* ============== Root Variables ============== */
:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --dark-color: #212529;
  --light-color: #f8f9fa;
  --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --shadow-sm: 0 .125rem .25rem rgba(0,0,0,.075);
  --shadow-md: 0 .5rem 1rem rgba(0,0,0,.15);
  --shadow-lg: 0 1rem 3rem rgba(0,0,0,.175);
  --transition-base: all 0.3s ease;
}

/* ============== Global Styles ============== */
body {
  font-family: var(--font-primary);
  line-height: 1.7;
  color: var(--dark-color);
  background-color: #fff;
}

html {
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
  transition: var(--transition-base);
}

/* ============== Navbar ============== */
.navbar {
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
}

.nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: 0.375rem;
  transition: var(--transition-base);
}

.nav-link:hover {
  background-color: rgba(13, 110, 253, 0.1);
}

/* ============== Search Box ============== */
.search-container {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.search-input {
  padding-left: 3rem;
  border-radius: 50px;
  border: 2px solid #e9ecef;
  transition: var(--transition-base);
}

.search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--secondary-color);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.search-results.show {
  display: block;
}

.search-result-item {
  padding: 1rem;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  transition: var(--transition-base);
}

.search-result-item:hover {
  background-color: var(--light-color);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-title {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.25rem;
}

.search-result-excerpt {
  font-size: 0.875rem;
  color: var(--secondary-color);
  margin: 0;
}

/* ============== Hero Section ============== */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color), #0b5ed7);
  color: #fff;
  padding: 5rem 0;
  margin-bottom: 2rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
}

/* ============== Article Cards ============== */
.article-card {
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  height: 100%;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.article-card .card-img-top {
  height: 200px;
  object-fit: cover;
  transition: var(--transition-base);
}

.article-card:hover .card-img-top {
  transform: scale(1.05);
}

.article-card .card-img-wrapper {
  overflow: hidden;
}

.article-card .card-body {
  padding: 1.5rem;
}

.article-card .card-title {
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.article-card .card-title a {
  color: var(--dark-color);
}

.article-card .card-title a:hover {
  color: var(--primary-color);
}

.article-card .card-text {
  color: var(--secondary-color);
  font-size: 0.9rem;
}

.article-meta {
  font-size: 0.8rem;
  color: var(--secondary-color);
}

.category-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
}

/* ============== Featured Article ============== */
.featured-article {
  background: linear-gradient(to right, rgba(0,0,0,0.8), rgba(0,0,0,0.4));
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
  min-height: 400px;
}

.featured-article-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  z-index: -1;
}

.featured-article-content {
  padding: 3rem;
  color: #fff;
  position: relative;
  z-index: 1;
}

.featured-article-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.featured-article-title a {
  color: #fff;
}

.featured-article-title a:hover {
  color: var(--warning-color);
}

/* ============== Article Detail ============== */
.article-header {
  background: linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(0,0,0,0.3));
  padding: 8rem 0 4rem;
  color: #fff;
  position: relative;
}

.article-header-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  z-index: -1;
}

.article-content {
  font-size: 1.1rem;
  line-height: 1.9;
}

.article-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

.article-content h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--secondary-color);
  background: var(--light-color);
  padding: 1.5rem;
  border-radius: 0 0.5rem 0.5rem 0;
}

.article-content ul, .article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content .lead {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--secondary-color);
  line-height: 1.8;
}

/* ============== Category Filter ============== */
.category-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.category-filter .btn {
  border-radius: 50px;
  padding: 0.5rem 1.25rem;
  font-weight: 500;
  transition: var(--transition-base);
}

.category-filter .btn.active {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* ============== Back to Top Button ============== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-base);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: #0b5ed7;
  transform: translateY(-3px);
}

/* ============== Footer ============== */
.footer {
  background-color: var(--dark-color);
  color: #fff;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-title {
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 2rem;
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255,255,255,0.5);
}

/* ============== Breadcrumb ============== */
.breadcrumb-container {
  background-color: var(--light-color);
  padding: 1rem 0;
}

.breadcrumb {
  margin: 0;
  background: transparent;
}

/* ============== Sidebar ============== */
.sidebar-widget {
  background: var(--light-color);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-widget-title {
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
}

/* ============== Loading Skeleton ============== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============== Responsive ============== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-section {
    padding: 3rem 0;
  }
  
  .featured-article-content {
    padding: 2rem;
  }
  
  .featured-article-title {
    font-size: 1.5rem;
  }
  
  .article-header {
    padding: 6rem 0 2rem;
  }
  
  .search-container {
    margin: 0 1rem;
  }
}

/* ============== Print Styles ============== */
@media print {
  .navbar, .footer, .back-to-top, .search-container {
    display: none !important;
  }
  
  .article-content {
    font-size: 12pt;
  }
}
