/* =============================================================
   EarnHub — Custom CSS
   Philosophy: Bootstrap-first. Only add what Bootstrap can't do.
   ============================================================= */

/* --- Design Tokens ------------------------------------------ */
:root {
  --eh-font: 'Open Sans', 'Inter', system-ui, sans-serif;
  --eh-radius: 12px;
  --eh-radius-sm: 8px;
  --eh-shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.10);
  --eh-border: 1px solid rgba(0, 0, 0, 0.08);
  --eh-transition: all 0.2s ease;
  --eh-hero-bg: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f4c81 100%);
  --eh-card-hover-translate: -4px;
}

/* --- Global -------------------------------------------------- */
body {
  font-family: var(--eh-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --- Links --------------------------------------------------- */
a {
  text-decoration: none;
}
a:hover {
  text-decoration: none;
}

/* --- Navbar -------------------------------------------------- */
.navbar.sticky-top {
  z-index: 1040;
}

.navbar-earnhub {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--eh-border);
  transition: var(--eh-transition);
}

/* --- Hero ---------------------------------------------------- */
.eh-hero {
  background: var(--eh-hero-bg);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.eh-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.eh-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.10) 0%, transparent 70%);
  pointer-events: none;
}

/* --- App Cards ---------------------------------------------- */
.app-card {
  border: var(--eh-border);
  border-radius: var(--eh-radius);
  transition: var(--eh-transition);
  background: #fff;
  overflow: hidden;
}

.app-card:hover {
  transform: translateY(var(--eh-card-hover-translate));
  box-shadow: var(--eh-shadow-hover);
  border-color: rgba(var(--bs-primary-rgb), 0.25);
}

.app-card .app-card-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--eh-radius-sm);
  object-fit: contain;
  border: var(--eh-border);
  background: #f8f9fa;
  padding: 6px;
  flex-shrink: 0;
}

.app-card .app-card-logo-placeholder {
  width: 56px;
  height: 56px;
  border-radius: var(--eh-radius-sm);
  border: var(--eh-border);
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.5rem;
}

/* --- Star Rating -------------------------------------------- */
.star-rating {
  color: #f59e0b;
  font-size: 0.85rem;
  letter-spacing: -1px;
}

.star-rating-lg {
  font-size: 1.2rem;
}

/* --- Badges ------------------------------------------------- */
.badge-verified {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-featured {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
  font-size: 0.7rem;
  font-weight: 600;
}

/* --- Category Cards ----------------------------------------- */
.category-card {
  border: var(--eh-border);
  border-radius: var(--eh-radius);
  transition: var(--eh-transition);
  text-align: center;
  padding: 1.5rem 1rem;
  background: #fff;
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--eh-shadow-hover);
  border-color: rgba(var(--bs-primary-rgb), 0.3);
  background: rgba(var(--bs-primary-rgb), 0.02);
}

.category-card .category-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
  line-height: 1;
}

/* --- Section Headings --------------------------------------- */
.section-heading {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.section-heading-sm {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* --- Trust Score Bar ---------------------------------------- */
.trust-bar {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg,
    #ef4444 0%,
    #f59e0b 40%,
    #10b981 80%,
    #059669 100%
  );
}

.trust-bar-track {
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
  overflow: hidden;
}

/* --- Platform Badges ---------------------------------------- */
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  border: var(--eh-border);
  background: #f8fafc;
  color: #475569;
}

/* --- Newsletter Strip --------------------------------------- */
.newsletter-strip {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  padding: 3.5rem 0;
}

/* --- Pros & Cons ------------------------------------------- */
.pros-cons-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.pros-cons-item .icon-pro {
  color: #10b981;
  margin-top: 2px;
  flex-shrink: 0;
}

.pros-cons-item .icon-con {
  color: #ef4444;
  margin-top: 2px;
  flex-shrink: 0;
}

/* --- Compare Table ----------------------------------------- */
.compare-header {
  font-weight: 700;
  font-size: 1rem;
}

/* --- Scroll Snap Carousel ---------------------------------- */
.snap-scroll-x {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}

.snap-scroll-x::-webkit-scrollbar {
  display: none;
}

.snap-scroll-x > * {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* --- Search Bar -------------------------------------------- */
.search-input-group .form-control {
  border-radius: 50px 0 0 50px !important;
  padding-left: 1.25rem;
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1rem;
}

.search-input-group .form-control::placeholder {
  color: rgba(255,255,255,0.6);
}

.search-input-group .form-control:focus {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.18);
  box-shadow: none;
  color: #fff;
}

.search-input-group .btn {
  border-radius: 0 50px 50px 0 !important;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
}

/* --- Footer ------------------------------------------------- */
.eh-footer {
  background: #0f172a;
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 1.5rem;
}

.eh-footer a {
  color: rgba(255,255,255,0.6);
  transition: var(--eh-transition);
}

.eh-footer a:hover {
  color: #fff;
}

.eh-footer .footer-brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
}

/* --- App Detail -------------------------------------------- */
.app-logo-lg {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 20px;
  border: var(--eh-border);
  background: #f8fafc;
  padding: 10px;
}

.app-logo-placeholder-lg {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  border: var(--eh-border);
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.screenshot-thumb {
  border-radius: 10px;
  border: var(--eh-border);
  transition: var(--eh-transition);
  cursor: pointer;
}

.screenshot-thumb:hover {
  transform: scale(1.03);
}

/* --- Country Cards ----------------------------------------- */
.country-card {
  border: var(--eh-border);
  border-radius: var(--eh-radius);
  transition: var(--eh-transition);
  background: #fff;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.country-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--eh-shadow-hover);
}

.country-flag {
  font-size: 1.75rem;
  line-height: 1;
}

/* --- Blog Cards -------------------------------------------- */
.blog-card {
  border: var(--eh-border);
  border-radius: var(--eh-radius);
  transition: var(--eh-transition);
  overflow: hidden;
  background: #fff;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--eh-shadow-hover);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* --- Filters sidebar --------------------------------------- */
.filters-card {
  border: var(--eh-border);
  border-radius: var(--eh-radius);
  background: #fff;
  padding: 1.5rem;
  position: sticky;
  top: 80px;
}

/* --- Pagination -------------------------------------------- */
.pagination .page-link {
  border-radius: 8px;
  margin: 0 2px;
  border: var(--eh-border);
  color: inherit;
  font-size: 0.875rem;
}

.pagination .page-item.active .page-link {
  font-weight: 600;
}

/* --- Responsive adjustments -------------------------------- */
@media (max-width: 768px) {
  .eh-hero {
    padding: 3rem 0 2.5rem;
  }

  .section-heading {
    font-size: 1.4rem;
  }
}

.category-link {
  transition: border-color .15s ease, box-shadow .15s ease;
}
.category-link:hover {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 1px var(--bs-primary);
}

.breadcrumb-item + .breadcrumb-item::before{
    content: "›";
    color: var(--bs-secondary-color);
}