/**
 * GeerSoft IT Solutions — Blog Specialized Stylesheet
 * File: ai-blog.css
 * Description: Dedicated styling for Editorial Hero, Search & Category Filter Interface,
 *              Featured Insight Card, Article Grid, Topic Exploration Grid, and Light/Dark Modes.
 * Extends: ai-home.css design tokens & 10s multi-color theme engine
 */

/* ==========================================================================
   1. Blog Hero: Editorial 3D Composition
   ========================================================================== */
.blog-hero-composition {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Floating Primary Article Specimen Card */
.blog-hero-card-main {
  position: absolute;
  top: 30px;
  left: 0;
  width: 380px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(14, 23, 48, 0.94) 0%, rgba(9, 15, 31, 0.98) 100%);
  border: 1px solid var(--border-glow);
  box-shadow: 0 25px 60px -15px var(--glow-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  z-index: 2;
  animation: float-blog-slow 7s ease-in-out infinite alternate;
  transition: var(--trans-smooth);
}

@keyframes float-blog-slow {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(-1deg); }
  100% { transform: translateY(6px) rotate(1deg); }
}

.blog-hero-card-img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.blog-hero-card-body {
  padding: 20px;
}

.blog-hero-card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: var(--neon-cyan);
  margin-bottom: 10px;
}

.blog-hero-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.35;
}

.blog-hero-card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Secondary Floating Mini Card */
.blog-hero-card-sub {
  position: absolute;
  bottom: 25px;
  right: 10px;
  width: 240px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(17, 24, 39, 0.96) 0%, rgba(9, 14, 28, 0.98) 100%);
  border: 2px solid var(--border-glow);
  box-shadow: 0 20px 50px -10px var(--btn-glow);
  backdrop-filter: blur(20px);
  padding: 18px;
  z-index: 3;
  animation: float-blog-fast 6s ease-in-out infinite alternate-reverse;
}

@keyframes float-blog-fast {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(10px) rotate(1.5deg); }
  100% { transform: translateY(-8px) rotate(-1deg); }
}

.sub-blog-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: #10b981;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.sub-blog-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.sub-blog-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.sub-blog-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Floating Status Badges */
.blog-hero-badge-float {
  position: absolute;
  z-index: 4;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(11, 19, 43, 0.92);
  border: 1px solid var(--border-glow);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
  backdrop-filter: blur(12px);
  animation: float-orb 5s ease-in-out infinite alternate;
}

.blog-hero-badge-float.top-left {
  top: 10px;
  left: -20px;
}

.blog-hero-badge-float.bottom-left {
  bottom: 25px;
  left: 20px;
}


/* ==========================================================================
   2. Search & Category Filter Interface
   ========================================================================== */
.blog-discovery-section {
  padding-top: 10px;
  padding-bottom: 30px;
}

.blog-search-wrap {
  position: relative;
  max-width: 560px;
  margin: 0 auto 24px auto;
}

.blog-search-input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border-radius: 999px;
  background: rgba(14, 23, 48, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.25s ease;
  backdrop-filter: blur(14px);
}

.blog-search-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px var(--glow-color);
  background: rgba(14, 23, 48, 0.9);
}

.blog-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
}

.blog-search-clear {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: none;
  padding: 0;
  font-size: 1.1rem;
}

.blog-search-clear:hover {
  color: #ffffff;
}

/* Category Filter Nav */
.blog-category-nav {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(14, 23, 48, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  margin: 0 auto;
}

.blog-category-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.blog-category-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.blog-category-btn.active {
  background: var(--grad-ai);
  color: #ffffff;
  box-shadow: 0 4px 18px var(--btn-glow);
}


/* ==========================================================================
   3. Featured Insight Editorial Section
   ========================================================================== */
.featured-insight-section {
  padding: 40px 0 70px 0;
}

.featured-insight-card {
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(14, 23, 48, 0.88) 0%, rgba(9, 15, 31, 0.96) 100%);
  border: 1px solid var(--border-glow);
  box-shadow: 0 25px 70px -15px var(--glow-color);
  padding: 38px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  transition: border-color 0.3s ease;
}

.featured-insight-card:hover {
  border-color: var(--neon-cyan);
}

.featured-img-wrap {
  position: relative;
  width: 100%;
  height: 380px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.featured-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.featured-insight-card:hover .featured-img-wrap img {
  transform: scale(1.05);
}

.featured-tag-pill {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--neon-cyan);
}

.featured-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.featured-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.featured-meta-row span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.featured-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 16px;
}

.featured-excerpt {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.btn-read-featured {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--grad-ai);
  border: none;
  text-decoration: none;
  box-shadow: 0 4px 18px var(--btn-glow);
  width: fit-content;
  transition: all 0.25s ease;
}

.btn-read-featured:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--btn-glow);
  color: #ffffff;
}


/* ==========================================================================
   4. Latest Articles Grid & Card Design
   ========================================================================== */
.articles-grid-section {
  padding-bottom: 80px;
}

.article-col-item {
  transition: all 0.4s ease;
}

.article-col-item.d-none-filter {
  display: none !important;
}

.article-card-ai {
  position: relative;
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(14, 23, 48, 0.8) 0%, rgba(9, 15, 31, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  backdrop-filter: blur(14px);
}

.article-card-ai:hover {
  transform: translateY(-8px);
  border-color: var(--border-glow);
  box-shadow: 0 25px 60px -15px var(--glow-color);
}

.article-thumb-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #020712;
}

.article-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card-ai:hover .article-thumb-wrap img {
  transform: scale(1.06);
}

.article-category-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.article-read-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.article-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.article-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
  line-height: 1.35;
  transition: color 0.25s ease;
}

.article-card-ai:hover .article-title {
  color: var(--neon-cyan);
}

.article-summary {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-grow: 1;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-read-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--neon-cyan);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.btn-read-link:hover {
  color: #ffffff;
  transform: translateX(4px);
}

/* Empty State */
.blog-empty-state {
  text-align: center;
  padding: 60px 20px;
  border-radius: 20px;
  background: rgba(14, 23, 48, 0.4);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  display: none;
}

.empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--text-muted);
  margin: 0 auto 16px auto;
}

/* ==========================================================================
   4b. Blog Pagination (Up to 9 Cards per Page)
   ========================================================================== */
.blog-pagination-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 50px;
}

.blog-pagination-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(14, 23, 48, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.pagination-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.pagination-btn:hover:not(:disabled) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.pagination-btn.active {
  background: var(--grad-ai);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 18px var(--btn-glow);
}

.pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-info-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}


/* ==========================================================================
   5. Explore Technology by Topic Grid
   ========================================================================== */
.topics-section {
  padding: 80px 0;
  position: relative;
}

.topic-card-ai {
  padding: 30px 24px;
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(14, 23, 48, 0.75) 0%, rgba(9, 15, 31, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease;
  backdrop-filter: blur(12px);
  text-decoration: none;
}

.topic-card-ai:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
}

.topic-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--neon-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 16px;
}

.topic-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.topic-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}

.topic-action-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--neon-cyan);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}


/* ==========================================================================
   6. Light Mode Adaptations (body[data-mode="light"])
   ========================================================================== */
body[data-mode="light"] .blog-search-input {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.15);
  color: #0f172a;
}

body[data-mode="light"] .blog-search-input:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.15);
}

body[data-mode="light"] .blog-category-nav {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.08);
}

body[data-mode="light"] .blog-category-btn {
  color: #475569;
}

body[data-mode="light"] .blog-category-btn:hover {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.05);
}

body[data-mode="light"] .blog-category-btn.active {
  background: var(--grad-ai);
  color: #ffffff;
}

body[data-mode="light"] .featured-insight-card,
body[data-mode="light"] .article-card-ai,
body[data-mode="light"] .topic-card-ai,
body[data-mode="light"] .blog-hero-card-main,
body[data-mode="light"] .blog-hero-card-sub {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

body[data-mode="light"] .featured-title,
body[data-mode="light"] .article-title,
body[data-mode="light"] .topic-title,
body[data-mode="light"] .blog-hero-card-title,
body[data-mode="light"] .sub-blog-title {
  color: #0f172a;
}

body[data-mode="light"] .featured-excerpt,
body[data-mode="light"] .article-summary,
body[data-mode="light"] .topic-desc {
  color: #475569;
}

body[data-mode="light"] .article-card-footer {
  border-top-color: rgba(15, 23, 42, 0.06);
}

body[data-mode="light"] .blog-empty-state {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.15);
}

body[data-mode="light"] .blog-pagination-nav {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

body[data-mode="light"] .pagination-btn {
  color: #475569;
}

body[data-mode="light"] .pagination-btn:hover:not(:disabled) {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.06);
}

body[data-mode="light"] .pagination-btn.active {
  background: var(--grad-ai);
  color: #ffffff;
}

body[data-mode="light"] .pagination-info-text {
  color: #64748b;
}


/* ==========================================================================
   7. Responsiveness (Mobile & Tablet)
   ========================================================================== */
@media (max-width: 991px) {
  .blog-hero-composition {
    height: 380px;
    margin-top: 30px;
  }
  .blog-hero-card-main {
    width: 310px;
    top: 20px;
  }
  .blog-hero-card-sub {
    width: 200px;
    bottom: 20px;
  }
  .featured-img-wrap {
    height: 280px;
    margin-bottom: 24px;
  }
  .featured-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 768px) {
  .blog-hero-card-main {
    width: 270px;
    left: 0;
  }
  .blog-hero-card-sub {
    width: 170px;
    right: 0;
  }
  .blog-category-nav {
    border-radius: 16px;
    justify-content: flex-start;
    overflow-x: auto;
    width: 100%;
    padding: 8px;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .featured-insight-card {
    padding: 24px 18px;
  }
  .featured-title {
    font-size: 1.4rem;
  }
}
