/* Better mobile touch targets */
@media (max-width: 767px) {
    .radio-item,
    .checkbox-item {
        min-height: 36px;
        padding: 8px 4px;
        font-size: 11px;
    }
    
    
    .radio-item input[type="radio"],
    .checkbox-item input[type="checkbox"] {
        width: 14px;
        height: 14px;
        margin-right: 6px;
    }
    
    .option-text {
        font-size: 11px;
    }/* Enhanced Mobile-First Responsive Property Search Form Styles */

.search-form-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 20px;
    margin-bottom: 30px;
    width: 100%;
    overflow: visible;
}

.search-form-container {
    width: 100%;
    overflow: visible;
}

/* Main Search Row - Mobile First Grid */
.search-main-row {
    display: grid;
    gap: 16px;
    align-items: end;
    margin-bottom: 0;
}

/* Mobile Layout - Exactly 2 boxes per row as requested */
@media (max-width: 767px) {
    .search-form-wrapper {
        margin: 0 -16px 20px -16px;
        border-radius: 0;
        padding: 14px;
    }
    
    .search-main-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        grid-template-areas:
            "city district"
            "property bedrooms"
            "price-min price-max"
            "clear search"
            "advanced advanced";
    }
    
    .city-group { grid-area: city; }
    .district-group { grid-area: district; }
    .property-type-group { grid-area: property; }
    .bedrooms-group { grid-area: bedrooms; }
    .price-min-group { grid-area: price-min; }
    .price-max-group { grid-area: price-max; }
    .clear-group { grid-area: clear; }
    .search-btn-group { grid-area: search; }
    .advanced-toggle-group { grid-area: advanced; }
    
    .advanced-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .keywords-group,
    .features-group {
        grid-column: 1 / -1;
    }
    
    .form-label {
        font-size: 11px;
        margin-bottom: 4px;
        gap: 3px;
    }
    
    .form-label i {
        width: 10px;
        font-size: 10px;
    }
    
    .dropdown-btn {
        height: 40px;
        padding: 6px 8px;
        font-size: 11px;
    }
    
    .dropdown-btn span:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: calc(100% - 16px);
        font-size: 11px;
    }
    
    .dropdown-arrow {
        flex-shrink: 0;
        margin-left: 3px;
        font-size: 10px;
    }
    
    .dropdown-content {
        max-height: 250px;
        min-width: 200px;
    }
    
    .dropdown-controls {
        flex-direction: column;
        gap: 4px;
        padding: 8px 12px;
    }
    
    .control-btn {
        width: 100%;
        text-align: center;
        font-size: 10px;
        padding: 4px 6px;
    }
    
    .search-btn,
    .clear-btn {
        height: 40px;
        font-size: 11px;
        padding: 0 12px;
        min-width: auto;
    }
    
    .advanced-toggle {
        height: 40px;
        font-size: 11px;
    }
    
    .btn-text {
        font-size: 11px;
    }
    
    .toggle-text {
        font-size: 11px;
    }
    
    .option-text {
        font-size: 11px;
    }
    
    .section-title {
        font-size: 10px;
    }
    
    .radio-item,
    .checkbox-item {
        min-height: 36px;
        padding: 8px 4px;
        font-size: 11px;
    }
    
    .option-icon {
        margin-right: 6px;
        font-size: 12px;
        width: 14px;
    }
    
    .radio-item input[type="radio"],
    .checkbox-item input[type="checkbox"] {
        width: 14px;
        height: 14px;
        margin-right: 6px;
    }
}

/* Tablet Layout */
@media (min-width: 768px) and (max-width: 1023px) {
    .search-main-row {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 16px;
    }
    
    .advanced-toggle-group {
        grid-column: 1 / -1;
    }
    
    .advanced-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    
    .dropdown-btn {
        height: 46px;
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .dropdown-btn span:first-child {
        font-size: 13px;
    }
    
    .dropdown-content {
        min-width: 240px;
        max-height: 350px;
    }
    
    .form-label {
        font-size: 13px;
        margin-bottom: 6px;
    }
}

/* Desktop Layout */
@media (min-width: 1024px) {
    .search-main-row {
        grid-template-columns: 1.2fr 1fr 1fr 1fr 1.3fr 0.8fr 1fr auto;
        gap: 20px;
    }
    
    .advanced-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0; /* Allow shrinking */
}

.form-label {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-label i {
    color: #007bff;
    width: 14px;
    font-size: 12px;
    flex-shrink: 0;
}

/* Custom Dropdown Base Styles */
.custom-dropdown {
    position: relative;
    width: 100%;
    z-index: 1;
    min-width: 0;
}

.custom-dropdown.active {
    z-index: 9999;
}

.dropdown-btn {
    width: 100%;
    height: 48px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    text-align: left;
    transition: all 0.2s ease;
    font-weight: 500;
    min-width: 0;
}

.dropdown-btn span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.dropdown-btn:hover {
    background: #e9ecef;
    border-color: #007bff;
}

.dropdown-btn:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    font-size: 12px;
    color: #666;
    margin-left: 8px;
    flex-shrink: 0;
}

.custom-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #007bff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-height: 320px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    margin-top: 4px;
    min-width: 250px; /* Ensure minimum width for content */
}

/* Desktop specific dropdown improvements */
@media (min-width: 1024px) {
    .dropdown-content {
        min-width: 300px;
        max-height: 400px;
    }
    
    .dropdown-btn {
        padding: 12px 20px;
    }
}

.custom-dropdown.active .dropdown-content {
    display: block;
    animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Box */
.dropdown-search {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.dropdown-search input {
    width: 100%;
    height: 36px;
    padding: 8px 12px 8px 40px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.dropdown-search input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
}

.search-icon {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #666;
    pointer-events: none;
}

/* Controls */
.dropdown-controls {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.control-btn {
    padding: 6px 12px;
    border: 1px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background: #007bff;
    color: white;
}

/* Options Section */
.options-section {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
}

.radio-item,
.checkbox-item {
    display: flex;
    align-items: center;
    padding: 12px 8px;
    cursor: pointer;
    font-size: 14px;
    position: relative;
    transition: all 0.2s ease;
    border-radius: 4px;
    min-height: 44px;
    width: 100%;
    box-sizing: border-box;
}

.radio-item:hover,
.checkbox-item:hover {
    background: #f8f9fa;
}

.radio-item.hidden,
.checkbox-item.hidden {
    display: none;
}

.radio-item.selected {
    background: #e3f2fd;
    font-weight: 600;
    color: #1976d2;
}

/* Search highlighting for feature grouping fix */
.radio-item.match-highlight,
.checkbox-item.match-highlight {
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    font-weight: 600;
}

.radio-item.match-partial,
.checkbox-item.match-partial {
    background: #f8f9fa;
    border-left: 2px solid #dee2e6;
}

.option-icon {
    margin-right: 10px;
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.option-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    line-height: 1.3;
}

.radio-item input[type="radio"],
.checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    accent-color: #007bff;
    flex-shrink: 0;
}

/* Mobile specific text improvements */
@media (max-width: 767px) {
    .radio-item,
    .checkbox-item {
        padding: 10px 6px;
        font-size: 13px;
        min-height: 40px;
    }
    
    .option-icon {
        margin-right: 8px;
        font-size: 14px;
        width: 18px;
    }
    
    .radio-item input[type="radio"],
    .checkbox-item input[type="checkbox"] {
        margin-right: 8px;
        width: 14px;
        height: 14px;
    }
    
    .option-text {
        font-size: 12px;
        line-height: 1.2;
    }
}

/* Desktop specific improvements */
@media (min-width: 1024px) {
    .radio-item,
    .checkbox-item {
        padding: 14px 12px;
        font-size: 15px;
    }
    
    .option-text {
        font-size: 14px;
        white-space: normal;
        word-wrap: break-word;
    }
}

/* Feature Sections */
.feature-section {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
}

.feature-section:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.section-title {
    font-size: 12px;
    font-weight: 700;
    color: #666;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* No Options State */
.no-options {
    padding: 24px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Search Button */
.search-btn {
    height: 48px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 24px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    min-width: 120px;
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.search-btn:active {
    transform: translateY(0);
}

/* Clear Button */
.clear-btn {
    height: 48px;
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    white-space: nowrap;
}

.clear-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Advanced Toggle */
.advanced-toggle {
    height: 48px;
    width: 100%;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #495057;
}

.advanced-toggle:hover {
    background: #e9ecef;
    border-color: #007bff;
}

.advanced-toggle:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.advanced-toggle .toggle-icon {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.advanced-toggle.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.advanced-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.toggle-text {
    margin: 0 4px;
}

@media (max-width: 767px) {
    .toggle-text {
        font-size: 13px;
    }
    
    .btn-text {
        font-size: 13px;
    }
    
    .form-label {
        font-size: 12px;
        margin-bottom: 4px;
        gap: 4px;
    }
    
    .form-label i {
        width: 12px;
        font-size: 11px;
    }
    
    .dropdown-btn {
        height: 42px;
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .dropdown-btn span:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: calc(100% - 20px);
    }
    
    .dropdown-arrow {
        flex-shrink: 0;
        margin-left: 4px;
    }
    
    .dropdown-content {
        max-height: 280px;
    }
    
    .dropdown-controls {
        flex-direction: column;
        gap: 6px;
    }
    
    .control-btn {
        width: 100%;
        text-align: center;
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* Advanced Section */
.advanced-section {
    display: none;
    padding-top: 24px;
    border-top: 2px solid #f0f0f0;
    margin-top: 24px;
    overflow: visible;
}

.advanced-section.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.advanced-grid {
    display: grid;
    gap: 20px;
    align-items: start;
}

/* Mobile: 2 boxes per row for advanced options */
@media (max-width: 767px) {
    .advanced-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .keywords-group,
    .features-group {
        grid-column: 1 / -1;
    }
}

/* Tablet: 2-3 boxes per row */
@media (min-width: 768px) and (max-width: 1023px) {
    .advanced-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
    
    .features-group {
        grid-column: 1 / -1;
    }
}

/* Desktop: 3 boxes per row */
@media (min-width: 1024px) {
    .advanced-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* Keywords Input */
.form-input {
    height: 48px;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: all 0.2s ease;
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.form-input::placeholder {
    color: #999;
}

/* Loading State */
.dropdown-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.dropdown-btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #007bff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Accessibility Improvements */
.dropdown-btn:focus-visible,
.control-btn:focus-visible,
.search-btn:focus-visible,
.clear-btn:focus-visible,
.advanced-toggle:focus-visible {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .dropdown-btn,
    .form-input {
        border-width: 2px;
    }
    
    .dropdown-content {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .dropdown-arrow,
    .toggle-icon,
    .dropdown-btn,
    .control-btn,
    .search-btn,
    .clear-btn {
        transition: none;
    }
    
    .dropdown-content,
    .advanced-section {
        animation: none;
    }
}

/* Mobile specific adjustments for better UX */
@media (max-width: 767px) {
    .search-btn,
    .clear-btn {
        height: 42px;
        font-size: 13px;
        padding: 0 16px;
        min-width: auto;
    }
    
    .advanced-toggle {
        height: 42px;
        font-size: 13px;
    }
    
    .option-text {
        font-size: 13px;
    }
    
    .section-title {
        font-size: 11px;
    }
}

/* Smooth scrolling for dropdown content */
.dropdown-content {
    scroll-behavior: smooth;
}

/* Better mobile touch targets */
@media (max-width: 767px) {
    .radio-item,
    .checkbox-item {
        min-height: 44px;
        padding: 12px 0;
    }
    
    .radio-item input[type="radio"],
    .checkbox-item input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
}

/* Improved dropdown positioning for mobile */
@media (max-width: 767px) {
    .dropdown-content {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: 280px;
        border-radius: 8px;
        margin-top: 4px;
    }
    
    /* Alternative: Full screen modal for very small screens */
    @media (max-width: 480px) {
        .custom-dropdown.active .dropdown-content {
            position: fixed;
            top: 10%;
            left: 16px;
            right: 16px;
            bottom: auto;
            max-height: 70vh;
            border-radius: 12px;
            margin-top: 0;
            z-index: 10000;
        }
    }
}

@keyframes slideUpMobile {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced feature section styling */
.feature-section .checkbox-item {
    border-bottom: 1px solid #f8f9fa;
}

.feature-section .checkbox-item:last-child {
    border-bottom: none;
}

/* Loading animation for district loading */
.loading-districts {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-style: italic;
    color: #666;
}

.loading-districts::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #007bff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}


/* =============================================================================
   FORCED FIXES - OVERRIDE EXISTING STYLES
   ============================================================================= */

/* FORCE Advanced Grid to display in rows - DESKTOP */
@media (min-width: 768px) {
    .advanced-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
        align-items: start !important;
        grid-template-rows: auto auto auto !important;
    }
    
    .keywords-group { grid-column: 1 / -1 !important; order: 1 !important; }
    .status-group { grid-column: 1 !important; order: 2 !important; }
    .bathrooms-group { grid-column: 2 !important; order: 3 !important; }
    .area-min-group { grid-column: 3 !important; order: 4 !important; }
    .area-max-group { grid-column: 1 !important; order: 5 !important; }
    .features-group { grid-column: 2 !important; order: 6 !important; }
    .project-status-group { grid-column: 3 !important; order: 7 !important; }
    .installment-group { grid-column: 1 !important; order: 8 !important; }
    .developer-group { grid-column: 2 !important; order: 9 !important; }
    .age-group { grid-column: 3 !important; order: 10 !important; }
}

/* FORCE Mobile: Two boxes per row */
@media (max-width: 767px) {
    .advanced-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }
    
    .keywords-group { grid-column: 1 / -1 !important; }
    .features-group { grid-column: 1 / -1 !important; }
}

/* FORCE text to fit in boxes */
.form-label {
    white-space: nowrap !important;
    font-size: 12px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.dropdown-btn span:first-child {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: calc(100% - 25px) !important;
}

/* FORCE dropdown widths */
#districtContent {
    min-width: 320px !important;
    width: auto !important;
}

#maxPriceContent {
    min-width: 200px !important;
    width: auto !important;
}

/* FORCE option text fitting */
.option-text {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 200px !important;
}

/* Mobile specific text sizing */
@media (max-width: 767px) {
    .form-label {
        font-size: 11px !important;
    }
    
    .dropdown-btn {
        font-size: 11px !important;
        height: 38px !important;
        padding: 6px 10px !important;
    }
    
    .option-text {
        font-size: 11px !important;
        max-width: 120px !important;
    }
}

/* COPY THIS EXACT CSS TO THE END OF YOUR property-search-form.css FILE */

/* District text breaking fix - Line 70: <span class="option-text">{{ $district->name }}</span> */
#districtContent .option-text {
    white-space: nowrap !important;
}

/* District dropdown width fix - Line 48: <div class="dropdown-content" id="districtContent"> */
#districtContent {
    width: 350px !important;
}

/* Max Price label breaking fix - Line 169: Max Price */
.price-max-group .form-label {
    white-space: nowrap !important;
}

/* Max Price dropdown width fix - Line 175: <div class="dropdown-content" id="maxPriceContent"> */
#maxPriceContent {
    width: 220px !important;
}

/* Advanced grid layout fix - Line 218: <div class="advanced-grid"> */
@media (min-width: 768px) {
    .advanced-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 20px !important;
    }
    
    .advanced-grid .form-group {
        flex: 1 1 300px !important;
        min-width: 250px !important;
    }
    
    .keywords-group {
        flex: 1 1 100% !important;
    }
}

/* Mobile: Two boxes per row - Line 218: <div class="advanced-grid"> */
@media (max-width: 767px) {
    .advanced-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    
    .keywords-group,
    .features-group {
        grid-column: 1 / -1 !important;
    }
}





/* COPY THIS EXACT CSS TO THE END OF YOUR property-search-form.css FILE */

/* District text breaking fix - Line 70: <span class="option-text">{{ $district->name }}</span> */
#districtContent .option-text {
    white-space: nowrap !important;
}

/* District dropdown width fix - Line 48: <div class="dropdown-content" id="districtContent"> */
#districtContent {
    width: 350px !important;
}

/* Max Price label breaking fix - Line 169: Max Price */
.price-max-group .form-label {
    white-space: nowrap !important;
}

/* Max Price dropdown width fix - Line 175: <div class="dropdown-content" id="maxPriceContent"> */
#maxPriceContent {
    width: 220px !important;
}

/* Advanced grid layout fix - Line 218: <div class="advanced-grid"> */
@media (min-width: 768px) {
    .advanced-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 20px !important;
    }
    
    .advanced-grid .form-group {
        flex: 1 1 300px !important;
        min-width: 250px !important;
    }
    
    .keywords-group {
        flex: 1 1 100% !important;
    }
}

/* Mobile: Two boxes per row - Line 218: <div class="advanced-grid"> */
@media (max-width: 767px) {
    .advanced-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    
    .keywords-group,
    .features-group {
        grid-column: 1 / -1 !important;
    }
}



