/**
 * Location Finder Block Styles
 */

/* Heading Section */
.locationfinder-heading {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto 60px;
}

.locationfinder-subtitle {
    color: var(--secondary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.locationfinder-title {
    color: var(--primary);
    margin-bottom: 20px;
    max-width: 800px;
    margin: 1.5rem auto;
}

.locationfinder-copy {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto 30px;
}

.locationfinder-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.locationfinder-link {
    color: var(--secondary);
    text-decoration: none;
    display: inline-block;
    padding: 10px;
    border-bottom: 2px solid var(--tertiary);
    font-weight: 600;
    transition: all 0.3s ease;
}

.locationfinder-link i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.locationfinder-link:hover {
    color: var(--tertiary);
}

.locationfinder-link:hover i {
    transform: translateY(5px);
}

/* Map and Filters Section */
.locationfinder-map-section {
    margin-bottom: 60px;
    scroll-margin-top: 100px;
}

.locationfinder-map-container {
    display: flex;
    gap: 30px;
}

.locationfinder-filters {
    width: 40%;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.locationfinder-filter-title {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.locationfinder-filter-description {
    margin-bottom: 30px;
    color: #666;
}

.locationfinder-filter {
    margin-bottom: 20px;
}

.locationfinder-filter label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.locationfinder-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--font2);
    font-size: 16px;
    color: #333;
    background-color: white;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.locationfinder-select:focus {
    outline: none;
    border-color: var(--secondary);
}

#filter-button {
    margin-top: 10px;
    margin-bottom: 20px;
}

.locationfinder-view-listings {
    color: var(--secondary);
    text-decoration: none;
    text-align: center;
    margin-top: auto;
    padding: 10px;
    border-bottom: 2px solid var(--tertiary);
    font-weight: 600;
    transition: all 0.3s ease;
    align-self: center;
}

.locationfinder-view-listings i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.locationfinder-view-listings:hover {
    color: var(--tertiary);
}

.locationfinder-view-listings:hover i {
    transform: translateY(5px);
}

.locationfinder-map {
    width: 60%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Communities Section */
.locationfinder-communities-section {
    margin-bottom: 60px;
    scroll-margin-top: 100px;
}

.locationfinder-communities-title {
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary);
}

.locationfinder-communities-container {
    margin: 0 auto;
}

.locationfinder-communities-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    align-items: stretch;
}

/* Community Card Styling */
.locationfinder-community-card {
    width: calc(33.333% - 20px);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    padding: 0;
}

.locationfinder-community-card:hover {
    transform: scale(1.03);
}

/* Community Card Image */
.locationfinder-community-image {
    border-bottom: none;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.locationfinder-community-image img {
    width: calc(100% - 30px);
    height: auto;
    display: block;
    margin: 15px auto;
    border: 3px solid var(--secondary);
    border-radius: 15px 15px 0 0;
    margin: 0;
    border-bottom: 0;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* Community Card Content */
.locationfinder-community-content {
    border: 1px solid #E3E3E3;
    border-radius: 10px;
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.locationfinder-community-title {
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.locationfinder-community-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.locationfinder-community-info i {
    color: var(--primary);
    font-size: 18px;
}

.locationfinder-community-info a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.locationfinder-community-info a:hover {
    color: var(--primary);
}

.locationfinder-community-living-options {
    margin: 20px 0;
}

.locationfinder-community-living-options p {
    font-weight: 600;
    margin-bottom: 10px;
}

.locationfinder-living-options-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.locationfinder-living-option {
    display: inline-block;
    color: initial;
    text-decoration: underline;
    font-size: 14px;
    transition: color 0.3s ease;
}

.locationfinder-living-option:hover {
    color: var(--secondary);
}

.locationfinder-community-content .btn {
    margin-top: auto;
    align-self: center;
}

/* Google Maps Info Window Styling */
.gm-style .gm-style-iw-c {
    padding: 20px;
    border-radius: 10px;
}

.map-info-window {
    max-width: 300px;
}

.map-info-window-title {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 700;
}

.map-info-window-address {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.map-info-window-address i {
    color: var(--primary);
    margin-top: 3px;
}

.map-info-window-address a {
    color: #333;
    text-decoration: none;
}

.map-info-window-address a:hover {
    color: var(--primary);
}

.map-info-window-button {
    display: inline-block;
    background-color: var(--tertiary);
    color: white;
    padding: 8px 15px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.map-info-window-button:hover {
    background-color: var(--primary);
}

p.locationfinder-below-cards {
    text-align: center;
    margin-top: -15px;
    margin-bottom: 50px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive Styles */
@media (max-width: 1199px) {
    .locationfinder-community-card {
        width: calc(50% - 15px);
    }
}

@media (max-width: 991px) {
    .locationfinder-map-container {
        flex-direction: column;
    }

    .locationfinder-filters {
        width: 100%;
        order: 2;
    }

    .locationfinder-map {
        width: 100%;
        order: 1;
        margin-bottom: 30px;
    }

    .locationfinder-heading {
        margin-bottom: 40px;
    }

    .locationfinder-title {
        font-size: 2.2rem;
    }

    .locationfinder-link {
        width: fit-content;
        margin: auto;
    }
}

@media (max-width: 767px) {
    .locationfinder-community-card {
        width: 100%;
    }

    .locationfinder-communities-row {
        gap: 20px;
    }

    .locationfinder-heading {
        margin-bottom: 30px;
    }

    .locationfinder-title {
        font-size: 1.8rem;
    }

    .locationfinder-links {
        flex-direction: column;
        gap: 15px;
    }

    .locationfinder-community-content {
        padding: 20px;
    }
}