/* ==========================================================================
   Lanka Designer Unified Blog Platform — Premium Agency Theme
   Color Palette & Design Tokens matching blog.png
   ========================================================================== */

:root {
  --brand-primary: #4F20FF;
  --brand-primary-hover: #3D12E3;
  --brand-primary-light: rgba(79, 32, 255, 0.08);
  --brand-primary-glow: rgba(79, 32, 255, 0.25);
  
  --brand-dark: #071126;
  --brand-dark-card: #0D1935;
  --brand-text: #10182F;
  --brand-muted: #667085;
  --brand-border: #E4E7EC;
  --brand-light: #F7F8FC;
  --brand-white: #FFFFFF;
  
  --card-radius: 18px;
  --pill-radius: 9999px;
  --shadow-sm: 0 2px 6px rgba(7, 17, 38, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(7, 17, 38, 0.06), 0 8px 10px -6px rgba(7, 17, 38, 0.04);
  --shadow-lg: 0 20px 35px -10px rgba(7, 17, 38, 0.10), 0 10px 15px -5px rgba(7, 17, 38, 0.05);
  --shadow-floating: 0 16px 36px rgba(79, 32, 255, 0.35);
  
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base resets & typography */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--brand-white);
  color: var(--brand-text);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* Global Centered Responsive Container */
.blog-container,
.container-xl {
  width: min(1320px, calc(100% - 48px)) !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
}

@media (max-width: 576px) {
  .blog-container,
  .container-xl {
    width: calc(100% - 32px) !important;
  }
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

/* ─── Top Navigation Header (Compact & Balanced 76px) ─────────────────────── */
.ld-blog-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(228, 231, 236, 0.8);
  position: sticky;
  top: 0;
  z-index: 1020;
  height: 76px;
  display: flex;
  align-items: center;
  padding: 0;
}

.ld-blog-header .container-xl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* ─── Header Logo ──────────────────────────────────────────────────────────── */
.ld-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.ld-logo-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 68px;
  overflow: hidden;
}


/* Primary: animated canvas (from logo-studio.html) */
.ld-logo-canvas,
.ld-footer-logo-canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Video: fallback/alternative animated asset */
.ld-logo-video {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.22);
  transform-origin: center center;
  pointer-events: none;
}

/* Fallback: hidden by default, shown only if animation fails */
.ld-logo-fallback {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

/* ─── Footer Logo ───────────────────────────────────────────────────────────── */
.ld-footer-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.ld-footer-logo-wrap {
  position: relative;
  display: block;
  width: 140px;
  height: 96px;
  overflow: hidden;
}

/* Video for footer */
.ld-footer-logo-video {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.22);
  transform-origin: center center;
  pointer-events: none;
  filter: invert(1) brightness(2);
}

/* Fallback: hidden by default */
.ld-footer-logo-fallback {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  filter: brightness(0) invert(1);
}

/* ─── Reduced motion: swap animation for static image ─────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ld-logo-canvas,
  .ld-footer-logo-canvas,
  .ld-logo-video,
  .ld-footer-logo-video {
    display: none !important;
  }
  .ld-logo-fallback,
  .ld-footer-logo-fallback {
    display: block !important;
  }
}


/* ─── Mobile: smaller viewport ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .ld-logo-wrap {
    width: 125px;
    height: 86px;
  }
  .ld-footer-logo-wrap {
    width: 120px;
    height: 82px;
  }
}


.ld-logo-badge {
  background: var(--brand-primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}

.ld-logo-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-dark);
  letter-spacing: -0.3px;
}

.ld-nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ld-nav-item a {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand-text);
  letter-spacing: 0.5px;
  padding: 8px 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.ld-nav-item a:hover {
  color: var(--brand-primary);
}

.ld-nav-item.active a,
.ld-nav-item a.active {
  color: var(--brand-primary);
  font-weight: 800;
}

.ld-nav-item.active a::after,
.ld-nav-item a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2.5px;
  background: var(--brand-primary);
  border-radius: 2px;
}

.btn-lets-talk {
  background: var(--brand-dark);
  color: #fff !important;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: var(--pill-radius);
  letter-spacing: 0.4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  transition: var(--transition-smooth);
}

.btn-lets-talk:hover {
  background: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-floating);
}

/* ─── Hero Section (Compact Top Spacing & Responsive Typography) ──────────── */
.ld-hero {
  padding: 36px 0 24px;
  position: relative;
}

.ld-hero-title {
  font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.12;
  color: var(--brand-dark);
  margin-bottom: 12px;
}

.ld-hero-subtitle {
  font-size: 1.05rem;
  color: var(--brand-muted);
  max-width: 680px;
  margin-bottom: 0;
  line-height: 1.55;
}


.btn-filter-toggle {
  background: var(--brand-dark);
  color: #fff;
  border: none;
  border-radius: var(--pill-radius);
  padding: 10px 22px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-filter-toggle:hover {
  background: var(--brand-primary);
  transform: translateY(-2px);
}

.btn-lang-selector {
  background: #fff;
  border: 1px solid var(--brand-border);
  color: var(--brand-text);
  border-radius: var(--pill-radius);
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-lang-selector:hover {
  border-color: var(--brand-dark);
}

/* ─── Filter Drawer Panel ────────────────────────────────────────────────── */
.ld-filter-drawer {
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  border-radius: var(--card-radius);
  padding: 24px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
}

.ld-filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: var(--pill-radius);
  background: #fff;
  border: 1px solid var(--brand-border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-text);
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}

.ld-filter-pill:hover,
.ld-filter-pill.active {
  background: var(--brand-dark);
  color: #fff;
  border-color: var(--brand-dark);
  transform: translateY(-1px);
}

/* ─── 4-Column Article Card Grid ─────────────────────────────────────────── */
.ld-card {
  background: #fff;
  border: 1px solid #EEF2F7;
  border-radius: var(--card-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: var(--transition-smooth);
  position: relative;
}

.ld-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(79, 32, 255, 0.25);
}

/* Fixed 16:9 Image Container */
.ld-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #EEF2F7;
}

.ld-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.ld-card:hover .ld-card-img {
  transform: scale(1.06);
}

/* Badges on Image */
.ld-badge-category {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--pill-radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  letter-spacing: 0.3px;
}

.ld-badge-date {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #475467;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--pill-radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Card Body */
.ld-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.ld-card-title {
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--brand-text);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.ld-card-excerpt {
  font-size: 0.86rem;
  color: var(--brand-muted);
  line-height: 1.55;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Footer Actions (Divider + Actions) */
.ld-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #EEF2F6;
}

.ld-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-card-action {
  background: transparent;
  border: none;
  color: var(--brand-muted);
  font-size: 0.85rem;
  padding: 4px 6px;
  cursor: pointer;
  transition: var(--transition-fast);
  border-radius: 6px;
}

.btn-card-action:hover {
  color: var(--brand-primary);
  background: var(--brand-primary-light);
}

.ld-read-more-link {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.3px;
}

.ld-read-more-link:hover {
  color: var(--brand-primary-hover);
  transform: translateX(3px);
}

/* ─── Floating Elements ─────────────────────────────────────────────────── */
.ld-floating-share-btn {
  position: fixed;
  bottom: 32px;
  left: 32px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-floating);
  z-index: 1000;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
}

.ld-floating-share-btn:hover {
  transform: scale(1.1) rotate(15deg);
  background: var(--brand-primary-hover);
}

.ld-floating-cta-badge {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--brand-dark);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--pill-radius);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  box-shadow: 0 12px 30px rgba(7, 17, 38, 0.3);
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.1);
  transition: var(--transition-smooth);
}

.ld-floating-cta-badge:hover {
  background: var(--brand-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-floating);
  color: #fff;
}

/* ─── Single Article Page Styling ────────────────────────────────────────── */
.ld-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--brand-muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.ld-breadcrumb a:hover {
  color: var(--brand-primary);
}

.ld-article-hero {
  margin-bottom: 36px;
}

.ld-article-title {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 900;
  line-height: 1.2;
  color: var(--brand-dark);
  margin-bottom: 16px;
  letter-spacing: -0.8px;
}

.ld-article-meta-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--brand-border);
  border-bottom: 1px solid var(--brand-border);
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.ld-article-featured-img {
  width: 100%;
  max-height: 520px;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-md);
}

.ld-sticky-share {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-share-social {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-text);
  font-size: 0.95rem;
  transition: var(--transition-fast);
  cursor: pointer;
}

.btn-share-social:hover {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
  transform: translateY(-2px);
}

.ld-toc-box {
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  border-radius: 16px;
  padding: 20px;
}

.ld-toc-title {
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--brand-dark);
  margin-bottom: 12px;
}

.ld-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ld-toc-list li a {
  font-size: 0.85rem;
  color: var(--brand-muted);
  padding: 6px 0;
  display: block;
}

.ld-toc-list li a:hover {
  color: var(--brand-primary);
  font-weight: 600;
}

.ld-article-content {
  font-size: 1.08rem;
  line-height: 1.8;
  color: #2D3748;
}

.ld-article-content h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--brand-dark);
  margin-top: 40px;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.ld-article-content h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-top: 30px;
  margin-bottom: 12px;
}

.ld-article-content p {
  margin-bottom: 24px;
}

.ld-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 24px 0;
}

.ld-author-bio-card {
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  border-radius: 20px;
  padding: 28px;
  margin-top: 48px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.ld-author-bio-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.ld-bottom-cta-banner {
  background: linear-gradient(135deg, var(--brand-dark) 0%, #152244 100%);
  border-radius: 24px;
  padding: 56px 36px;
  text-align: center;
  color: #fff;
  margin: 64px 0 40px;
  position: relative;
  overflow: hidden;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.ld-footer {
  background: #080F2A;
  color: #D5DDF0;
  padding: 64px 0 28px;
  margin-top: 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ld-footer h6 {
  color: #FFFFFF !important;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: 0.4px;
}

.ld-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ld-footer-links li {
  margin-bottom: 10px;
}

.ld-footer-links li a {
  font-size: 0.875rem;
  color: #B8C4E0 !important;
  transition: var(--transition-fast);
  text-decoration: none;
}

.ld-footer-links li a:hover {
  color: #FFFFFF !important;
  transform: translateX(3px);
  display: inline-block;
}

.ld-footer-bottom {
  padding-top: 28px;
  margin-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  color: #94A3B8 !important;
}
