/* ===== MOBILE RESPONSIVENESS FIXES - Hook Home ===== */
@media (max-width: 768px) {

    /* Prevent horizontal scrolling */
    html,
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    .container,
    .row,
    section {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    img,
    video,
    .swiper {
        max-width: 100% !important;
    }

    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Typography */
    .slider-content h1.text-white.animationtext.slide {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }

    h1,
    .h1 {
        font-size: 24px !important;
        line-height: 1.2 !important;
    }

    h2,
    .h2 {
        font-size: 20px !important;
    }

    h3 {
        font-size: 18px !important;
    }

    body,
    p {
        font-size: 13px !important;
    }

    /* Layout */
    .flat-section,
    section {
        padding: 30px 0 !important;
    }

    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Buttons */
    .btn,
    .tf-btn {
        font-size: 13px !important;
        padding: 8px 16px !important;
    }

    .tf-btn.primary {
        margin: 20px auto !important;
        display: block !important;
        max-width: 300px !important;
    }

    /* Property Cards */
    .homeya-box .images-style {
        height: 180px !important;
    }

    .homeya-box .content {
        padding: 15px !important;
    }

    /* Categories */
    .swiper.tf-sw-categories {
        margin-bottom: 150px !important;
    }

    .wrap-categories .box-navigation {
        display: none !important;
    }

    .flat-recommended-v2 {
        margin-top: -55px !important;
    }

    /* Counter Section */
    .counter-item {
        padding: 15px 10px !important;
    }

    .counter-icon-wrapper .icon-bg-circle {
        width: 50px !important;
        height: 50px !important;
    }

    .counter-number-wrapper .counter-number {
        font-size: 32px !important;
        font-weight: 700 !important;
    }

    .counter-text-wrapper .counter-text {
        font-weight: 700 !important;
        font-size: 12px !important;
    }

    /* ===== HERO SECTION FIXES ===== */
    .flat-slider,
    .flat-slider .slider-item,
    .flat-slider .swiper-slide {
        height: auto !important;
        min-height: 600px !important;
    }

    .flat-slider .slider-content {
        padding-top: 100px !important;
        padding-bottom: 60px !important;
        height: auto !important;
    }

    .flat-slider .slider-item .img-slider {
        height: 100% !important;
        position: absolute !important;
        top: 0;
        left: 0;
        width: 100% !important;
        object-fit: cover !important;
        z-index: -1;
    }

    /* Increase width of search tabs */
    .flat-tab.flat-tab-form {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
    }

    .flat-tab.flat-tab-form .nav-tab-form {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Make hero section container full width */
    .flat-slider .container.relative,
    .slider-content .container.relative {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* ===== SEARCH FORM GRID LAYOUT (MOBILE) ===== */
    .wd-find-select {
        width: 100% !important;
        margin: 0 !important;
        padding: 15px !important;
        background: #fff !important;
        border-radius: 12px !important;
    }

    .wd-find-select .inner-group {
        display: grid !important;
        grid-template-columns: 5fr 1fr 3fr 1fr !important;
        /* row1=5fr+1fr, row2=3fr+1fr */
        gap: 10px !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    svg.svg-icon-ti-ti-current-location {
        display: none !important;
    }

    .wd-find-select .inner-group .group-ip .icon {
        display: none !important;
    }

    /* Reset styles */
    .wd-find-select .inner-group>div,
    .wd-find-select .inner-group .form-style {
        min-width: unset !important;
        width: 100% !important;
        flex: unset !important;
        border: 1px solid #eee !important;
        border-radius: 8px !important;
        padding: 8px !important;
        margin: 0 !important;
    }

    /* Row 1: Keyword (col 1-2) and Location (col 3-4) */
    .wd-find-select .inner-group .form-group-1 {
        grid-column: 1 / 3 !important;
        /* Spans columns 1-2 */
    }

    .wd-find-select .inner-group .form-group-2 {
        grid-column: 3 / 5 !important;
        /* Spans columns 3-4 */
    }

    /* Row 2: Category (col 1-3) and Filter (col 4) */
    .wd-find-select .inner-group .form-group-3 {
        grid-column: 1 / 4 !important;
        /* Spans columns 1-3 (3fr) */
    }

    .wd-find-select .inner-group .form-group-4,
    .wd-find-select .inner-group .box-filter {
        grid-column: 4 / 5 !important;
        /* Spans column 4 (1fr) */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #f7f7f7 !important;
        padding: 4px !important;
    }

    .wd-find-select .inner-group .box-filter .filter-advanced {
        flex-direction: column !important;
        gap: 2px !important;
        font-size: 8px !important;
    }

    .wd-find-select .inner-group .box-filter .text-1 {
        font-size: 8px !important;
    }

    /* Hide keyword help text */
    .wd-find-select .inner-group #keyword-help {
        display: none !important;
    }

    /* Search Button Container - Full Width */
    .wd-find-select .d-flex.gap-2 {
        grid-column: 1 / 5 !important;
        /* Full width across all 4 columns */
        margin-top: 10px !important;
        padding: 0 !important;
        width: 100% !important;
        display: block !important;
    }

    .wd-find-select .d-flex.gap-2 button {
        width: 100% !important;
        display: block !important;
    }

    /* Restore Icons and Styles */
    .wd-find-select .inner-group .icon {
        display: block !important;
        width: 16px !important;
        height: 16px !important;
    }

    .wd-find-select .inner-group label {
        font-size: 9px !important;
        margin-bottom: 2px !important;
        display: block !important;
    }

    .wd-find-select .inner-group .form-control,
    .wd-find-select .inner-group .nice-select {
        height: 30px !important;
        line-height: 30px !important;
        font-size: 11px !important;
        padding: 0 !important;
        border: none !important;
    }

    .wd-find-select .inner-group .form-control::placeholder {
        font-size: 10px !important;
    }

    /* ===== PROPERTY LISTINGS - 1 PER ROW ON MOBILE ===== */

    /* Force 1 column layout for Bootstrap row-cols classes */
    .row.row-cols-xl-3,
    .row.row-cols-lg-3,
    .row.row-cols-md-3,
    .row.row-cols-md-2,
    .row.row-cols-sm-2,
    .row.row-cols-2,
    .row.row-cols-1 {
        --bs-columns: 1 !important;
    }

    .row.row-cols-xl-3>*,
    .row.row-cols-lg-3>*,
    .row.row-cols-md-3>*,
    .row.row-cols-md-2>*,
    .row.row-cols-sm-2>*,
    .row.row-cols-2>*,
    .row>.col,
    .row>.col-6,
    .row>.col-md-6,
    .row>.col-lg-4,
    .row>.col-xl-4 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        margin-bottom: 20px !important;
    }

    /* Property card containers */
    .homeya-box,
    .box-dream,
    .property-item,
    .project-item,
    .box-house {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 20px !important;
    }
}