@media (max-width: 768px) {
  html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
}

/* Responsive adjustments */
/* Default mobile layout fix */
@media (max-width: 768px) {
  .header-top .container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .header-top .btn,
  .header-top .signup-dropdown {
    margin: 0 !important;
  }

  .header-top .signup-dropdown {
    display: inline-block;
  }
}

@media (max-width: 768px) {
  /* Mobile header container */
  .header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 15px;
    position: relative;
    z-index: 100;
  }

  /* Logo adjustments */
  .logo img {
    max-height: 30px;
    width: auto;
    display: block;
  }

  /* Menu toggle button */
  .menu-toggle {
    display: block;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002;
    position: relative;
    color: var(--color-text, #333);
  }

  /* Dropdown menu aligned to toggle */
  .primary-navigation {
    position: absolute;
    top: 100%;                  /* below header-main */
    right: 0;                    /* align right edge with toggle */
    min-width: 150px;            /* minimum width */
    max-width: 220px;            /* maximum width */
    width: auto;                 /* shrink-to-fit short items */
    z-index: 1000;
    margin: 0;
    padding: 0;
	margin-top: -30px;    
  }

  /* Menu itself */
  .primary-navigation .main-menu {
    display: none;
    flex-direction: column;
    background: var(--color-bg, #fff);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 6px;
    padding: 0;
    width: 100%;                 /* fill parent (.primary-navigation) */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  /* Show menu */
  .primary-navigation.open .main-menu {
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  /* Menu items */
  .primary-navigation .main-menu li a {
    padding: 8px 12px;           /* minimal padding */
    display: block;
    white-space: nowrap;          /* prevent text wrap */
  }

  /* No extra vertical spacing */
  .primary-navigation .main-menu li {
    margin-bottom: 0;
  }
}

@media (max-width: 768px) {
   /* Main member containers: flush left/right with 1px gap */
  .member-header,
  .member-dashboard,
  .profile-form,
  .dashboard-field {
    width: calc(100% - 2px);
    margin-left: 1px;
    margin-right: 1px;
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
  }

  /* Ensure fields inside do not force overflow */
  .member-header *,
  .member-dashboard *,
  .profile-form *,
  .dashboard-field * {
    box-sizing: border-box;
    min-width: 0;
  }
}

@media (max-width: 768px) {
  /* Edge-to-edge (1px each side) regardless of parent/container padding */
  .dashboard-header,
  .dashboard-wrapper,
  .dashboard-left,
  .dashboard-right,
  .dashboard-field,
  .custom-wrapper-left,
  #custom-links-wrapper {
    position: relative;
    left: 50%;
    right: 50%;
    width: calc(100vw - 2px) !important;                 /* full viewport minus 2px */
    margin-left: calc(-50vw + 1px) !important;            /* centers and leaves 1px left */
    margin-right: calc(-50vw + 1px) !important;           /* leaves 1px right */
    padding-left: 14px;                                   /* adequate inner padding */
    padding-right: 14px;
    box-sizing: border-box;
    max-width: none !important;
  }

  .dashboard-left,
  .custom-wrapper-left {
    margin-top: 0 !important;   /* reset margins */
    padding-top: 0 !important;  /* reset paddings */
  }
	
  /* Nuke common theme paddings inside the dashboard area */
  .dashboard-wrapper .container,
  .dashboard-wrapper .wrap,
  .dashboard-wrapper .content-area,
  .dashboard-wrapper .site-content,
  .dashboard-wrapper .entry-content,
  .dashboard-wrapper .wp-block-group__inner-container,
  .dashboard-wrapper .wp-site-blocks {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
  }

  /* Keep form controls/link groups truly full width */
  .dashboard-field input,
  .dashboard-field textarea,
  .dashboard-field select,
  .custom-link-group input {
    width: 100% !important;
    box-sizing: border-box;
  }

  /* Buttons scale without overflow */
  .dashboard-field button,
  #add-link-btn,
  [form="business-profile-form"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
	  /* Make link title above URL */
	.custom-link-group {
	  display: flex;
	  flex-direction: column; /* stack children vertically */
	  gap: 6px; /* small spacing */
	}

	/* Center the Add Link button */
	#add-link-btn {
	  display: block;
	  margin: 10px auto; /* centers the button */
	  padding: 6px 14px;
	  width: 150px; /* reduce width */
	  text-align: center;
	}

  button[type="submit"][form="business-profile-form"],
  button[type="submit"][name="delete_account"],
  button[type="button"].remove-link {
    display: block;
    margin: 10px auto;
    width: 70%;
    max-width: 250px;
    text-align: center;
  }
}

@media (max-width: 768px) {  
  /* Main container spans viewport minus 2px total (1px per side) */
  .business-card {
    width: calc(100% - 2px);
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
  }

  /* Base containers: 1px side gap and roomy inner padding */
  .card,
  .col {
    margin-left: 1px;
    margin-right: 1px;
    padding: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow-x: hidden;
  }

  .business-tabs-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }	
  /* Order / stacking */
  .col--main { display: contents; }
  .card.card--logo  { order: 1; }
  .card.card--share { order: 2; }
  .col.col--details { order: 3; }
  .col.col--contact { order: 4; }

  /* Logo/name */
  .business-logo-name-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    min-width: 0;
  }
  .business-logo-name-wrap .business-logo img,
  .business-logo-name-wrap .avatar {
    max-height: 72px;
    width: auto;
    margin: 0 !important;
    display: block;
  }

  /* Details card styling */
  .card--details {
    padding: 18px;
    display: grid;
    gap: 12px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    box-sizing: border-box;
    min-width: 0;
  }
  .card--details h3 {
    margin: 0 0 8px 0;
    font-size: 1.05rem;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
  }
  .card--details p,
  .card--details strong {
    margin: 0;
    line-height: 1.45;
  }
  .card--details p {
    background: #f9f9f9;
    padding: 12px;
    border-radius: 6px;
    word-break: break-word;
  }

  /* Share card and copy link */
  .card.card--share .share-icons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    padding: 8px 0;
  }
  .share-icons-container > a,
  .qr-code-share { flex: 0 0 auto; min-width: 0; }
  .qr-code-share img { max-width: 100%; height: auto; display: block; }

  .share-icons-container .copy-link-wrap {
    flex: 0 0 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    order: 99;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    min-width: 0;
  }

  .copy-link-wrap input#shareLinkInput {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .copy-link-wrap .copy-link-btn {
    display: block;
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    box-sizing: border-box;
    background: #0073aa;
    color: #fff;
    border: none;
    cursor: pointer;
  }

	.card.card--share,
	.col.col--details,
	.col.col--details > .card--details,
	.card.card--share > .share-icons-container,
	.col.col--contact {
		margin-left: 1px !important;
		margin-right: 1px !important;
		box-sizing: border-box;
		min-width: 0;
	}

	/* Make the visible width identical (1px left + 1px right) */
	.card.card--share,
	.col.col--details > .card--details {
		width: calc(100% - 2px) !important;
	}

	/* Normalize padding so visual inset matches */
	.card.card--share {
		padding-left: 14px !important;
		padding-right: 14px !important;
		margin-top: 10px !important;       /* reduce gap from previous card */
		padding-top: 12px !important;      /* slightly tighter top padding */
		padding-bottom: 5px !important;   /* slightly tighter bottom padding */
		gap: 10px !important;              /* reduce internal spacing between elements */
	}

	.col.col--details {
		/* keep column gutters small but avoid doubling padding */
		padding-left: 1px !important;
		padding-right: 1px !important;
		margin-top: 0 !important;       /* smaller gap from share card */
	}

	.col.col--details > .card--details {
		/* card--details inner padding (content inset) should match share card */
		padding-left: 14px !important;     /* match share card padding */
		padding-right: 14px !important;    /* match share card padding */
		padding-top: 5px !important;
		padding-bottom: 12px !important;
		margin-bottom: 10px !important;    /* smaller gap before next section */
	}
	
	.col.col--contact {
        margin-top: 5px !important;
        padding: 8px !important;
    }

  /* Safety: prevent any child from forcing overflow */
  .business-card *, .card *, .col * { box-sizing: border-box; min-width: 0; }
}

@media (max-width: 768px) {
  /* Make dashboard-wrapper full width */
  body.page-template-template-business-news .news-dashboard-wrapper {
    display: flex;
    flex-direction: column; /* Stack left and right */
    margin: 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
  }

  /* Dashboard left */
  body.page-template-template-business-news .dashboard-left {
    width: calc(100% - 2px);
    margin-left: 1px;
    margin-right: 1px;
    padding: 0;
    box-sizing: border-box;
  }

  /* My business cards inside left */
  body.page-template-template-business-news .dashboard-left .my-business-cards {
    width: 100%;
    padding: 0;
    box-sizing: border-box;
  }

  /* Forms and inputs */
  body.page-template-template-business-news form#news-form,
  body.page-template-template-business-news .dashboard-field input[type="text"],
  body.page-template-template-business-news .dashboard-field input[type="search"],
  body.page-template-template-business-news #news-editor,
  body.page-template-template-business-news textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* Dashboard right (search and news list) */
  body.page-template-template-business-news .dashboard-right {
    width: calc(100% - 2px);
    margin-left: 1px;
    margin-right: 1px;
    padding: 0;
    box-sizing: border-box;
  }

  /* News items full width */
  body.page-template-template-business-news #news-list .news-item {
    width: 100%;
    margin-bottom: 1rem;
    box-sizing: border-box;
  }

  /* Make the toolbar buttons inline and wrap nicely */
	body.page-template-template-business-news .news-toolbar {
	  display: flex;
	  flex-wrap: wrap;      /* wrap to next line if too many */
	  gap: 4px;             /* spacing between buttons */
	}

	body.page-template-template-business-news .news-toolbar button {
	  flex: 0 0 auto;       /* prevent buttons from stretching */
	  width: auto;          /* auto width based on content */
	  min-width: 30px;      /* optional: ensure buttons not too small */
	  padding: 5px 8px;     /* adjust padding for mobile */
	  margin: 0;            /* remove default margins */
	  box-sizing: border-box;
	}

	body.page-template-template-business-news .emoji-grid {
	  display: flex;
	  flex-wrap: wrap;
	  gap: 4px;
	}

	body.page-template-template-business-news .emoji-grid button {
	  flex: 0 0 auto;
	  width: auto;
	  padding: 4px;
	}
	
	/* ---------- Force search input above button (mobile only) ---------- */
	body.page-template-template-business-news form#news-search-area,
	body.page-template-template-business-news form.news-search-form {
	  /* ensure the form stacks children vertically */
	  display: flex !important;
	  flex-direction: column !important;
	  align-items: stretch !important;
	  gap: 8px !important;               /* spacing between input and button */
	  width: calc(100% - 2px) !important;
	  margin-left: 1px !important;
	  margin-right: 1px !important;
	  padding: 0 !important;
	  box-sizing: border-box !important;
	}

	/* make search input full width, remove floats */
	body.page-template-template-business-news #news-search {
	  display: block !important;
	  width: 100% !important;
	  max-width: 100% !important;
	  margin: 0 !important;
	  padding: .55rem .6rem !important;
	  box-sizing: border-box !important;
	  float: none !important;
	}

	/* Force the submit button below the input — reduced width and centered */
	body.page-template-template-business-news form#news-search-area button[type="submit"],
	body.page-template-template-business-news form.news-search-form button[type="submit"] {
	  display: block !important;
	  width: 160px !important;           /* desired fixed width */
	  max-width: 70% !important;         /* prevents overflow on very small screens */
	  margin: 0.5rem auto !important;    /* center the button */
	  padding: .55rem .6rem !important;
	  box-sizing: border-box !important;
	  clear: both !important;
	  text-align: center !important;
	}

	/* In case theme added inline-flex or widths to immediate children, override them */
	body.page-template-template-business-news form#news-search-area > * {
	  min-width: 0 !important;
	}
	
	/* ---------- Make Save / Cancel match the reduced, centered Search button ---------- */
	body.page-template-template-business-news .dashboard-field {
	  text-align: center !important; /* ensure centering */
	}

	/* Target Save + Cancel inside dashboard-field (left & right areas) */
	body.page-template-template-business-news .dashboard-left .dashboard-field > button[type="submit"],
	body.page-template-template-business-news .dashboard-left .dashboard-field > button.cancel-edit,
	body.page-template-template-business-news .dashboard-right .dashboard-field > button[type="submit"],
	body.page-template-template-business-news .dashboard-right .dashboard-field > button.cancel-edit {
	  display: block !important;         /* stack and center like the search button */
	  width: 160px !important;           /* same fixed width as search button */
	  max-width: 70% !important;         /* prevents overflow on very small screens */
	  margin: 0.5rem auto !important;    /* center horizontally */
	  padding: .55rem .8rem !important;
	  box-sizing: border-box !important;
	  text-align: center !important;
	  clear: both !important;
	  white-space: nowrap !important;
	}
		
  /* Pagination */
  body.page-template-template-business-news .news-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
	margin-bottom: 10px;  
  }

  /* Reduce padding/margin for mobile */
  body.page-template-template-business-news h5,
  body.page-template-template-business-news h4 {
    margin-left: 8px;
    margin-right: 0;
  }
}

@media (max-width: 768px) {
  body.page-template-template-business-profile .col--contact {
    margin: 0 2px 1rem 2px;  /* tiny side margins, bottom spacing */
    padding: 1rem;           /* internal padding for content */
    box-sizing: border-box;   /* ensures padding doesn't break layout */
    width: calc(100% - 4px); /* full width minus side margins */
  }

  /* Contact heading smaller on mobile */
  body.page-template-template-business-profile .col--contact h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }
}
	
/* Medium devices (tablets, 600px to 899px) */
@media (max-width: 600px) {
  .business-tabs-wrapper {
    position: relative;
    /* Remove margin here */
  }

  .business-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    justify-content: flex-start;
    padding: 1rem;
  }

  .business-tabs .tab-link {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .business-tabs-wrapper::before,
  .business-tabs-wrapper::after {
    position: absolute;
    bottom: 4px; /* Adjusted closer to nav items */
    width: 40px;
    height: 30px;
    z-index: 10;
    pointer-events: none;
    font-size: 1.4rem;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Left Arrow */
  .business-tabs-wrapper::before {
    content: "←";
    left: 8px; /* margin from left edge */
    background: linear-gradient(to right, white, transparent);
    justify-content: flex-start;
    padding-left: 5px;
    animation: bounceLeft 1.5s infinite;
  }

  /* Right Arrow */
  .business-tabs-wrapper::after {
    content: "→";
    right: 8px; /* margin from right edge */
    background: linear-gradient(to left, white, transparent);
    justify-content: flex-end;
    padding-right: 5px;
    animation: bounceRight 1.5s infinite;
  }

  @keyframes bounceRight {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(4px); }
  }

  @keyframes bounceLeft {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(-4px); }
  }

  .business-tabs::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 768px) {
  .news-dashboard-wrapper {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .dashboard-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0.5rem;
  }

  .dashboard-logo {
    margin-left: 0; /* Center the logo */
    margin-bottom: 0.5rem;
  }

  .dashboard-header h3 {
    font-size: 18px; /* Slightly smaller for mobile */
  }
}

@media (max-width: 600px) {
  .dashboard-right {
    padding: 0.4rem 0.10rem;
  }	
}

@media (max-width: 600px) {
  .news-pagination {
    justify-content: center;   /* Center pagination on small screens */
    flex-wrap: wrap;           /* Allow wrapping to next line */
    margin-top: 0.8rem;
    padding: 0 0.5rem;         /* Add some horizontal breathing room */
  }

  .news-pagination a,
  .news-pagination .current {
    padding: 0.3rem 0.6rem;         /* Smaller padding for mobile */
    font-size: 0.9rem;              /* Slightly smaller text */
    min-width: 1.8rem;              /* Slightly smaller width */
    border-radius: 5px;             /* Smaller border radius */
  }
}

/* ensure the submit button spans full width below on mobile */
@media (max-width: 768px) {
  .dashboard-wrapper > form {
    flex-direction: column;
  }
  .dashboard-wrapper > form .dashboard-field {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .collab-dashboard-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 480px) {
  .collab-dashboard-field .field-details {
    grid-template-columns: auto 1fr;
    align-items: start;
  }
}

/* Responsive tweak: stack on small screens */
@media (max-width: 600px) {
  .collab-dashboard-wrapper {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  /* Reduce .news-item horizontal padding further to gain max width */
  .news-item {
    padding-left: 0.5rem;  /* smaller left padding */
    padding-right: 0.5rem; /* smaller right padding */
  }

  /* Form fills container width with minimal padding */
  .edit-news-form {
    max-width: 100%;
    width: 100%;
    margin: 0.3rem 0;          /* reduced vertical margin */
    padding: 0.5rem 0.6rem;
    box-sizing: border-box;
    border-radius: 6px;
    box-shadow: none;
  }

  /* Direct children full width, no horizontal margins/padding */
  .edit-news-form > * {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
    display: block;
    text-align: left !important;
  }

  /* Inputs and editors full width with inner padding */
  .edit-news-form input[type="text"],
  .edit-news-form .news-editor-inline {
    padding: 0.5rem !important;
    margin-bottom: 0.5rem !important;  /* some bottom margin */
    box-sizing: border-box !important;
  }

  /* Reduce editor min height */
  .news-editor-inline {
    min-height: 150px !important;
    padding: 0.5rem !important;  /* add some horizontal padding */
    margin-bottom: 0.5rem !important;  /* reduce bottom margin */
  }

  /* Toolbar: flex with wrap, gap between buttons */
  .edit-news-form .news-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;    /* allow wrapping to next line */
    gap: 0.5rem;
    margin-bottom: 0.8rem;
  }

  /* Toolbar buttons size to content, no fixed width, no margin */
  .edit-news-form .news-toolbar button,
  .edit-news-form .news-toolbar .emoji-toggle-btn,
  .edit-news-form .news-toolbar .news-image-btn {
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0.6rem;
    min-width: auto !important;
  }

  /* Dashboard buttons side-by-side */
  .edit-news-form .dashboard-field button {
    flex: 0 0 auto;
    margin: 0 0.3rem 0 0 !important;
    padding: 0.5rem 1rem !important;
  }
}

@media (max-width: 600px) {
  .virtual-card {
    max-width: calc(100% - 10px); /* 5px left + 5px right */
    margin: 20px 2px; /* top-bottom 20px, left-right 5px */
    padding: 20px;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.08);
    font-family: 'Georgia', serif;
    color: #333;
    border-radius: 8px;
  }
}

@media (max-width: 600px) {
  .card-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;	
  }

  .card-logo {
    width: 100px;  /* smaller circle */
    height: 100px;
  }

  .card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* still show full image */
  }

  .card-details {
    width: calc(100% - 16px);
	margin: 0 5px;
    padding-top: 10px;
    text-align: left;
  }

  .card-details h2,
  .card-details p {
    font-size: 1rem;
    line-height: 1.4;
  }

  .share-buttons {
    font-size: 0.95em;
    text-align: center;
  }

  .bc-download-btn {
    font-size: 0.95em;
    width: 90%;
  }
}

@media (max-width: 768px) {
  .bc-form-wrapper {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .my-business-cards {
    padding: 12px;            /* Reduce padding */
    margin-bottom: 12px;     /* Less spacing between cards */
    border-radius: 6px;      /* Slightly smaller rounded corners */
  }
}

@media (max-width: 600px) {
  .collab-invitedashboard-card {
    width: 95%;
    padding: 0.5rem;
  }

  .collab-invitedashboard-card h3 {
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
  }

  .collab-invitedashboard-card p {
    margin: 0.75rem;
    font-size: 0.9rem;
  }

  .collab-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin: 1rem;
  }

  .collab-filters label {
    font-size: 0.85rem;
  }

  .collab-filters input,
  .collab-filters select,
  .collab-filters button {
    width: 100%;
    font-size: 0.9rem;
    box-sizing: border-box;	  
  }

  .collab-filters a {
    font-size: 0.8rem;
    margin-left: 0;
    text-align: right;
    display: block;
  }
    .biz-card-header + .biz-card-body {
    margin-top: 0.5rem; /* or smaller */
  }  
}

@media (min-width: 768px) {
  #custom-platforms .platform-row {
    margin-bottom: 1.5rem;
  }
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .login-wrapper {
    align-items: flex-start !important;          /* Remove vertical centering */
    padding: 16px 12px 8px 12px !important;      /* Reduce padding, especially bottom */
    min-height: auto !important;                  /* Remove fixed min-height */
  }

  .login-wrapper .login-card {
    padding: 16px !important;                      /* Reduce inner padding */
    margin-bottom: 10px !important;                   /* Remove any margin */
  }
}

@media (max-width: 800px) {
  .business-single-news-container {
    flex-direction: column;
    max-width: 100%;            /* allow fullâ??width on mobile */
  }
  .business-news-single,
  .business-news-sidebar {
    flex: 1 1 100%;
    min-width: 0;
  }
}

/* Responsive: single column layout on smaller screens */
@media (max-width: 768px) {

  /* Root container */
  .business-news-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-left: 4px !important;
    margin-right: 4px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
  }

  /* All main columns stacked */
  .business-profile-card,
  .business-news-main,
  .business-news-sidebar,
  .business-news-feed,
  .news-post-card,
  .news-post-content {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
  }

  /* Add uniform 4px "safe space" inside */
  .business-profile-card,
  .business-news-main,
  .business-news-sidebar,
  .business-news-feed,
  .news-post-card,
  .news-post-content {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }

  /* Stack order */
  .business-news-container .business-profile-card { order: 1; }
  .business-news-container .business-news-main    { order: 2; }
  .business-news-container .business-news-sidebar { order: 3; }

  /* Ensure images/buttons scale correctly */
  .news-post-image {
    background-size: cover;
    background-position: center;
  }
  
  .news-feed-followers,
  .business-news-title {
    padding-left: 2px !important;
    padding-right: 2px !important;
  }

  /* ✅ Reduce font size only for the title */
  .business-news-title {
    font-size: 18px !important; /* adjust as you like */
  }	
}

/* Responsive (narrow screens) */
@media (max-width: 400px) {
  .business-sidebar {
    padding: 1rem;
    max-width: 100%;
  }
  .business-sidebar-section h3 {
    font-size: 1.1rem;
  }
}

@media (max-width: 600px) {
  .business-register-wrapper {
    margin-left: 1rem;
    margin-right: 1rem;
  }
	.business-register-wrapper label {
    margin-bottom: 2px !important;
  }

  .business-register-wrapper form p {
    margin-bottom: 8px !important;
  }
}

/* Responsive tweak */
@media (max-width: 600px) {  
  .member-register-form {
    margin-left: 1rem;
    margin-right: 1rem;
  }
  .member-register-form form p {
    margin-bottom: 8px !important;
  }
  .member-register-form label {
    margin-bottom: 2px !important;
  }
}

@media (min-width: 640px) {
  .footer-widgets {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-widgets {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 640px) {
  .footer-widgets {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .footer-widgets {
    grid-template-columns: 1fr 1.5fr 1.5fr 1fr;
  }
}

@media (min-width: 640px) {
  .footer-legal {
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  /* Scope tightly to the news editor form to avoid side-effects */
  body.page-template-template-business-news .edit-news-form .dashboard-field {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;   /* stack Save above Cancel */
    align-items: center !important;      /* center horizontally */
    justify-content: center !important;
    gap: 10px !important;                /* space between buttons */
    overflow: visible !important;        /* ensure nothing is clipped */
    text-align: center !important;
  }

  /* Make each button a nicely sized block centered inside the container */
  body.page-template-template-business-news .edit-news-form .dashboard-field button {
    display: block !important;
    width: min(360px, calc(100% - 12px)) !important; /* never wider than viewport */
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0.55rem 0.8rem !important;
    white-space: nowrap !important; /* prevents internal wrapping on emoji/text */
    overflow: visible !important;
  }
}

@media (max-width: 768px) {
  /* Force collab dashboard sections edge-to-edge with ~2px side margins */
  .dashboard-stats,
  .collab-dashboard-wrapper,
  .collab-dashboard-card,
  .collab-invitedashboard-card,
  .stats-grid,
  .stat-card,
  .scroll-container,
  form.collab-filters,
  .news-search-form {
    width: calc(100% - 4px) !important; /* 2px margin each side */
    margin-left: 2px !important;
    margin-right: 2px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
    max-width: 100% !important;
  }
}

@media (max-width: 600px) {
  .collab-dashboard-field,
  .field-content {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 1px !important;
    margin-right: 1px !important;
    padding-left: 3px !important;
    padding-right: 3px !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 768px) {
  body.page-template-template-search-business 
  .business-search-container,
  body.page-template-template-search-business 
  .business-search-container > div,
  body.page-template-template-search-business 
  .business-search-form,
  body.page-template-template-search-business 
  .business-result-card,
  body.page-template-template-search-business 
  .pagination,
  body.page-template-template-search-business 
  .no-results-message {
    width: calc(100% - 4px) !important; /* ~2px margin each side */
    margin-left: 2px !important;
    margin-right: 2px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Business search form stacks on mobile */
  body.page-template-template-search-business 
  .business-search-form {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Fix inputs + button alignment */
  body.page-template-template-search-business 
  .business-search-form input {
	width: 100% !important;
	border-radius: 6px !important;
	border-right: 1px solid #ccc !important;
	margin-left: 1px !important;   /* tiny side margins */
	margin-right: 1px !important;
	display: block !important;     
	box-sizing: border-box !important;
 }

  body.page-template-template-search-business 
  .business-search-form button {
    width: auto !important;         /* let button shrink to content */
    min-width: 80px !important;    /* optional: ensure a minimum size */
    max-width: 150px !important;    /* optional: prevent it from being too wide */
    padding: 0.6rem 1.2rem !important;
    border-radius: 6px !important;    
    display: inline-block !important;
	margin: 0 auto 0.5rem auto !important;
    box-sizing: border-box !important;
 }
 
  body.page-template-template-search-business 
  .business-results {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
    margin: 0 !important;         /* remove margin conflicts */
    box-sizing: border-box !important;
  }

  body.page-template-template-search-business 
  .business-result-card {
    width: 100% !important;
    margin: 0 0 1rem 0 !important;  /* bottom margin only, left/right handled by parent padding */
    box-sizing: border-box !important;
  }
	
  body.page-template-template-search-business 
  .biz-logo {
    padding: 1rem !important;
  }

  body.page-template-template-search-business 
  .biz-info {
    padding: 0.8rem 1rem !important;
  }

  /* Pagination centered on small screens */
  body.page-template-template-search-business 
  .pagination {
    justify-content: center !important;
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .search-members h2 
  .business-search-container h2 {
    font-size: 20px;  /* smaller size for mobile */
    line-height: 1.3; /* keeps readability */
    text-align: center; /* optional: center on mobile */
  }
}

@media (max-width: 768px) {
  /* Prevent the invisible anchor from covering interactive controls on small screens */
  #news-search-anchor {
    margin-top: 0 !important;
    padding-top: 0 !important;
    height: 1px !important;
    width: 1px !important;
    overflow: hidden !important;
    display: block !important;
    pointer-events: none !important; /* lets touches/clicks pass through */
  }
}

@media (max-width: 768px) {
  .biz-sidebar {
    margin-bottom: 10px; /* reduce gap under whole sidebar */
  }
}

@media (max-width: 768px) {
    .card-preview p:last-of-type a {
        font-size: 12px; /* smaller on tablets */
    }
}

@media (max-width: 768px) {
  .news-share-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }
}