/* === FONT dengan Path Absolut === */
@font-face {
  font-family: 'Comfortaa';
  src: url('/wp-content/themes/wp-rbp-1/assets/css/font/Comfortaa-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Comfortaa';
  src: url('/wp-content/themes/wp-rbp-1/assets/css/font/Comfortaa-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Comfortaa';
  src: url('/wp-content/themes/wp-rbp-1/assets/css/font/Comfortaa-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Comfortaa';
  src: url('/wp-content/themes/wp-rbp-1/assets/css/font/Comfortaa-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Comfortaa';
  src: url('/wp-content/themes/wp-rbp-1/assets/css/font/Comfortaa-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* === ROOT VARIABLES === */
:root {
  --primary: #0d6efd;
  --secondary: #6c757d;
  --dark: #212529;
  --light: #f8f9fa;
  --accent: #fd7e14;
}

/* === BASE ELEMENTS === */
*, *::before, *::after {
  transition: background-color 0.1s ease, color 0.1s ease;
}

body {
  font-family: 'Comfortaa', sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--light);
}

header, .navbar {
  background-color: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* === HERO SECTION === */
.hero {
  background-color: var(--primary);
  color: white;
  padding: 3rem 0;
}

/* === CATEGORY CARDS === */
.category-card {
  background-color: white;
  border: 1px solid rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}
.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.category-icon {
  font-size: 2.5rem;
  color: var(--primary);
}

/* === SEARCH === */
.search-input {
  border-radius: 50px;
  padding-left: 1rem;
  color: white;
  border: 2px solid rgba(255,255,255,0.2);
  background-color: rgba(255,255,255,0.2);
}
.search-input::placeholder {
  color: rgba(255,255,255,0.7);
}
.search-btn {
  border-radius: 50px;
  padding: 0.5rem 1.5rem;
  background-color: white;
  color: var(--primary);
  border: none;
  font-weight: 500;
}

/* === NAVIGATION === */
.nav-link {
  color: var(--dark);
  font-weight: 500;
}
.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

/* === FILTER BUTTONS === */
.filter-btn {
  background-color: white;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 50px;
  padding: 0.25rem 1rem;
}
.filter-btn:hover,
.filter-btn.active {
  background-color: var(--primary);
  color: white;
}

/* === DARK/LIGHT MODE TOGGLES === */
[data-bs-theme="light"] .search-input {
  color: var(--dark);
}
[data-bs-theme="light"] .search-input::placeholder {
  color: rgba(0,0,0,0.4);
}
[data-bs-theme="light"] .category-icon {
  color: var(--primary);
}
[data-bs-theme="light"] #darkIcon {
  color: #212529 !important;
}
[data-bs-theme="dark"] body {
  background-color: #121212;
  color: #e0e0e0;
}
[data-bs-theme="dark"] header,
[data-bs-theme="dark"] .navbar {
  background-color: #212529 !important;
}
[data-bs-theme="dark"] .nav-link {
  color: #e0e0e0;
}
[data-bs-theme="dark"] .category-card {
  background-color: #1f1f1f;
}
[data-bs-theme="dark"] .category-icon {
  color: white;
}
[data-bs-theme="dark"] .search-input {
  background-color: rgba(255,255,255,0.1);
  color: white;
  border-color: rgba(255,255,255,0.2);
}
[data-bs-theme="dark"] .search-btn {
  background-color: var(--primary);
  color: white;
}
[data-bs-theme="dark"] #lightIcon {
  color: white !important;
}

/* === CARD RATIO FIX (3:4) === */
.custom-3x4 {
  width: 100%;
  padding-top: 133.33%; /* 4 / 3 aspect ratio */
  position: relative;
  overflow: hidden;
}

/* === CARD LAYOUT (Post Block) === */
.card-hover {
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.hover-shadow:hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-shadow:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.position-relative.rounded {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* === IMAGE AND OVERLAY === */
.object-fit-cover {
  object-fit: cover;
  width: 100%;
  height: 100%;
  transition: none;
  z-index: 1;
  position: absolute;
  top: 0;
  left: 0;
}
.custom-3x4 .overlay-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: 1;
  color: white;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
  text-shadow: 0 1px 2px rgba(0,0,0,0.9);
  pointer-events: none;
}

.overlay-content h5 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.overlay-content p {
  font-size: 0.85rem;
  line-height: 1.4;
  max-height: 5.6em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}


/* === RESPONSIVE === */
@media (max-width: 768px) {
  .overlay-content h5 {
    font-size: 1rem;
  }
  .overlay-content p {
    font-size: 0.85rem !important;
  }
}


/* Perbaiki padding dan lebar sidebar */
aside .widget {
  padding: 0.5rem 1rem;
  margin-bottom: 2rem;
}

.widget-title,
.widget h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary);
}

/* Supaya list tidak dempet */
.widget ul {
  list-style: none;
  padding-left: 0;
}

.widget ul li {
  padding: 0.4rem 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

/* Input pencarian lebih fleksibel */
.widget_search input[type="search"],
.widget_search input[type="text"] {
  width: 100%;
  padding: 0.4rem;
}

.widget_search input[type="submit"] {
  width: 100%;
  margin-top: 0.5rem;
}

/* Responsive fix */
@media (max-width: 768px) {
  aside.col-lg-4 {
    margin-top: 2rem;
  }
}

.comment-body,
.comment-content,
.comments-area {
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.comment-list,
.comment-list .children {
  padding-left: 1rem;
}

.comment-form,
.comment-form input,
.comment-form textarea {
  max-width: 100%;
  width: 100%;
}

.comment-form input[type="submit"] {
  width: auto;
}

input[type="checkbox"] {
  appearance: checkbox;
  -webkit-appearance: checkbox;
  -moz-appearance: checkbox;
  width: auto !important;
  height: auto !important;
  display: inline-block !important;
  vertical-align: middle;
}

  /* Suggestions Box Styling */
  #suggestions-box {
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
  }
  
  #suggestions-box .list-group-item {
    border-left: none;
    border-right: none;
    padding: 0.75rem 1.25rem;
  }
  
  #suggestions-box .list-group-item:first-child {
    border-top: none;
  }
  
  #suggestions-box .list-group-item:last-child {
    border-bottom: none;
  }
  
  /* Dark mode adjustments */
  @media (prefers-color-scheme: light) {
    .hero-section {
      background-color: rgba(var(--bs-primary-rgb), 0.05);
      border-bottom-color: rgba(var(--bs-primary-rgb), 0.1);
    }
    #suggestions-box {
      background-color: var(--bs-light) !important;
      border-color: var(--bs-gray-800) !important;
    }
    #suggestions-box .list-group-item {
      background-color: var(--bs-light);
      color: var(--bs-light);
    }
  }
  
 .author-link:hover {
  color: var(--bs-primary) !important;
  text-decoration: underline !important;
}
  