/* Blog Content Section Styles */

/* Main Layout */
.blog-content-section {
  position: relative;
  padding: 100px 0;
  background-color: var(--dark-bg);
  overflow: hidden;
}

.blog-content-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 20%, rgba(45, 85, 255, 0.1), transparent 40%),
              radial-gradient(circle at 70% 60%, rgba(255, 45, 85, 0.1), transparent 40%);
  z-index: 0;
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 40px;
  position: relative;
  z-index: 1;
}

/* Blog Main Content */
.blog-main-content {
  width: 100%;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-bottom: 50px;
}

/* Featured Article (spans two columns) */
.blog-card.featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  background: rgba(20, 25, 40, 0.7);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(81, 94, 236, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: all 0.4s ease;
}

.blog-card.featured:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(81, 94, 236, 0.2);
  border-color: rgba(81, 94, 236, 0.4);
}

.blog-card.featured .card-image {
  height: 100%;
  border-radius: 16px 0 0 16px;
}

.blog-card.featured .card-content {
  padding: 30px;
}

/* Blog Card */
.blog-card {
  position: relative;
  background: rgba(20, 25, 40, 0.7);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(81, 94, 236, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: all 0.4s ease;
  animation: fadeIn 0.6s ease forwards;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(81, 94, 236, 0.15);
  border-color: rgba(81, 94, 236, 0.3);
}

.card-tag {
  position: absolute;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #ff3e6f, #ff7f45);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 2;
  box-shadow: 0 5px 15px rgba(255, 62, 111, 0.3);
}

.blog-card.premium .card-tag {
  background: linear-gradient(135deg, #ffd700, #ff9d00);
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

/* Card Image */
.card-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.blog-card:hover .card-image img {
  transform: scale(1.05);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.6));
}

.category-badge {
  position: absolute;
  bottom: 15px;
  left: 15px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  z-index: 2;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.category-badge.teknologi {
  background: linear-gradient(135deg, #3498db, #2980b9);
}

.category-badge.matematika {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.category-badge.info-produk {
  background: linear-gradient(135deg, #f39c12, #f1c40f);
}

.category-badge.selfcare {
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.category-badge.sains {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.category-badge.lain-lain {
  background: linear-gradient(135deg, #1abc9c, #16a085);
}

/* Card Content */
.card-content {
  padding: 25px;
}

.blog-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-color);
  line-height: 1.3;
  transition: color 0.3s ease;
}

.blog-card:hover h3 {
  background: linear-gradient(to right, #3498db, #5352ed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glitch Text Effect */
.glitch-text {
  position: relative;
  display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch-text::before {
  color: #ff00ff;
  z-index: -1;
}

.glitch-text::after {
  color: #00ffff;
  z-index: -2;
}

.blog-card:hover .glitch-text::before {
  animation: glitch 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
  animation-delay: 0.1s;
}

.blog-card:hover .glitch-text::after {
  animation: glitch 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) reverse both infinite;
  animation-delay: 0.2s;
}

@keyframes glitch {
  0% {
    transform: translate(0);
    opacity: 0;
  }
  20% {
    transform: translate(-3px, 3px);
    opacity: 0.3;
  }
  40% {
    transform: translate(-3px, -3px);
    opacity: 0;
  }
  60% {
    transform: translate(3px, 3px);
    opacity: 0.3;
  }
  80% {
    transform: translate(3px, -3px);
    opacity: 0;
  }
  100% {
    transform: translate(0);
    opacity: 0;
  }
}

.card-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 0.85rem;
  color: var(--text-light);
}

.card-meta span {
  display: flex;
  align-items: center;
}

.card-meta i {
  margin-right: 5px;
  color: var(--primary-color);
}

.card-excerpt {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-light);
  margin-bottom: 20px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
}

/* Read More Button */
.read-more-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(81, 94, 236, 0.1), rgba(81, 94, 236, 0.2));
  border-radius: 30px;
  color: var(--primary-color);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid rgba(81, 94, 236, 0.2);
  position: relative;
  overflow: hidden;
}

.read-more-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.6s ease;
}

.read-more-btn:hover {
  background: linear-gradient(135deg, rgba(81, 94, 236, 0.2), rgba(81, 94, 236, 0.3));
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(81, 94, 236, 0.15);
}

.read-more-btn:hover::before {
  left: 100%;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  transition: all 0.3s ease;
}

.read-more-btn:hover .btn-icon {
  transform: translateX(3px);
}

.engagement {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: var(--text-light);
}

.engagement span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.engagement i {
  color: var(--primary-color);
}

/* Pagination */
.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 50px;
}

.pagination-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(81, 94, 236, 0.1);
  color: var(--text-color);
  font-weight: 600;
  border: 1px solid rgba(81, 94, 236, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-btn:hover, .pagination-btn.active {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 5px 15px rgba(81, 94, 236, 0.3);
}

.pagination-btn.next {
  width: auto;
  padding: 0 15px;
}

/* Blog Sidebar */
.blog-sidebar {
  width: 100%;
}

.sidebar-widget {
  background: rgba(20, 25, 40, 0.7);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(81, 94, 236, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  margin-bottom: 30px;
  transition: all 0.4s ease;
}

.sidebar-widget:hover {
  border-color: rgba(81, 94, 236, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.widget-title {
  padding: 20px;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-color);
  border-bottom: 1px solid rgba(81, 94, 236, 0.1);
  position: relative;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20px;
  width: 50px;
  height: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  border-radius: 3px;
}

.widget-content {
  padding: 20px;
}

/* Search Widget */
.search-widget .widget-content {
  padding: 15px;
}

.search-input-wrapper {
  display: flex;
  border-radius: 30px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(81, 94, 236, 0.2);
  transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(81, 94, 236, 0.2);
}

.search-input-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 20px;
  color: var(--text-color);
  font-size: 0.95rem;
}

.search-input-wrapper input::placeholder {
  color: var(--text-light);
}

.search-input-wrapper button {
  background: var(--primary-color);
  border: none;
  padding: 0 20px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-input-wrapper button:hover {
  background: var(--accent-color);
}

/* Categories Widget */
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-list li {
  margin-bottom: 10px;
}

.category-list li:last-child {
  margin-bottom: 0;
}

.category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.category-list a:hover {
  background: rgba(81, 94, 236, 0.1);
  border-color: rgba(81, 94, 236, 0.2);
  transform: translateX(5px);
}

.category-name {
  flex: 1;
  font-weight: 500;
}

.category-count {
  background: rgba(81, 94, 236, 0.2);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.category-list a:hover .category-count {
  background: var(--primary-color);
  color: white;
}

.category-icon {
  margin-left: 10px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(81, 94, 236, 0.1);
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.category-list a:hover .category-icon {
  background: var(--primary-color);
  color: white;
  transform: rotate(360deg);
}

/* Recent Posts Widget */
.recent-posts-widget .widget-content {
  padding: 15px;
}

.recent-post {
  display: flex;
  gap: 15px;
  padding: 15px;
  border-radius: 8px;
  transition: all 0.3s ease;
  margin-bottom: 10px;
}

.recent-post:last-child {
  margin-bottom: 0;
}

.recent-post:hover {
  background: rgba(255, 255, 255, 0.05);
}

.post-image {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.recent-post:hover .post-image img {
  transform: scale(1.1);
}

.post-info {
  flex: 1;
}

.post-info h4 {
  margin: 0 0 5px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.post-info h4 a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.post-info h4 a:hover {
  color: var(--primary-color);
}

.post-date {
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Tags Widget */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-item {
  padding: 6px 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  color: var(--text-color);
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(81, 94, 236, 0.1);
}

.tag-item:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(81, 94, 236, 0.2);
}

/* Newsletter Widget */
.newsletter-content {
  text-align: center;
}

.newsletter-content p {
  margin-bottom: 20px;
  color: var(--text-light);
}

.newsletter-form {
  display: flex;
  margin-bottom: 15px;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 15px;
  border-radius: 8px 0 0 8px;
  border: 1px solid rgba(81, 94, 236, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-color);
}

.subscribe-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border: none;
  border-radius: 0 8px 8px 0;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.subscribe-btn:hover {
  filter: brightness(1.1);
}

.newsletter-info {
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.newsletter-info i {
  color: var(--primary-color);
}

/* Featured Article Widget */
.featured-article {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.featured-image {
  position: relative;
  height: 180px;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.7));
}

.featured-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(135deg, #ff3e6f, #ff7f45);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 5px 15px rgba(255, 62, 111, 0.3);
}

.featured-content {
  padding: 20px;
  background: rgba(20, 25, 40, 0.9);
}

.featured-content h4 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-color);
  line-height: 1.4;
}

.featured-content p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 15px;
  line-height: 1.5;
}

.read-featured {
  color: var(--primary-color);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.read-featured:hover {
  color: var(--accent-color);
}

.read-featured i {
  transition: transform 0.3s ease;
}

.read-featured:hover i {
  transform: translateX(5px);
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .blog-layout {
    grid-template-columns: 1fr 300px;
    gap: 30px;
  }
}

@media (max-width: 992px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .blog-card.featured {
    grid-template-columns: 1fr;
    grid-column: span 1;
  }
  
  .blog-card.featured .card-image {
    border-radius: 16px 16px 0 0;
    height: 300px;
  }
}

@media (max-width: 768px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }
  
  .blog-content-section {
    padding: 60px 0;
  }
  
  .blog-sidebar {
    margin-top: 30px;
  }
}

@media (max-width: 576px) {
  .blog-card.featured .card-image {
    height: 220px;
  }
  
  .card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .engagement {
    width: 100%;
    justify-content: space-between;
  }
  
  .blog-pagination {
    flex-wrap: wrap;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Light Theme Adjustments */
body.light-theme .blog-content-section {
  background-color: var(--light-bg);
}

body.light-theme .blog-card,
body.light-theme .sidebar-widget {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(230, 230, 250, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

body.light-theme .blog-card h3,
body.light-theme .widget-title,
body.light-theme .post-info h4 a {
  color: var(--dark-text);
}

body.light-theme .card-excerpt,
body.light-theme .card-meta,
body.light-theme .engagement,
body.light-theme .post-date {
  color: var(--dark-text-light);
}

body.light-theme .search-input-wrapper,
body.light-theme .category-list a,
body.light-theme .tag-item,
body.light-theme .newsletter-form input {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .search-input-wrapper input::placeholder {
  color: var(--dark-text-light);
}