:root {
  /* Core Colors */
  --primary-blue: #0A66C2;
  --dark-blue: #084484;
  --pure-white: #FFFFFF;
  --success-green: #2E8B57;
  --premium-gold: #FFD700;
  --light-gold: #ffe033;
  --alert-coral: #FF6B6B;
  --light-gray: #F5F5F5;

  /* Newly Defined General Colors */
  --medium-gray: #CCCCCC; /* For borders, etc. */
  --soft-gray: #E0E0E0; /* For lighter backgrounds/hover states */
  --dark-text-general: #333; /* For general dark text (body color) */
  --light-text-general: #ccc; /* For lighter text in footer */
  --ad-image-placeholder: #ddd; /* For placeholder image background */
  --warm-gold: var(--premium-gold); /* Alias for premium gold for specific use */
  --footer-border-rgba: rgba(255, 255, 255, 0.1); /* For footer border */
  --ad-shadow-rgba: rgba(0, 0, 0, 0.1); /* For ad-card box-shadow */
  --ad-hover-shadow-rgba: rgba(0, 0, 0, 0.1); /* For ad-card hover box-shadow */

  /* Search Section Specific Colors */
  --success-green-darker: #226B42; /* A slightly darker shade for success button hover */
  --primary-blue-overlay-light: rgba(255, 255, 255, 0.15); /* Light overlay for dropdowns/checkbox against primary blue background */
  --primary-blue-border-light: rgba(255, 255, 255, 0.3); /* Light border for dropdowns against primary blue background */
  --gold-focus-shadow: rgba(255, 215, 0, 0.3); /* Soft gold shadow for focus states */


  /* Text Colors */
  --text-dark: #1D2226;
  --text-medium: #666666;
  --text-light: #999999;
  --ad-location-text: var(--text-medium);
  --ad-time-text: var(--text-light);

  /* Functional Colors */
  --success: var(--success-green);
  --error: var(--alert-coral);
  --warning: var(--premium-gold);

  /* General Variables / Aliases for consistency */
  --bg-light: var(--light-gray);
  --border: var(--medium-gray);
  --radius: 4px; /* Defined for consistent border-radius */
  --clean-white: var(--pure-white); /* Alias for pure-white */
  --dark: var(--dark-text-general); /* Alias for a general dark text color */

  /* Header Specific (Using core colors) */
  --header-bg: var(--primary-blue);
  --header-hover: var(--dark-blue);
  --header-text: var(--pure-white);
  --header-shadow: 0 2px 5px var(--ad-shadow-rgba);

  /* Shadows (Consolidated and using consistent naming) */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.15);
  --box-shadow-ad-card: 0 2px 5px var(--ad-shadow-rgba);
  --box-shadow-ad-card-hover: 0 5px 15px var(--ad-hover-shadow-rgba);

  /* Button Specific (Aligning to primary-blue for consistency) */
  --primary: var(--primary-blue);
  --primary-dark: var(--dark-blue);
  --primary-light: var(--lightest-blue);
  --white: var(--pure-white);


--mobile-horizontal-padding: 12px;
--desktop-horizontal-padding: 15px;
--slider-mobile-height: 80px; /* Optimal height for 4.7" displays */
--slider-desktop-height: 150px;
--section-gap-mobile: 12px;
--section-gap-desktop: 20px;


}

/* Universal box-sizing for consistent layout */
html {
  box-sizing: border-box;
}
*, *::before, *::after {
  box-sizing: inherit;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--soft-gray);
  color: var(--dark-text-general);
}


.logo {
  color: var(--primary-blue);
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
}

.nav-links a {
  margin-left: 20px;
  color: var(--dark-blue);
  text-decoration: none;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--primary-blue);
}



/*------ SPONSORED ADS --------------------------------------------------------------------------------*/



/*------ GLOBAL STYLES & VARIABLES ------*/

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/*------ MAIN LAYOUT ------*/
.main-layout-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5px;
    position: relative;
}

.content-and-banner-wrapper {
    display: flex;
    gap: var(--section-gap-desktop);
    align-items: flex-start;
}

.main-content-area {
    flex-grow: 1;
    min-width: 0;
    width: 100%;
}

/*------ TOP SLIDER ADS (OPTIMIZED FOR MOBILE) ------*/
.top-slider-ads {
    margin-bottom: var(--section-gap-desktop);
    overflow: hidden;
    width: 100%;
    border-radius: 8px;
    background-color: #f5f5f5; /* Fallback if images don't load */
}

.top-slider-ads .slider-container {
    display: flex;
    transition: transform 0.5s ease;
    width: 100%;
}

.top-slider-ads .slider-item {
    min-width: 100%;
    flex-shrink: 0;
    position: relative;
}

.top-slider-ads .slider-item a {
    display: block;
    width: 100%;
}

.top-slider-ads .slider-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

/*------ SEARCH SECTION (OPTIMIZED GAP) ------*/
.search-section {
    margin-top: var(--section-gap-mobile);
}

.search-container {
    width: 100%;
}

.search-container h1 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    line-height: 1.3;
}

/*------ RESPONSIVE ADJUSTMENTS ------*/

/* Mobile (up to 767px) */
@media (max-width: 767px) {
    .top-slider-ads {
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        border-radius: 0;
        margin-bottom: var(--section-gap-mobile)0;
        display: block; /* Add this to override any other display:none */
    }
    
    .top-slider-ads .slider-item img {
        min-height: var(--slider-mobile-height);
        border-radius: 0;
    }
    
    .content-and-banner-wrapper {
        flex-direction: column;
        gap: 0;
    }
    
    .search-section {
        margin-top: 8px; /* Reduced gap between slider and search */
    }
    
    .right-vertical-banner-ads {
        display: none;
    }
}

/* Tablet (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .top-slider-ads .slider-item img {
        min-height: 120px;
    }
    
    .content-and-banner-wrapper {
        flex-direction: column;
    }
    
    .right-vertical-banner-ads {
        display: none;
    }
    
    .search-section {
        margin-top: 15px;
    }
}

/* Desktop (992px and up) */
@media (min-width: 992px) {
    .main-layout-wrapper {
        padding: 0 var(--desktop-horizontal-padding);
    }
    
    .top-slider-ads .slider-item img {
        min-height: var(--slider-desktop-height);
    }
    
    .right-vertical-banner-ads {
        display: block;
    }
    
    .search-section {
        margin-top: var(--section-gap-desktop);
    }
}

/* Small mobile devices (320px-480px) */
@media (max-width: 480px) {
    :root {
        --mobile-horizontal-padding: 10px;
        --slider-mobile-height: 70px;
        --section-gap-mobile: 8px;
    }
    
    .search-container h1 {
        font-size: 1.3rem;
    }
}

/*------ RIGHT VERTICAL BANNER ADS ------*/
.right-vertical-banner-ads {
    width: 180px;
    flex-shrink: 0;
    padding-top: 20px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.right-vertical-banner-ads::-webkit-scrollbar {
    display: none;
}

.right-vertical-banner-ads .banner-item {
    margin-bottom: 20px;
}

.right-vertical-banner-ads .banner-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}




/*---------------------------------------------------------------------------------------------*/

/* --- Search Section Styles (Desktop Defaults) --- */
.search-section {
    background-color: var(--primary-blue);
    color: var(--pure-white);
    padding: 30px 0; /* Default vertical padding for desktop */
}

.search-container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: 0 15px; /* Default horizontal padding for desktop, adjusted later for mobile */
}

.search-container h1 {
    font-size: 2.2rem; /* Default for larger screens */
    margin-bottom: 25px;
    line-height: 1.2;
}

/* Search Main Row (Input + Toggle Button) */
.search-main-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 20px auto;
}

/* Main Search Input Group (Desktop) */
.main-search-input-group {
    display: flex;
    flex: 1;
    background-color: var(--clean-white);
    border-radius: var(--radius);
    overflow: hidden;
}

.main-search-input-group input {
    flex: 1;
    padding: 12px; /* Default desktop padding */
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-dark);
}

.main-search-input-group input::placeholder {
    color: var(--text-light);
}

.main-search-input-group button {
    background-color: var(--success-green);
    color: var(--pure-white);
    border: none;
    padding: 0 20px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.main-search-input-group button:hover {
    background-color: var(--success-green-darker);
}

/* Toggle Filters Button (Desktop - hidden) */
.toggle-filters-button {
    background-color: var(--dark-blue);
    color: var(--pure-white);
    border: none;
    border-radius: var(--radius);
    padding: 12px 15px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: none; /* Hidden by default on desktop */
    white-space: nowrap;
    text-align:center;
    justify-content: center;
}

.toggle-filters-button i {
    margin-left: 8px;
}

.toggle-filters-button:hover {
    background-color: var(--dark-blue);
}

/* Filters (Collapsible Area - Desktop Visible) */
.advanced-filters-collapse {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: block; /* Visible by default on desktop */
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    max-height: 500px; /* A value larger than its content to ensure it shows */
    opacity: 1;
}

.search-filters-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;              /* SPACE BETWNN AD IMAGE AND AD TEXT */
    margin-bottom: 20px;
}

.search-filters-compact select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--primary-blue-border-light);
    border-radius: var(--radius);
    background-color: var(--primary-blue-overlay-light);
    color: var(--text-dark);
    font-size: 1rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%231D2226" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    cursor: pointer;
}

.search-filters-compact select option:first-child {
    color: var(--text-medium);
}
.search-filters-compact select:valid {
    color: var(--text-dark);
}
.search-filters-compact select:focus {
    border-color: var(--light-gold);
    outline: none;
    box-shadow: 0 0 0 2px var(--gold-focus-shadow);
}

.search-filters-compact .checkbox-inline {
    display: flex;
    align-items: center;
}

.search-filters-compact .checkbox-inline input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--pure-white);
    border-radius: 4px;
    margin-right: 10px;
    cursor: pointer;
    position: relative;
    outline: none;
    background-color: var(--primary-blue-overlay-light);
    flex-shrink: 0;
}

.search-filters-compact .checkbox-inline input[type="checkbox"]:checked {
    background-color: var(--success-green);
    border-color: var(--success-green);
}

.search-filters-compact .checkbox-inline input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 6px;
    height: 12px;
    border: solid var(--pure-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.search-filters-compact .checkbox-inline label {
    color: var(--pure-white);
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 500;
}



/* Style for the container of the buttons */
.filter-actions {
    display: flex; /* Makes buttons lay out in a row */
    gap: 10px; /* Adds space between the buttons */
    justify-content: flex-end; /* Aligns buttons to the right (if container allows) */
    width: 100%; /* Ensure it takes full width if inside a smaller parent */
    padding-top: 15px; /* Add some space above the buttons */
}


/* Apply Filters Button (inside collapsible area) */
.apply-filters-btn,
.clear-filters {
    background-color: var(--primary-blue);
    color: var(--pure-white);
    border: 1px solid var(--pure-white);
    border-radius: var(--radius);
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    margin-top: 15px;
    width: 100%;
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* Style for Apply Filters button */
.apply-filters-btn {
    background-color: #007bff; /* Example blue */
    color: white;
}

.apply-filters-btn:hover {
    background-color: #0056b3; /* Darker blue on hover */
}

/* Style for Clear Filters button */
.clear-filters {
    background-color: #f8f9fa; /* Light grey */
    color: #343a40; /* Dark text */
    border: 1px solid #ced4da; /* Light border */
}

.clear-filters:hover {
    background-color: #e2e6ea; /* Slightly darker grey on hover */
    color: #000;
}



@media (max-width: 768px) {
    /* --- Mobile Specific Search Section Overrides --- */
    .search-section {
        padding: 20px 0; /* Reduced vertical padding */
    }
    .search-container h1 {
        font-size: 1.8rem; /* Smaller for tablets/larger mobiles */
        margin-bottom: 20px;
    }
    .search-main-row {
        gap: 10px; /* Adjust main gap between input group, toggle button */
        margin-bottom: 15px;
    }
    .main-search-input-group input,
    .main-search-input-group button {
        font-size: 0.9rem;
        padding: 8px 10px; /* More compact padding for mobile input/button */
    }
    .toggle-filters-button {
        display: inline-flex; /* Show toggle button on mobile */
        align-items: center;
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    /* Filters (Collapsible Area - Mobile Hidden by default) */
    .advanced-filters-collapse {
        max-height: 0;
        opacity: 0;
        margin-bottom: 0;
        padding: 0;
        transition: max-height 0.3s ease-out, opacity 0.3s ease-out; /* Keep transition */
        
        /* Existing styles for advanced-filters-collapse */
        display: grid; /* Keep grid for internal filters */
        gap: 10px; /* Spacing between filter items */
        /* ... other styles ... */

        /* Ensure flexbox for direct children if not using the .filter-actions div */
        /* If you wrapped buttons in .filter-actions, these might not be strictly necessary for buttons */
        /* but could be useful for other elements within advanced-filters-collapse */
        /* Remove if they conflict with your internal filter layout (selects, checkbox) */
        align-items: center;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Example grid for internal filters */
    }
    
    .advanced-filters-collapse.is-expanded { /* Class added by JS */
        max-height: 500px; /* A height larger than content */
        opacity: 1;
        margin-top: 15px;
        margin-bottom: 20px;
    }
    .search-filters-compact {
        grid-template-columns: 1fr 1fr; /* Force two columns for filters */
        gap: 10px;
        max-width: none;
        margin-bottom: 10px;
    }
    .search-filters-compact select {
        font-size: 0.85rem;
        padding: 7px 9px;
    }
    .search-filters-compact .checkbox-inline input[type="checkbox"] {
        width: 32px;
        height: 32px;
        margin-right: 8px;
    }
    .search-filters-compact .checkbox-inline input[type="checkbox"]:checked::after {
        top: 0px;
        left: 8px;
        width: 12px;
        height: 24px;
    }
    .search-filters-compact .checkbox-inline label {
        font-size: 0.8rem;
    }
    .apply-filters-btn,
    .clear-filters {
        width: 100%; /* Full width for mobile */
        max-width: 180px;
        padding: 10px 15px;
        font-size: 0.9rem;
        margin-bottom: 3px;
    }
     .ads-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .filter-actions {
        flex-direction: column; /* Stack buttons vertically on small screens */
        align-items: stretch; /* Make them full width */
        padding: 0 10px 15px; /* Adjust padding for mobile */
    }
}




@media (max-width: 400px) {
    .search-section {
        padding: 10px 0; /* Minimum vertical padding */
    }
    .search-container {
        padding: 0 8px; /* Even less container padding */
    }
    .search-container h1 {
        font-size: 1.3rem; /* Smallest practical font size */
        margin-bottom: 10px;
    }
    .search-main-row {
        gap: 10px;
    }
    .main-search-input-group {
        max-width: 280px; /* Further limit width for extremely narrow screens */
    }
    .toggle-filters-button {
        max-width: 280px; /* Further limit width */
        font-size: 0.85rem;
    }

    /* NEW: Even further reduced padding for very small screens */
    .main-search-input-group input,
    .main-search-input-group button {
        font-size: 0.85rem;
        padding: 6px 8px; /* Minimum practical vertical padding */
    }
    /* Filters are already stacked from 576px, so these just ensure fonts/padding are compact */
    .search-filters-compact select,
    .search-filters-compact .checkbox-inline label,
    .apply-filters-btn {
        font-size: 0.85rem;
    }
}

/* (Optional) For extremely narrow devices where one column is too cramped */
@media (max-width: 350px) {
    /* No changes here needed as 400px already applies the most compact styles for input/button */
}

/* --- Other Sections (Existing Media Queries) --- */
.categories {
  padding: 30px 0;
  background-color: var(--clean-white);
}

.section-title {
  color: var(--dark-blue);
  border-bottom: 2px solid var(--soft-gray);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
}

.category-card {
  text-align: center;
  padding: 15px;
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.category-card:hover {
  background-color: var(--soft-gray);
  transform: translateY(-5px);
}

.category-card img {
  width: 50px;
  height: 50px;
  margin-bottom: 10px;
}



/*-------------------------------------------------------------------------------*/

.featured-section,
.latest-section {
  padding: 30px 0;
  background-color: var(--white);
}

.featured-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.featured-tag {
  background-color: var(--warm-gold);
  color: var(--dark-blue);
  padding: 5px 10px;
  border-radius: var(--radius);
  font-weight: bold;
  font-size: 14px;
  margin-left: auto;
  margin-right: 0px;
}


.ads-grid {
  display: flex;
  flex-direction: column; /* Keep ads stacked vertically */
  gap: 20px;
}


.ad-card-feature {
  text-decoration: none;
  background-color: #fff9e6; /* Light yellow background */
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--box-shadow-ad-card);
  transition: all 0.3s ease;
  width: 100%;
  display: flex; /* Make the ad card a flex container */
  align-items: center; /* Vertically align items in the middle */
  gap: 15px; /* <--- ADDED THIS FOR SPACE BETWEEN IMAGE AND TEXT */
}

.ad-card-feature:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-ad-card-hover);
}




.ad-card {
  text-decoration: none;
  background-color: var(--clean-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--box-shadow-ad-card);
  transition: all 0.3s ease;
  width: 100%;
  display: flex; /* Make the ad card a flex container */
  align-items: center; /* Vertically align items in the middle */
  gap: 15px; /* <--- ADDED THIS FOR SPACE BETWEEN IMAGE AND TEXT */
}

.ad-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-ad-card-hover);
}

.ad-image {
  flex-shrink: 0; /* Prevent the image from shrinking */
  width: 120px; /* Set a fixed width for the image */
  height: 120px; /* Make height equal to width for a square image */
  background-color: var(--ad-image-placeholder);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius) 0 0 var(--radius); /* Rounded corners only on the left */
}

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

.featured-badge {
  position: absolute;
  top: 3px; /* Adjust position for smaller image */
  left: 0px; /* Adjust position for smaller image */
  background-color: var(--warm-gold);
  color: var(--dark-blue);
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 10px; /* Smaller font for badge */
  font-weight: bold;
  z-index: 2;
}

.online-badge {
  position: absolute;
  top: 3px; /* Adjust position for smaller image */
  right: 0px; /* Adjust position for smaller image */
  background-color: lightblue;
  color: black;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 10px; /* Smaller font for badge */
  font-weight: bold;
  z-index: 2;
}

.ad-details {
  flex-grow: 1; /* Allow details to take up remaining space */
  padding: 15px;
  /* Reset any previous absolute positioning if you had it */
  position: static;
  background: none;
  color: unset; /* Revert to default text color */
  overflow: hidden; /* Helps contain floats if any, good practice */
}

.ad-price {
  color: unset;  /* Revert to default text color */
  font-weight: bold;
  font-size: 14px;
  margin: 5px 0;
}

.ad-title {
  font-weight: 500;
  text-decoration: none !important;
  margin: 5px 0;
  /* Removed:
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  */
  color: var(--primary-blue);
  
    border-bottom: 1px solid #f0f0f5; /* Or any color/style you prefer */
    padding-bottom: 5px; /* Add some space between the title text and the line */
    margin-bottom: 5px; /* Add some space between the line and the ad-price */
    line-height: 1.2; /* Adjust as needed for your font size */
}

.ad-location {
  color: var(--ad-location-text);
  font-size: 14px;
  margin: 5px 0;
}

.ad-time {
  color: var(--ad-time-text);
  font-size: 12px;
  margin-top: 10px;
}

/*------------------------------------------------------------------------------*/



/* Consolidated General Responsive Media Queries (these were fine) */
@media (max-width: 992px) {
  .ads-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}



@media (max-width: 576px) { /* This breakpoint covers iPhone 8 (375px) */
    .search-section {
        padding: 15px 0; /* Further reduce section padding */
    }
    .search-container {
        padding: 0 10px; /* Slightly reduce container padding for very narrow screens */
    }
    .search-container h1 {
        font-size: 1.5rem; /* Even smaller for phones */
        margin-bottom: 15px;
        padding: 0 5px; /* A little extra internal buffer for text */
    }
    .search-main-row {
        flex-direction: column; /* Stack search input group and toggle button */
        gap: 15px;
        margin-bottom: 15px;
    }

    /* --- FIXES FOR OVERSIZED SEARCH BOX & BUTTON HEIGHT/WIDTH --- */
    .main-search-input-group {
        width: 100%;
        max-width: 320px; /* Limit search box width */
        margin: 0 auto; /* Center it */
    }
    .main-search-input-group input,
    .main-search-input-group button {
        padding: 7px 10px; /* NEW: Reduced padding for a shorter height */
        font-size: 0.9rem;
    }
    .toggle-filters-button {
        width: 100%;
        max-width: 320px; /* Limit filter button width */
        margin: 0 auto; /* Center it */
        font-size: 0.9rem;
        padding: 10px 12px; /* Adjusted padding for better fit */
    }

    /* Filters are now stacked in a single column here */
    .search-filters-compact {
        grid-template-columns: 1fr; /* Stack filters on very small phones */
        gap: 15px;
    }
    .search-filters-compact select {
        padding: 10px 12px; /* Give more padding when stacked */
        font-size: 0.9rem;
    }
    .search-filters-compact .checkbox-inline label {
        font-size: 0.9rem;
    }
    .apply-filters-btn {
        max-width: 250px;
    }

    /* General layout for this breakpoint */
    .ads-grid {
      grid-template-columns: 1fr;
    }
    .category-grid {
      grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
      grid-template-columns: 1fr;
    }
}

/*----------------------------------------------------------------------------------/*/


/* --- Floating "List Your Tuition" Button --- */
.floating-list-button {
    position: fixed; /* Makes the element float relative to the viewport */
    bottom: 20px;    /* 20px from the bottom of the screen */

    left: 50%;       /* Start from the horizontal center */
    transform: translateX(-50%); /* Pull it back by half its own width to truly center */

    background-color: var(--warm-gold);
    color: black;  
    padding: 15px 25px; /* Comfortable padding */
    border-radius: 50px; /* Makes it pill-shaped */
    text-decoration: none; /* Removes underline */
    font-size: 1.1em; /* Slightly larger text */
    font-weight: bold; /* Bold text */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Soft shadow for depth */
    z-index: 1000;   /* Ensures it stays on top of other content */
    transition: background-color 0.3s ease, transform 0.3s ease; /* Smooth hover effect */
    display: flex; /* Use flexbox for centering text if needed (though not strictly necessary here) */
    align-items: center;
    justify-content: center;
}

.floating-list-button:hover {
    background-color: var(--light-gold); 
    /* Combine transforms: first translateX for centering, then translateY for lift */
    transform: translateX(-50%) translateY(-2px);
}

/* --- Responsive Adjustments for the Floating Button --- */
@media (max-width: 767px) {
    .floating-list-button {
        bottom: 15px; /* Slightly closer to the bottom on smaller screens */
        padding: 12px 20px; /* Slightly smaller padding */
        font-size: 1em; /* Slightly smaller font size */
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); /* Smaller shadow */

        /* These should inherit from above, but explicitly reset if needed */
        left: 50%;
        transform: translateX(-50%);
    }

    .floating-list-button:hover {
        /* Combine transforms for mobile hover */
        transform: translateX(-50%) translateY(-2px);
    }
}

/* You might want to adjust its position further for very small screens if it overlaps critical content */
/*
@media (max-width: 480px) {
    .floating-list-button {
        bottom: 10px;
        right: 10px;
        font-size: 0.9em;
        padding: 10px 18px;
    }
}
*/


/*--PAGINATION --------------------------------------------------------------------------------/*/


/* Pagination Styles */
.pagination-container {
    margin-top: 30px;
    text-align: center;
}

.pagination {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.pagination a {
    color: #333;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.pagination a:hover:not(.active) {
    background-color: #f1f1f1;
}

.pagination .active {
    background-color: #4CAF50;
    color: white;
    border: 1px solid #4CAF50;
}

.pagination a.disabled {
    pointer-events: none;
    opacity: 0.5;
}

.pagination-ellipsis {
    padding: 8px 12px;
}

.pagination-numbers {
    display: flex;
    gap: 5px;
}

.pagination-prev,
.pagination-next {
    min-width: 100px;
}

/* Responsive pagination */
@media (max-width: 600px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-numbers {
        order: 1;
        width: 100%;
        justify-content: center;
        margin: 10px 0;
    }
    
    .pagination-prev {
        order: 0;
    }
    
    .pagination-next {
        order: 2;
    }
}


/*----SEARCH RESULTS-----------------------------------------------------------------------------------------------------------/*/
/* Results count style */
.results-count {
    margin-bottom: 20px;
    font-size: 0.9em;
    color: #666;
}

/* No results message style */
.no-results {
    padding: 40px;
    text-align: center;
    border: 1px dashed #ddd;
    margin: 20px 0;
    border-radius: 5px;
}



/*-------------------------------------------------------------------------------------------------/*


/*-----------------------------------------------------------------------------------------------------------/*