/* ============================================================
   BLOG PAGE — Blog.css
   Nav styles handled by header.css — not duplicated here
   ============================================================ */

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  --navy: #0a0f1e;
  --navy2: #0f172a;
  --navy3: #1e293b;
  --cyan: #06b6d4;
  --cyan2: #22d3ee;
  --gold: #f59e0b;
  --white: #f8fafc;
  --gray: #94a3b8;
  --card-bg: rgba(30, 41, 59, 0.7);
}

/* ── Reset ────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", sans-serif;
  background: var(--navy);
  color: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

.wrapper {
  --min-col-size: 350px;

  max-inline-size: 1200px;
  margin-inline: auto;
  padding-inline: 1.5rem;

  display: grid;
  gap: 1.2rem;
  margin-block-start: 2rem;
  grid-template-columns: repeat(
    auto-fit,
    minmax(min(var(--min-col-size), 100%), 1fr)
  );
}

.wrapper a {
  color: var(--white);
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--navy2);
}
::-webkit-scrollbar-thumb {
  background: var(--cyan);
  border-radius: 2px;
}

/* ── Typography ───────────────────────────────────────────── */
h1 {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  animation: fade-up 0.8s 0.1s ease both;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--cyan);
  color: var(--navy);
  padding: 0.9rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.25s;
  box-shadow: 0 4px 30px rgba(6, 182, 212, 0.35);
}

.btn-primary:hover {
  background: var(--cyan2);
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(6, 182, 212, 0.45);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--white);
  padding: 0.9rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.25s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

/* ── Section Shared ───────────────────────────────────────── */
section {
  padding: 5rem 5%;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cyan);
  margin-bottom: 1rem;
}

.section-label::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--cyan);
  border-radius: 2px;
}

.section-title {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  text-align: center;
}

.section-sub {
  color: var(--gray);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
}

/* ── Reveal Animation ─────────────────────────────────────── */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb-container {
  background: var(--navy);
  padding: 70px 5% 0;
}

.breadcrumb {
  max-width: 1400px;
  margin: 0 auto;
  font-size: 0.85rem;
  color: var(--gray);
}

.breadcrumb a {
  color: var(--cyan);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* ── Page Hero ───────────────────────────────────────────── */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 6rem 5%;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("../assets/services.jpeg");
  background-size: 110% 110%;
  background-repeat: no-repeat;
  background-position: center;
  animation: moveBackground 20s ease-in-out infinite alternate;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.7), rgba(10, 15, 30, 0.85));
  pointer-events: none;
}

.page-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

@keyframes moveBackground {
  0% {
    background-position: 0% center;
    background-size: 110% 110%;
  }
  50% {
    background-position: 50% center;
    background-size: 120% 120%;
  }
  100% {
    background-position: 100% center;
    background-size: 110% 110%;
  }
}

@media (max-width: 768px) {
  .page-hero {
    background-size: cover;
    padding: 5rem 5% 3rem;
    min-height: 400px;
  }
}

@media (max-width: 480px) {
  .page-hero {
    min-height: 350px;
    padding: 4rem 5% 2rem;
  }
}

.neural-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.18;
  pointer-events: none;
  mix-blend-mode: screen;
}

.page-hero-inner p {
  color: var(--gray);
  line-height: 1.7;
}

.hero-search-container {
  margin-top: 1.5rem;
  width: min(760px, 100%);
  max-width: 760px;
  align-self: center;
}

.hero-intro-card {
  max-width: 1350px;
  margin: 0 auto;
  padding: 55px;
  border-radius: 30px;
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.82),
    rgba(30, 41, 59, 0.7)
  );
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 2px solid rgba(46, 250, 250, 0.863);
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.45),
    0 0 80px rgba(6, 182, 212, 0.08);
  position: relative;
  overflow: hidden;
}

.hero-intro-card::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  top: -120px;
  right: -100px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.25), transparent 70%);
  border-radius: 50%;
}

.page-hero h1 {
  font-size: clamp(2.8rem, 7vw, 4.8rem);
  line-height: 1.1;
  font-weight: 800;
  text-align: center;
}

.page-hero h1 span {
  color: var(--cyan);
  position: relative;
}

.page-hero h1 span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 4px;
  background: var(--cyan);
  border-radius: 999px;
}

/* ── Search ───────────────────────────────────────────────── */
.blog-search {
  display: flex;
  width: 100%;
  max-width: 650px;
  margin: 2.5rem auto 0;
  position: relative;
  margin-top: 35px;
  gap: 15px;
  z-index: 3;
}

.search-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  padding: 18px 22px;
  transition: 0.35s;
  color: var(--white);
  font-size: 1rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15);
}

.search-btn {
  background: var(--cyan);
  color: var(--navy);
  border: none;
  border-radius: 16px;
  padding: 18px 26px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.search-btn:hover {
  background: var(--cyan2);
  transform: translateY(-2px);
}

/* ── Filter Buttons ───────────────────────────────────────── */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 0 auto 2.5rem;
  justify-content: center;
  max-width: 1400px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gray);
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  transform: translateY(-3px);
}

.filter-btn.active {
  background: var(--cyan);
  color: var(--navy);
  border-color: var(--cyan);
}

/* ── Mobile Filter Dropdown ───────────────────────────────── */
.filter-select-wrapper {
  display: none;
  position: relative;
  max-width: 320px;
  margin: 0 auto 2.5rem;
}

.filter-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
  padding: 0.75rem 2.5rem 0.75rem 1.1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: var(--cyan);
}

.filter-select option {
  background: var(--navy2);
  color: var(--white);
}

.filter-select-wrapper::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1.1rem;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Featured Post ────────────────────────────────────────── */
.featured-post {
  background: var(--navy);
  padding: 1.5rem 5% 4rem;
}

.featured-post-container {
  max-width: 1200px;
  margin: 0 auto;
}

.featured-card {
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.95),
    rgba(6, 182, 212, 0.1)
  );
  border: 1px solid rgba(6, 182, 212, 0.15);
  border-radius: 28px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  cursor: pointer;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  transition: all 0.3s;
}

.featured-card:hover {
  transform: translateY(-10px);
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 40px 70px rgba(0, 0, 0, 0.45);
}

.featured-preview {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(6, 182, 212, 0.05);
}

.featured-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.featured-badge {
  background: var(--cyan);
  color: var(--navy);
  padding: 0.2rem 0.8rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
}

.featured-content {
  padding: 3rem;
}

.featured-content h3 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.featured-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--gray);
}

/* ── Blog Section ─────────────────────────────────────────── */
#blog {
  background: var(--navy2);
  padding: 3rem 5%;
}

.blog-section-heading {
  max-width: 1400px;
  margin: 0 auto 2rem;
  text-align: left;
}

.blog-section-heading .section-sub {
  margin-left: 0;
  margin-right: 0;
  max-width: 780px;
  margin-inline: auto;
}

.blog-category-sections {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

.blog-category-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0;
}

.blog-category-intro {
  max-width: 780px;
}

.blog-category-intro h3 {
  font-size: 1.6rem;
  margin: 0 0 0.55rem;
}

.blog-category-intro p {
  color: var(--gray);
  line-height: 1.7;
  margin: 0;
}

/* ── Blog Grid ────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.blog-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.96),
    rgba(30, 41, 59, 0.82)
  );
}

.blog-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.blog-image {
  width: 100%;
  height: 240px;
  transition: 0.5s;
  object-fit: cover;
}

.blog-card:hover .blog-image {
  transform: scale(1.08);
}

.blog-card {
  opacity: 0;
  transform: translateY(30px);
  animation: cardReveal 0.7s forwards;
}

.blog-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: 22px;
  background: linear-gradient(
    135deg,
    rgba(6, 182, 212, 0.6),
    transparent,
    rgba(245, 158, 11, 0.5)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: 0.35s;
}

.blog-card:hover::before {
  opacity: 1;
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.floating-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float 8s ease-in-out infinite;
}

.orb1 {
  width: 260px;
  height: 260px;
  background: rgba(6, 182, 212, 0.18);
  left: 5%;
  top: 10%;
}

.orb2 {
  width: 200px;
  height: 200px;
  background: rgba(245, 158, 11, 0.12);
  right: 8%;
  bottom: 15%;
  animation-delay: 2s;
}

.orb3 {
  width: 160px;
  height: 160px;
  background: rgba(34, 211, 238, 0.12);
  left: 50%;
  top: 60%;
  animation-delay: 4s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-25px);
  }
}

.blog-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--cyan);
  color: var(--navy);
  padding: 0.2rem 0.8rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
}

.blog-body {
  padding: 1.5rem;
}

.blog-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--gray);
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.blog-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.blog-body p {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 1rem;
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.blog-tag {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.7rem;
  color: var(--gray);
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
}

.blog-tag:hover {
  background: var(--cyan);
  color: var(--navy);
}

.read-more {
  color: var(--cyan);
  font-weight: 600;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* ── Load More ────────────────────────────────────────────── */
.load-more-container {
  text-align: center;
  margin-top: 3rem;
}

.load-more-btn {
  background: transparent;
  border: 2px solid var(--cyan);
  color: var(--cyan);
  padding: 0.8rem 2rem;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

.load-more-btn:hover {
  background: var(--cyan);
  color: var(--navy);
}

/* ── Author ───────────────────────────────────────────────── */
.author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 0.4rem;
  object-fit: cover;
}

.author-link {
  cursor: pointer;
  color: var(--white);
  transition: color 0.2s;
}

.author-link:hover {
  color: var(--cyan);
  text-decoration: underline;
}

/* ── Share ────────────────────────────────────────────────── */
.share-container {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.share-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.share-btn:hover {
  background: var(--cyan);
  color: var(--navy);
  border-color: var(--cyan);
}

/* ── No Posts ─────────────────────────────────────────────── */
.no-posts-message {
  text-align: center;
  padding: 3rem;
  color: var(--gray);
}

/* ── CTA Section ──────────────────────────────────────────── */
.blog-cta-section {
  background: linear-gradient(135deg, var(--navy), #0a0f1e);
  padding: 2rem 3%;
  text-align: center;
}

.blog-cta-container {
  padding: 70px;
  border-radius: 28px;
  max-width: 700px;
  margin: 0 auto;
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.9),
    rgba(6, 182, 212, 0.08)
  );
  backdrop-filter: blur(18px);
}

.blog-cta-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.blog-cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ── Newsletter ───────────────────────────────────────────── */
.newsletter-section {
  background: var(--navy2);
  padding: 2rem 5%;
  text-align: center;
}

.newsletter-container {
  max-width: 600px;
  margin: 0 auto;
}

.newsletter-form {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.newsletter-form input {
  flex: 1;
  min-width: 250px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  color: var(--white);
}

.feedback {
  margin-top: 1rem;
  color: #4ade80;
}

/* ── Modal ────────────────────────────────────────────────── */
.modal {
  background: var(--navy2);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 20px;
  width: min(560px, 92vw);
  padding: 2rem;
  color: var(--white);
  backdrop-filter: blur(20px);
}

.modal::backdrop {
  background: rgba(10, 15, 30, 0.8);
  backdrop-filter: blur(4px);
}

.icon-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1.2rem;
  color: var(--white);
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--cyan);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 0 0 40px;
}

.social-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}

.social-btn:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
  color: var(--cyan);
  transform: translateY(-2px);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .featured-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .blog-category-sections {
    gap: 0.75rem;
  }
  .newsletter-form {
    flex-direction: column;
  }
  .blog-search {
    flex-direction: column;
  }
  .search-input,
  .search-btn {
    width: 100%;
    min-width: 0;
  }
  .page-hero {
    padding-bottom: 5rem;
    min-height: 400px;
  }
  .blog-filters {
    display: none;
  }
  .filter-select-wrapper {
    display: block;
  }
}

@media (max-width: 480px) {
  .page-hero {
    min-height: 350px;
    padding: 4rem 5% 2rem;
  }
  .hero-intro-card {
    padding: 30px 20px;
  }
  .page-hero h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
  }
}