/* Variabel CSS */
:root {
  --primary-color: #f8d7da;
  --secondary-color: #f8f9fa;
  --accent-color: #e63946;
  --text-color: #212529;
  --text-light: #6c757d;
  --border-color: #dee2e6;
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --border-radius: 8px;
  --font-family: 'Nunito', sans-serif;
}

/* Dark mode variables */
[data-theme="dark"] {
  --primary-color: #2d3436;
  --secondary-color: #1e272e;
  --accent-color: #ff6b6b;
  --text-color: #f5f5f5;
  --text-light: #b2bec3;
  --border-color: #485460;
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Reset dan Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--secondary-color);
  transition: var(--transition);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #d62828;
}

img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Header Styles */
.site-header {
  background-color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo img {
  height: 50px;
}

.main-nav ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-nav li {
  margin-left: 2rem;
}

.main-nav a {
  font-weight: 600;
  color: var(--text-color);
  position: relative;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent-color);
}

.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-color);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-toggle,
.theme-toggle,
.mobile-menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  padding: 0.5rem;
  border-radius: 50%;
  transition: var(--transition);
}

.search-toggle:hover,
.theme-toggle:hover,
.mobile-menu-toggle:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
}

.mobile-menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--text-color);
  transition: var(--transition);
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-container {
  width: 100%;
  max-width: 800px;
  padding: 0 20px;
}

.search-box {
  position: relative;
  margin-bottom: 1rem;
}

.search-input {
  width: 100%;
  padding: 1rem 3rem 1rem 1rem;
  font-size: 1.2rem;
  border: none;
  border-radius: var(--border-radius);
  background-color: var(--secondary-color);
  color: var(--text-color);
}

.search-close {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  padding: 0.5rem;
}

.search-results {
  max-height: 70vh;
  overflow-y: auto;
  background-color: var(--secondary-color);
  border-radius: var(--border-radius);
  padding: 1rem;
}

.search-result-item {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.search-result-summary {
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.search-result-url {
  font-size: 0.9rem;
  color: var(--accent-color);
}

/* Main Content */
.main-content {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
}

.hero {
  text-align: center;
  padding: 3rem 0;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 2rem;
}

.page-description {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 800px;
}

/* Sections */
.section {
  margin-bottom: 3rem;
}

.section h2 {
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
  padding-bottom: 0.5rem;
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background-color: var(--accent-color);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background-color: var(--primary-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 1.5rem;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.card-title {
  margin-bottom: 0.5rem;
}

.card-title a {
  color: var(--text-color);
}

.card-title a:hover {
  color: var(--accent-color);
}

.card-summary {
  margin-bottom: 1rem;
  color: var(--text-light);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background-color: var(--accent-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Video Card */
.video-card .card-image {
  position: relative;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background-color: rgba(230, 57, 70, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: var(--transition);
}

.video-card:hover .play-button {
  background-color: rgba(230, 57, 70, 1);
}

.video-duration {
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  position: absolute;
  bottom: 10px;
  right: 10px;
}

/* Term Card */
.term-card {
  background-color: var(--secondary-color);
  border: 1px solid var(--border-color);
}

.term-title {
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.term-definition {
  margin-bottom: 1rem;
}

.related-terms h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.related-terms ul {
  padding-left: 1.5rem;
}

.related-terms li {
  margin-bottom: 0.25rem;
}

/* Q&A Card */
.qa-card {
  background-color: var(--secondary-color);
  border: 1px solid var(--border-color);
}

.qa-category {
  background-color: var(--accent-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.question {
  margin-bottom: 1rem;
}

.answer-preview {
  margin-bottom: 1rem;
  color: var(--text-light);
}

.read-more {
  font-weight: 600;
  color: var(--accent-color);
}

.read-more:hover {
  text-decoration: underline;
}

/* Content */
.content {
  max-width: 800px;
  margin: 0 auto;
}

.content-header {
  margin-bottom: 2rem;
  text-align: center;
}

.content-header h1 {
  margin-bottom: 1rem;
}

.meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

.content-body {
  margin-bottom: 2rem;
}

.content-body h2,
.content-body h3,
.content-body h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.content-body ul,
.content-body ol {
  margin-bottom: 1rem;
}

.content-body li {
  margin-bottom: 0.5rem;
}

.content-body img {
  margin: 1.5rem 0;
  border-radius: var(--border-radius);
}

.content-body blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-light);
}

.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.content-body th,
.content-body td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.content-body th {
  background-color: var(--primary-color);
  font-weight: 600;
}

.content-body code {
  background-color: rgba(0, 0, 0, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
}

.content-body pre {
  background-color: rgba(0, 0, 0, 0.1);
  padding: 1rem;
  border-radius: var(--border-radius);
  overflow-x: auto;
}

.content-body pre code {
  background: none;
  padding: 0;
}

/* Content Footer */
.content-footer {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

/* Share Buttons */
.share-buttons h4 {
  margin-bottom: 1rem;
}

.share-buttons-container {
  display: flex;
  gap: 1rem;
}

.share-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: white;
  transition: var(--transition);
}

.share-button:hover {
  transform: translateY(-3px);
}

.share-button.facebook {
  background-color: #1877f2;
}

.share-button.twitter {
  background-color: #1da1f2;
}

.share-button.whatsapp {
  background-color: #25d366;
}

.share-button.email {
  background-color: #6c757d;
}

.share-button.copy {
  background-color: #343a40;
}

/* Comments */
.comments-section {
  margin-top: 2rem;
}

.comments-section h3 {
  margin-bottom: 1rem;
}

.comments-container {
  min-height: 200px;
}

/* Breadcrumb */
.breadcrumb {
  margin-bottom: 2rem;
}

.breadcrumb ol {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumb li {
  margin-right: 0.5rem;
}

.breadcrumb li:not(:last-child)::after {
  content: '/';
  margin-left: 0.5rem;
  color: var(--text-light);
}

.breadcrumb li[aria-current="page"] {
  color: var(--text-light);
  font-weight: normal;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  gap: 0.5rem;
}

.pagination-prev,
.pagination-next {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-color);
  transition: var(--transition);
}

.pagination-prev:hover,
.pagination-next:hover {
  background-color: var(--primary-color);
}

.pagination-numbers {
  display: flex;
  gap: 0.5rem;
}

.pagination-numbers li {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius);
}

.pagination-numbers a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-color);
  transition: var(--transition);
}

.pagination-numbers a:hover {
  background-color: var(--primary-color);
}

.pagination-current {
  background-color: var(--accent-color);
  color: white;
}

.pagination-ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--text-light);
}

/* Footer */
.site-footer {
  background-color: var(--primary-color);
  padding: 2rem 0 1rem;
  margin-top: 3rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--accent-color);
  color: white;
  transition: var(--transition);
}

.social-links a:hover {
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--primary-color);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--secondary-color);
  color: var(--text-color);
  font-family: var(--font-family);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}

.submit-btn {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.submit-btn:hover {
  background-color: #d62828;
}

/* Responsive Design */
@media (max-width: 992px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-wrap: wrap;
  }
  
  .main-nav {
    order: 3;
    width: 100%;
    margin-top: 1rem;
    display: none;
  }
  
  .main-nav.active {
    display: block;
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .main-nav li {
    margin: 0;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .share-buttons-container {
    flex-wrap: wrap;
  }
  
  .pagination {
    flex-wrap: wrap;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 15px;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .content {
    padding: 0;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}