@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary-color: #7c3aed;
  --primary-hover: #6d28d9;
  --primary-light: #ede9fe;
  --dark-color: #111827;
  --light-bg: #f9fafb;
  --border-color: #e5e7eb;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #ffffff;
  color: #374151;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Header & Navigation */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid #f3f4f6;
  transition: all 0.3s ease;
}

.nav-link {
  font-weight: 500;
  color: #4b5563 !important;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color) !important;
}

.header-social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: #fff;
  color: #4b5563;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.header-social-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
  transform: translateY(-2px);
}

.header-search-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  cursor: pointer;
}

.header-search-btn:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

/* Category Badge Pill */
.badge-purple {
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.badge-purple:hover {
  background-color: var(--primary-color);
  color: #fff;
}

/* Slider Section */
.featured-slider {
  width: 100%;
  height: 500px;
  position: relative;
  overflow: hidden;
}

.slider-item {
  height: 500px;
  position: relative;
  background-size: cover;
  background-position: center;
}

.slider-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  background: linear-gradient(to bottom, rgba(17, 24, 39, 0.2) 30%, rgba(17, 24, 39, 0.9) 100%);
  display: flex;
  align-items: flex-end;
  padding: 4rem 0;
}

.slider-content {
  color: #ffffff;
}

.slider-content .badge-purple {
  margin-bottom: 1rem;
}

.slider-title {
  font-weight: 800;
  font-size: 2.25rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.slider-excerpt {
  font-size: 1rem;
  color: #e5e7eb;
  margin-bottom: 1.5rem;
  max-width: 700px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.slider-link {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.slider-link:hover {
  color: var(--primary-light);
}

.slider-control-btn {
  width: 45px;
  height: 45px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background-color 0.3s ease, transform 0.3s ease;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.slider-control-btn:hover {
  background-color: var(--primary-color);
  color: #fff;
  transform: translateY(-50%) scale(1.1);
}

.carousel-indicators [data-bs-target] {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  border: none;
  margin: 0 5px;
}

.carousel-indicators .active {
  background-color: var(--primary-color);
  width: 20px;
  border-radius: 10px;
}

/* Main Section Titles */
.section-title {
  font-weight: 800;
  font-size: 1.35rem;
  color: #111827;
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 2px;
  background-color: #f3f4f6;
}

.text-primary-color {
  color: var(--primary-color);
}

/* Horizontal Cards */
.horizontal-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #fff;
  margin-bottom: 1.75rem;
}

.horizontal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(124, 58, 237, 0.15), 0 4px 6px -2px rgba(124, 58, 237, 0.05);
}

.card-img-wrapper {
  overflow: hidden;
  position: relative;
}

@media (max-width: 767.98px) {
  .card-img-wrapper {
    width: 100%;
    height: 220px;
  }
}

@media (min-width: 768px) {
  .card-img-wrapper {
    width: 260px;
    height: 100%;
    align-self: stretch;
  }
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.horizontal-card:hover .card-img-wrapper img {
  transform: scale(1.05);
}

.card-content-side {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.card-post-title {
  font-weight: 700;
  font-size: 1.25rem;
  color: #111827;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.35;
  transition: color 0.3s ease;
}

.card-post-title a {
  color: inherit;
}

.card-post-title a:hover {
  color: var(--primary-color);
}

.card-excerpt {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #6b7280;
  border-top: 1px solid #f3f4f6;
  padding-top: 0.75rem;
  margin-top: auto;
}

.card-meta-left {
  display: flex;
  gap: 12px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.meta-link {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

.meta-link:hover {
  color: var(--primary-hover);
}

/* Sticky Sidebar */
.sticky-sidebar {
  position: sticky;
  top: 90px;
}

.widget-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

.widget-title {
  font-weight: 700;
  font-size: 1rem;
  color: #111827;
  border-bottom: 2px solid #f3f4f6;
  padding-bottom: 0.5rem;
  margin-bottom: 1.2rem;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.widget-title::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
}

.recent-post-item {
  display: flex;
  gap: 12px;
  margin-bottom: 1.1rem;
  transition: transform 0.3s ease;
}

.recent-post-item:last-child {
  margin-bottom: 0;
}

.recent-post-item:hover {
  transform: translateX(3px);
}

.recent-post-img {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #f3f4f6;
}

.recent-post-meta {
  font-size: 0.75rem;
  color: #6b7280;
}

.recent-post-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #111827;
  margin: 2px 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.recent-post-title a:hover {
  color: var(--primary-color);
}

.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  color: #4b5563;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.3s ease, padding-left 0.3s ease;
  border-bottom: 1px dashed #f3f4f6;
}

.category-item:last-child {
  border-bottom: none;
}

.category-item:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

.category-count {
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.category-item:hover .category-count {
  background-color: var(--primary-color);
  color: #fff;
}

/* Pagination */
.pagination-container {
  display: flex;
  gap: 8px;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.page-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: #fff;
  color: #4b5563;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.page-btn:hover {
  background-color: var(--primary-light);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.page-btn.active {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* Category Page Banner */
.category-banner {
  background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%);
  color: #ffffff;
  padding: 4rem 0;
  text-align: center;
  margin-bottom: 3rem;
}

.category-banner h1 {
  font-weight: 800;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  text-transform: capitalize;
}

.breadcrumb-list {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #ddd6fe;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumb-list a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb-list a:hover {
  text-decoration: underline;
}

.breadcrumb-list li::after {
  content: "›";
  margin-left: 8px;
}

.breadcrumb-list li:last-child::after {
  content: "";
}

/* Single Blog Page Details */
.single-post-image {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.single-post-meta {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 1rem;
}

.single-post-title {
  font-weight: 800;
  font-size: 2.25rem;
  color: #111827;
  line-height: 1.25;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.single-post-content {
  line-height: 1.75;
  font-size: 1.05rem;
  color: #374151;
}

.single-post-content p {
  margin-bottom: 1.5rem;
}

.single-post-content h2, .single-post-content h3 {
  font-weight: 700;
  color: #111827;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.single-post-content h2 {
  font-size: 1.5rem;
}

.single-post-content h3 {
  font-size: 1.25rem;
}

.single-post-content blockquote {
  border-left: 4px solid var(--primary-color);
  background-color: var(--primary-light);
  padding: 1.5rem;
  font-style: italic;
  font-weight: 500;
  margin: 2rem 0;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  color: #4c1d95;
}

.single-post-content ul, .single-post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.single-post-content li {
  margin-bottom: 0.5rem;
}

/* Related Posts Section */
.related-posts-section {
  border-top: 1px solid #f3f4f6;
  padding-top: 3rem;
  margin-top: 3rem;
}

.related-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(124, 58, 237, 0.1), 0 4px 6px -2px rgba(124, 58, 237, 0.05);
}

.related-img-wrapper {
  height: 180px;
  overflow: hidden;
}

.related-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-content {
  padding: 1.25rem;
}

.related-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #111827;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-title a:hover {
  color: var(--primary-color);
}

.related-date {
  font-size: 0.75rem;
  color: #6b7280;
}

/* Footer Section */
footer {
  background-color: var(--dark-color);
  color: #9ca3af;
  padding: 4rem 0 2.5rem 0;
  border-bottom: 1px solid #1f2937;
}

.footer-logo {
  font-weight: 800;
  font-size: 1.5rem;
  color: #ffffff;
  margin-bottom: 1rem;
}

.footer-logo span {
  color: var(--primary-color);
}

.footer-widget-title {
  font-weight: 700;
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #9ca3af;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
  padding-left: 3px;
}

.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 1rem;
}

.footer-social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #1f2937;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.footer-social-btn:hover {
  background-color: var(--primary-color);
  transform: translateY(-2px);
}

/* You May Have Missed Section */
.missed-section {
  background-color: var(--light-bg);
  padding: 4rem 0;
  border-top: 1px solid #e5e7eb;
  overflow: hidden;
}

.missed-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.missed-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -6px rgba(124, 58, 237, 0.15), 0 4px 8px -2px rgba(124, 58, 237, 0.06);
}

.missed-img-wrapper {
  height: 170px;
  overflow: hidden;
}

.missed-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.missed-card:hover .missed-img-wrapper img {
  transform: scale(1.05);
}

.missed-content {
  padding: 1.15rem;
}

.missed-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #111827;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.missed-title a {
  color: inherit;
  text-decoration: none;
}

.missed-title a:hover {
  color: var(--primary-color);
}

.missed-date {
  font-size: 0.75rem;
  color: #6b7280;
}

/* Search Modal */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  background-color: rgba(17, 24, 39, 0.8);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  backdrop-filter: blur(4px);
  padding-left: 1rem;
  padding-right: 1rem;
}

.search-modal.active {
  display: flex;
}

.search-box {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 580px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.search-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f3f4f6;
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  border: 1px solid #e5e7eb;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.search-close-btn {
  position: absolute;
  right: 2.25rem;
  background: none;
  border: none;
  font-size: 1.15rem;
  color: #9ca3af;
  cursor: pointer;
  transition: color 0.3s ease;
}

.search-close-btn:hover {
  color: var(--primary-color);
}

.search-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 1rem;
  background-color: #fff;
}

.suggestion-item {
  display: flex;
  gap: 12px;
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-decoration: none;
  align-items: center;
  border-bottom: 1px solid #f9fafb;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background-color: var(--primary-light);
}

.suggestion-img {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
}

.suggestion-info {
  flex: 1;
}

.suggestion-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: #111827;
  margin-bottom: 2px;
  line-height: 1.35;
}

.suggestion-excerpt {
  font-size: 0.75rem;
  color: #6b7280;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Search Modal Active */
.search-modal.active {
    display: flex !important;
}

/* Suggestion Items */
.suggestion-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background 0.2s ease;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #f9fafb;
}

.suggestion-img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.suggestion-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.2rem;
}

.suggestion-excerpt {
    font-size: 0.775rem;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 420px;
}

.search-results {
    max-height: 350px;
    overflow-y: auto;
    margin-top: 0.5rem;
}

/* Content overflow fix */
.single-post-content {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

.single-post-content * {
    max-width: 100%;
}

.single-post-content p,
.single-post-content li,
.single-post-content td {
    overflow-wrap: break-word;
    word-break: break-word;
}