/* --- 1. Import Self-Hosted Inter Font --- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap; /* Ensures text is visible while font loads */
  src: local(''),
       url('../fonts/inter-v20-latin-regular.woff2') format('woff2'); /* Modern Browsers */
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: local(''),
       url('../fonts/inter-v20-latin-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: local(''),
       url('../fonts/inter-v20-latin-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local(''),
       url('../fonts/inter-v20-latin-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: local(''),
       url('../fonts/inter-v20-latin-800.woff2') format('woff2');
}


/* --- END FONT IMPORTS --- */

/* General layout */
body {
  background-color: #FFFFFF;
  font-family: 'Inter', system-ui, sans-serif; /* <-- UPDATED */
  font-weight: 400; /* <-- ADDED (sets Regular as default) */
  /* Add a transition for the background color */
  transition: background-color 0.2s ease, color 0.2s ease;
}

html {
  scroll-behavior: smooth;
  /* Add transitions for root element colors */
  transition: background-color 0.2s ease, color 0.2s ease;
}

p {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* --- NEW: Style for H3 headings --- */
h3 {
  font-weight: 800;
}

/* Global button font weight */
.btn {
  font-weight: 500;
}

/* Font styling */
.post-timestamp {
  font-size: 0.85rem;
  color: #888;
  margin-top: 1rem;
  margin-bottom: 0rem;
}

/* Icon styling */
.reply-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  margin-right: 0.2rem;
  border-radius: 0.75rem;
  background-color: transparent;
  transition: background-color 0.2s ease, fill 0.2s ease;
}

.reply-action:hover .reply-icon-wrapper {
  background-color: #93c5fd; /* Light blue */
}

.reply-action:hover .reply-icon {
  fill: #fff !important; /* White on hover */
}


/* Profile */
.profile-header .fa-camera,
.profile-header .fa-user-circle {
  opacity: 0.6;
}

.profile-header .bg-light {
  background-color: #f8f9fa;
  border: 1px dashed #ccc;
}

.profile-header {
  position: relative;
}

.profile-header .profile-image-wrapper {
  position: absolute;
  padding-left: 1rem;
  bottom: -50px;
  z-index: 2;
}

.profile-header a img.rounded-circle,
.profile-header .rounded-circle {
  position: relative;
  z-index: 2;
  border: 2px solid #e0e0e0; /* Light grey outline */
  background-color: #fff;
}

.post-title-avatar {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid #e0e0e0; /* Optional grey outline */
}

.clean-page .post-title {
  margin-top: 0;
}

.edit-profile-btn {
  background-color: #fff;
  color: #000;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.edit-profile-btn:hover {
  background-color: #f0f0f0;
  color: #000;
  border-color: rgba(0, 0, 0, 0.1);
}

.edit-profile-btn:active,
.edit-profile-btn:focus {
  background-color: #f0f0f0 !important;
  color: #000 !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  box-shadow: none;
}

.headerbuffer {
  padding: 40px 0 0 0;
}

.profile-divider {
  border-top: 1px solid #e6e6e6;

  margin-top: 1rem;
  margin-bottom: 1rem;
}


/* Feed wrapper */
.feed-centered {
  flex: 1 1 650px;
  max-width: 100%;
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
  background-color: #fff;
  border-left: 1px solid #e6e6e6;
  border-right: 1px solid #e6e6e6;
  padding-left: 0px;
  padding-right: 0px;
  min-height:100vh;
}

/* Posts stacked with dividing lines */
.feed-centered .card {
  border: none;
  border-radius: 0;
  box-shadow: none;
  position: relative;
  margin: 0;
  border-bottom: 1px solid #e6e6e6;
}

.feed-centered .card:hover {
  background-color: #f5f8fa;
  transition: background-color 0.2s ease;
}

.feed-centered .card-body {
  padding: 0.75rem 1rem;
}

.clean-page .card:hover {
  background-color: transparent;
  color: inherit;
  text-decoration: none;
}


/* New post */
.new-post-button {
  position: fixed;
  bottom: 10px;
  right: 20px;
  background-color: #0d6efd;
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 20px;
  text-decoration: none; /* ✅ Remove underline */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: background-color 0.2s ease;
}

.new-post-button:hover {
  background-color: #0b5ed7;
  color: #fff;
  text-decoration: none; /* ✅ Also on hover */
}

.scroll-top-button {
  position: fixed;
  bottom: 10px; /* above nav bar or new post button */
  left: 20px;
  z-index: 1020;
  background-color: #f8f9fa;
  color: #333;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.scroll-top-button.visible {
  opacity: 1;
  pointer-events: auto;
}

/* --- Sticky Action Bar (Diensten, Over Ons) --- */

/* By default, hide the action menu on desktop screens */
.actions-sticky {
    display: none;
}

/* On mobile screens (<= 1024px), display it as a fixed bar */
@media (max-width: 1024px) {
    .actions-sticky {
        display: block;
        position: fixed;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        /* Assuming the central column has this max-width */
        max-width: 648px;
        z-index: 1000;

        box-sizing: border-box;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border-top: 1px solid #dee2e6;
        padding: 1rem 1.25rem;
        /* Add safe area padding for phones with a home bar (e.g., iPhone) */
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }
}

/* New reply on post */
.new-reply-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #0d6efd;
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: background-color 0.2s ease;
  text-decoration: none;
}

.new-reply-button:hover {
  background-color: #0b5ed7;
  color: #fff;
}

.add-reply {
  padding: 1rem;
	padding-bottom: 3rem;
	padding-left: 1.6rem;
  border-bottom: 1px solid #e6e6e6;
}

/* --- Advanced Post Image Grid (Final Version) --- */

/* The main container for all image grid layouts */
.post-images {
  display: grid;
  gap: 2px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  background-color: transparent;
}

/* --- Child Element Styling (Applies to all grids) --- */
/* For multi-image grids, the link MUST fill the grid cell */
.post-images.double > a,
.post-images.triple > a,
.post-images.quad > a {
  display: block;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

/* For single images, the link should shrink to fit the image inside it */
.post-images.single {
  /* Make the container only as wide as the image inside it */
  width: fit-content;
  max-width: 100%; /* Safety measure to prevent overflow */

  /* Reset grid properties and keep max height */
  display: block;
  max-height: 512px;
  background-color: transparent;
  border-radius: 0;
  gap: 0;
}


.post-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* --- 1. Single Image Layout (New Proportional Style) --- */
.post-images.single {
  display: flex;         /* Use flexbox to center the image */
  justify-content: center; /* Center horizontally */
  max-height: 512px;     /* Set a max height for the area */
  aspect-ratio: auto;
}

.post-images.single img {
  /* Override the general styles for grid images */
  width: auto;           /* Let width be determined by aspect ratio */
  height: auto;          /* Let height be determined by aspect ratio */
  max-width: 100%;       /* Don't allow image to be wider than the card */
  max-height: 512px;     /* Ensure image respects the container's max height */
  object-fit: contain;   /* This makes the whole image visible without cropping */
  border-radius: 12px;
}

/* --- 2. Two-Image Layout --- */
.post-images.double {
  grid-template-columns: repeat(2, 1fr);
}

/* --- 3. Three-Image Layout (1 tall on left, 2 stacked on right) --- */
.post-images.triple {
  grid-template-columns: 1fr 1fr; /* Two equal-width columns */
  grid-template-rows: repeat(2, 1fr);    /* Two equal-height rows */
  grid-template-areas:
    "main right-top"
    "main right-bottom";
}

/* Assign the first image to the 'main' area (left column, spanning both rows) */
.post-images.triple > a:nth-child(1) {
  grid-area: main;
}

/* Assign the second image to the top-right area */
.post-images.triple > a:nth-child(2) {
  grid-area: right-top;
}

/* Assign the third image to the bottom-right area */
.post-images.triple > a:nth-child(3) {
  grid-area: right-bottom;
}

/* --- 4. Four-Image Layout (FIXED) --- */
.post-images.quad {
  /* This creates two equal-width columns */
  grid-template-columns: repeat(2, 1fr);
  /* This explicitly makes each row take up 50% of the container's height */
  grid-template-rows: 50% 50%;
}

/* --- Container style for multi-image grids --- */
.post-images.double,
.post-images.triple,
.post-images.quad {
  aspect-ratio: 16 / 10; /* Use a standard 16:9 widescreen ratio */
}

.post-back-link {
  padding: 1rem 1rem 0.75rem 1rem; /* ← Add horizontal padding */
  border-bottom: 1px solid #e6e6e6;
  display: flex;
  align-items: center;
  color: #333;
  font-weight: 500;
}


.post-back-link:hover {
  color: #0d6efd;
  text-decoration: none;
}

.post-back-link i {
  font-size: 1rem;
}

/* Sticky blurred header wrapper for post page */
.sticky-header-wrapper {
  position: sticky;
  top: 0;
  height: 60px;
  z-index: 100;
  margin-bottom: 0;
  padding: 1rem 1rem 0.75rem 1rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Light mode background - white with higher opacity for more color */
.sticky-header-wrapper {
  background-color: rgba(255, 255, 255, 0.80) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
}

/* Dark mode background - darker black with higher opacity for more color */
html.dark-mode .sticky-header-wrapper {
  background-color: rgba(0, 0, 0, 0.80) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* Dark mode text color for back link */
html.dark-mode .post-back-link {
  color: #f8f9fa;
}


.plus-post {
  padding: 1rem 1rem 0.75rem 0rem; /* ← Add horizontal padding */
  display: flex;
  align-items: center;
  color: #333;
  font-weight: 500;
  margin-bottom: 1rem;
  margin-left: 0
}

.plus-post i {
  font-size: 1rem;
}


.reply-card {
  border-left: 4px solid #0d6efd; /* Bootstrap primary */
  margin-left: 0.25rem;
  margin-right: 0.25rem;
  padding-left: 0.5rem;
  margin-bottom: 0rem;
  margin-top: 0rem;
}



.replies-section {
  padding-top: 1.25rem;
  padding-left: 1rem;
  padding-bottom: 1.25rem;
}

/* Before */

.threaded-reply {
  position: relative;
  margin-left: 24px; /* indent */
  padding-left: 16px;
}

.threaded-reply:first-child {
  margin-top: 0px;
}

.threaded-reply::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10px;
  width: 1px;
  height: 100%;
  background-color: #d3d3d3;
}

.threaded-reply .mb-3 {
  margin-bottom: 0rem !important;
}


/* --- Before/After Slider Update --- */

/* --- Before/After Slider Styles (Complete) --- */
.before-after-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  border-radius: 12px;
  line-height: 0;
  display: block;
  cursor: pointer;
  /* The height will be set by JavaScript */
}

.before-container,
.after-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; 
}

/* Base layer on the bottom */
.before-container {
  z-index: 1;
}

/* Top layer that gets clipped by the JavaScript */
.after-container {
  z-index: 2;
}

/* Image styles within their containers */
.before-after-slider .before,
.before-after-slider .after {
  position: static;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

/* Scroller handle styles */
.before-after-slider .scroller {
  position: absolute;
  top: 0;
  height: 100%;
  width: 4px;
  background: white;
  cursor: ew-resize;
  z-index: 5;
  transform: translateX(-50%);
  transition: background 0.3s ease;
  left: 50%; /* Initial position */
}

.before-after-slider .scroller:hover {
  background: #ccc;
}

.before-after-slider .scroller::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px rgba(0,0,0,0.2);
}

/* Label styles */
.label {
  position: absolute;
  top: 12px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: bold;
  color: white;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 6px;
  z-index: 3; /* Must be higher than their container's z-index */
  pointer-events: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
  white-space: nowrap;
}

.label-before { left: 12px; }
.label-after { right: 12px; }



/* Mobile adjustments */
@media (max-width: 768px) {
.feed-centered {
padding: 0;
border-left: none;
border-right: none;
}

.feed-centered .card {
border-radius: 0;
margin: 0;
border-left: none;
border-right: none;
}

.feed-centered .card-body {
padding: 0.75rem 1rem;
}
}

/* Nav styling */
.nav-link {
padding: 0.5rem 1rem;
color: #333;
}

.nav-link i {
margin-right: 0.5rem;
}

.layout-container {
display: flex;
justify-content: center;
align-items: flex-start;
gap: 24px; /* Controls horizontal spacing between columns */
margin-top: 0rem;
}

/* Left and Right menu */
.left-menu,
.right-menu {
flex: 0 0 280px;
max-width: 280px;
height: 100vh;
position: sticky;
top: 0;
overflow-y: auto;
padding: 1rem 0;
background-color: #fff; /* Optional: white background behind sticky elements */
}

/* Hug edges */
.left-menu {
  text-align: left;         /* Align menu text to the left */
}

.left-menu .nav-link {
  text-decoration: none;
  padding: 0;
  text-align: left; /* <-- Changed back to left */
  font-weight: 500; /* <-- UPDATED */
  margin-bottom: 0.75rem; /* space between items */

}

.right-menu {
text-align: left;
}

.right-menu .card {
margin-bottom: 0.75rem;
}

.right-menu .card-title {
font-weight: 600; /* <-- UPDATED */
margin-bottom: 0.5rem;
}

.right-menu .nav-link {
text-decoration: none;
padding-left: 0;
color: #333;
font-weight: 500; /* <-- ADDED */
}

/* Hover for clickable right-menu items (email/phone links) */
.right-menu a.nav-link:hover,
.right-menu a.nav-link:focus {
  color: #0d6efd;
  background: transparent;
  text-decoration: none;
}


/* Static contact info rows in right menu (no hover, align with nav-link) */
.right-menu .nav-link.contact-info-static {
  cursor: default;
}

.right-menu .nav-link.contact-info-static:hover,
.right-menu .nav-link.contact-info-static:focus {
  color: #333 !important;
  background: transparent !important;
  text-decoration: none !important;
}


.right-menu .nav-link i {
margin-right: 0.5rem;
}

/* Right menu footer - Powered by Bouwdomein (fixed at bottom of right column) */
.right-menu-footer {
  position: fixed;
  bottom: 0;
  width: 280px;
  padding: 1.5rem 1rem;
  background-color: #fff;
  z-index: 10;
}

.powered-by-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #6c757d;
  font-size: 0.813rem;
  transition: opacity 0.2s;
}

.powered-by-link:hover {
  opacity: 0.7;
  color: #6c757d;
  text-decoration: none;
}

.powered-by-logo {
  height: 20px;
  width: auto;
}

.powered-by-text {
  line-height: 1.2;
}

/* Feed centered */
.feed-centered {
flex: 0 0 650px;
margin: 0;
}

/* Responsive: hide side menus */
/* Phones + tablet portrait: hide both side menus */
@media (max-width: 1024px) {
  .left-menu,
  .right-menu {
    display: none;
  }
}

/* Tablet landscape (e.g., iPad 10th gen ≈1180, iPad Air ≈1194, iPad Pro ≈1366):
   hide both side menus on touch devices */
@media (min-width: 1025px) and (max-width: 1366px)
       and (orientation: landscape)
       and (hover: none) and (pointer: coarse) {
  .left-menu,
  .right-menu {
    display: none !important; /* ensure it overrides earlier display:block */
  }
}

@media (min-width: 1025px) and (max-width: 1366px)
       and (orientation: landscape)
       and (hover: none) and (pointer: coarse) {
    .mobile-nav { display: block !important; }
  .mobile-top-bar { display: flex !important; }
}

@media (min-width: 1025px) and (pointer: fine) {
  .mobile-nav,
  .mobile-top-bar {
    display: none !important;
  }

  body {
    padding-top: 0 !important; /* Removes the space left by the hidden bar */
  }
}

.stretched-link {
position: relative;
z-index: 2;
}

.card-body {
position: relative;
}



.stretched-link {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 2;
}



/* Block the stretched link ONLY for interactive areas */
.card .post-images,
.card .before-after-slider,
.card .btn,
.card form,
.card-body p a { /* <-- ADDED THIS SELECTOR */
position: relative;
z-index: 3;
pointer-events: auto;
}


/* post actions */
.post-actions {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
align-items: center;
gap: 0.5rem;
font-size: 0.9rem;
padding: 1rem 0rem 0rem 0rem;
}

.post-actions > div {
display: flex;
align-items: center;
justify-content: center;
position: relative;
z-index: 3;
}

.post-actions i {
padding: 0.75rem;
border-radius: 12px;
color: #666;
cursor: pointer;
transition: color 0.1s ease;
}

.post-actions i:hover {
background-color: #7eacf2;
color: #fff;
}

.post-actions .like-count,
.post-actions .reply-count {
  color: #6c757d;
  font-size: 0.9rem; /* Match the post-actions font-size */
  user-select: none; /* Optional: prevents selecting the number */
}


.more-menu-wrapper {
position: relative;
}

.more-menu {
position: absolute;
bottom: 75%; /* shows above */
right: 0;
background: white;
border: 1px solid #ccc;
border-radius: 6px;
z-index: 1060;
min-width: 250px;
padding: 0.25rem 0;
}

.more-menu .menu-item {
display: block;
padding: 0.5rem 1rem;
font-size: 0.9rem;
color: #333;
text-decoration: none;
font-weight: 500; /* <-- ADDED */
}

.more-menu .menu-item:hover {
background-color: #f2f2f2;
}

.more-menu .menu-item i {
width: 2.25rem;
text-align: center;
}

input[type="checkbox"]:checked + img {
opacity: 0.3;
filter: grayscale(100%);
}

.preview-thumb {
height: 80px;
border-radius: 6px;
object-fit: cover;
border: 1px solid #ddd;
}

.thumb-container {
position: relative;
}

.thumb-container .btn-outline-danger {
font-size: 18px;
line-height: 1;
position: absolute;
top: 0px;
right: 0px;
background: #dc3545;
color: white;
border: none;
border-radius: 50%;
width: 20px;
height: 20px;
font-size: 12px;
line-height: 18px;
text-align: center;
cursor: pointer;
}

/* --- Help Modal Alignment Fix --- */
#helpModal .modal-body p {
  margin-top: 0;
}

/* --- Pinned Post Styles --- */


/* Style for the fat border on the home feed */
#feed .card.pinned-post {
  border: 1px solid #0d6efd !important;
    margin: 0.5rem;
    border-radius: 10px;
	margin-top: 1.5rem;
}

/* Style for the pin icon itself (used on home.php and post.php) + Wrapper to create a large, clickable area for the pin icon */
.pin-icon-wrapper {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 11; /* Ensure it's on top of the card's stretched-link */
  padding: 15px; /* Creates a large, invisible touch target */
  border-radius: 50%; /* Makes the clickable area circular */
}

/* The visual icon itself, now positioned by its wrapper */
.pin-icon {
  color: #0d6efd;
  font-size: 1.2rem;
  cursor: pointer;
}
/* --- Custom Toast Styling --- */
#postToast {
  /* Mobile-first: Make the toast wide on small screens */
  width: 90vw; /* Use 90% of the viewport width */
  max-width: 320px; /* But don't let it get excessively wide */
  min-width: 0;
}

/* On screens 576px and wider (tablets/desktops), revert to shrink-to-fit */
@media (min-width: 576px) {
  #postToast {
    width: auto;
    max-width: none;
  }
}

/* --- Slider Dragging Helper --- */
/* Prevent text selection highlight on the page while dragging the slider */
body.slider-is-active {
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* IE10+/Edge */
  user-select: none;         /* Standard */
}


/* --- Horizontally Scrollable Image Preview Area --- */
#imagesPreview {
  /* This enables horizontal scrolling only when the content overflows */
  overflow-x: auto;
  
  /* This ensures the flex items stay in a single line and don't wrap */
  flex-wrap: nowrap; 
}

/* Optional: Add subtle scrollbar styling for a cleaner look on webkit browsers */
#imagesPreview::-webkit-scrollbar {
  height: 8px;
}

#imagesPreview::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 4px;
}

/* --- Services Page Styles (Enhanced) --- */

.page-header {
  padding: 1rem 1rem 0.75rem 1rem;
  border-bottom: 1px solid #e6e6e6;
}

.page-header h4 {
  font-weight: 600; /* <-- ADDED */
}

.services-submenu-wrapper {
  position: relative; /* Crucial for positioning the buttons */
  border-bottom: 1px solid #e6e6e6;
}

.services-submenu {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 0.5rem 1rem;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  cursor: grab;
  scrollbar-width: none; /* For Firefox */
  -ms-overflow-style: none;  /* For IE */
}
.services-submenu::-webkit-scrollbar {
  display: none; /* For Chrome, Safari, Opera */
}

.services-submenu .submenu-item {
  padding: 0.5rem 0.75rem;
  margin-right: 0.5rem;
  text-decoration: none;
  color: #6c757d;
  font-weight: 500;
  border-radius: 6px;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.services-submenu .submenu-item:hover {
  background-color: #f8f9fa;
  color: #212529;
}

.services-submenu .submenu-item.active {
  color: #0d6efd;
  background-color: #e7f1ff;
  font-weight: 600; /* <-- ADDED */
}

/* Styles for the chevron scroll buttons */
.submenu-scroll-btn {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50px;
  border: none;
  color: #333;
  font-size: 0.9rem;
  z-index: 10;
  cursor: pointer;
  display: none; 
  transition: opacity 0.2s ease;
  background: linear-gradient(to left, white 70%, rgba(255,255,255,0));
}

.submenu-scroll-btn.left {
  left: 0;
  background: linear-gradient(to right, white 70%, rgba(255,255,255,0));
}

.submenu-scroll-btn.right {
  right: 0;
}

.submenu-scroll-btn.visible {
  display: flex;
  align-items: center;
  justify-content: center;
}

.submenu-scroll-btn:hover {
  opacity: 0.7;
}

/* Class added via JS while dragging */
.services-submenu.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

/* --- FIX: Restored Header Image Styles --- */
.service-header-image {
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  margin-bottom: 1rem; /* Added margin for spacing */
}

.service-header-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-content .content-body {
  line-height: 1.7;
	padding-bottom: 3rem;
}

.service-actions {
  padding-bottom: 2rem;
}

/* --- Mobile Navigation Styles --- */

/* This ensures the main content doesn't get hidden behind the fixed top bar */
body {
  padding-top: 60px; /* Default padding for pages WITH the mobile header */
}

/* If a page has no mobile header, remove the padding */
body.no-mobile-header {
  padding-top: 0;
}

/* On desktop, there's never any padding needed */
@media (min-width: 992px) {
  body {
    padding-top: 0;
  }
}

.mobile-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.80) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1030;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  transition: transform 0.3s ease-in-out;
}

/* Class to hide the bar on scroll down */
.mobile-top-bar.hidden {
  transform: translateY(-100%);
}

/* Update top bar to space out items */
.mobile-top-bar {
  justify-content: space-between;
}

/* Styles for the logo and its wrappers */
.top-bar-logo-link {
  height: 100%;
  display: flex;
  align-items: center;
}
.top-bar-logo {
  height: 30px; /* Adjust this value to make the logo bigger or smaller */
  width: auto;
}

/* Make the invisible spacer the same width as the hamburger button */
.top-bar-spacer {
  width: 40px; /* Adjust if your hamburger button size changes */
}

.hamburger-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #333;
}

.top-bar-title {
  font-weight: 600;
  margin-left: 1rem;
}

/* The slide-out panel */
.mobile-menu-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background-color: #f8f9fa;
  z-index: 1040;
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  overflow-y: auto;
  border-right: 1px solid #e6e6e6;
}

.mobile-menu-panel.open {
  transform: translateX(0);
}

/* The overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1035;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}

.mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Prevent body scroll when menu is open */
body.mobile-menu-active {
  overflow: hidden;
}

/* Mobile menu inner wrapper - creates elastic space */
.mobile-menu-inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* Mobile menu footer - Powered by Bouwdomein (no background) */
.mobile-menu-footer {
  padding: 1rem;
  margin-top: auto;
}

/* Hide mobile footer on desktop - only show in mobile menu */
@media (min-width: 992px) {
  .mobile-menu-footer {
    display: none;
  }
}


/* Thumbnail Previews Styling */
.thumb-wrapper {
  position: relative;
  display: inline-block;
}

.preview-thumb {
  height: 100px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #ddd;
}

.remove-image-btn {
  position: absolute;
  top: 0px;
  right: 0px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 0.25rem;
  width: 26px;
  height: 31px;
  font-size: 14px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  padding-block: 1px;
  padding-inline: 6px;
}

pre {
  font-family: inherit;  /* Inherits the font style */
  font-size: inherit;    /* Inherits the font size */
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
}

/* Make embedded iframes (like YouTube videos) responsive */
.content-body iframe {
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9; /* Maintains a 16:9 widescreen ratio */
    border-radius: 0.5rem; /* Optional: adds rounded corners to match your site's style */
}

.service-content .content-body {
  line-height: 1.5; /* Match typical post line-height */
  font-size: 1rem;  /* Optional: match font-size as well */
}


/* --- NEW: IOS-STYLE THEME TOGGLE --- */
.theme-switch-wrapper {
  padding: 0.5rem 1rem; /* Match nav-link padding */
  cursor: pointer;
}

.theme-switch-wrapper .theme-switch {
  position: relative;
  display: inline-block;
  width: 50px; /* Width of the switch */
  height: 28px; /* Height of the switch */
}

.theme-switch-wrapper .theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-switch-wrapper .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 28px; /* Makes it pill-shaped */
}

.theme-switch-wrapper .slider:before {
  position: absolute;
  content: "";
  height: 20px; /* Size of the inner circle */
  width: 20px;  /* Size of the inner circle */
  left: 4px;    /* Padding from the left */
  bottom: 4px;  /* Padding from the bottom */
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.theme-switch-wrapper input:checked + .slider {
  background-color: #0d6efd; /* Blue when active */
}

.theme-switch-wrapper input:checked + .slider:before {
  transform: translateX(22px); /* Moves the circle to the right */
}
/* --- END: IOS-STYLE THEME TOGGLE --- */

/* --- GOOGLE PREVIEW STYLES --- */
.google-preview-box {
    background-color: #ffffff;
    border: 1px solid #dfe1e5;
    border-radius: 8px;
    padding: 16px;
    font-family: Arial, sans-serif;
}

.google-preview-header {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.google-preview-favicon {
    width: 28px;
    height: 28px;
    margin-right: 8px;
}

.google-preview-url-group {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.google-preview-domain {
    font-size: 14px;
    color: #202124;
}

.google-preview-breadcrumb {
    font-size: 12px;
    color: #4d5156;
}

.google-preview-title {
    font-size: 20px;
    font-weight: 500; /* <-- UPDATED */
    color: #1a0dab;
    text-decoration: none;
    margin: 0;
    line-height: 1.3;
}

.google-preview-desc {
    font-size: 14px;
    color: #4d5156;
    line-height: 1.57;
    margin-top: 4px;
    margin-bottom: 0;
    /* Truncate to 2 lines */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
/* --- END GOOGLE PREVIEW STYLES --- */

/* --- Statistics Page Tabs --- */
.nav-tabs .nav-link {
  font-weight: 500; /* <-- ADDED */
}


/* ==========================================================================
   RICH TEXT CONTENT (Quill)
   Shared styling for editor output and public pages
   ========================================================================== */
.ql-toolbar.ql-snow {
  position: relative;
  z-index: 10;
}

.ql-snow .ql-picker-options {
  z-index: 20;
}

/* Service formatted content styling */
    .service-formatted-content {
    line-height: 1;
    }
    .service-formatted-content h2 {
        font-size: 1.5rem;
        font-weight: 600;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
        color: #212529;
    }
    .service-formatted-content h3 {
        font-size: 1.25rem;
        font-weight: 600;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
        color: #212529;
    }
    .service-formatted-content p {
    margin: 0 0 0 0;
}
	.service-formatted-content p:last-child {
    margin-bottom: 0;
}
	.service-formatted-content p:has(br:only-child) {
    margin-bottom: 0.25rem;
}
    .service-formatted-content ul, 
    .service-formatted-content ol {
        margin-bottom: 0.1rem;
        padding-left: 1.5rem;
    }
    .service-formatted-content li {
        margin-bottom: 0.1rem;
    }
    .service-formatted-content strong {
        font-weight: 600;
    }
    .service-formatted-content em {
        font-style: italic;
    }
    .service-formatted-content u {
        text-decoration: underline;
    }
    .service-formatted-content .ql-align-center {
        text-align: center;
    }
    .service-formatted-content .ql-align-right {
        text-align: right;
    }
    .service-formatted-content .ql-align-left {
        text-align: left;
    }

/* ==========================================================================
    DARK MODE STYLES 
    (Place this entire block at the very end of the CSS file)
==========================================================================
*/
html.dark-mode {
    color-scheme: dark;
}

.dark-mode body {
  background-color: #000000;
  color: #fff;
}

/* Main layout containers */
.dark-mode .feed-centered {
  background-color: #000000;
  border-left-color: #2f3336;
  border-right-color: #2f3336;
}

.dark-mode .left-menu,
.dark-mode .right-menu {
  background-color: #000000;
}

/* Cards (posts, settings, etc.) */
.dark-mode .card {
  background-color: #000000;
  border-bottom-color: #2f3336;
  color: #fff;
}

.dark-mode .feed-centered .card:hover {
  background-color: #080808; /* Slightly lighter black */
}

.dark-mode .clean-page .card:hover {
  background-color: transparent;
}

/* Text and Links */
.dark-mode .post-back-link,
.dark-mode .nav-link,
.dark-mode a.text-dark {
  color: #fff !important;
}

.dark-mode .post-back-link:hover,
.dark-mode .nav-link:hover {
  color: #0d6efd !important;
}

/* Right menu static contact info should NOT show link hover color */
.dark-mode .right-menu .nav-link.contact-info-static:hover,
.dark-mode .right-menu .nav-link.contact-info-static:focus {
  color: #fff !important;
  background: transparent !important;
}

/* Dark mode - Powered by Bouwdomein footer */
.dark-mode .right-menu-footer {
  border-top-color: #2f3336;
  background-color: #000000;
}

.dark-mode .powered-by-link {
  color: #888;
}

.dark-mode .powered-by-link:hover {
  color: #888;
}


.dark-mode .text-muted {
  color: #888 !important;
}

.dark-mode pre {
  color: #fff;
}

/* Borders and Dividers */
.dark-mode .profile-divider,
.dark-mode .post-back-link,
.dark-mode .add-reply,
.dark-mode .page-header,
.dark-mode .services-submenu-wrapper {
  border-bottom-color: #2f3336;
  background-color: #000000; /* Added for sticky headers */
}

/* Mobile Nav */
.dark-mode .mobile-top-bar {
  background-color: rgba(0, 0, 0, 0.80) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.dark-mode .hamburger-btn {
  color: #fff;
}

.dark-mode .mobile-menu-panel {
  background-color: #121212;
  border-right-color: #2f3336;
}

/* Post Form */
.dark-mode .form-control,
.dark-mode .form-control:focus,
.dark-mode .form-select,
.dark-mode .form-select:focus {
  background-color: #1a1a1a;
  color: #fff;
  border-color: #2f3336;
}

.dark-mode .form-control::placeholder {
  color: #888;
}

/* Fix for readonly form controls in dark mode */
.dark-mode .form-control[readonly] {
  background-color: #2a2a2a;
  color: #fff;
  opacity: 1;
}

/* Added for profile.php sticky footer */
.dark-mode .form-actions-sticky {
  background-color: rgba(26, 26, 26, 0.95); /* dark, slightly transparent */
  border-top-color: #2f3336;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
	border-left: 1px solid #2f3336;
	border-right: 1px solid #2f3336;
}

/* Added for dienst.php sticky footer */
.dark-mode .actions-sticky {
  background-color: rgba(26, 26, 26, 0.95);
  border-top-color: #2f3336;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
	border-left: 1px solid #2f3336;
	border-right: 1px solid #2f3336;
}

/* Services Menu */
.dark-mode .services-submenu .submenu-item {
  color: #888;
}

.dark-mode .services-submenu .submenu-item:hover {
  background-color: #1a1a1a;
  color: #fff;
}

.dark-mode .services-submenu .submenu-item.active {
  color: #0d6efd;
  background-color: #0a284e; /* Darker blue */
}

/* Scroll buttons for services */
.dark-mode .submenu-scroll-btn {
  color: #fff;
  background: linear-gradient(to left, #000000 70%, rgba(0,0,0,0));
}

.dark-mode .submenu-scroll-btn.left {
  background: linear-gradient(to right, #000000 70%, rgba(0,0,0,0));
}

/* Icons */
.dark-mode .reply-icon {
  fill: #888; /* Added base color for reply SVG */
}

.dark-mode .reply-action:hover .reply-icon-wrapper {
  background-color: #0a284e;
}

.dark-mode .post-actions i {
  color: #888;
}
.dark-mode .post-actions i:hover {
  background-color: #0a284e;
  color: #fff;
}

.dark-mode .post-actions .like-count,
.dark-mode .post-actions .reply-count {
  color: #888; /* Match the dark-mode icon color */
}

.dark-mode .svg-upload-wrapper svg path {
  fill: #fff;
}

/* Added for profile.php img icons */
.dark-mode .svg-upload-wrapper img {
  filter: invert(1) brightness(0.8);
}

/* More Menu Dropdown */
.dark-mode .more-menu {
  background-color: #1a1a1a;
  border-color: #2f3336;
}

.dark-mode .more-menu .menu-item {
  color: #fff;
}

.dark-mode .more-menu .menu-item:hover {
  background-color: #2a2a2a;
}

/* --- Modal Styles --- */
.dark-mode .modal-content {
  background-color: #1a1a1a;
  color: #fff;
  border: 1px solid #2f3336;
}

.dark-mode .modal-header {
  border-bottom-color: #2f3336;
}

.dark-mode .modal-footer {
  border-top-color: #2f3336;
}

/* This styles the 'X' close button to be white */
.dark-mode .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* --- Help Modal SVG Icons --- */
.dark-mode #helpModal img {
    filter: invert(1);
}

/* --- Google Preview Dark Mode Override (Force Light) --- */
.dark-mode .google-preview-box {
    background-color: #ffffff;
    border: 1px solid #dfe1e5;
}

.dark-mode .google-preview-domain {
    color: #202124;
}

.dark-mode .google-preview-breadcrumb,
.dark-mode .google-preview-desc {
    color: #4d5156;
}

.dark-mode .google-preview-title {
    color: #1a0dab;
}

/* --- Fix for dark-on-dark button (e.g., X icon) --- */
.dark-mode .btn-outline-dark {
  color: #888; /* Uses your existing dark mode muted color */
  border-color: #888;
}
.dark-mode .btn-outline-dark:hover {
  color: #000; /* Black text on hover */
  background-color: #888; /* Muted color background */
}

/* --- Mobile Contact Buttons (Light/Dark Mode Compatible) --- */
/* Light mode: same style as btn-outline-dark */
.btn-contact {
  color: #212529;
  border-color: #212529;
  background-color: transparent;
}
.btn-contact:hover {
  color: #fff;
  background-color: #212529;
  border-color: #212529;
}

/* Dark mode: white outline */
.dark-mode .btn-contact {
  color: #fff;
  border-color: #fff;
  background-color: transparent;
}
.dark-mode .btn-contact:hover {
  color: #000;
  background-color: #fff;
  border-color: #fff;
}

/* --- Home Actions Submenu Buttons (Side-Scroller) --- */
#home-actions-submenu {
  display: flex;
  gap: 0.5rem;
  padding-left: 0 !important; /* Remove left padding to align first button */
  padding-bottom: 0 !important; /* Remove bottom padding to eliminate line */
}

#home-actions-submenu .btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.375rem 0.75rem;
}

#home-actions-submenu .btn i {
  margin-right: 0.25rem;
}

/* Disable hover effects for home actions menu buttons (prevents hover during swipe) */
#home-actions-submenu .btn:hover {
  background-color: inherit !important;
  border-color: inherit !important;
  color: inherit !important;
  transform: none !important;
}

/* Hide left scroll arrow for home actions menu */
.services-submenu-wrapper:has(#home-actions-submenu) #scroll-left-btn {
  display: none !important;
}

/* Remove border-bottom for home actions wrapper */
.services-submenu-wrapper:has(#home-actions-submenu) {
  border-bottom: none;
}

/* --- KvK Info Section (Mobile Home Page) --- */
.kvk-info-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #666;
}

.kvk-info-item {
  display: flex;
  align-items: center;
}

.kvk-info-item i {
  color: #888;
  width: 20px;
}

.dark-mode .kvk-info-section {
  color: #aaa;
}

.dark-mode .kvk-info-item i {
  color: #888;
}

/* --- NEW: Statistics Page Fix --- */
.dark-mode .list-group-item {
  background-color: transparent; /* Use the card's bg */
  border-color: #2f3336; /* Match other borders */
}

.dark-mode .nav-tabs {
  border-bottom-color: #2f3336;
}

.dark-mode .nav-tabs .nav-link {
  color: #888; /* Muted for inactive */
  border-color: transparent;
}

.dark-mode .nav-tabs .nav-link:hover {
  color: #fff;
  border-color: #2f3336 #2f3336 transparent; /* Keep bottom border transparent */
}

.dark-mode .nav-tabs .nav-link.active {
  color: #0d6efd; /* Keep Bootstrap blue */
  background-color: transparent;
  border-color: #2f3336 #2f3336 #000; /* Active tab "sits" on top */
}
/* --- END: Statistics Page Fix --- */

/* --- Statistics Page Table Fix --- */
.dark-mode .table {
  color: #fff; /* Main text color */
  border-color: #2f3336; /* Match other borders */
}

.dark-mode .table > :not(caption) > * > * {
  /* This targets all TH, TD, TR */
  background-color: transparent; /* Use the card's bg */
  color: inherit; /* Inherit the #fff from .table */
  border-bottom-width: 1px;
}

.dark-mode .table-striped > tbody > tr:nth-of-type(odd) > * {
  /* This creates the striped effect */
  background-color: #080808; /* Slightly lighter black, matching card hover */
  color: inherit;
}

.dark-mode .table > thead > tr > th {
  /* Header specific */
  color: #fff;
}

.dark-mode .table > tfoot > tr > td {
  /* Footer specific */
  color: #fff;
}

/* --- Quill Editor Dark Mode Fix (Snow Theme) --- */

html.dark-mode .service-formatted-content h2,
html.dark-mode .service-formatted-content h3 {
    color: #ffffff;
}

/* --- Quill Editor Container (Dark Mode Override) --- */
html.dark-mode #editor {
    background: #000000;
    border: 1px solid #333333;
}

html.dark-mode .ql-toolbar.ql-snow {
  background-color: #000000;
  border-color: #2f3336;
}

html.dark-mode .ql-toolbar.ql-snow .ql-picker-label,
html.dark-mode .ql-toolbar.ql-snow .ql-picker-item,
html.dark-mode .ql-toolbar.ql-snow button {
  color: #fff;
}

html.dark-mode .ql-toolbar.ql-snow .ql-stroke {
  stroke: #fff;
}

html.dark-mode .ql-toolbar.ql-snow .ql-fill {
  fill: #fff;
}

html.dark-mode .ql-container.ql-snow {
  background-color: #000000;
  border-color: #2f3336;
}

html.dark-mode .ql-editor {
  color: #fff;              /* Fix white-on-white or inherited mismatch */
  background-color: #000000; /* Fix Snow default white background */
}

html.dark-mode .ql-editor a {
  color: #0d6efd; /* Keep links readable */
}

/* Placeholder text in an empty editor */
html.dark-mode .ql-editor.ql-blank::before {
  color: #888;
}

/* Dropdowns (header picker, align picker, etc.) */
html.dark-mode .ql-snow .ql-picker-options {
  background-color: #1a1a1a;
  border-color: #2f3336;
}

html.dark-mode .ql-snow .ql-picker.ql-expanded .ql-picker-label {
  border-color: #2f3336;
}

/* Tooltip popup (link input) */
html.dark-mode .ql-snow .ql-tooltip {
  background-color: #1a1a1a;
  border-color: #2f3336;
  color: #fff;
}

html.dark-mode .ql-snow .ql-tooltip input[type="text"] {
  background-color: #000;
  border: 1px solid #2f3336;
  color: #fff;
}
/* ====================================
   YouTube Preview Cards
   ==================================== */

.youtube-preview-card {
    margin: 1rem 0;
    border: 1px solid var(--border-color, #e1e8ed);
    border-radius: 16px;
    overflow: hidden;
    transition: background-color 0.2s, box-shadow 0.2s;
    background-color: var(--card-bg, #fff);
    position: relative;
    z-index: 2;
}

.youtube-preview-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.youtube-preview-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.youtube-thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background-color: #000;
    overflow: hidden;
}

.youtube-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.youtube-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    opacity: 0.9;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}

.youtube-preview-card:hover .youtube-play-button {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.youtube-info {
    padding: 12px 16px;
}

.youtube-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #14171a);
    margin-bottom: 2px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.youtube-author {
    font-size: 13px;
    color: var(--text-secondary, #536471);
    margin-bottom: 4px;
    line-height: 1.3;
}

.youtube-domain {
    font-size: 12px;
    color: var(--text-secondary, #536471);
    display: flex;
    align-items: center;
}

.youtube-domain::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FF0000'%3E%3Cpath d='M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .youtube-preview-card {
        border-color: var(--border-color-dark, #38444d);
        background-color: var(--card-bg-dark, #192734);
    }
    
    .youtube-title {
        color: var(--text-primary-dark, #e7e9ea);
    }
    
    .youtube-author,
    .youtube-domain {
        color: var(--text-secondary-dark, #8b98a5);
    }
}

/* Theme-specific overrides */
html.dark-mode .youtube-preview-card {
    border-color: #38444d;
    background-color: #192734;
}

html.dark-mode .youtube-title {
    color: #e7e9ea;
}

html.dark-mode .youtube-author,
html.dark-mode .youtube-domain {
    color: #8b98a5;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .youtube-info {
        padding: 10px 12px;
    }
    
    .youtube-title {
        font-size: 14px;
    }
    
    .youtube-author {
        font-size: 12px;
    }
    
    .youtube-domain {
        font-size: 11px;
    }
    
    .youtube-play-button {
        width: 56px;
        height: 40px;
    }
}/* ====================================
   YouTube Lightbox Modal Styles
   ==================================== */

/* Modal content styling */
.youtube-modal-content {
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--card-bg, #fff);
}

.youtube-modal-header {
    border-bottom: 1px solid var(--border-color, #e1e8ed);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.youtube-modal-logo {
    height: 24px;
    width: auto;
}

/* YouTube embed container - maintains 16:9 aspect ratio */
.youtube-embed-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background-color: #000;
    overflow: hidden;
}

.youtube-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Modal dialog sizing */
.modal-xl {
    max-width: 1140px;
}

/* Cursor pointer for clickable preview cards */
.youtube-preview-link {
    cursor: pointer;
}

/* Dark mode support */
html.dark-mode .youtube-modal-content {
    background-color: #192734;
    color: #e7e9ea;
}

html.dark-mode .youtube-modal-header {
    border-color: #38444d;
}

@media (prefers-color-scheme: dark) {
    .youtube-modal-content {
        background-color: #192734;
        color: #e7e9ea;
    }
    
    .youtube-modal-header {
        border-color: #38444d;
    }
}

/* ====================================
   Responsive Design
   ==================================== */

/* Desktop and large tablets (landscape) */
@media (min-width: 992px) {
    .modal-xl {
        max-width: 90vw;
    }
    
    #youtubeModal .modal-dialog {
        margin: 1.75rem auto;
    }
}

/* Tablets and small laptops */
@media (min-width: 768px) and (max-width: 991px) {
    .modal-xl {
        max-width: 90vw;
    }
    
    .youtube-modal-header {
        padding: 0.5rem 0.75rem;
    }
}

/* Mobile devices - Portrait */
@media (max-width: 767px) and (orientation: portrait) {
    #youtubeModal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .youtube-modal-header {
        padding: 0.5rem 0.75rem;
    }
    
    .youtube-modal-logo {
        height: 20px;
    }
}

/* Mobile devices - Landscape */
@media (max-width: 767px) and (orientation: landscape) {
    #youtubeModal .modal-dialog {
        margin: 0.25rem auto;
        max-width: 98vw;
    }
    
    /* Make modal use almost full screen in landscape */
    #youtubeModal .modal-content {
        height: 98vh;
        display: flex;
        flex-direction: column;
    }
    
    .youtube-modal-header {
        padding: 0.375rem 0.5rem;
        flex-shrink: 0;
    }
    
    .youtube-modal-logo {
        height: 18px;
    }
    
    .youtube-modal-body {
        flex: 1;
        display: flex;
        align-items: center;
        padding: 0 !important;
    }
    
    .youtube-embed-container {
        padding-bottom: 0;
        height: 100%;
    }
}

/* Very small phones in portrait */
@media (max-width: 375px) and (orientation: portrait) {
    #youtubeModal .modal-dialog {
        margin: 0.25rem;
        max-width: calc(100% - 0.5rem);
    }
    
    .youtube-modal-logo {
        height: 18px;
    }
}

/* Tablets in landscape mode */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    #youtubeModal .modal-dialog {
        max-width: 95vw;
    }
    
    .youtube-modal-body {
        max-height: 70vh;
    }
}

/* Extra large screens */
@media (min-width: 1400px) {
    .modal-xl {
        max-width: 1320px;
    }
}

/* Smooth transitions */
.youtube-embed-container {
    transition: padding-bottom 0.3s ease;
}

#youtubeModal .modal-content {
    transition: height 0.3s ease;
}

/* Loading state (optional - shows black screen while iframe loads) */
.youtube-embed-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: youtubeSpinner 0.8s linear infinite;
    z-index: 1;
}

.youtube-embed-container iframe {
    z-index: 2;
}

@keyframes youtubeSpinner {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Hide spinner when iframe is loaded (you can add this via JS if needed) */
.youtube-embed-container.loaded::before {
    display: none;
}

/* Ensure modal is on top of everything */
#youtubeModal {
    z-index: 1060; /* Higher than default Bootstrap modals if needed */
}

/* Backdrop styling - darker background */
#youtubeModal + .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.95);
}

/* Focus styles for accessibility */
.youtube-modal-header .btn-close:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}