/**
 * Realgest for WordPress Styles
 */

:root{
    --primary-color: #679941;
    --secondary-color: #007bff;
    --tertiary-color: #E74C3C;
    --text-color: #666;
    --heading-color: #333;
    --primary-color-hover : #50792d;
}

/* General */
.realgest-error,
.realgest-no-results {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.realgest-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.realgest-no-results {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Properties Grid */
.realgest-properties-grid,
.realgest-properties-vertical {
    width: 100%;
}

.realgest-properties-grid .realgest-properties-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 20px;
}

.realgest-properties-vertical .realgest-properties-list{
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.realgest-properties-grid.columns-1 .realgest-properties-list {
    grid-template-columns: 1fr;
}

.realgest-properties-grid.columns-2 .realgest-properties-list {
    grid-template-columns: repeat(2, 1fr);
}

.realgest-properties-grid.columns-3 .realgest-properties-list {
    grid-template-columns: repeat(3, 1fr);
}

.realgest-properties-grid.columns-4 .realgest-properties-list {
    grid-template-columns: repeat(4, 1fr);
}


@media (max-width: 992px) {
    .realgest-properties-list {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 576px) {
    .realgest-properties-list {
        grid-template-columns: 1fr !important;
    }
}

.realgest-properties-header {
    margin-bottom: 20px;
}

.realgest-properties-count {
    font-size: 16px;
    color: #666;
}

.realgest-property {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.realgest-property:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.realgest-properties-grid .realgest-property-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.realgest-properties-vertical .realgest-property-inner {
    display: grid;
    grid-template-columns: 40% 60%;
    height: 100%;
}
/*
.realgest-property-thumbnail {
    position: relative;
    padding-top: 66.67%;
    overflow: hidden;
}

.realgest-property-thumbnail-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}
*/
.realgest-property-thumbnail-container {
    position: relative;
}
.realgest-properties-grid .realgest-property-thumbnail{
    width: 100%;
    background-position: center;
    background-attachment: unset;
    background-repeat: no-repeat;
    background-size: cover;
    aspect-ratio: 3/2;
}

.realgest-properties-vertical .realgest-property-thumbnail{
    height: 100%;
    width: 100%;
    background-position: center;
    background-attachment: unset;
    background-repeat: no-repeat;
    background-size: cover;
    aspect-ratio: 3/2;
}

.realgest-property-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.realgest-property-no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    color: #999;
    font-size: 14px;
}

.realgest-property-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
}

.realgest-property-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    color: #fff;
}

.realgest-property-badge-vendita {
    background-color: var(--primary-color);
}

.realgest-property-badge-affitto {
    background-color: var(--secondary-color);
}

.realgest-property-badge-locazione{
    background-color: var(--tertiary-color);
}

.realgest-properties-grid .realgest-property-content ,
.realgest-properties-vertical .realgest-property-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.realgest-properties-vertical .realgest-property-content {
    gap: 10px;
}

.realgest-property-title {
    font-size: 14px;
    line-height: 1.6;
    color: var(--heading-color);
}
.realgest-properties-vertical .realgest-property-title {
    font-size: 26px;
    line-height: 1.1;
    margin: 0;
    color: var(--heading-color);
}

.realgest-property-title a {
    color: var(--heading-color);
    text-decoration: none;
}

.realgest-property-title a:hover {
    color: var(--primary-color);
}

.realgest-property-location {
    font-size: 14px;
    color: #666;
}

.realgest-property-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.realgest-property-price {
    font-size: 24px;
    font-weight: bold;
    color: var(--heading-color);
    margin-bottom: 5px;
}

.realgest-property-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.realgest-property-feature {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #666;
}

.realgest-property-feature-icon {
    margin-right: 5px;
    display: flex;
    align-items: center;
}

.realgest-single-property-description {
    font-size: 14px;
    color: #666;
}

.realgest-properties-grid .realgest-property-description,
.realgest-properties-vertical .realgest-property-description{
    font-size: 14px;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;     /* numero massimo di righe */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.realgest-properties-vertical .realgest-property-description {
    -webkit-line-clamp: 3;     /* numero massimo di righe */
}

.realgest-property-actions {
    margin-top: auto;
}

.realgest-property-view-button {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.realgest-property-view-button:hover {
    background-color: var(--primary-color-hover);
    color: #fff;
}

/* Pagination */
.realgest-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
    text-align: center;
}

.realgest-pagination .page-numbers {
    display: flex;
    padding: 5px 10px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    list-style-type: none;
    color: #333;
}

.realgest-pagination .page-numbers.current {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.realgest-pagination .page-numbers a:hover{
    background-color: #f5f5f5;
}

/* Single Property */
.realgest-property-single {
    margin-bottom: 30px;
}

.realgest-property-header {
    margin-bottom: 20px;
}

.realgest-property-single .realgest-property-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.realgest-property-single .realgest-property-location {
    font-size: 16px;
    margin-bottom: 15px;
}

.realgest-property-single .realgest-property-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.realgest-property-reference {
    font-size: 14px;
    color: #666;
}

.realgest-property-single .realgest-property-price {
    font-size: 22px;
}

.realgest-property-gallery {
    margin-bottom: 30px;
}

.realgest-property-gallery-main {
    position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 4px;
}

.realgest-property-gallery-main-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.realgest-property-gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-gap: 10px;
}

@media (max-width: 768px) {
    .realgest-property-gallery-thumbnails {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 576px) {
    .realgest-property-gallery-thumbnails {
        grid-template-columns: repeat(3, 1fr);
    }
}

.realgest-property-gallery-thumbnail {
    position: relative;
    padding-top: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
}

.realgest-property-gallery-thumbnail-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.realgest-property-gallery-thumbnail:hover .realgest-property-gallery-thumbnail-image {
    transform: scale(1.1);
}

.realgest-property-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .realgest-property-details {
        grid-template-columns: 1fr;
    }
}

.realgest-property-amenities {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
}

.realgest-property-features h3,
.realgest-property-amenities h3,
.realgest-property-description h3,
.realgest-single-property-description h3,
.realgest-property-map h3,
.realgest-property-videos h3,
.realgest-property-virtual-tour h3,
.realgest-property-floor-plan h3 {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
    color: var(--heading-color);
}

.realgest-property-features-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 10px;
}

.realgest-property-feature {
    margin-bottom: 10px;
}

.realgest-property-feature-label {
    font-weight: bold;
    margin-right: 5px;
}

.realgest-property-amenities-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 10px;
}

@media (max-width: 576px) {
    .realgest-property-features-list,
    .realgest-property-amenities-list {
        grid-template-columns: 1fr;
    }
}

.realgest-property-amenity {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.realgest-property-amenity-icon {
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.realgest-property-description-content {
    line-height: 1.6;
}

.realgest-property-map {
    margin-bottom: 30px;
}

.realgest-property-map-container {
    height: 400px;
    border-radius: 4px;
    overflow: hidden;
}

.realgest-property-videos {
    margin-bottom: 30px;
}

.realgest-property-videos-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 20px;
}

@media (max-width: 768px) {
    .realgest-property-videos-list {
        grid-template-columns: 1fr;
    }
}

.realgest-property-video {
    position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: 4px;
}

.realgest-property-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.realgest-property-virtual-tour,
.realgest-property-floor-plan {
    margin-bottom: 30px;
}

.realgest-property-floor-plan-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Search Form */
.realgest-search {
    margin-bottom: 30px;
}

.realgest-search-form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 15px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

@media (max-width: 992px) {
    .realgest-search-form {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .realgest-search-form {
        grid-template-columns: 1fr;
    }
}

.realgest-search-field {
    margin-bottom: 15px;
}

.realgest-search-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.realgest-search-field select,
.realgest-search-field input[type="number"],
.realgest-search-field input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.realgest-search-range {
    display: flex;
    align-items: center;
}

.realgest-search-range input {
    flex: 1;
}

.realgest-search-range-separator {
    margin: 0 10px;
}

.realgest-search-features-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 10px;
}

@media (max-width: 576px) {
    .realgest-search-features-list {
        grid-template-columns: 1fr;
    }
}

.realgest-search-feature {
    display: flex;
    align-items: center;
}

.realgest-search-feature input[type="checkbox"] {
    margin-right: 5px;
}

.realgest-search-submit {
    grid-column: 1 / -1;
    text-align: center;
}

.realgest-search-button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.realgest-search-button:hover {
    background-color: var(--primary-color-hover);
}

.realgest-loading {
    margin-left: 10px;
    font-style: italic;
    color: #666;
}
