/* === GLOBAL RESET === */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Outfit', 'Poppins', 'Inter', sans-serif;
  font-size: 16px;
  color: #1F2A36;
  background-color: #ffffff;
  overflow-x: hidden;
}

/* === GRAPHIE BLOG SECTION === */
.graphie-section {
  background-color: #f9fafb;
  margin-top: 50px;
}

.graphie-section h2 {
  font-family: 'Outfit';
  font-size: 55px;
  font-weight: bold;
  color: #1F2A36;
}

/* === SEARCH BAR === */
.graphie-searchbar {
  position: relative;
  max-width: 540px;
  margin: 40px auto;
}

.graphie-input {
  width: 100%;
  padding: 14px 52px 14px 24px;
  border-radius: 999px;
  border: 2px solid #1F2A36;
  font-size: 16px;
  color: #1F2A36;
  transition: all 0.3s ease;
}

.graphie-input::placeholder {
  color: gray;
  font-weight: 400;
}

.graphie-input:focus {
  outline: none;
}

.graphie-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #000;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  transition: 0.2s;
}

.graphie-btn:hover {
  color: #1F2A36;
}

/* === KATEGORI === */
#blog h3 {
  font-size: 25px;
  font-weight: 600;
  color: #1F2A36;
  font-family: 'Poppins';
}

.category-slider {
  display: flex;
  overflow-x: auto;
  gap: 36px;
  padding-bottom: 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grabbing;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.category-slider::-webkit-scrollbar {
  display: none;
}

.category-slider .label {
  font-size: 16px;
  font-weight: 600;
  color: #1F2A36;
  font-family: 'Poppins';
}

.category-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: none;
  background: transparent;
  color: #333;
  font-size: 14px;
  padding: 5px 10px;
  cursor: pointer;
  transition: color 0.3s;
  flex-shrink: 0;
}

.category-item .icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.category-item .underline {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  height: 2px;
  width: 100%;
  background: #000;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.category-item.active .underline {
  transform: scaleX(1);
}

.category-item:not(.active) .underline {
  transform: scaleX(0);
}

/*=== Card ===*/
.graphie-card {
  background-color: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.graphie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08);
}

.graphie-card small {
  color: #6c757d;
  display: block;
  margin-bottom: 4px;
}

/* === Thumbnail image === */
.graphie-thumb {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.graphie-card:hover .graphie-thumb {
  transform: scale(1.03);
}

/* === Card Text === */
.graphie-card .p-3 {
  padding: 16px;
  flex-grow: 1;
}

.graphie-card small {
  font-size: 13px;
  color: #6c757d;
}

.graphie-card h5 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #1f2a36;
}

.graphie-card p {
  font-size: 12px;
  color: #6c757d;
  margin: 0;
}

/* === PAGINATION === */
.pagination-wrapper {
  background-color: #f9fafb;
  padding: 1px 0;
  margin-top: -50px;
}

.graphie-pagination {
  text-align: center;
  margin: 50px 0;
}

.graphie-pagination .pagination {
  list-style: none;
  display: inline-flex;
  gap: 16px;
  padding: 0;
  margin: 0;
}

.graphie-pagination .pagination li a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  font-weight: 600;
  font-size: 20px;
  color: #1F2A36;
  text-decoration: none;
  border-radius: 0;
  transition: all 0.2s ease;
}

.graphie-pagination .pagination li a.active::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 8px;
  right: 8px;
  height: 2px;
  background-color: #1F2A36;
  border-radius: 2px;
}

.graphie-pagination .pagination li a:not(.active):not(.arrow)::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: #1F2A36;
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 2px;
}

.graphie-pagination .pagination li a:not(.active):not(.arrow):hover::after {
  width: 60%;
}

.graphie-pagination .pagination li a.arrow {
  border-radius: 50%;
  border: 1px solid #ccc;
  color: #1F2A36;
}

/* === Responsive === */
@media (max-width: 576px) {
  .graphie-thumb {
    height: auto;
  }

  .graphie-card h5 {
    font-size: 16px;
  }

  .graphie-card p {
    font-size: 12.8px;
  }
}

/* === LIGHT/DARK MODE === */
body.dark-mode #blog {
  background-color: #121212;
}

body.dark-mode #blog h2, 
body.dark-mode #blog h3 {
  color: white;
}

body.dark-mode .graphie-input {
  background-color: #1e1e1e;
  color: white;
  border: 2px solid white;
}

body.dark-mode .graphie-input::placeholder {
  color: #6c757d; 
}

body.dark-mode .graphie-btn {
  color: white;
}

body.dark-mode .category-slider .icon, 
body.dark-mode .category-slider .label {
  color: white;
}

body.dark-mode .category-slider .underline {
  background: white;
}

body.dark-mode .graphie-card {
  background-color: #1e1e1e;
}

body.dark-mode .graphie-card h5 {
  color: white;
}

body.dark-mode .graphie-card p {
  color: #b0b0b0;
  font-size: 80%;
}

body.dark-mode .graphie-card small {
  color: white;
  display: block;
  margin-bottom: 4px;
}

body.dark-mode .pagination-wrapper {
  background-color: #121212;
}

body.dark-mode .pagination li a,
body.dark-mode .pagination li i {
  color: white;
}

body.dark-mode .graphie-pagination .pagination li a.active::after {
  background-color: white;
}

body.dark-mode .graphie-pagination .pagination li a:not(.active):not(.arrow)::after {
  background-color: white;
}

body.dark-mode .graphie-pagination .pagination li a.arrow {
  border-color: white;
  color: white;
}
