.modal-overlay {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    display: none;
    z-index: 2000;
    overflow-y: auto;
}
.modal-grid {
    display: flex;
    gap: 30px;
    padding: 20px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2vh;
    margin-right: 1vh;
    margin-left: 1vh;
}
.modal-gallery{
    min-width: 35%;
}
.modal-thumbnails {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    height: 100px;
}
.modal-thumbnails img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
}
.modal-thumbnails img.active {
    border: 3px solid #007bff;
}
.modal-details {
    background: white;
    padding: 1.5rem;
    overflow-y: auto;
    flex-direction: column;
    justify-content: flex-end;
    display: flex;
    margin-bottom: 5vh;
}
.modal-map {
    height: 50vh;
    width: 100%;
}
.catalog-map-container{
width: 100%;
display: flex;
justify-content: center;
}
.modal_info{
    margin-left: 5vh;
    padding-bottom: 2vh;
}
.modal_description{
    min-width: 300px;
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 20px; 
}
.mortgage-section {
    margin: 0 auto;
    font-family: Arial, sans-serif;
    color: #333;
    padding-bottom: 50px;
}
.mortgage-header {
    text-align: center;
    margin-bottom: 20px;
}
.mortgage-logo {
    display: block;
    margin: 0 auto 10px;
}
.mortgage-description {
    font-size: 14px;
    color: #666;
}
.mortgage-calculator {
    background: #fff;
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}
.calculator-inputs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    width: 50%;
}
.calculator-group {
    width: 500px;
    height: 200px;
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    background: white;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin: 2vh;
    padding: 20px;
    font-size: 24px;
    align-items: center;
}
.calculator-group label {
    display: block;
    font-size: 20px;
    margin-bottom: 5px;
}
.rate-input {
    width: 150px;
    padding: 12px 20px;
    font-size: 18px;
    font-family: 'Arial', sans-serif;
    color: #2c3e50;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
    line-height: 1.5;
}
.rate-input:focus {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}
.rate-input:hover {
    border-color: #bdc3c7;
}
.rate-input::-webkit-inner-spin-button,
.rate-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
@media (max-width: 480px) {
    .rate-input {
        font-size: 14px;
        padding: 8px 14px;
    }
}
.value-display {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.value-display::after {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    font-size: 14px;
    pointer-events: none;
}
.input-field {
    width: 100%;
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-align: center;
}
.range-slider {
    width: 100%;
    margin-top: 5px;
}
.calculator-payment {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    width: 40%;
}
.payment-result {
    font-weight: bold;
    background: #f8f8f8;
    cursor: not-allowed;
}
.calculator-footer {
    text-align: center;
}
.calculator-note {
    font-size: 14px;
    color: #777;
    margin-bottom: 15px;
}
.apply-button {
    background: #ffcc00;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
}
.payment-info {
    display: flex;
    font-size: 24px;
    flex-direction: column;
    width: 500px;
    align-items: flex-start;
}
.callback{
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: flex-end;
    width: 500px;
}
.ipoteka {
    width: 300px;
    height: 6px;
    -webkit-appearance: none;
    background: transparent;
    margin: 10px 0;
}
.ipoteka::-webkit-slider-runnable-track {
    height: 4px;
    background: #000;
    border-radius: 2px;
    position: relative;
}
.ipoteka::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #FFD700;
    border-radius: 50%;
    margin-top: -8px;
    cursor: pointer;
    z-index: 2;
    position: relative;
}
.ipoteka::-webkit-slider-runnable-track::before {
    content: '';
    position: absolute;
    left: 0;
    height: 100%;
    width: var(--fill-percent);
    background: #FFD700;
    border-radius: 2px;
    z-index: 1;
}
.ipoteka::-moz-range-track {
    height: 4px;
    background: #000;
    border-radius: 2px;
}
.ipoteka::-moz-range-progress {
    height: 4px;
    background: #FFD700;
    border-radius: 2px;
}
.ipoteka::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #FFD700;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}
.fullscreen-map {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    background: white;
}
.leaflet-control-fullscreen {
    background: #fff;
    padding: 5px 8px;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
    margin-right: 10px !important;
}
.leaflet-control-fullscreen:hover {
    background: #f4f4f4;
}
@media (max-width: 768px) {
    .leaflet-control-fullscreen {
        padding: 4px 6px;
        font-size: 14px;
    }
    .rate-input {
        width: 100%;
        max-width: 200px;
        padding: 10px 16px;
        font-size: 16px;
    }
    .modal_info{
    padding-bottom: 2vh;
    justify-content: center;
}
    .modal-gallery {
        min-width: 100%;
        display: flex;
        justify-content: center;
        flex-direction: column;
    }
}
.modal-close-btn {
    font-size: 48px;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    z-index: 1001;
    display: flex;
}
.modal-close-btn:hover {
    color: #000;
}
.modal-object-details{
    display: flex;
    margin-top: 5vh;
}
.modal-object-delail-list{
    list-style-type: none;
    padding-left: 0;
    width: 50%;
}
.modal-object-delail-info{
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    margin-top: 1vh;
}
.modal-object-detail-description{
    font-size: 18px;
    font-weight: 500;
}
.modal-object-detail-param{
    font-size: 18px;
    color: gray;
    margin-left: 1vh;
}
@media (max-width: 1300px) {
    .modal-grid {
        flex-direction: column;
        gap: 20px;
        padding: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        align-content: center;
    }
    .modal-gallery {
        min-width: 100%;
    }
    .modal_description {
        min-width: auto;
        width: 100%;
        align-items: center;
    }
    .calculator-group,
    .payment-info,
    .callback {
        width: 100%;
        max-width: 100%;
    }
    .calculator-inputs {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    .calculator-payment {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
}
@media (max-width: 768px) {
    .modal-grid {
        gap: 15px;
        margin: 0;
    }
    .modal-details {
        padding: 1rem;
    }
    .modal-thumbnails {
        grid-template-columns: repeat(3, 1fr);
        height: auto;
    }
    .modal-info {
        margin-left: 0;
    }
    .modal-object-details {
        flex-direction: column;
        margin-top: 2vh;
    }
    .modal-object-delail-list {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    .modal-object-detail-description,
    .modal-object-detail-param {
        font-size: 16px;
    }
    .calculator-group {
        font-size: 18px;
        padding: 15px;
    }
    .payment-info,
    .callback {
        font-size: 18px;
        align-items: center;
    }
    .apply-button {
        width: 100%;
        padding: 10px;
        font-size: 16px;
    }

    .modal-close-btn {
        font-size: 36px;
    }
}
@media (max-width: 480px) {
    .modal-thumbnails {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }
    .modal_description {
        gap: 15px;
    }
    .calculator-group {
        font-size: 16px;
        padding: 10px;
    }
    .modal-gallery {
        min-width: 100%;
        display: flex;
        justify-content: center;
        flex-direction: column;
    }
    .modal_info {
        margin: 0;
        padding-bottom: 2vh;
        display: flex;
        align-items: center;
        flex-direction: column;
    }
    .modal-object-delail-list {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(1, 1fr);
    }
    .rate-input {
        font-size: 14px;
        padding: 8px 10px;
    }
    .modal-close-btn {
        font-size: 32px;
    }
    .leaflet-control-fullscreen {
        font-size: 12px;
        padding: 3px 5px;
    }
}