html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

/* === APP SHELL LAYOUT === */
/* Use flex column to push footer down */
body.app-shell-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Header (navbar): fixed at top */
.app-shell-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}

/* Main content area: takes remaining space */
.app-shell-content {
  flex: 1;
  margin-top: var(--navbar-height, 80px);
  width: 100%;
  padding: 0;
}

main {
  flex: 1 0 auto;
}

/* Footer: normal flow */
.app-shell-footer {
  position: relative;
  z-index: 1020;
  box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.04);
  padding-top: 1rem;
  padding-bottom: 0.75rem;
  margin-top: auto;
}

/* CSS Variables for Brand Colors and common tokens */
:root {
  --brand-reddit: #FF4500;
  --brand-instagram: #E1306C;
  --brand-linkedin: #0077B5;
  --brand-twitter: #000000;

  --bg-reddit-subtle: #fff0e5;
  --bg-instagram-subtle: #fceef5;
  --bg-linkedin-subtle: #e5f6ff;
  --bg-twitter-subtle: #f0f2f5;
}

/* --- Custom Feed Styles --- */

/* 1. Kaart Interacties */
.post-card,
.feed-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover,
.feed-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, .1) !important;
}

.cursor-pointer {
  cursor: pointer;
}

/* 2. Hero Sectie: 3D Telefoon Effect */
.hero-phone-mockup {
  transform: perspective(1000px) rotateY(-15deg) rotateX(5deg) rotateZ(-2deg);
  transition: transform 0.5s ease;
  box-shadow: -20px 20px 40px rgba(0, 0, 0, 0.2);
  border: 8px solid #212529;
  border-radius: 2rem;
  overflow: hidden;
  background: #fff;
}

.hero-phone-mockup:hover {
  transform: perspective(1000px) rotateY(-5deg) rotateX(0deg) rotateZ(0deg);
}

/* 3. Feed View Specifieke Stijlen */
.feed-image {
  max-height: 500px;
  object-fit: cover;
  width: 100%;
}

.feed-type-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Custom utility for stat badges */
.stat-badge {
  font-size: 0.875rem;
  color: #1a1a1a;
  background-color: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.stat-badge svg {
  width: 18px;
  height: 18px;
}

/* Card header & footer styling */
.card-header {
  border-radius: 8px 8px 0 0 !important;
}

.card-footer {
  border-radius: 0 0 8px 8px !important;
  border-top: 1px solid #e9ecef;
}

/* Card img top */
.card-img-top {
  object-fit: cover;
  background-color: #f5f5f5;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

/* Button styling in feed footer */
.card-footer .btn {
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.15s ease;
}

.card-footer .btn:disabled {
  cursor: default;
}

.card-footer .btn-light:hover:not(:disabled) {
  background-color: #e9ecef !important;
}

/* Badge styling */
.badge {
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
}

/* Form check styling */
.form-check-input {
  cursor: pointer;
}

/* Pagination styling */
.pagination {
  gap: 0.5rem;
}

.page-link {
  border-radius: 6px;
  border: 1px solid #dee2e6;
  transition: all 0.15s ease;
}

.page-link:hover:not(.disabled) {
  background-color: #f8f9fa;
  border-color: #0d6efd;
  color: #0d6efd;
}

/* Navbar sticky styling */
.navbar {
  transition: box-shadow 0.2s ease;
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1030;
}

.navbar.scrolled {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Hover effects */
.hover-underline:hover {
  text-decoration: underline;
}

.hover-opacity-100:hover {
  opacity: 1 !important;
}

.transition {
  transition: all 0.2s ease;
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* standard property for newer browsers */
  line-clamp: 2;
}

/* === HOMEPAGE GLASSMORPHISM STYLES === */

/* 1. MODERN NAVBAR STYLES */
.navbar-glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Active nav link styling */
.nav-link-custom.active {
  color: var(--bs-primary) !important;
  font-weight: 600;
}


.logo-gradient {
  background: linear-gradient(135deg, #0d6efd, #6610f2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link-custom {
  position: relative;
  font-weight: 500;
  color: var(--bs-body-color);
  transition: color 0.3s ease;
}

.nav-link-custom::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background: linear-gradient(90deg, rgba(59, 130, 246, 1), rgba(99, 102, 241, 1));
  transition: width 0.18s ease, transform 0.18s ease, opacity 0.12s ease;
  transform: translateX(-50%);
  border-radius: 2px;
  opacity: 0;
}

.nav-link-custom:hover {
  color: var(--bs-primary);
}

.nav-link-custom:hover::after {
  width: 100%;
  opacity: 1;
}

.nav-link-custom:focus::after {
  width: 100%;
  opacity: 1;
}

.btn-gradient {
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
  border: none;
  color: white;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
  color: white;
}

/* 2. Source Card Interactions */
.source-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.source-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, .1) !important;
  border-color: var(--bs-primary-border-subtle);
}

/* 3. Brand Colors (use CSS variables for maintainability) */
.text-reddit {
  color: var(--brand-reddit);
}

.text-instagram {
  color: var(--brand-instagram);
}

.text-linkedin {
  color: var(--brand-linkedin);
}

.text-twitter {
  color: var(--brand-twitter);
}

.bg-reddit-subtle {
  background-color: var(--bg-reddit-subtle);
}

.bg-instagram-subtle {
  background-color: var(--bg-instagram-subtle);
}

.bg-linkedin-subtle {
  background-color: var(--bg-linkedin-subtle);
}

.bg-twitter-subtle {
  background-color: var(--bg-twitter-subtle);
}

/* Dark Mode Aanpassingen */
[data-bs-theme="dark"] .bg-light {
  background-color: #1a1e22 !important;
}

[data-bs-theme="dark"] .card {
  background-color: #212529 !important;
  border-color: #343a40 !important;
}

[data-bs-theme="dark"] .bg-instagram-subtle {
  background-color: #330014;
}

[data-bs-theme="dark"] .text-twitter {
  color: #ffffff;
}

.card {
  border-radius: 12px;
  /* Afgeronde hoeken voor kaarten */
  transition: background-color 0.3s, border-color 0.3s;
}

/* Algemene styling voor alle knopgroepen */
/* Only apply border-radius to buttons NOT in btn-group (loose buttons) */
.filter-btn-group .btn:not(.btn-group .btn) {
  border-radius: 8px !important;
  font-weight: 500;
}

/* Visuele aanpassing voor Platform Badges om ze selecteerbaar te maken */
.platform-toggle {
  cursor: pointer;
  transition: transform 0.1s, opacity 0.1s;
}

.platform-toggle:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.badge-reddit {
  background-color: #FFECE6 !important;
  color: var(--brand-reddit) !important;
}

.btn-check:checked+.badge-reddit,
.badge-reddit.active {
  background-color: var(--brand-reddit) !important;
  color: white !important;
}

.badge-linkedin {
  background-color: #E6F1F8 !important;
  color: var(--brand-linkedin) !important;
}

.btn-check:checked+.badge-linkedin,
.badge-linkedin.active {
  background-color: var(--brand-linkedin) !important;
  color: white !important;
}

.badge-twitter {
  background-color: #E6E6E6 !important;
  color: var(--brand-twitter) !important;
}

.btn-check:checked+.badge-twitter,
.badge-twitter.active {
  background-color: var(--brand-twitter) !important;
  color: white !important;
}

/* Instagram badge */
.badge-instagram {
  background: #FCE6E9 !important;
  color: var(--brand-instagram) !important;
}

.btn-check:checked+.badge-instagram,
.badge-instagram.active {
  background: linear-gradient(135deg, var(--brand-instagram), #ff7aa9) !important;
  color: white !important;
}

/* TOP-SPACING VOOR STICKY ELEMENT */
.sticky-top-custom {
  /* Mobile / small screens: behave as normal block inside flow */
  position: sticky !important;
  top: 0;
  width: 100%;
  max-height: none;
  z-index: 99;
}

/* Desktop: sticky positioning will work correctly within the scrollable .app-shell-content */
@media (min-width: 992px) {

  /* Desktop: make the filter panel sticky in the viewport */
  .sticky-top-custom {
    position: sticky !important;
    top: calc(var(--navbar-height, 88px) + 1.5rem);
    z-index: 1020;
    /* Allow internal scrolling if the sidebar is taller than the viewport */
    max-height: calc(100vh - var(--navbar-height, 88px) - 2rem);
    overflow-y: auto;
  }
}

/* Dropdown knoppen in de filterbalk */
.filter-dropdown .dropdown-toggle {
  border-radius: 8px !important;
  font-weight: 500;
  width: 100%;
  /* Zorg dat de knop de volledige breedte inneemt */
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-dropdown .dropdown-toggle::after {
  margin-left: auto;
}

/* Accordion styling for filter panel */
.accordion-item {
  border: none;
  border-radius: 0;
  background-color: transparent;
}

.accordion-header .accordion-button {
  padding: 0.5rem 0;
  background-color: transparent;
  font-weight: 600;
  color: var(--bs-body-color);
  box-shadow: none;
}

.accordion-header .accordion-button {
  border-bottom: none;
}

.accordion-header .accordion-button:focus {
  box-shadow: none;
}

.accordion-body {
  padding: 1rem 0 0.5rem 0;
}

/* Switch label styling */
.form-check-label {
  font-weight: 500;
}

/* Progress bar styling (admin bulk operations) */
.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.875rem;
}