/* =========================================================
Vito Reality - Premium Minimalist Redesign
FIXED VERSION - SECOND BLOCK CENTERED
========================================================= */
/* =========================================================
FIRST SECTION FULL-WIDTH ONLY (for your manual Hero)
========================================================= */
body.home .elementor-section:first-child,
body.home .elementor-section-wrap>.elementor-section:first-child {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* =========================================================
HERO SECTION STYLES (vr-hero class - optional)
========================================================= */
.vr-hero {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 500px !important;
    height: 70vh !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    overflow: hidden !important;
    padding: 0 0 20px 0 !important;
    /* Moved further down (was 60px) */
    margin: 0 !important;
}

.vr-hero__bg {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    z-index: 1 !important;
}

.vr-hero__overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.25) !important;
    z-index: 2 !important;
}

.vr-hero__content {
    position: relative !important;
    z-index: 3 !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.vr-hero__buttons {
    display: flex !important;
    gap: 40px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    width: 100% !important;
}

.vr-hero__btn {
    flex: 0 1 auto !important;
    width: auto !important;
    /* Button sized to text */
    max-width: 300px !important;
    min-width: 0 !important;
    background-color: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border-radius: 12px !important;
    padding: 16px 24px !important;
    /* Reduced padding */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-decoration: none !important;
    color: #1a1a1a !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
}

.vr-hero__btn:hover {
    transform: translateY(-5px) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2) !important;
}

.vr-hero__btn-icon {
    margin-bottom: 12px !important;
    color: #2c3e50 !important;
}

.vr-hero__btn-text {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 20px !important;
    /* Reduced font size */
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    margin-bottom: 4px !important;
    /* Tighter margin */
}

.vr-hero__btn-sub {
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    color: #555 !important;
    font-weight: 500 !important;
}

@media (max-width: 768px) {
    .vr-hero {
        height: auto !important;
        min-height: auto !important;
        padding: 60px 0 !important;
    }

    .vr-hero__buttons {
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px !important;
    }

    .vr-hero__btn {
        width: 100% !important;
        max-width: 400px !important;
        padding: 30px 20px !important;
    }

    .vr-hero__btn-text {
        font-size: 26px !important;
    }
}

/* =========================================================
Property Listings Grid
========================================================= */
.es-listings,
.es-listings.es-listings--grid-3 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
    padding: 20px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.es-listings .es-post-entity.ast-col-sm-12 {
    width: auto !important;
    max-width: 400px !important;
    float: none !important;
}

.es-listing {
    max-width: 400px;
    width: 100%;
}

@media (max-width: 992px) {

    .es-listings,
    .es-listings.es-listings--grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {

    .es-listings,
    .es-listings.es-listings--grid-3 {
        grid-template-columns: 1fr !important;
    }

    .es-listings .es-post-entity.ast-col-sm-12,
    .es-listing {
        max-width: 100% !important;
    }
}

/* =========================================================
Property Card Styling
========================================================= */
.es-listing {
    background: #fff;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 0;
}

.es-listing:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.es-listing__image {
    height: 240px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid #eee;
}

.es-listing__image img,
.es-listing__image__background {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.es-listing:hover .es-listing__image img,
.es-listing:hover .es-listing__image__background {
    transform: scale(1.05);
}

.es-listing__body {
    padding: 20px;
}

.es-listing__title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 12px;
}

.es-listing__title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s;
}

.es-listing__title a:hover {
    color: #888;
}

.es-listing__price {
    margin-bottom: 15px !important;
}

.es-price,
.vr-card__price,
.es-property-price,
.es-price span {
    display: inline-block !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    background-color: #1f7278 !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    border: none !important;
    width: auto !important;
    /* Force width reset */
    max-width: 100% !important;
}

.es-listing__details {
    font-size: 14px;
    color: #666;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
    margin-top: 12px;
}

/* =========================================================
CLEANUP: Removing Sidebar and Extra System Elements
========================================================= */
.archive.tax-es_status #secondary {
    display: none !important;
}

.archive.tax-es_status #primary {
    width: 100% !important;
    border: none !important;
    max-width: 1200px;
    margin: 0 auto;
    float: none !important;
}

.archive.tax-es_status .es-listings {
    width: 100% !important;
}

.archive.tax-es_status header.page-header,
.archive.tax-es_status .ast-archive-description,
.archive.tax-es_status .page-title {
    display: none !important;
}

.es-listings-filter,
.js-es-listings-filter,
.es-top-panel,
.es-listings-wrap__top,
.es-listing-settings {
    display: none !important;
}

.es-powered {
    display: none !important;
}

.ast-builder-button-wrap {
    display: none !important;
}

/* =========================================================
HEADER & NAVIGATION STYLING
========================================================= */
.site-header,
.ast-main-header-wrap,
.ast-primary-header-bar {
    background-color: #ffffff !important;
}

/* Make sure the header menu links look like neat teal pills */
#masthead .main-header-menu .menu-item>a,
.ast-builder-menu-1 .main-navigation ul li a,
.ast-primary-header-bar .main-navigation ul li a,
.main-navigation ul li a {
    color: #ffffff !important;
    background-color: #1f7278 !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 13px !important;
    padding: 6px 14px !important;
    border-radius: 5px !important;
    margin: 0 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    line-height: normal !important;
    height: auto !important;
}

#masthead .main-header-menu .menu-item>a:hover,
.ast-builder-menu-1 .main-navigation ul li a:hover,
.ast-primary-header-bar .main-navigation ul li a:hover,
.main-navigation ul li a:hover {
    background-color: #16565b !important;
    color: #ffffff !important;
}

/* =========================================================
HEADER LAYOUT
========================================================= */
.ast-primary-header-bar .ast-builder-grid-row {
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center;
}

.ast-primary-header-bar .ast-builder-grid-row .site-header-primary-section-right {
    justify-content: flex-end;
}

.ast-primary-header-bar .ast-builder-menu-1 {
    margin: 0 auto;
}

.ast-header-social-1-wrap {
    margin-right: 20px;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
}

@media (max-width: 921px) {
    .ast-header-social-1-wrap {
        margin-right: 0;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }
}

/* =========================================================
LANGUAGE SWITCHER
========================================================= */
.widget_polylang,
.pll-parent-menu-item,
.wpml-ls-item {
    display: block;
    margin-left: 15px;
}

.pll-parent-menu-item>a,
.wpml-ls-item>a {
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #1a1a1a !important;
    display: flex !important;
    align-items: center;
    gap: 5px;
}

.pll-parent-menu-item>a::after {
    content: "▼";
    font-size: 10px;
    opacity: 0.7;
    margin-left: 2px;
}

.pll-parent-menu-item ul.sub-menu {
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    border: none !important;
}

.pll-parent-menu-item ul.sub-menu li a {
    font-weight: 600 !important;
    padding: 10px 20px !important;
    color: #444 !important;
    border-bottom: 1px solid #f5f5f5;
}

.pll-parent-menu-item ul.sub-menu li a:hover {
    background-color: #f8f9fa !important;
    color: #1a1a1a !important;
}

/* =========================================================
FIX: Logo Visibility - Universal Approach
========================================================= */

/* Always show the site identity container */
.ast-site-identity {
    z-index: 99999 !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Always show ALL logo links */
.ast-site-identity a.custom-logo-link,
.ast-site-identity a.custom-mobile-logo-link,
.site-logo-img a,
.ast-mobile-header-logo,
a.custom-logo-link,
a.custom-mobile-logo-link {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    clip: auto !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
}

/* Logo image sizing */
.ast-site-identity img,
.custom-logo-link img,
.custom-mobile-logo-link img,
.ast-mobile-header-logo img {
    max-width: 180px !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ---- FIX DOUBLE LOGO on subpages ---- */
/* When BOTH logos exist, hide the mobile one on desktop */
@media (min-width: 922px) {
    .ast-site-identity a.custom-logo-link~a.custom-mobile-logo-link {
        display: none !important;
    }
}

/* ---- MOBILE: hide desktop logo, show mobile ---- */
@media (max-width: 921px) {

    /* If both exist, hide the desktop one */
    .ast-site-identity a.custom-logo-link {
        display: none !important;
    }

    /* Always show the mobile logo */
    .ast-site-identity a.custom-mobile-logo-link {
        display: inline-block !important;
    }

    .ast-site-identity img,
    .custom-mobile-logo-link img,
    .ast-mobile-header-logo img {
        max-width: 150px !important;
    }
}

/* =========================================================
FIX: Call for price button on archives
========================================================= */
/* 1. Убираем фоны оберток и ЗАСТАВЛЯЕМ их тянуться на 100% */
.es-wrap .es-listing__price,
.es-wrap .es-listing__price-wrapper,
.es-wrap .es-property-price,
.es-wrap .es-price-wrapper,
.es-wrap .es-listing__price-on-call,
.es-wrap .es-listing__price--on-call,
.es-wrap .es-price-call,
.es-listing__price,
.es-listing__price-wrapper,
.es-property-price,
.es-price-wrapper,
.es-listing__price-on-call,
.es-listing__price--on-call,
.es-price-call {
    background: transparent !important;
    background-color: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important; /* Пробиваем flex-контейнеры */
}

/* 2. Сама плашка цены (и числа, и текст) */
.es-price:not(:has(.vr-price-on-call)),
.vr-price-on-call {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
    background-color: #2d7a77 !important;
    color: #ffffff !important;
    padding: 10px 0 !important;
    text-align: center !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
    margin-top: 15px !important;
}

/* 3. Центрируем сам текст внутри плашки */
.es-price *, .vr-price-on-call * {
    color: inherit !important;
    text-align: center !important;
}