/* ============================================================================
   LEGAL BOUNDARY - PROFESSIONAL UI (Inspired by LiveLaw)
   Modern Legal News Portal Styling
   ============================================================================ */

:root {
  --primary-red: #c41f2a;
  --primary-dark: #a01820;
  --secondary-red: #e31f2a;
  --text-dark: #1a1a1a;
  --text-muted: #666666;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --border-color: #e8e8e8;
  --surface-strong: #ffffff;
  --surface-soft: #fbfaf8;
  --surface-tint: #f7f4f1;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --space-xs: 0.4rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-white);
}

/* ============================================================================
   TOPBAR - Date & Language Switch
   ============================================================================ */

.lb-topbar {
  background: var(--primary-red);
  color: white;
  padding: 0.75rem 0;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.lb-topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
}

.lb-date {
  font-weight: 500;
  opacity: 0.95;
}

.lb-language-switch {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.lb-lang-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 0.35rem 0.75rem;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.lb-lang-btn:hover {
  background: rgba(255,255,255,0.1);
}

.lb-lang-btn.active {
  background: white;
  color: var(--primary-red);
  border-color: white;
}

/* ============================================================================
   HEADER - Logo, Search, Navigation
   ============================================================================ */

.lb-header {
  background: white;
  border-bottom: 2px solid var(--border-color);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.lb-header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1rem;
}

.lb-brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.lb-brand img {
  height: auto;
  width: auto;
  max-width: 150px;
}

.lb-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.lb-search:focus-within {
  border-color: var(--primary-red);
  background: white;
  box-shadow: 0 0 0 3px rgba(196, 31, 42, 0.1);
}

.lb-search i {
  color: var(--text-muted);
  font-size: 1rem;
}

.lb-search input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.lb-search input::placeholder {
  color: var(--text-muted);
}

.lb-header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.lb-icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--text-dark);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.lb-icon-btn:hover {
  color: var(--primary-red);
}

/* ============================================================================
   NAVIGATION - Category Menu
   ============================================================================ */

.lb-nav {
  background: white;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  overflow-y: hidden;
}

.lb-nav-inner {
  display: flex;
  gap: 0;
  padding: 0 1rem;
  flex-wrap: nowrap;
}

.lb-nav-item {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
}

.lb-nav-item:hover {
  color: var(--primary-red);
  background: rgba(196, 31, 42, 0.02);
}

.lb-nav-item.active {
  color: var(--primary-red);
  border-bottom-color: var(--primary-red);
}

.lb-nav-item i {
  margin-right: 0.5rem;
  font-size: 1.1rem;
}

/* ============================================================================
   HERO SECTION - Featured Content
   ============================================================================ */

.lb-hero {
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 2.5rem 0;
  margin-bottom: 2rem;
}

.lb-hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.lb-hero-text h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.lb-hero-text p {
  font-size: 1.1rem;
  opacity: 0.95;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.lb-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.lb-stat-item {
  background: rgba(255,255,255,0.1);
  padding: 1rem;
  border-radius: 6px;
  border-left: 3px solid white;
  text-align: center;
}

.lb-stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  display: block;
}

.lb-stat-label {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-top: 0.25rem;
}

.lb-hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-hero-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .lb-hero-content {
    grid-template-columns: 1fr;
  }
  .lb-hero-text h1 {
    font-size: 1.8rem;
  }
}

/* ============================================================================
   SECTION HEADER
   ============================================================================ */

.lb-section {
  margin-bottom: 1.5rem;
}

.lb-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  padding-bottom: 0.85rem;
  border-bottom: 2px solid var(--primary-red);
}

.lb-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lb-section-title i {
  color: var(--primary-red);
  font-size: 1.4rem;
}

.lb-section-view-all {
  text-decoration: none;
  color: var(--primary-red);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.lb-section-view-all:hover {
  gap: 0.75rem;
  opacity: 0.8;
}

/* ============================================================================
   ARTICLE CARDS - Grid Layout
   ============================================================================ */

.lb-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.lb-article-card,
.lb-card,
.lb-lead-card,
.lb-mini-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.lb-article-card:hover,
.lb-card:hover,
.lb-lead-card:hover,
.lb-mini-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: var(--primary-red);
  transform: translateY(-2px);
}

.lb-article-image,
.lb-card img,
.lb-lead-card img,
.lb-mini-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  overflow: hidden;
}

.lb-article-image img,
.lb-card img,
.lb-lead-card img,
.lb-mini-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.lb-article-card:hover .lb-article-image img,
.lb-card:hover img,
.lb-lead-card:hover img,
.lb-mini-card:hover img {
  transform: scale(1.05);
}

.lb-article-body,
.lb-card-body,
.lb-lead-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.lb-article-category {
  display: inline-block;
  background: var(--primary-red);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
  width: fit-content;
}

.lb-article-title,
.lb-card h3,
.lb-lead-body h3,
.lb-mini-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  flex-grow: 1;
}

.lb-article-card:hover .lb-article-title,
.lb-card:hover h3,
.lb-lead-card:hover h3,
.lb-mini-card:hover h3 {
  color: var(--primary-red);
}

.lb-article-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lb-article-meta,
.lb-card-meta,
.lb-mini-card .meta,
.lb-lead-body p {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.lb-article-author {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.lb-article-time {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ============================================================================
   LIST LAYOUT - For single column articles
   ============================================================================ */

.lb-articles-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lb-article-list-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.lb-article-list-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-color: var(--primary-red);
}

.lb-article-list-image {
  width: 140px;
  height: 140px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.lb-article-list-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lb-article-list-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.lb-article-list-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.lb-article-list-item:hover .lb-article-list-title {
  color: var(--primary-red);
}

.lb-article-list-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.lb-article-list-excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex-grow: 1;
}

.lb-article-list-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.lb-read-more {
  color: var(--primary-red);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.lb-read-more:hover {
  text-decoration: underline;
}

/* ============================================================================
   SIDEBAR - Categories, Filters, Related
   ============================================================================ */

.lb-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.lb-sidebar-box {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  overflow: hidden;
}

.lb-sidebar-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-red);
}

.lb-category-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lb-category-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  text-decoration: none;
  color: var(--text-dark);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.lb-category-link:hover {
  background: var(--bg-light);
  color: var(--primary-red);
  padding-left: 1rem;
}

.lb-category-count {
  background: var(--bg-light);
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
}

.lb-category-link:hover .lb-category-count {
  background: var(--primary-red);
  color: white;
}

/* ============================================================================
   FEATURED / BREAKING NEWS
   ============================================================================ */

.lb-featured {
  background: linear-gradient(135deg, #f8f9fa 0%, white 100%);
  border: 2px solid var(--primary-red);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.lb-featured-content {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lb-featured-badge {
  display: inline-block;
  background: var(--primary-red);
  color: white;
  padding: 0.35rem 0.75rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
  width: fit-content;
}

.lb-featured-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.lb-featured-excerpt {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.lb-featured-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.lb-featured-image {
  width: 100%;
  height: 100%;
  min-height: 250px;
}

.lb-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .lb-featured {
    grid-template-columns: 1fr;
  }
  .lb-featured-image {
    min-height: 200px;
  }
}

/* ============================================================================
   PAGINATION
   ============================================================================ */

.lb-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 1rem 0 1.5rem;
}

.lb-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  transition: all 0.3s ease;
}

.lb-page-link:hover {
  border-color: var(--primary-red);
  color: var(--primary-red);
}

.lb-page-link.active {
  background: var(--primary-red);
  color: white;
  border-color: var(--primary-red);
}

.lb-page-link.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.lb-footer {
  background: var(--text-dark);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 3rem;
}

.lb-footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.lb-footer-section h5 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.lb-footer-link {
  display: block;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.lb-footer-link:hover {
  color: white;
  text-decoration: underline;
}

.lb-footer-bottom {
  text-align: center;
  padding: 1rem 0;
  font-size: 0.85rem;
  opacity: 0.8;
}

/* ============================================================================
   UTILITIES
   ============================================================================ */

.container-xxl {
  max-width: 1400px;
  margin: 0 auto;
}

.d-flex {
  display: flex;
}

.gap-2 {
  gap: 1rem;
}

.gap-3 {
  gap: 1.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.text-muted {
  color: var(--text-muted);
}

.text-center {
  text-align: center;
}

.fw-bold {
  font-weight: 700;
}

.rounded {
  border-radius: 6px;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
  .lb-header-inner {
    gap: 0.85rem;
  }

  .lb-search {
    padding: 0.7rem 0.9rem;
  }

  .lb-articles-grid {
    grid-template-columns: 1fr;
  }

  .lb-nav-inner {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .lb-hero-content {
    grid-template-columns: 1fr;
  }

  .lb-hero-text h1 {
    font-size: 1.8rem;
  }

  .lb-hero-stats {
    grid-template-columns: 1fr;
  }

  .lb-section-title {
    font-size: 1.2rem;
  }

  .lb-section-header {
    align-items: flex-start;
    gap: 0.75rem;
  }

  .lb-section-view-all {
    padding: 0.35rem 0;
  }

  .lb-article-card,
  .lb-card,
  .lb-lead-card,
  .lb-mini-card,
  .lb-article-list-item,
  .lb-category-link,
  .lb-list a,
  .lb-page-link,
  .lb-pill {
    min-height: 44px;
  }

  .lb-sidebar-box {
    padding: 1rem;
  }

  .lb-sidebar {
    gap: 0.85rem;
  }

  .lb-sidebar-title {
    margin-bottom: 0.85rem;
    padding-bottom: 0.65rem;
  }

  .lb-featured-content {
    padding: 1.25rem;
  }

  .lb-featured-title {
    font-size: 1.45rem;
  }

  .lb-article-image,
  .lb-card img,
  .lb-lead-card img {
    height: 170px;
  }

  .lb-article-body,
  .lb-card-body,
  .lb-lead-body {
    padding: 0.9rem;
  }
}

@media (max-width: 480px) {
  .lb-topbar-inner {
    flex-direction: column;
    gap: 0.4rem;
    padding: 0 0.75rem;
  }

  .lb-header-inner {
    padding: 0.65rem 0.75rem;
    gap: 0.75rem;
  }

  .lb-articles-grid {
    gap: 0.85rem;
  }

  .lb-article-list-item {
    flex-direction: column;
  }

  .lb-article-list-image {
    width: 100%;
    height: 200px;
  }

  .lb-section-title {
    font-size: 1rem;
  }

  .lb-featured {
    grid-template-columns: 1fr;
  }

  .lb-featured-content {
    padding: 1rem;
  }

  .lb-featured-title {
    font-size: 1.25rem;
  }

  .lb-section-header {
    margin-bottom: 0.85rem;
    padding-bottom: 0.7rem;
  }

  .lb-sidebar-box {
    padding: 0.9rem;
  }

  .lb-page-link {
    width: 44px;
    height: 44px;
  }

  .lb-footer {
    padding: 2rem 0 1rem;
    margin-top: 2rem;
  }

  .lb-footer-content {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
  }

  .lb-footer-section h5 {
    margin-bottom: 0.75rem;
  }

  .lb-footer-link {
    margin-bottom: 0.4rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lb-article-card {
  animation: fadeIn 0.3s ease;
}

/* ============================================================================
   DARK MODE SUPPORT (Optional)
   ============================================================================ */

@media (prefers-color-scheme: dark) {
  :root {
    --text-dark: #e0e0e0;
    --text-muted: #a0a0a0;
    --bg-light: #1a1a1a;
    --bg-white: #0d0d0d;
    --border-color: #333333;
  }

  body {
    background-color: var(--bg-white);
  }

  .lb-article-card,
  .lb-sidebar-box {
    background: #1a1a1a;
  }

  .lb-search {
    background: #1a1a1a;
  }
}
