.complex-gallery-section {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    background-color: white;
    padding: 4vh;
    margin-top: 2vh;
    align-items: center;
}

.nb_round {
    width: 16px;
    height: 16px;
    background: #ffcc00;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.main-gallery {
    position: relative;
    width: 450px;
    height: 500px;
    flex-shrink: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.current-main-image {
    width: 450px;
    height: 500px;
    object-fit: cover;
    background: #f5f5f5;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    display: block;
}

.main-image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #333;
}

.complex-description{
    margin-left: 2vh;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    display: inline-block;
}

.main-image-nav:hover {
    background: white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-50%) scale(1.05);
}

.main-image-nav.prev {
    left: 5%;
}

.main-image-nav.next {
    right: 5%;
}

.thumbnails-column {
    display: flex;
    flex-direction: column;
    gap: 2vh;
    margin-top: 0;
}

.thumbnail {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    image-rendering: crisp-edges;
    background: #f5f5f5;
}

.thumbnail:hover {
    border-color: #007bff;
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: #007bff;
    box-shadow: 0 3px 6px rgba(0, 123, 255, 0.2);
}

.complex-info-block {
    flex: 1;
    margin-left: 30px;
}

.complex-header {
    display: flex;
    align-items: baseline;
    flex-direction: column;
}

.complex-title {
    font-size: 24px;
    margin: 0;
}

.izhs-title{
    font-size: 24px;
    font-weight: bold;
    display: inline-block;
}

.developer-info{
    margin-left: 2vh;
}

.meta-grid {
    display: flex;
    gap: 15px 30px;
    margin-bottom: 4vh;
    margin-left: 2vh;
}

.scrollable-description {
    max-height: 150px;
    margin-left: 2vh;
    overflow-y: auto;
    margin-bottom: 4vh;
    padding-right: 10px;
}

.specs-grid {
    display: grid;
    margin-left: 2vh;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 90vh;
}

.spec-item {
    padding: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    flex: 1;
    border-radius: 50px;
    font-weight: 500;
    box-sizing: border-box;
    max-height: 7vh;
    max-width: 40vh;
    justify-content: center;
}

.spec-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

table {
    width: 80%;
    max-width: 1000px;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

th {
    background: #007bff;
    color: #fff;
    padding: 12px;
    text-align: left;
    font-size: 16px;
}

td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

tr:nth-child(even) {
    background: #f9f9f9;
}

a[href="complex_form.php"] {
    display: inline-block;
    margin-top: 10px;
    background: #007bff;
    padding: 10px 15px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
}

a[href="complex_form.php"]:hover {
    background: #0056b3;
}

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    max-width: 70%;
    cursor: default;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: cover;
    background: #000;
    transition: transform 0.3s ease;
    cursor: grab;
}

.lightbox-image:active {
    cursor: grabbing;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: -40px;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    padding: 10px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.complex-full-description{
    display: flex;
    flex-direction: column;
    background-color: white;
    padding-top: 4vh;
}

.complex-full-description-cards{
    display: flex;
    justify-content: center;
    gap: 5vh;
}

.complex-full-description-card{
    display: flex;
    flex-direction: column;
    padding-top: 10vh;
    padding-bottom: 15vh;
}

.complex-full-description-img {
    width: 400px;
    height: 400px;
    object-fit: cover;
    flex-shrink: 0;
}

.complex-full-description-scroll {
    overflow-y: auto;
    overflow-x: hidden;
    height: 300px;
    padding: 10px;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
    font-size: 18px;
    white-space: pre-wrap;
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

.complex-info-card {
    background: rgba(238, 238, 238, 0.3);
    border-radius: 10px;
    overflow: hidden;
    height: 300px;
    width: 400px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: left;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
}
.newbuilding-section-button:hover{
    background-color: #f1c40f;
}

.complex-full-description-scroll::-webkit-scrollbar {
    width: 6px;
}

.complex-full-description-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.complex-full-description-scroll::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.complex-full-description-scroll::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.lightbox-nav.prev { left: -80px; }
.lightbox-nav.next { right: -80px; }

.modal-and-map{
    display: flex;
    background-color: white;
    flex-direction: row-reverse;
}

.secondary-description{
    display: flex;
    flex-direction: column;
    width: 45%;
    margin-left: 10vh;
    margin-top: 10vh;
    margin-bottom: 10vh;
    gap: 4vh;
}

.secondary-description-card {
    position: relative; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    overflow: hidden;
    box-shadow: 0px 1px 10px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: color 0.5s ease;
    min-height: 200px; 
}

.secondary-description-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: #f1c40f;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.secondary-description-card:hover {
    color: #000 !important;
}

.secondary-description-card:hover::before {
    height: 100%;
}

.secondary-description-card * {
    position: relative;
    transition: color 0.3s ease 0.1s;
    z-index: 2;
}

.secondary-description-card:hover * {
    color: inherit !important;
}

.spec-item:hover{
    transform: scale(1.05);
    z-index: 2; 
}

.complex-full-description-card:hover{
    transform: scale(1.05);
    z-index: 2;
}

.complex-video.main-slide {
    position: relative;
    width: 100%;
    height: 100vh;
}

.video-wrapper video {
    width: 100%;
    height: 85%;
    object-fit: cover;
    padding: 5vh;
}

.secondary-description-scroll {
    overflow-y: auto;
    display: flex;
    overflow-x: hidden;
    height: 30vh;
    font-size: 22px;
    margin-left: 4vh;
    margin-right: 4vh;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
    white-space: pre-wrap;
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
    align-items: center;
}

.secondary-description-card h3{
    padding-top: 4vh;
}

.modal-map {
    min-height: 100%;
    width: 100%;
}

.leaflet-container {
    background: #f8f9fa;
}
.catalog-map-container{
    height: 100vh;
    width: 50%;
    margin-top: 2vh;
    margin-bottom: 2vh;
    box-shadow: inset 0px 1px 20px 20px rgba(0, 0, 0, 0.1);
}
.complex-layouts{
    background-color: white;
    padding-bottom: 7vh;
}
.layout-card-02 {
    width: 300px;
    display: flex;
    align-items: center;
    flex-direction: column;
}
.layout-card-and-object-photos{
    display: flex;
    flex-direction: column;
}
.slider {
    position: relative;
    width: 300px;
    height: 300px;
    overflow: hidden;
    cursor: pointer;
}
.slider img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    display: none;
    transition: transform 0.3s ease;
    cursor: pointer;
}
.slider img.active {
    display: block;
}
.slider .prev, .slider .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slider .prev {
    left: 10px;
}
.slider .next {
    right: 10px;
}
.layout-card-02:hover {
    transform: scale(1.05);
    z-index: 2;
}
.complex-layout-info-card {
    background: rgba(238, 238, 238, 0.3);
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: left;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
}
.card-footer {
    font-size: 20px;
    font-weight: bold;
    margin-top: 4vh;
    border-top: 1px solid #aaa;
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.layout-image img{
    height: 400px;
    width: 400px;
    object-fit: contain;
}
.layouts-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    margin: 10vh;
    align-items: end;
    justify-content: end;
    justify-items: center;
    gap: 4vh;
}
.place-info{
   display: flex;
   font-size: 24px;
   font-weight: 500;
   color: black;
}
.complex-layout-param{
    margin-right: 1vh;
    margin-top: 1vh;
    color: #4B4B4B;
}
.complex-video {
    background-color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 2vh; 
    padding-top: 2vh; 
}
.building-info{
    display: flex;
    flex-direction: column;
    background-color: white;
}
.building-info-card-images {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-evenly;
    margin-bottom: 10vh;
}
.image-container {
    width: 40vh;
    height: var(--image-height, 300px);
    position: relative;
    overflow: hidden;
    object-fit: cover;
}
.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.date {
    font-size: 16px;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    position: absolute;
    bottom: 10px;
    left: 10px;
}
.layout-image:hover{
    cursor: pointer;
}
.main-gallery{
    cursor: pointer;
}
.swiper-slide{
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    margin-right: 2vh;
    margin-left: 2vh;
    margin-top: 2vh;
    cursor: pointer;

}
.swiper-slide img {
    min-height: 300px;
    max-height: 300px;
    object-fit: scale-down;
    min-width: 300px;
    max-width: 300px;
}
.floor-index {
    position: absolute;
    bottom: 2vh;
    left: 1vh;
    background: rgb(217 217 217 / 80%);
    padding: 0.5vh 1.5vh;
    border-radius: 50px;
    font-size: 18px;
    display: flex;
    align-items: center;
    backdrop-filter: blur(2px);
}
@media (max-width: 1700px) {
.complex-full-description-img {
    width: 350px;
    height: 350px;
    object-fit: cover;
    flex-shrink: 0;
}
.complex-info-card {
        height: 300px;
    width: 350px;
}
.layouts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 10vh;
    gap: 2vh;
    align-items: end;
    justify-content: end;
    justify-items: center;
}
}
@media (max-width: 1550px) {
.complex-full-description-img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    flex-shrink: 0;
}
.complex-info-card {
    height: 250px;
    width: 300px;
}
}
@media (max-width: 1300px) {
    .complex-gallery-section {
        flex-direction: column;
        padding: 2vh;
    }
    .layouts-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        margin: 10vh;
        gap: 2vh;
        align-items: end;
        justify-content: end;
        justify-items: center;
    }
    .complex-info-card {
        width: 100%;
        margin-top: 2vh;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    .complex-full-description-scroll{
        margin-top: 1vh;
    }
    .main-gallery,
    .current-main-image {
        width: 100%;
        height: 70vw;
        max-width: 600px;
    }
    .thumbnails-column {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        margin: 2vh 0;
    }
    .thumbnail {
        width: 80px;
        height: 80px;
    }
    .complex-info-block {
        margin-left: 0;
        width: 100%;
    }
    .specs-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
    }
    .complex-full-description-cards {
        flex-direction: column;
        align-items: center;
    }
    .complex-full-description-card {
        padding: 5vh 0;
    }
    .complex-full-description-img {
        width: 100%;
        height: auto;
    }
    .modal-and-map {
        flex-direction: column;
    }
    .secondary-description {
        width: 90%;
        margin: 5vh auto;
    }
    .catalog-map-container {
        width: 100%;
        height: 50vh;
    }
    .building-info-card-images {
        flex-wrap: wrap;
        gap: 2vh;
    }
}
@media (max-width: 968px) {
.layouts-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2vh;
    align-items: end;
    justify-content: end;
    justify-items: center;
}
}
@media (max-width: 768px) {
    .main-image-nav {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }
    .complex-layouts {
        background-color: white;
        padding-bottom: 7vh;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .specs-grid {
        grid-template-columns: 1fr;
    }
    .layout-image img {
        width: 100%;
        height: auto;
    }
    
    .complex-full-description-scroll,
    .secondary-description-scroll {
        font-size: 16px;
    }
    
    table {
        width: 100%;
    }
    
    .spec-item {
        max-width: 100%;
    }
    
    .complex-title,
    .izhs-title {
        font-size: 20px;
    }
}
@media (max-width: 680px) {
.layouts-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    margin: 10vh;
    gap: 2vh;
    align-items: end;
    justify-content: end;
    justify-items: center;
}
.layout-card-02 {
    width: 300px;
    display: flex;
    align-items: center;
    flex-direction: column;
}
.slider {
    position: relative;
    width: 300px;
    height: 300px;
    overflow: hidden;
}
.slider img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: none;
    transition: transform 0.3s ease;
}
}
@media (max-width: 480px) {
    .main-gallery,
    .current-main-image {
        height: 50vh;
    }

    .complex-layouts {
    background-color: white;
    padding-bottom: 7vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    }
    
    .thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .layouts-grid {
        grid-template-columns: 1fr;
    }
    
    .complex-full-description-card {
        padding: 2vh 0;
    }
    
    .secondary-description-card {
        min-height: 150px;
    }
    
    .spec-item {
        font-size: 14px;
        padding: 10px;
    }
    
    .complex-description {
        font-size: 16px;
    }
    
    .main-image-nav {
        width: 25px;
        height: 25px;
        font-size: 16px;
    }
    
    .swiper-slide img {
        width: 100%;
        height: auto;
    }
}
