/*
Theme Name: ListingHive Child
Theme URI: https://hivepress.io/themes/listinghive/
Template: listinghive
Author: HivePress
Author URI: https://hivepress.io/
Description: ListingHive Child Theme.
Version: 1.0.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: listinghive-child
*/

:root {
    --primary-color: #FF6B6B;
    /* Warm Orange/Pink */
    --secondary-color: #FF8E53;
    --text-color: #333;
    --bg-light: #F9F9F9;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--text-color);
}

/* Hero Section */
.home-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    padding: 80px 20px;
    text-align: center;
    border-radius: 0 0 20px 20px;
    margin-bottom: 40px;
    position: relative;
}

.home-hero__title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 30px;
    color: #fff;
}

.home-hero__title span {
    font-size: 1.2rem;
    font-weight: normal;
    opacity: 0.9;
    display: block;
    margin-top: 10px;
}

.home-hero__search {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 8px;
    position: relative;
    z-index: 100;
}

/* Ensure form inputs are always clickable and above generic overlays */
.home-hero__search input,
.home-hero__search select,
.home-hero__search button,
.home-hero__search .hp-field {
    position: relative;
    z-index: 101;
    pointer-events: auto !important;
}

/* Prevent icons (pseudo-elements) from blocking clicks */
.home-hero__search *:before,
.home-hero__search *:after {
    pointer-events: none !important;
}

/* HivePress Search Form Customization */
.hp-form--listing-search {
    display: flex;
    gap: 10px;
}

.hp-form--listing-search .hp-field {
    margin-bottom: 0;
}

.home-hero__area-select {
    margin-top: 20px;
    font-size: 0.9rem;
}

.home-hero__area-select a {
    color: #fff;
    text-decoration: underline;
    margin: 0 5px;
}

/* Section Titles */
.section-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-all-link {
    font-size: 1rem;
    color: var(--primary-color);
    text-decoration: none;
    border: 1px solid var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    transition: all 0.3s;
}

.view-all-link:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Categories */
.home-categories {
    margin-bottom: 60px;
}

.hp-listing-categories .hp-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Mobile: 2 columns */
    gap: 20px;
    margin: 0 !important;
    /* Override negative margins */
}

@media only screen and (min-width: 48em) {
    .hp-listing-categories .hp-row {
        grid-template-columns: repeat(4, 1fr);
        /* Desktop: 4 columns */
    }
}

@media only screen and (min-width: 48em) {
    .hp-listing-category--view-block .hp-listing-category__item-count {
        position: absolute;
        left: 1rem;
        top: 1rem;
        z-index: 1;
    }
}

/* Mobile adjustments for Categories */
@media only screen and (max-width: 47.99em) {
    .hp-listing-category--view-block .hp-listing-category__name {
        font-size: 0.9rem;
        /* Reduce title size */
        word-wrap: break-word;
        /* Ensure wrapping */
    }

    .hp-listing-category--view-block .hp-listing-category__item-count {
        font-size: 0.75rem;
        /* Reduce count size */
        position: absolute;
        /* Overlay on image to save space */
        left: 5px;
        top: 5px;
        z-index: 1;
        background: rgba(0, 0, 0, 0.5);
        /* Semi-transparent background */
        color: #fff;
        padding: 2px 6px;
        border-radius: 4px;
        max-width: 90%;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
    }

    .hp-listing-category--view-block .hp-listing-category__header {
        position: relative;
        /* Context for absolute positioning */
    }

    .hp-listing-category--submit-block .hp-listing-category__content,
    .hp-listing-category--view-block .hp-listing-category__content {
        position: absolute;
        left: 0;
        bottom: 0;
        padding: 0.5rem;
    }

    .hp-listing-category--view-block .hp-listing-category__name {
        font-size: 1.1rem;
        word-wrap: break-word;
    }

    .hp-listing-category--view-block .hp-listing-category__description {
        font-size: 0.9rem;
    }
}

.hp-listing-categories .hp-grid__item {
    max-width: 100% !important;
    flex: none !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
}

/* Listings */
.home-listings {
    margin-bottom: 60px;
}


body .header-hero--large {
    padding: 0 !important;
}

@media only screen and (min-width: 48em) {
    body .header-hero--large {
        padding: 0 !important;
    }
}

/* Address Search Form Button */
.hp-listing-address-search .hp-form button[type="submit"],
.hp-listing-address-search .hp-form .hp-form__button {
    background-color: #15cd72 !important;
    border-color: #15cd72 !important;
}

.hp-listing-address-search .hp-form button[type="submit"]:hover,
.hp-listing-address-search .hp-form .hp-form__button:hover {
    background-color: #12b864 !important;
    border-color: #12b864 !important;
}

.m_top-30 {
    margin-top: -40px;
}