/* ─── BLOG PAGE STYLES ────────────────────────────────────────────────── */
/* Reuses navbar and component styles from main style.css */
/* Blog pages inherit: header, nav, button styles from style.css */

/* ── BLOG HERO SECTION ───────────────────────────────────────── */
#blog-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 24px;
  position: relative;
  overflow: hidden;
  margin-top: 0;
  padding-top: 120px;
}

.blog-hero-inner {
  position: relative;
  z-index: 10;
  max-width: 820px;
}

/* ── MAIN CONTENT SPACING ────────────────────────────────────── */
#main-content {
  position: relative;
  z-index: 1;
}


.blog-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.blog-hero-title .accent {
  color: var(--red);
}

.blog-hero-sub {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 36px;
}

/* ── SEARCH BAR ──────────────────────────────────────────────── */
.blog-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  max-width: 450px;
  margin: 0 auto;
  transition: border-color 0.3s;
}

.blog-search-bar:focus-within {
  border-color: rgba(229, 62, 62, 0.5);
}

.blog-search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 16px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
}

.blog-search-bar input::placeholder {
  color: var(--muted);
}

.blog-search-bar button {
  background: var(--red);
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.25s;
}

.blog-search-bar button:hover {
  background: #c53030;
}

/* ── CATEGORY FILTERS ────────────────────────────────────────── */
.blog-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 60px 24px 40px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 18px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
  text-transform: capitalize;
}

.filter-btn:hover {
  border-color: rgba(229, 62, 62, 0.4);
  color: var(--white);
}

.filter-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

/* ── BLOG GRID ───────────────────────────────────────────────── */
.blog-section {
  padding: 0 24px 120px;
}

.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card:hover {
  border-color: rgba(229, 62, 62, 0.3);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(229, 62, 62, 0.1);
}

.blog-image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #0a0a0a;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-image img {
  transform: scale(1.05);
}

.blog-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--red);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.blog-date {
  display: flex;
  align-items: center;
}

.blog-readtime {
  display: flex;
  align-items: center;
}

.blog-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--white);
  transition: color 0.3s;
}

.blog-card:hover .blog-title {
  color: var(--red);
}

.blog-excerpt {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.blog-link {
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: gap 0.3s;
  display: inline-block;
}

.blog-link:hover {
  gap: 6px;
}

/* ── BLOG CTA SECTION ────────────────────────────────────────── */
#blog-cta {
  padding: 120px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

#blog-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(229, 62, 62, 0.07), transparent);
  pointer-events: none;
}

.blog-cta-inner {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
}

#blog-cta .section-title {
  font-size: clamp(2rem, 4vw, 3.4rem);
  margin-bottom: 16px;
}

#blog-cta .section-sub {
  margin: 0 auto 40px;
  text-align: center;
}

.blog-cta-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── HIDDEN STATE FOR FILTERED ITEMS ─────────────────────────── */
.blog-card.hidden {
  display: none;
}

/* ── RESPONSIVE DESIGN ───────────────────────────────────────── */
@media (max-width: 900px) {
  .blog-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  #blog-hero {
    padding: 60px 24px;
  }

  .blog-section {
    padding: 0 24px 80px;
  }

  #blog-cta {
    padding: 80px 24px;
  }
}

@media (max-width: 640px) {
  .blog-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .blog-filters {
    padding: 40px 16px 30px;
    gap: 8px;
  }

  .filter-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
  }

  .blog-hero-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
  }

  .blog-search-bar {
    max-width: 100%;
  }

  .blog-image {
    height: 160px;
  }

  .blog-content {
    padding: 16px;
  }

  .blog-title {
    font-size: 1rem;
  }

  .blog-cta-actions {
    flex-direction: column;
  }

  .blog-cta-actions a {
    width: 100%;
  }
}

/* ── BLOG POST DETAIL PAGE STYLES ────────────────────────────────────── */
.blog-post-content {
  margin-top: 60px;
}

.blog-post-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px;
}

.blog-post-header {
  margin-bottom: 60px;
}

.blog-post-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-wrap: wrap;
}

.blog-post-date,
.blog-post-category,
.blog-post-readtime {
  display: flex;
  align-items: center;
}

.blog-post-category {
  color: var(--red);
  font-weight: 600;
}

.blog-post-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--white);
}

.blog-post-subtitle {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 32px;
}

.blog-post-image {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: 16px;
  margin-top: 40px;
}

.blog-post-body {
  line-height: 1.8;
  color: var(--white);
  font-size: 1rem;
}

.blog-post-body p {
  margin-bottom: 24px;
  color: var(--muted);
  line-height: 1.8;
}

.blog-post-body p strong {
  color: var(--white);
  font-weight: 600;
}

.blog-post-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.3;
  margin: 40px 0 20px;
  color: var(--white);
  letter-spacing: -0.01em;
}

.blog-post-body h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 32px 0 16px;
  color: var(--white);
}

.blog-post-body ul,
.blog-post-body ol {
  margin-bottom: 24px;
  padding-left: 24px;
}

.blog-post-body li {
  margin-bottom: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.blog-post-body a {
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s;
}

.blog-post-body a:hover {
  opacity: 0.8;
}

.blog-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.blog-table tr:first-child {
  background: rgba(229, 62, 62, 0.1);
  border-bottom: 2px solid var(--border);
}

.blog-table td {
  padding: 16px;
  border-right: 1px solid var(--border);
  color: var(--muted);
  text-align: left;
}

.blog-table tr:first-child td {
  color: var(--white);
  font-weight: 600;
}

.blog-table td:last-child {
  border-right: none;
}

.blog-post-cta {
  background: linear-gradient(135deg, rgba(229, 62, 62, 0.1) 0%, rgba(229, 62, 62, 0.05) 100%), var(--surface);
  border: 1px solid rgba(229, 62, 62, 0.3);
  border-left: 5px solid var(--red);
  border-radius: 16px;
  padding: 60px 48px;
  margin: 80px 0;
  text-align: center;
  box-shadow: 0 10px 40px rgba(229, 62, 62, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.blog-post-cta::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(229, 62, 62, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.blog-post-cta:hover {
  border-color: rgba(229, 62, 62, 0.5);
  box-shadow: 0 20px 60px rgba(229, 62, 62, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-4px);
}

.blog-post-cta h3 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--white);
  letter-spacing: -0.01em;
}

.blog-post-cta p {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.blog-post-cta a[style*="display:inline-block"] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--red) 0%, #c53030 100%);
  border: none;
  padding: 14px 32px !important;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.03em;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(229, 62, 62, 0.3);
  margin-top: 12px !important;
}

.blog-post-cta a[style*="display:inline-block"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(229, 62, 62, 0.4);
  background: linear-gradient(135deg, #c53030 0%, #a01d1d 100%);
}

/* ── RESPONSIVE BLOG POST ────────────────────────────────────── */
@media (max-width: 768px) {
  .blog-post-container {
    padding: 40px 16px;
  }

  .blog-post-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 12px;
  }

  .blog-post-subtitle {
    font-size: 1rem;
    margin-bottom: 24px;
  }

  .blog-post-meta {
    font-size: 0.75rem;
    gap: 8px;
  }

  .blog-post-body h2 {
    font-size: 1.4rem;
    margin: 32px 0 16px;
  }

  .blog-post-body h3 {
    font-size: 1.1rem;
    margin: 24px 0 12px;
  }

  .blog-post-body ul,
  .blog-post-body ol {
    padding-left: 16px;
  }

  .blog-post-cta {
    padding: 24px;
  }

  .blog-table {
    font-size: 0.85rem;
  }

  .blog-table td {
    padding: 12px;
  }
}

/* ─── NAVBAR STICKY FIX & STYLING ──────────────────────── */

/* Properly position navbar as fixed at top */
header#navbar {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 200;
  padding: 22px 48px;
  background: transparent;
  transition: background 0.4s, border-bottom 0.4s;
}

/* Styling for scrolled navbar state (added by JS) */
header#navbar.scrolled {
  background: rgba(8, 8, 8, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

/* Add proper spacing so content doesn't go under navbar */
.blog-post-content {
  margin-top: 90px;
}

#blog-hero {
  margin-top: 0;
  padding-top: 140px;
}

/* Floating social icons should be below navbar */
.insta-float,
.whatsapp-float {
  z-index: 190;
}

/* Remove conflicting inline styles from <style> tag */
.blog-post-header {
  margin-bottom: 60px;
  margin-top: 0 !important;
}

/* ─── NAVBAR RESPONSIVE STYLES (Desktop → Mobile) ──────────────────── */

/* Mobile menu toggle - hidden by default */
.mobile-menu-toggle {
  display: none;
}

/* Hamburger icon - hidden by default */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 201;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 1px;
  transition: all 0.3s ease;
  display: block;
}

/* Mobile menu - hidden by default, shown when checkbox is checked */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 16px;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(8, 8, 8, 0.98);
  backdrop-filter: blur(16px);
  padding: 24px 24px;
  border-bottom: 1px solid var(--border);
  z-index: 190;
}

.mobile-menu a {
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s;
  padding: 8px 0;
}

.mobile-menu a:hover {
  color: var(--white);
}

.mobile-menu .btn-primary {
  width: 100%;
  text-align: center;
  margin-top: 8px;
}

/* Show mobile menu when checkbox is checked */
.mobile-menu-toggle:checked ~ .mobile-menu {
  display: flex;
}

/* Animate hamburger on toggle */
.mobile-menu-toggle:checked ~ .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle:checked ~ .hamburger span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle:checked ~ .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Desktop navbar (900px+) */
@media (min-width: 901px) {
  header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  header nav:not(.mobile-menu) {
    display: flex;
    gap: 36px;
  }

  .hamburger,
  .mobile-menu-toggle {
    display: none !important;
  }

  .mobile-menu {
    display: none !important;
  }
}

/* Mobile navbar (900px and below) */
@media (max-width: 900px) {
  header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
  }

  /* Hide desktop nav */
  header nav:not(.mobile-menu) {
    display: none;
  }

  /* Show hamburger */
  .hamburger {
    display: flex;
    order: 2;
  }

  /* Hide desktop button, show mobile button in mobile menu */
  header > .btn-primary {
    display: none;
  }

  .logo {
    order: 1;
  }
}
