/*
 Theme Name:   WpGeoPress
 Theme URI:    https://generatepress.com
 Description:  Cleaned and optimized child theme for GeneratePress (Dark Mode Only)
 Template:     generatepress
 Version:      3.0.5
*/

/* ---------------------------------------------------------
   1. VARIABLES & GLOBAL (Dark Theme Permanent Values)
--------------------------------------------------------- */
:root {
  --min-width-card-adaptive: 300px;
  --width-card-1u: 336px;
  --primary-blue: #5b7eff;
  --primary-blue-hover: #00e6c3;
  --text-main: #e4e4e4;
  --text-muted: #a0a0a0;
  --text-light: #808080;
  --border-color: #333333;
  --bg-main: #0f0f0f;
  --bg-secondary: #1a1a1a;
  --bg-card: #1e1e1e;
  --bg-skeleton: linear-gradient(90deg, #1e1e1e 25%, #2a2a2a 50%, #1e1e1e 75%);
  --radius-lg: 60px;
  --radius-md: 40px;
  --transition: 0.2s ease;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
}

/* Header */
header#masthead .inside-header {
  background: rgba(30, 30, 30, 0.8);
  border-color: rgba(60, 60, 60, 0.4);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.main-navigation .main-nav ul li a {
  color: var(--text-main);
}

.main-navigation .main-nav ul li a:hover {
  color: var(--primary-blue);
}

.container.grid-container {
    width: auto;
	max-width: 100%;
}

/* ---------------------------------------------------------
   5. CATEGORY SECTIONS
--------------------------------------------------------- */
body:not(.home) div#page {
    padding-top: 80px;
}
section.hero-section {
    max-width: 1360px;
    margin: auto;
    padding: 0 20px;
}
.category-section {
  max-width: 1400px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

.category-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 15px;
}

.category-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.category-view-all {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.category-view-all:hover {
  color: var(--primary-blue-hover);
  text-decoration: underline;
}

.category-section .post-list.cards.grid-row {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .category-section {
    margin-bottom: 40px;
    padding: 0;
  }
  .category-section-title {
    font-size: 1.5rem;
  }
  .category-view-all {
    font-size: 0.9rem;
  }
}

/* ---------------------------------------------------------
   6. CARD GRID SYSTEM & COMPONENTS
--------------------------------------------------------- */
.post-list.cards.grid-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding: 20px 0;
  max-width: 1400px;
  margin: 0 auto;
}

/* Card Base */
.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  box-shadow: 0 4px 12px rgba(91, 126, 255, 0.15);
}

/* Card Image Area */
.card-top {
  position: relative;
  width: 100%;
  min-height: 200px;
  overflow: hidden;
}

.card-top a {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.card-top img.lazy-image,
.card-top img.card-image,
.image-skeleton {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-md) var(--radius-md);
}

.card-top img.card-image {
  display: block;
  position: relative;
  z-index: 2;
}

.card-top img.lazy-image {
  opacity: 0;
  transition: opacity 0.3s ease;
  position: relative;
  z-index: 2;
  display: block;
}

.card-top img.lazy-image.loaded {
  opacity: 1;
  display: block !important;
}

.flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.image-skeleton {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  background: var(--bg-skeleton);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

/* Card Content */
.card-info {
  padding: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  margin-bottom: 12px;
  font-size: 18px !important;
  line-height: 1.4;
  font-weight: 600;
}

.card-title a {
  color: var(--text-main);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}

.card-title a:hover {
  color: var(--primary-blue);
}

/* Card Meta (Unified) */
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: auto;
  flex-wrap: wrap; /* Added support for web stories layout */
}

.card-source {
  font-weight: 500;
  color: var(--text-main);
}

.card-time,
.card-views {
  color: var(--text-light);
}

.card-time::before,
.card-views::before {
  content: "•";
  margin-right: 8px;
  color: var(--text-light);
}

/* Card Categories (Overlay) */
.card-categories {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-categories .post-category {
  background: rgba(30, 30, 30, 0.85);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.card-categories .post-category.featured-tag {
  background: #ff6a00;
  color: #ffffff;
  border-color: #ff6a00;
}

/* Responsive Grid */
@media (min-width: 768px) {
  .post-list.cards.grid-row {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
  }
}

@media (min-width: 1024px) {
  .post-list.cards.grid-row {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
  }
}

/* ---------------------------------------------------------
   7. SINGLE POST
--------------------------------------------------------- */
/* .single-post div#content {
    padding-top: 100px;
} */
.single-post .container.grid-container {
    max-width: 1360px;
    margin: auto;
	padding: 0 20px;
}
.inside-article {
    padding: 0 !important;
}
.single-post-title {
  color: #fff !important;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  text-align:center;
}

.single-post-meta,
.post-author-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.single-post-meta {
  flex-wrap: wrap;
  margin-bottom: 30px;
  font-size: 14px;
  color: var(--text-muted);
}

/* Author Avatars (Unified) */
.author-avatar,
.author-avatar-placeholder,
.author-bio-avatar,
.author-bio-avatar-placeholder {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.author-avatar,
.author-avatar-placeholder {
  width: 40px;
  height: 40px;
}

.author-bio-avatar,
.author-bio-avatar-placeholder {
  width: 80px;
  height: 80px;
  margin: auto;
}

.author-avatar-placeholder,
.author-bio-avatar-placeholder {
  background: var(--border-color);
}

/* Post Categories */
.post-category {
  background: #ffa500;
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

/* Content Typography */
.single-post-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-main);
}

.single-post-content :is(h2, h3, h4) {
  margin: 30px 0 15px;
  font-weight: 600;
  color: var(--text-main) !important;
}

.single-post-content h2 { font-size: 1.8rem; }
.single-post-content h3 { font-size: 1.5rem; }
.single-post-content h4 { font-size: 1.3rem; }

/* Images & Media */
.gif-rounded img,
.post-image img,
.featured-image img {
  display: block;
  width: 100% !important;
  border-radius: 16px;
  filter: brightness(0.9);
}

.card-top img {
  filter: brightness(0.9);
}

/* Code Blocks */
.single-post-content :is(code, pre) {
  background: #1a1a1a;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.single-post-content code {
  padding: 2px 6px;
  font-size: 0.9em;
}

.single-post-content pre {
  padding: 20px;
  overflow-x: auto;
  margin-bottom: 20px;
}

.single-post-content pre code {
  background: none;
  padding: 0;
  border: none;
}

/* Author Bio */
.single-post-author-bio {
  display: flex;
  gap: 20px;
  padding: 30px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin: 40px 0;
}

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

/* Share Buttons */
.single-post-share {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  margin: 30px 0;
  border-block: 1px solid var(--border-color);
}

.single-post-share .entry-meta {
  margin: 0;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1a1a1a !important;
  color: #fff !important;
  transition: all var(--transition);
}

.share-btn:hover {
  background: #3a3a3a;
  transform: translateY(-2px);
  color: #00c7a6 !important;
}

/* Share Brand Colors */
.single-post-share .share-facebook:hover { color: #1877F2; }
.single-post-share .share-twitter:hover { color: #1DA1F2; }
.single-post-share .share-linkedin:hover { color: #0A66C2; }
.single-post-share .share-whatsapp:hover { color: #25D366; }
.single-post-share .share-telegram:hover { color: #229ED9; }
.single-post-share .share-email:hover { color: #EA4335; }

/* Comments */
.comments-area {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comment-author .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
  width: 100%;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-main);
}

.comment-form textarea:focus,
.comment-form input:focus {
  border-color: var(--primary-blue);
  outline: none;
}

.comment-form .submit {
  background: var(--primary-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}

.comment-form .submit:hover {
  background: var(--primary-blue-hover);
}

/* Single Post Responsive */
@media (max-width: 768px) {
  .single-post div#content {
/*     padding-top: 60px; */
    max-width: 100% !important;
  }
  .single-post-title {
    font-size: 1.8rem !important;
  }
  .single-post-author-bio {
    flex-direction: column;
    text-align: center;
  }
  .single-post-share {
    flex-wrap: wrap;
    gap: 10px;
  }
  .separate-containers .inside-article,
  .separate-containers .comments-area,
  .separate-containers .page-header,
  .separate-containers .paging-navigation,
  .one-container .site-content,
  .inside-page-header {
    padding: 20px;
  }
}

/* ---------------------------------------------------------
   9. WIDGETS & SHORTCODES (TOC, FAQ)
--------------------------------------------------------- */
/* Table of Contents */
.post-toc-container {
  width: 100%;
  margin: 20px 0;
}

.widget_toc {
  margin-bottom: 30px;
  width: 100%;
  max-width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px 16px 10px;
  box-sizing: border-box;
  cursor: pointer;
  position: relative;
  transition: background-color 0.2s ease;
}

.widget_toc:hover {
  background: #222222;
}

.widget_toc .widgettitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 16px;
  margin: 0 0 6px;
  user-select: none;
  -webkit-user-select: none;
  transition: color 0.2s ease;
  pointer-events: auto;
  position: relative;
  z-index: 1;
  color: #fff;
}

.widget_toc .widgettitle:hover { color: var(--primary-blue); }

.widget_toc .widgettitle::after {
  content: '+';
  font-weight: 600;
  font-size: 18px;
  line-height: 1;
}

.widget_toc.toc-expanded .widgettitle::after { content: '–'; }

.widget_toc ul {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.widget_toc.toc-collapsed ul { display: none; }

.widget_toc ul li a {
  color: var(--text-muted);
  display: block;
  padding: 4px 0;
  font-size: 14px;
  transition: color var(--transition);
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}

.widget_toc ul li a:hover { color: var(--primary-blue); }

.item-h3 { padding-left: 16px; }
.item-h4 { padding-left: 32px; }

/* Schema FAQ */
.schema-faq-section {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 32px;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  margin-bottom: 20px;
}

strong.schema-faq-question {
  display: block;
  width: 100%;
  position: relative;
  padding-right: 30px;
}

.schema-faq-question:after {
  content: "?";
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  color: var(--primary-blue);
  background: #2a2a2a;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 0;
  top: -2px;
}

.schema-faq-section .schema-faq-answer {
  margin-bottom: 0;
  margin-top: 10px;
}

/* ---------------------------------------------------------
   10. CATEGORY NAV LINKS
--------------------------------------------------------- */
.category-nav-link {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.category-nav-link:hover {
  background: var(--primary-blue);
  color: #ffffff;
}

/* ---------------------------------------------------------
   11. FOOTER & UTILITIES
--------------------------------------------------------- */
/* Hidden Elements */
.load-more-container,
.load-more-btn,
.image-skeleton.hidden {
  display: none !important;
}

/* Animations */

@keyframes marquee-reverse {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}