@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Light Mode Minimal Palette */
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #111827;
  --text-muted: #6b7280;
  --primary: #111827;
  --border: #e5e7eb;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Layout structure */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.custom-gpt-ad{
    max-width: 100%;
}
figure.wp-block-table {
    margin: 0;
}
table {
    margin: 0;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.site-title {
  text-decoration: none; 
  color: var(--text); 
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
}

/* Responsive Top Navigation */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
  padding: 0.5rem;
  border-radius: 8px;
}

.category-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-left: auto;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.nav-link:hover { 
  color: var(--text); 
}

.nav-link.active-cat { 
  color: #1d4ed8;
  background-color: #eff6ff; 
  border-bottom-color: #2563eb;
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .site-title {
    order: 1;
  }
  .mobile-toggle { 
    display: block; 
    order: 2;
  }
  .category-nav { 
    display: none; 
    flex-direction: column;
    width: 100%;
    margin-left: 0;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    gap: 0.5rem;
    align-items: stretch;
    order: 3;
  }
  .category-nav.show { 
    display: flex; 
  }
  .nav-link {
    text-align: center;
  }
}

main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 10px;
  padding-right: 10px;
  box-sizing: border-box;
  margin-top: 10px;
}

/* Footer */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 4rem 2rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-col h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 1rem;
  line-height: 1.6;
}

.footer-link {
  display: block;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
  cursor: pointer;
}

.footer-link:hover {
  color: var(--text);
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Views */
#list-view, #detail-view, #page-view { display: none; }
.view-active { display: block !important; animation: fadeIn 0.4s ease-out forwards; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Section Header */
.section-header {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text);
  grid-column: 1 / -1; /* spans full width of grid */
}

/* Layout for List View with Sidebar */
.list-view-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
}

@media (max-width: 900px) {
  .list-view-layout {
    grid-template-columns: 1fr;
  }
}

/* Grid Layout for Posts */
#posts-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  padding-bottom: 2rem;
}

@media (max-width: 600px) {
  #posts-container { grid-template-columns: 1fr; }
}

/* UI Components (Cards) */
.post-card {
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}

.post-card:hover {
  transform: translateY(-2px);
}

.post-card-image-wrapper {
  position: relative;
  width: 100%;
 height: 100%;
  margin-bottom: 1.25rem;
}

.post-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: #4f46e5;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  z-index: 10;
}

.post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  background-color: #f3f4f6; /* Placeholder color */
}

.post-title-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.post-card h2 { 
  margin: 0; 
  color: var(--text); 
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 0.8rem;
  color: var(--text);
  flex-shrink: 0;
  transition: all 0.2s;
}

.post-card:hover .post-arrow {
  background-color: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.post-card .excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Author block */
.post-author-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
}

.author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #e5e7eb;
}

.author-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.author-meta span.author-name {
  color: var(--text);
}

/* Pagination System */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  margin-bottom: 4rem;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--text);
  background-color: transparent;
  color: var(--text);
  border-radius: 50%;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover {
  background-color: #f3f4f6;
}

.page-btn.active {
  background-color: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}

.page-dots {
  color: var(--text-muted);
  font-weight: 600;
  padding: 0 0.25rem;
}

/* Back Button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
  background: transparent;
  padding: 0;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.back-btn:hover { 
  color: var(--text);
}

/* Loader */
.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 1rem;
  grid-column: 1 / -1;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(17, 24, 39, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner.small {
  width: 16px;
  height: 16px;
  border-width: 2px;
  border-color: rgba(255,255,255,0.3);
  border-top-color: #fff;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader-text {
  color: var(--text-muted);
  font-weight: 500;
}

/* Detail View Typography & Header */
.single-post-header {
  position: relative;
  margin-bottom: 2rem;
}

.single-badge {
  position: static;
  display: inline-block;
  margin-bottom: 1rem;
}

#single-post-container h1, #single-page-container h1 {
  font-size: 2.8rem;
  line-height: 1.15;
  margin: 0 0 1.5rem 0;
  letter-spacing: -1px;
  font-weight: 800;
  color: var(--text);
}

.single-author {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.single-post-image {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2.5rem;
}

/* WordPress Content Styles */
.wp-content {
  font-size: 1.15rem;
  color: #374151;
  line-height: 1.8;
}

.wp-content p { margin-bottom: 1.75rem; }
.wp-content h2 { 
  color: var(--text); 
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 3rem; 
  margin-bottom: 1.25rem; 
}
.wp-content h3 { 
  color: var(--text); 
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 2.5rem; 
  margin-bottom: 1rem; 
}
.wp-content img { max-width: 100%; height: auto; border-radius: 12px; margin: 2rem 0; }
.wp-content a { color: #2563eb; text-decoration: none; font-weight: 500; }
.wp-content a:hover { text-decoration: underline; }
.wp-content ul, .wp-content ol { margin-bottom: 1.75rem; padding-left: 1.5rem; }
.wp-content li { margin-bottom: 0.5rem; }
.wp-content blockquote {
  border-left: 4px solid #4f46e5;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text);
  font-size: 1.25rem;
}
.wp-content iframe { max-width: 100%; border-radius: 12px; margin: 2rem 0; }

/* Sidebar Styles */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.sidebar-widget {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-header {
  display: flex;
  align-items: center;
}

.sidebar-badge {
  background-color: #4f46e5;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  white-space: nowrap;
}

.header-line {
  flex: 1;
  height: 1px;
  background-color: var(--border);
  margin-left: -4px; /* Slight overlap for seamless look */
  z-index: -1;
}

.sidebar-categories {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sidebar-cat-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.25rem;
  background-color: #f3f4f6;
  border: none;
  border-radius: 12px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  text-align: left;
}

.sidebar-cat-btn:hover {
  background-color: #e5e7eb;
}

.sidebar-cat-btn .icon {
  font-size: 1.25rem;
}

.sidebar-trending {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.trending-item {
  display: flex;
  gap: 1rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.trending-item:hover {
  transform: translateX(4px);
}

.trending-thumb {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background-color: #f9d849; /* Yellow placeholder like ref image */
}

.trending-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
}

.trending-info h4 {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text);
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trending-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.sidebar-ad {
  width: 100%;
  height: 250px;
  background-color: #f9fafb;
  border: 1px dashed #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 0.85rem;
  letter-spacing: 2px;
  font-weight: 600;
}
.ez-toc-container-direction{
	display:none !important;
}
.post-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    background-color: #f3f4f6;
   
    overflow: hidden;
}
@media (max-width: 767px) {
    #single-post-container h1,
    #single-page-container h1 {
        font-size: 26px;
        line-height: 30px;
        margin: 0 0 1.5rem 0;
        font-weight: 700;
        color: var(--text);
    }
}