/*
 * CloudLaundry - Blog Styles
 * Includes: shared navbar/footer layout (migrated from landing.css) + blog-specific styles
 */

/* ===================== SHARED: Variables, Reset, Navbar, Footer ===================== */

:root {
  --primary: #2d6b41;
  --primary-dark: #2d6b41;
  --primary-light: #e6f4ea;
  --secondary: #2d6b41;
  /* alias for compat */
  --accent: #f59e0b;
  --text: #0f172a;
  --text-light: #64748b;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.1);
  --shadow: var(--shadow-md);
  /* alias for compat */
  --radius: 1.5rem;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-display: var(--font-heading);
  --font-main: var(--font-body);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --gradient-primary: linear-gradient(135deg, #2d6b41 0%, #2d6b41 100%);
  --gradient: linear-gradient(135deg, #2d6b41 0%, #2d6b41 100%);
  /* alias for compat */
  --gradient-soft: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  --glass: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(255, 255, 255, 0.3);
  --dark-bg: #0f172a;
  /* alias for compat */
  --footer-bg: #0f172a;
  /* alias for compat */
}

/* ==========================================================================
   PWA "Open in App" Banner
   ========================================================================== */
.app-banner {
    position: fixed;
    bottom: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 450px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transition: bottom 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-banner.show {
    bottom: 20px;
}

.app-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.app-icon img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.app-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-info strong {
    font-size: 0.95rem;
    color: #0f172a;
    font-family: var(--font-heading);
}

.app-info span {
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-open-app {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-dismiss-app {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    color: #64748b;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* Hero headings must stay white on dark bg */
.hero h1,
.hero h2,
.hero h3 {
  color: white;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 0.9rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled {
  padding: 0.7rem 5%;
  box-shadow: var(--shadow);
}

.logo img {
  height: 36px;
  width: auto;
  transition: var(--transition);
}

.navbar.scrolled .logo img {
  height: 30px;
}

.nav-links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a.login-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1.2rem;
  border-radius: 50px;
  background: rgba(56, 135, 82, 0.08);
  transition: var(--transition);
}

.nav-links a.login-link:hover {
  background: rgba(56, 135, 82, 0.15);
  color: var(--primary-dark);
}

.nav-cta {
  background: var(--gradient-primary);
  color: white !important;
  padding: 0.8rem 1.8rem;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none !important;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white !important;
}

/* Mobile Menu */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--text);
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100vh;
  background: white;
  padding: 6rem 5% 2rem;
  transition: left 0.4s ease;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.mobile-menu.open {
  left: 0;
}

.mobile-menu a {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.mobile-menu a:hover {
  color: var(--primary);
}

.mobile-menu .login-link {
  color: var(--primary);
  background: rgba(56, 135, 82, 0.08);
  border-radius: 50px;
  text-align: center;
}

.mobile-menu .nav-cta {
  display: inline-block;
  text-align: center;
  margin-top: 1rem;
  width: 100%;
}


/* Footer Section */
.footer {
  background: #0f172a;
  color: white;
  padding: 8rem 5% 3rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto 5rem;
}

.footer-col h3 {
  color: white;
  margin-bottom: 2rem;
  font-size: 1.25rem;
  font-family: var(--font-heading);
}

.footer-col p {
  color: #94a3b8;
  line-height: 1.7;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 1rem;
}

.footer-col a {
  color: #94a3b8;
  text-decoration: none;
  transition: var(--transition);
  font-size: 1rem;
  display: inline-block;
}

.footer-col a:hover {
  color: var(--primary);
  transform: translateX(5px);
}

.social-links {
  display: flex;
  gap: 1.25rem;
}

.social-links a {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: white;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Growth Section */
.growth {
  padding: 3rem 5%;
  background: #0f172a;
  color: white;
  text-align: center;
  position: relative;
}

.growth .section-title {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.growth-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto 3rem;
}

.state {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1.75rem;
  border-radius: 99px;
  font-weight: 600;
  color: #94a3b8;
  transition: var(--transition);
  font-size: 0.95rem;
}

.state:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(56, 135, 82, 0.3);
}

.more-coming {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.social-links a:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-5px);
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: #64748b;
  font-size: 0.9rem;
}

.footer-bottom a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

/* ============================================================

/* Tablet responsive: navbar + footer */
@media (max-width: 1024px) {
  .nav-links,
  .nav-cta {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .logo img {
    height: 32px;
  }
  .navbar {
    padding: 0.8rem 5%;
  }
  .footer {
    padding: 5rem 5% 2rem;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

/* Mobile responsive: navbar + footer */
@media (max-width: 640px) {
  .footer {
    padding: 4rem 5% 2rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    font-size: 0.8rem;
  }
  .footer-bottom p {
    margin-bottom: 0.5rem;
  }
}

/* ===================== BLOG NAVBAR (matches React Header) ===================== */

.blog-nav {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

.blog-nav.scrolled {
  padding: 0.75rem 5%;
  border-bottom-color: #f1f5f9;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.blog-nav__logo img {
  height: 36px;
  width: auto;
  transition: all 0.3s ease;
}

.blog-nav__links {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}

.blog-nav__links a {
  text-decoration: none;
  color: #0f172a;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
  font-family: var(--font-body);
}

.blog-nav__links a:hover,
.blog-nav__links a.active {
  color: var(--primary);
}

.blog-nav__login {
  color: var(--primary) !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  background: rgba(45,107,65,0.08);
  transition: background 0.2s, color 0.2s;
}

.blog-nav__login:hover {
  background: rgba(45,107,65,0.15) !important;
}

.blog-nav__cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, #2d6b41, #388752);
  color: white !important;
  text-decoration: none;
  padding: 0.75rem 1.75rem;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 14px rgba(45,107,65,0.25);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.blog-nav__cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(45,107,65,0.35);
}

.blog-nav__toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #0f172a;
  padding: 0.5rem;
}

/* Mobile menu */
.blog-nav__mobile {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100vh;
  background: white;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 5.5rem 5% 2rem;
  z-index: 999;
  transition: left 0.4s ease;
  box-shadow: 4px 0 40px rgba(0,0,0,0.12);
  overflow-y: auto;
}

.blog-nav__mobile.open {
  left: 0;
}

.blog-nav__mobile a {
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  padding: 0.85rem 0;
  border-bottom: 1px solid #f1f5f9;
  transition: color 0.2s;
  font-family: var(--font-body);
}

.blog-nav__mobile a:hover,
.blog-nav__mobile a.active {
  color: var(--primary);
}

.blog-nav__mobile-login {
  color: var(--primary) !important;
  background: rgba(45,107,65,0.06);
  border-radius: 14px;
  text-align: center;
  margin-top: 0.5rem;
  padding: 0.85rem 1rem !important;
  border-bottom: none !important;
}

.blog-nav__mobile-cta {
  background: linear-gradient(135deg, #2d6b41, #388752) !important;
  color: white !important;
  border-radius: 99px;
  text-align: center;
  margin-top: 1rem;
  padding: 1rem !important;
  box-shadow: 0 6px 20px rgba(45,107,65,0.3);
  border-bottom: none !important;
}

@media (max-width: 1024px) {
  .blog-nav__links,
  .blog-nav__cta {
    display: none;
  }
  .blog-nav__toggle {
    display: block;
  }
}

/* ===================== BLOG FOOTER (matches React Footer) ===================== */

.blog-footer {
  background: #0f172a;
  color: white;
  padding: 8rem 5% 3rem;
  position: relative;
  overflow: hidden;
  font-family: var(--font-body);
}

.blog-footer__top-line {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.blog-footer__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto 6rem;
}

.blog-footer__logo {
  width: 160px;
  height: auto;
  display: block;
  margin-bottom: 1.5rem;
}

.blog-footer__desc {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.blog-footer__socials {
  display: flex;
  gap: 0.75rem;
}

.blog-footer__socials a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.2s;
}

.blog-footer__socials a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.blog-footer__col h3 {
  color: white;
  font-size: 1rem;
  font-family: var(--font-heading);
  margin-bottom: 2rem;
}

.blog-footer__col-label {
  font-size: 0.7rem !important;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.5;
}

.blog-footer__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-footer__col ul a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
  display: inline-block;
}

.blog-footer__col ul a:hover {
  color: white;
}

.blog-footer__company-name {
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.blog-footer__rc {
  color: rgba(255,255,255,0.4);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
}

.blog-footer__address {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.blog-footer__phone {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: white;
  transition: all 0.3s;
}

.blog-footer__phone:hover {
  color: #86efac;
}

.blog-footer__phone-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(45,107,65,0.1);
  border: 1px solid rgba(45,107,65,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #86efac;
  transition: all 0.3s;
  flex-shrink: 0;
}

.blog-footer__phone:hover .blog-footer__phone-icon {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.blog-footer__phone-text {
  display: flex;
  flex-direction: column;
}

.blog-footer__phone-label {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 800;
  margin-bottom: 2px;
}

.blog-footer__phone-text span:last-child {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.blog-footer__bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 3rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}

.blog-footer__bottom p {
  color: rgba(255,255,255,0.4);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.blog-footer__bottom a {
  color: #86efac;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.blog-footer__bottom a:hover {
  color: white;
}

/* Responsive footer */
@media (max-width: 1024px) {
  .blog-footer__grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .blog-footer__brand {
    grid-column: span 3;
  }
}

@media (max-width: 640px) {
  .blog-footer {
    padding: 5rem 5% 2rem;
  }
  .blog-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
  .blog-footer__brand {
    grid-column: span 2;
  }
}

@media (max-width: 420px) {
  .blog-footer__grid {
    grid-template-columns: 1fr;
  }
  .blog-footer__brand {
    grid-column: span 1;
  }
}

/* ===================== BLOG-SPECIFIC STYLES ===================== */

/* 
   CloudLaundry - Blog Styles 
   This file contains all styles for the blog list and detail pages.
   It uses variables from landingpage/base.html or landing.css.
*/

:root {
  --blog-primary: #2d6b41;
  --blog-primary-dark: #2d6b41;
  --blog-primary-light: #e6f4ea;
  --blog-bg: #f8fafc;
  --blog-card: #ffffff;
  --blog-border: #f1f5f9;
  --blog-text: #0f172a;
  --blog-text-light: #64748b;
  --blog-radius: 1.25rem;
  --blog-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
  --blog-shadow-lg: 0 20px 50px -10px rgba(0, 0, 0, 0.1);
}

/* Blog Hero */
.blog-hero, .post-hero {
  padding: 8rem 5% 4rem;
  text-align: center;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  position: relative;
  overflow: hidden;
}

.blog-hero h1, .post-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1.5rem;
  line-height: 1.1;
  color: var(--blog-text);
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
}

.blog-hero h1 span, .post-hero h1 span {
  color: var(--blog-primary);
}

.blog-hero p {
  font-size: 1.15rem;
  max-width: 700px;
  margin: 0 auto;
  color: var(--blog-text-light);
  line-height: 1.6;
}

/* Layout */
.blog-layout {
  max-width: 1300px;
  margin: 0 auto;
  padding: 4rem 5%;
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 4rem;
}

.blog-section-header {
  grid-column: 1 / -1;
  margin-bottom: 0rem;
}

.search-no-results {
  color: var(--blog-text-light);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  padding: 1rem 1.5rem;
  background: #f8fafc;
  border-left: 4px solid var(--blog-primary);
  border-radius: 8px;
}

@media (max-width: 1024px) {
  .blog-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
  }
}

/* Blog List Cards */
.posts-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  min-width: 0;
}

.blog-card {
  background: var(--blog-card);
  border-radius: var(--blog-radius);
  overflow: hidden;
  box-shadow: var(--blog-shadow);
  display: flex;
  border: 1px solid var(--blog-border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 250px;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--blog-shadow-lg);
  border-color: var(--blog-primary-light);
}

.blog-card .image-container {
  width: 320px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: #f1f5f9;
}

.blog-card .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.blog-card:hover .image-container img {
  transform: scale(1.08);
}

.blog-card-content {
  padding: 2.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.blog-meta {
  display: flex;
  gap: 1.25rem;
  font-size: 0.88rem;
  color: var(--blog-text-light);
  margin-bottom: 0.75rem;
  font-weight: 500;
  flex-wrap: wrap;
}

.blog-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.blog-meta i {
  color: var(--blog-primary);
  font-size: 0.9rem;
}

/* Detail Page Meta */
.post-meta {
  font-size: 0.95rem;
  color: rgba(15, 23, 42, 0.7);
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding: 1rem 2rem;
  background: white;
  display: inline-flex;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.post-meta i {
  color: var(--blog-primary);
  font-size: 1rem;
}

.blog-card h3 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.blog-card h3 a {
  text-decoration: none;
  color: var(--blog-text);
  transition: color 0.3s ease;
}

.blog-card h3 a:hover {
  color: var(--blog-primary);
}

.blog-card p {
  color: var(--blog-text-light);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--blog-primary);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
  transition: gap 0.3s ease;
}

.read-more:hover {
  gap: 0.8rem;
}

@media (max-width: 768px) {
  .blog-card {
    flex-direction: column;
    min-height: auto;
  }
  .blog-card .image-container {
    width: 100%;
    height: 220px;
  }
  .blog-card-content {
    padding: 1.8rem;
  }
}

/* Post Detail */
.post-content {
  background: var(--blog-card);
  padding: 3.5rem;
  border-radius: var(--blog-radius);
  box-shadow: var(--blog-shadow);
  border: 1px solid var(--blog-border);
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.post-content p {
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--blog-text);
  margin-bottom: 1.8rem;
}

.post-content h2 {
  font-size: 2.2rem;
  margin: 3.5rem 0 1.5rem;
  color: var(--blog-primary);
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
}

.post-content h3 {
  font-size: 1.75rem;
  margin: 2.5rem 0 1.2rem;
  color: var(--blog-primary-dark);
}

.post-content img, .post-content iframe, .post-content video {
  max-width: 100%;
  height: auto;
  border-radius: 1.25rem;
  margin: 2.5rem 0;
  box-shadow: var(--blog-shadow);
}
.post-content pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: keep-all;
}
.post-content table {
  max-width: 100%;
  display: block;
  overflow-x: auto;
}

.post-content blockquote {
  border-left: 5px solid var(--blog-primary);
  padding: 1.5rem 2rem;
  background: var(--blog-primary-light);
  border-radius: 0.5rem;
  margin: 3rem 0;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--blog-primary-dark);
}

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

.sidebar-widget {
  background: var(--blog-card);
  padding: 2rem;
  border-radius: var(--blog-radius);
  box-shadow: var(--blog-shadow);
  border: 1px solid var(--blog-border);
  margin-bottom: 0.5rem; /* fallback bottom margin */
}

.sidebar-widget h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--blog-text);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-widget h3::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--blog-primary);
  border-radius: 2px;
}

/* Search Form */
.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-form input {
  flex: 1;
  padding: 0.8rem 1.2rem;
  border: 1px solid var(--blog-border);
  border-radius: 50px;
  background: #f8fafc;
  outline: none;
  transition: all 0.3s ease;
}

.search-form input:focus {
  border-color: var(--blog-primary);
  box-shadow: 0 0 0 3px rgba(56, 135, 82, 0.1);
  background: white;
}

.search-form button {
  background: var(--blog-primary);
  color: white;
  border: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-form button:hover {
  background: var(--blog-primary-dark);
  transform: scale(1.1);
}

/* Categories List */
.categories-list {
  list-style: none;
}

.categories-list li {
  margin-bottom: 0.75rem;
}

.categories-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: var(--blog-text-light);
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.categories-list a:hover {
  background: var(--blog-primary-light);
  color: var(--blog-primary-dark);
  padding-left: 1rem;
}

.categories-list span {
  background: white;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.75rem;
  box-shadow: var(--blog-shadow);
}

/* Recent Posts */
.recent-posts {
  list-style: none;
}

.recent-posts li {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.recent-posts img {
  width: 64px;
  height: 64px;
  border-radius: 0.75rem;
  object-fit: cover;
}

.recent-posts a {
  text-decoration: none;
  color: var(--blog-text);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
  display: block;
  margin-bottom: 0.25rem;
}

.recent-posts a:hover {
  color: var(--blog-primary);
}

.recent-posts small {
  color: var(--blog-text-light);
  font-size: 0.8rem;
}

@media (max-width: 1024px) {
  .post-content {
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  .post-content {
    padding: 1.25rem;
  }
}

/* Breadcrumbs */
.breadcrumb-nav {
  padding: 1.5rem 5%;
  background: white;
  border-bottom: 1px solid var(--blog-border);
}

.breadcrumb-list {
  display: flex;
  list-style: none;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--blog-text-light);
  max-width: 1300px;
  margin: 0 auto;
}

.breadcrumb-item a {
  color: var(--blog-primary);
  text-decoration: none;
}

.breadcrumb-item::after {
  content: '/';
  margin-left: 0.75rem;
}

.breadcrumb-item:last-child::after {
  content: none;
}

/* Pagination */
.pagination {
  margin-top: 4rem;
  margin-bottom: 6rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pagination a, .pagination span {
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  background: white;
  border: 1px solid var(--blog-border);
  text-decoration: none;
  color: var(--blog-text);
  font-weight: 600;
  transition: all 0.3s ease;
}

.pagination a:hover {
  background: var(--blog-primary);
  color: white;
  border-color: var(--blog-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.pagination .current {
  background: var(--blog-primary);
  color: white;
  border-color: var(--blog-primary);
  box-shadow: 0 4px 12px rgba(45, 107, 65, 0.25);
  cursor: default;
}

.pagination .disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f1f5f9;
  color: var(--blog-text-light);
  border-color: #e2e8f0;
}

/* Author Box */
.author-box {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2.5rem;
  background: var(--blog-primary-light);
  border-radius: var(--blog-radius);
  margin: 4rem 0;
  border: 1px solid var(--blog-border);
}

.author-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: var(--blog-shadow);
}

.author-box h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--blog-text);
}

.author-box p {
  font-size: 0.95rem;
  color: var(--blog-text-light);
  margin: 0;
  line-height: 1.6;
}

/* Share Buttons */
.share-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 3rem 0 4rem;
}

.share-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  color: var(--blog-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all 0.3s ease;
  box-shadow: var(--blog-shadow);
  text-decoration: none;
  border: 1px solid var(--blog-border);
}

.share-btn:hover {
  background: var(--blog-primary);
  color: white;
  transform: translateY(-5px);
  border-color: var(--blog-primary);
}

/* Related Posts (Detail Page) */
.related-posts {
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--blog-border);
}

.related-posts h3 {
  text-align: center;
  margin-bottom: 2.5rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.related-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--blog-shadow);
  border: 1px solid var(--blog-border);
  transition: all 0.3s ease;
}

.related-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--blog-shadow-lg);
}

.related-right {
  padding: 1.5rem;
}

.related-right h4 {
  font-size: 1.05rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.related-right h4 a {
  text-decoration: none;
  color: var(--blog-text);
  transition: color 0.3s ease;
}

.related-card:hover h4 a {
  color: var(--blog-primary);
}

.related-post-meta {
  font-size: 0.8rem;
  color: var(--blog-text-light);
}

/* Post Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0;
}

.post-tags .tag {
  padding: 0.4rem 1rem;
  background: var(--blog-primary-light);
  color: var(--blog-primary-dark);
  border-radius: 50px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.post-tags .tag:hover {
  background: var(--blog-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--blog-shadow);
}

@media (max-width: 768px) {
  .author-box {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
  }
}
