@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap');

:root {
  --primary: #d8232a;
  --primary-dark: #b81d22;
  --primary-light: #fbe9e9;
  --primary-gradient: #d8232a;
  --primary-gradient-soft: #fbe9e9;
  --btn-primary: #d8232a;
  --btn-primary-dark: #b81d22;
  --btn-primary-gradient: #d8232a;
  --secondary: #303030;
  --success: #008000;
  --danger: #d8232a;
  --warning: #F59E0B;
  --info: #0073e6;
  --dark: #303030;
  --dark-soft: #424242;
  --body-bg: #f4f4f4;
  --card-bg: #FFFFFF;
  --text-primary: #303030;
  --text-secondary: #606060;
  --text-muted: #999999;
  --border-color: #e0e0e0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 2px 6px rgba(0,0,0,0.12);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
  --shadow-xl: 0 8px 24px rgba(0,0,0,0.15);
  --radius-sm: 4px;
  --radius-md: 4px;
  --radius-lg: 4px;
  --radius-xl: 4px;
  --glossy-overlay: transparent;
}

* { box-sizing: border-box; }

body {
  font-family: 'Open Sans', sans-serif;
  background: var(--body-bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .section-title, .navbar-brand, .card-title, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

::selection { background: var(--primary); color: white; }

/* === Navbar === */
.navbar {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.navbar-brand { font-weight: 800; letter-spacing: -0.5px; font-size: 1.35rem; color: #111 !important; }
.navbar-brand i { color: var(--primary); }
.navbar .nav-link { font-weight: 600; font-size: 0.95rem; color: var(--text-secondary) !important; padding: 0.5rem 1rem !important; transition: all 0.2s; border-radius: var(--radius-sm); }
.navbar .nav-link:hover { color: var(--primary) !important; background: rgba(229, 57, 53, 0.05); }
.navbar .btn-primary { background: var(--btn-primary-gradient); border: none; border-radius: 50rem; font-weight: 600; padding: 0.6rem 1.5rem !important; transition: all 0.2s; }
.navbar .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(229, 57, 53, 0.35); }
.dropdown-menu { border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 0.5rem; }
.dropdown-menu-dark { background: var(--dark-soft); border-color: rgba(255,255,255,0.08); }
.dropdown-menu-dark .dropdown-item { color: rgba(255,255,255,0.75); }
.dropdown-menu-dark .dropdown-item:hover { background: rgba(255,255,255,0.08); color: white; }
.dropdown-menu-dark .dropdown-divider { border-color: rgba(255,255,255,0.08); }
.dropdown-item { border-radius: var(--radius-sm); font-weight: 500; font-size: 0.9rem; padding: 0.5rem 0.75rem; transition: all 0.15s; }
.dropdown-item:hover { background: #f1f5f9; }
.navbar .dropdown-menu { margin-top: 0.5rem !important; }
.dropdown-menu-dark .dropdown-item.text-danger:hover { background: rgba(239,68,68,0.15) !important; color: #fca5a5 !important; }

/* === Hero === */
.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  background: linear-gradient(135deg, #D8232A 0%, #C41E24 50%, #8B1A1E 100%);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.45) 50%, rgba(216, 35, 42, 0.08) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1;
}
.hero-slider {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: heroFade 24s infinite;
}
.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 4s; }
.hero-slide:nth-child(3) { animation-delay: 8s; }
.hero-slide:nth-child(4) { animation-delay: 12s; }
.hero-slide:nth-child(5) { animation-delay: 16s; }
.hero-slide:nth-child(6) { animation-delay: 20s; }
@keyframes heroFade {
  0%, 16.66% { opacity: 0; }
  4.16%, 12.5% { opacity: 1; }
  16.66%, 100% { opacity: 0; }
}
.hero-section .container { position: relative; z-index: 2; }
.hero-section h1 { letter-spacing: -1px; font-weight: 800; text-shadow: 0 2px 20px rgba(0,0,0,0.5); }
.hero-section .lead { font-weight: 500; text-shadow: 0 1px 12px rgba(0,0,0,0.5); }
.hero-section .badge { text-shadow: 0 1px 8px rgba(0,0,0,0.4); }
.hero-section .form-control,
.hero-section .form-select {
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  backdrop-filter: blur(4px);
  transition: all 0.2s;
}
.hero-section .form-control:focus,
.hero-section .form-select:focus {
  border-color: var(--primary-light);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(216, 35, 42, 0.25);
  color: white;
}
.hero-section .form-control::placeholder { color: rgba(255, 255, 255, 0.5); }
.hero-section .form-select option { color: var(--text-primary); background: white; }

/* === Glassmorphism === */
.glass {
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.glass-card {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.glass-dark {
  background: rgba(15, 20, 25, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* === Cards === */
.card {
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-lg); background: #E8F8FB; }
.card-header {
  background: transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1rem 1.25rem;
  font-weight: 600;
}
.card-footer { background: transparent; border-top: 1px solid rgba(0, 0, 0, 0.06); }

/* === Buttons === */
.btn {
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.25rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.9rem;
  cursor: pointer;
}
.btn:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.btn-primary {
  background: var(--btn-primary-gradient);
  border: none;
  color: white;
}
.btn-primary:hover { box-shadow: 0 4px 14px rgba(0, 122, 255, 0.4); }
.btn-outline-primary {
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline-primary:hover { background: var(--btn-primary-gradient); border-color: transparent; color: white; box-shadow: 0 4px 14px rgba(0, 122, 255, 0.3); }
.btn-outline-danger:hover { background: var(--danger); border-color: var(--danger); color: white; }
.btn-outline-secondary {
  border: 2px solid var(--secondary);
  color: var(--secondary);
  background: white;
}
.btn-outline-secondary:hover { background: var(--secondary); border-color: var(--secondary); color: white; }
.btn-outline-success:hover { background: var(--success); border-color: var(--success); color: white; }
.btn-outline-warning:hover { background: var(--warning); border-color: var(--warning); color: white; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

/* === Forms === */
.form-control, .form-select {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  transition: all 0.2s;
  font-family: inherit;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(216, 35, 42, 0.1);
  outline: none;
}
.form-control-lg { padding: 0.65rem 1rem; font-size: 1rem; }
.form-label { font-weight: 600; font-size: 0.85rem; color: var(--text-primary); margin-bottom: 0.35rem; }
.input-group-text { border: 2px solid var(--border-color); background: #f8fafc; border-radius: var(--radius-sm); font-weight: 600; }

/* === Category Cards === */
.category-card {
  border-radius: var(--radius-lg) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  background: rgba(255, 255, 255, 0.6) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.category-card:hover {
  border-color: var(--primary-light) !important;
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(216, 35, 42, 0.15) !important;
}
.category-card i { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.category-card:hover i { transform: scale(1.2); }

/* === Property Cards === */
.property-card {
  border-radius: var(--radius-lg) !important;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.property-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1) !important;
}
.property-card .card-img-top {
  height: 220px;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.property-card:hover .card-img-top { transform: scale(1.08); }
.property-card .card-body { padding: 1.25rem; }
.property-card .card-title { font-weight: 700; font-size: 1.05rem; }
.property-card .card-footer { padding: 0 1.25rem 1.25rem; background: transparent; border: none; }

/* === Badges === */
.badge {
  font-weight: 600;
  padding: 0.35em 0.65em;
  border-radius: 0.375rem;
  font-size: 0.75rem;
}
.badge.bg-primary { background: var(--primary-gradient) !important; }
.badge.bg-warning { background: linear-gradient(135deg, #f59e0b, #d97706) !important; }
.badge.bg-success { background: linear-gradient(135deg, #10b981, #059669) !important; }
.badge.bg-danger { background: linear-gradient(135deg, #ef4444, #dc2626) !important; }
.badge.bg-info { background: linear-gradient(135deg, #3b82f6, #2563eb) !important; }
.badge.bg-secondary { background: linear-gradient(135deg, #64748b, #475569) !important; }
.badge.bg-light { background: #f1f5f9 !important; color: var(--text-primary); border: 1px solid var(--border-color); }

/* === Alerts === */
.alert {
  border: none;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  margin-bottom: 0;
  position: relative;
  z-index: 999;
}
.alert-success { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #065f46; }
.alert-danger { background: linear-gradient(135deg, #fee2e2, #fecaca); color: #991b1b; }
.alert-warning { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; }
.alert-info { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1e40af; }
.alert .btn-close { font-size: 0.8rem; }

/* === Footer === */
footer { background: var(--dark) !important; border-top: 1px solid rgba(255, 255, 255, 0.05); }
footer a { transition: color 0.2s; }
footer a:hover { color: var(--primary-light) !important; }

/* === Dashboard Sidebar === */
.sidebar {
  min-height: calc(100vh - 57px);
  background: var(--card-bg);
  border-right: 1px solid var(--border-color);
  padding: 1rem 0.5rem;
}
.sidebar .nav-link {
  padding: 0.75rem 1.25rem;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s;
  margin-bottom: 0.25rem;
}
.sidebar .nav-link:hover { background: #F1F5F9; color: var(--text-primary); }
.sidebar .nav-link.active {
  background: var(--primary-gradient-soft);
  color: var(--primary-dark);
  font-weight: 600;
  border-right: 3px solid var(--primary);
}
.sidebar .nav-link i { width: 1.5rem; text-align: center; font-size: 1.1rem; }

/* === Stat Cards (Dashboard) === */
.stat-card {
  border: none !important;
  border-radius: var(--radius-lg) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  transition: all 0.3s;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15) !important; }
.stat-card:hover::after { transform: scale(1.2); }
.stat-card.bg-primary { background: var(--primary-gradient) !important; }
.stat-card.bg-warning { background: linear-gradient(135deg, #f59e0b, #d97706) !important; }
.stat-card.bg-info { background: linear-gradient(135deg, #3b82f6, #2563eb) !important; }
.stat-card.bg-success { background: linear-gradient(135deg, #10b981, #059669) !important; }
.stat-card.bg-danger { background: linear-gradient(135deg, #ef4444, #dc2626) !important; }
.stat-card.bg-secondary { background: linear-gradient(135deg, #64748b, #475569) !important; }

/* === Tables === */
.table { margin-bottom: 0; width: 100%; border-collapse: separate; border-spacing: 0; }
.table th {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  background: #F8FAFC;
  border-bottom: 1px solid var(--border-color) !important;
  border-top: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
}
.table td { padding: 1.25rem; vertical-align: middle; border-bottom: 1px solid var(--border-color); font-size: 0.9rem; color: var(--text-primary); }
.table-hover tbody tr:hover td { background: rgba(216, 35, 42, 0.02); }
.table-bordered { border: none; }
.table-bordered th, .table-bordered td { border-left: none; border-right: none; }
.table-dark { background: var(--dark) !important; }
.table-dark th { background: var(--dark-soft) !important; color: white; text-transform: none; letter-spacing: normal; }

/* === Pagination === */
.pagination .page-link {
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm) !important;
  margin: 0 0.15rem;
  transition: all 0.2s;
}
.pagination .page-link:hover { background: #f1f5f9; border-color: var(--primary-light); color: var(--primary); }
.pagination .page-item.active .page-link { background: var(--btn-primary-gradient); border-color: transparent; color: white; box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3); }

/* === Breadcrumb === */
.breadcrumb { background: transparent; padding: 0; margin: 0; }
.breadcrumb-item a { color: var(--text-secondary); font-weight: 500; text-decoration: none; transition: color 0.2s; }
.breadcrumb-item a:hover { color: var(--primary); }
.breadcrumb-item.active { color: var(--text-primary); font-weight: 600; }

/* === Price History === */
.price-change-up { color: var(--danger); font-weight: 600; }
.price-change-down { color: var(--success); font-weight: 600; }

/* === Modal === */
.modal-content {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.modal-header { border-bottom: 1px solid var(--border-color); padding: 1.25rem; }
.modal-footer { border-top: 1px solid var(--border-color); padding: 1rem 1.25rem; }

/* === Animations === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.property-card { animation: fadeInUp 0.4s ease both; }
.category-card { animation: fadeInUp 0.4s ease both; }
.property-card:nth-child(1) { animation-delay: 0.02s; }
.property-card:nth-child(2) { animation-delay: 0.06s; }
.property-card:nth-child(3) { animation-delay: 0.1s; }
.property-card:nth-child(4) { animation-delay: 0.14s; }
.property-card:nth-child(5) { animation-delay: 0.18s; }
.property-card:nth-child(6) { animation-delay: 0.22s; }
.property-card:nth-child(7) { animation-delay: 0.26s; }
.property-card:nth-child(8) { animation-delay: 0.3s; }
.property-card:nth-child(9) { animation-delay: 0.34s; }
.property-card:nth-child(10) { animation-delay: 0.38s; }
.property-card:nth-child(11) { animation-delay: 0.42s; }
.property-card:nth-child(12) { animation-delay: 0.46s; }

/* === Mortgage Calculator === */
#mc_result { animation: fadeInUp 0.3s ease both; }
#mc_monthly { font-size: 1.75rem; font-weight: 800; color: var(--primary); }

/* === Leaflet Map Fix === */
.leaflet-container { border-radius: var(--radius-lg); }

.map-blur-overlay {
  position: absolute;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
#propertyMap {
  filter: blur(4px);
  pointer-events: none;
}

/* === Responsive === */
@media (max-width: 768px) {
  .hero-section { min-height: 420px; }
  .hero-section h1 { font-size: 1.65rem; }
  .hero-section .lead { font-size: 0.95rem !important; }
  .hero-section .form-control,
  .hero-section .form-select { font-size: 0.9rem; }
  .sidebar { min-height: auto; }
}

/* === Section Titles === */
.section-title { font-weight: 800; letter-spacing: -0.5px; color: var(--text-primary); }
.section-subtitle { color: var(--text-secondary); font-weight: 400; }

.tracking-wide { letter-spacing: 0.05em; }

/* === Empty States === */
.empty-state i { color: var(--text-muted); opacity: 0.5; }
.empty-state h5 { font-weight: 700; color: var(--text-primary); }

/* === Carousel === */
.carousel img { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }

/* === Amenity Badges (Property Page) === */
.amenity-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.amenity-badge:hover {
  border-color: var(--primary-light);
  background: #eef2ff;
}
.amenity-badge i { color: var(--primary); font-size: 1rem; }

/* === Compare Table === */
.compare-table th:first-child { position: sticky; left: 0; background: #f8fafc; z-index: 2; }

/* === Images in Dashboard === */
.img-thumbnail { border: 2px solid var(--border-color); border-radius: var(--radius-sm); padding: 0.25rem; }

/* === Back to Site Link === */
.back-to-site { color: var(--text-secondary) !important; font-size: 0.85rem; }
.back-to-site:hover { color: var(--primary) !important; }

/* === Carousel Controls === */
.carousel-control-prev, .carousel-control-next { width: 10%; opacity: 0; transition: opacity 0.3s; }
.carousel:hover .carousel-control-prev,
.carousel:hover .carousel-control-next { opacity: 1; }
.carousel-indicators button { width: 10px; height: 10px; border-radius: 50%; border: none; }

/* === Analytics === */
.chart-container { position: relative; }
.chart-container canvas { max-height: 300px; }
.analytics-period-select { min-width: 120px; }

/* === Home Sections === */
.feature-card { border-radius: var(--radius); transition: all 0.3s ease; border: 1px solid var(--border-color); }
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08); border-color: var(--primary); }
.feature-icon { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 16px; font-size: 1.5rem; }

.testimonial-card { border-radius: var(--radius); border: none; position: relative; }
.testimonial-card::before { content: '\201C'; font-size: 4rem; position: absolute; top: 0; left: 20px; color: var(--primary); opacity: 0.15; font-family: Georgia, serif; line-height: 1; }
.testimonial-card .card-body { padding: 2rem 1.5rem; }
.testimonial-card p { font-style: italic; line-height: 1.7; }
.testimonial-avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }

.rating-stars { color: #f59e0b; }

.cta-section { background: var(--primary-gradient); position: relative; overflow: hidden; }
.cta-section::before { content: ''; position: absolute; top: -50%; right: -20%; width: 400px; height: 400px; border-radius: 50%; background: rgba(255,255,255,0.05); }
.cta-section::after { content: ''; position: absolute; bottom: -30%; left: -10%; width: 300px; height: 300px; border-radius: 50%; background: rgba(255,255,255,0.05); }

.stats-section .stat-number { font-size: 2.2rem; font-weight: 800; letter-spacing: -1px; }
.stats-section .stat-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8; }

.amenities-checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.5rem;
}
.amenity-checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.2rem 0;
  transition: color 0.15s;
}
.amenity-checkbox-item:hover {
  color: var(--primary);
}
.amenity-checkbox-item .form-check-input {
  margin: 0;
  flex-shrink: 0;
  width: 0.9rem;
  height: 0.9rem;
  cursor: pointer;
}
.amenity-checkbox-item span {
  line-height: 1.3;
}

/* Blog styles */
.blog-card {
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: 0.75rem;
  overflow: hidden;
}
.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
}
.blog-card-img img {
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s;
}
.blog-card:hover .blog-card-img img {
  transform: scale(1.03);
}
.blog-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.blog-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
.blog-content p {
  margin-bottom: 1.25rem;
}
.blog-content ul,
.blog-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}
.blog-content li {
  margin-bottom: 0.5rem;
}
.blog-content a {
  color: var(--primary);
  text-decoration: underline;
}
.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
}
.sticky-sidebar {
  position: sticky;
  top: 80px;
}
@media (max-width: 991px) {
  .sticky-sidebar {
    position: static;
  }
}

/* Breadcrumb tweaks */
.breadcrumb {
  background: transparent;
  padding: 0;
}
.breadcrumb-item a {
  color: var(--primary);
  text-decoration: none;
}
.breadcrumb-item.active {
  color: var(--text-muted);
}

/* === Editor.js overrides === */
.codex-editor {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}
.ce-block__content, .ce-toolbar__content {
  max-width: 100% !important;
}
.codex-editor__redactor {
  padding-bottom: 50px !important;
}
.ce-toolbar__actions {
  right: auto;
  left: -20px;
}

/* === Premium Search Capsules === */
.search-capsule {
  background: var(--card-bg);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.search-capsule:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(216, 35, 42, 0.2);
}

.search-capsule:focus-within {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(216, 35, 42, 0.15), var(--shadow-md);
}

.search-capsule-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.15rem;
  display: block;
}

.search-capsule .form-control,
.search-capsule .form-select {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary) !important;
  box-shadow: none !important;
}

.search-capsule .form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.75;
}

.search-btn-premium {
  min-height: 62px;
  border-radius: var(--radius-lg) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(216, 35, 42, 0.3) !important;
}
