@import url("../vendor/leaflet/leaflet.css");

body {
    margin: 0;
}

#carousel {
    position: relative;
    margin: auto 0;
    overflow: hidden;
}

.carousel-btn {
    position: absolute;
    /* top: 0; */
    bottom: 0;
    height: 100%;
    width: 6rem;
    /* background: rgba(255, 255, 255, 0.10); */
    border: none;
    font-size: 2.3rem;
    text-align: center;
    border-radius: 18px;
    cursor: pointer;
    z-index: 5;
    color: #D7992A;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.slick-prev.carousel-btn {
    left: 0;
}

.slick-next.carousel-btn {
    right: 0;
}

.carousel-btn:hover {
    background: rgba(215, 153, 42, 0.17);
}

/* === Slide Peeking & Gap === */
.slider {
    /* background-color: #08282c; */
    /* Slick centerMode handles padding */
    padding: 10px 0;
}

.slider .slick-slide {
    padding: 20px 15px;
    /* 10px gap each side */
    box-sizing: border-box;
}

/* Inactive cards: transparent + scaled down */
.slider .card {
    opacity: 0.5;
    transform: scale(0.9);
    transition: transform 0.3s ease, opacity 0.3s ease;
    margin: 10px 0;
}

/* Active (center) card: full size + opaque */
.slick-current {
    opacity: 1 !important;
    transform: scale(1) !important;
}

/* === Card Layout === */
.card {
    display: flex !important;
    margin: 10px 0;
    /* background: #d7982a33; */
    border-radius: 11px;
    /* box-shadow: 0px 0px 13px 10px rgb(0 0 0 / 13%), 0 0px 10px 2px #d7992a66;
    border: 1px solid #D7992A; */
    overflow: hidden;
    transition: box-shadow 0.3s;
}


.card-content {
    flex: 0 0 50%;
    color: #fff;
}

.card-content h3 {
    margin-top: 0;
    font-size: 1.5rem;
    color: #D7992A;
    font-weight: 900;
}

.card-content dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .5rem 1rem;
}

.card-content dt {
    font-weight: bold;
    color: #D7992A;
    font-size: 0.8rem;

}

.card-content dd {
    margin: 0;
    color: #fff;
    font-size: 1.5rem;
}

.card-image {
    flex: 0 0 50%;
    max-width: 400px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* === Responsive === */
@media (max-width: 768px) {
    .slick-center .card {
        opacity: 1;
        transform: scale(1);
    }

    .slider .slick-slide {
        padding: 0;
    }

    .slider .card {
        display: block;
        /* width: 100% !important; */
        margin: 0 auto;
        transform: scale(1);
        opacity: 1;
    }

    .card {
        flex-direction: column;
    }


    .card-image {
        height: 200px;
    }

    .carousel-btn {
        display: flex !important;
    }
}

.card-menu {
    display: flex;
    gap: 0.5rem;
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
}

.menu-btn {
    background: none;
    color: #e8e6e3 !important;
    border: none;
    border-radius: 12px 12px 0 0;
    padding: .4rem .9rem;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.menu-btn.active {
    color: #D7992A !important;
}

.card-content {
    position: relative;
    min-height: 260px;
    /* Leaves room for menu on top */
}

.card-section {
    margin-top: 2.5rem;
    margin-left: 2rem;
}

/* Interior gallery: simple horizontal scroll */
.interior-gallery {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.interior-gallery img {
    max-width: 90px;
    border-radius: 8px;
    box-shadow: 0 1px 4px #0001;
}

/* Responsive: Stack menu on small screens */
@media (max-width: 768px) {
    .card-menu {
        position: static;
        justify-content: start;
        margin-bottom: .7rem;
    }

    .card-content {
        min-height: 180px;
    }
}

.card-menu {
    display: flex;
    gap: 0.5rem;
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    align-items: flex-end;
    /* needed for underline */
}

.menu-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: #D7992A;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(.58, .12, .45, .88);
    z-index: 1;
}

/* Adjust .card-menu to have position: relative; for absolute underline */
.card-menu {
    position: relative;
    padding-bottom: 2px;
}

.menu-btn {
    position: relative;
    /* So underline goes behind */
    /* background: #fff8; */
    color: #b78917;
    border: none;
    border-radius: 12px 12px 0 0;
    padding: .5rem .9rem;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    transition: background .3s, color .2s;
    z-index: 2;
}

.menu-btn.active {
    color: #fff;
    font-size: 0.95rem;
    padding: .4rem .9rem;
}

/* Responsive tweak */
@media (max-width: 768px) {
    .card-menu {
        /* position: static; */
        justify-content: start;
        margin-bottom: .7rem;
        margin-left: .5rem;
        padding-bottom: 0;
    }

    .menu-underline {
        display: none;
        /* Hide for stacked menu on mobile for simplicity */
    }
}


/* Base styling */
.apshape {
    fill-opacity: 0.4;
    /* starting more transparent */
    transition: fill 0.2s ease, fill-opacity 0.2s ease;
}

/* Status fills */
.en_1 {
    fill: #31799f81;
}

.en_2 {
    fill: #e9e7e17b;
}

.en_3 {
    fill: #a0402d7c;
}

.en_4 {
    fill: rgba(6, 7, 9, 0.838);
}

/* Hover states */
.en_1:hover {
    fill: #31789F;
}

.en_2:hover {
    fill: #E9E7E1;
}

.en_3:hover {
    fill: #A0412D;
}

.en_4:hover {
    fill: #203064;
}

/* Highlighted (active) apartment */
.apshape.highlight {
    fill-opacity: 1 !important;
    /* fully opaque */
    filter: brightness(2.5);
    /* boost brightness */
    transition: filter 0.2s ease, fill-opacity 0.2s ease;
}

#carousel {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    height: auto;
    position: relative;
    padding: 0;
}

.slider {
    width: 100%;
}

.card {
    width: 80vw;
    max-width: 900px;
    min-width: 320px;
    margin: 0 auto;
    /* the rest of your styles (border, shadow, etc) */
    display: flex !important;
    flex-direction: row;
    /* Responsive handled below */
}

@media (max-width: 768px) {
    .card {
        flex-direction: column;
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
    }

    .card-content,
    .card-image {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0;
    }

    .card-image {
        height: 200px;
    }

    .slider .slick-slide {
        padding: 0;
    }

    .slider {
        width: 95%;
    }

    #carousel {
        padding: 0 2px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

#carousel {
    position: relative;
    /* ...your other styles... */
    /* max-width: 1000px; */
    margin: 0 auto;
}

.carousel-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 64px;
    /* adjust width for how wide the fade is */
    pointer-events: none;
    /* make sure clicks pass through */
    z-index: 10;
}

.carousel-fade-left {
    left: 0;
    background: linear-gradient(to right,
            #04262C 0%,
            rgba(4, 38, 44, 0.01) 100%);
}

.carousel-fade-right {
    right: 0;
    background: linear-gradient(to left,
            #04262C 0%,
            rgba(4, 38, 44, 0.01) 100%);
}


/* If your background is light, use white (#fff), if dark, use your bg. 
   You can also match the card's background for a seamless look.
   Example for white fade: rgba(255,255,255,0.95)
*/

@media (max-width: 768px) {
    .carousel-fade {
        display: none;
    }
}

.card-image.has-slider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    background: #04262C;
}

/* OVERRIDE for main image in slider */
.card-image .plan-image {
    width: auto;
    /* max-width: 96%; */
    height: auto;
    min-height: 400px;
    max-height: 600px;
    display: none;
    margin: 0 auto 10px auto;
}

/* OVERRIDE for active main image */
.card-image .plan-image.active {
    display: block;
}

/* OVERRIDE for thumbnails: always small, never 100% */
.card-image .plan-thumbs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 0;
    margin-bottom: 8px;
}

.card-image .plan-thumb {
    width: 48px !important;
    height: 38px !important;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.7;
    background: #04262C;
    transition: border-color 0.18s, opacity 0.15s;
}

.card-image .plan-thumb.active,
.card-image .plan-thumb:hover {
    border-color: #D7992A;
    opacity: 1;
}

.plan-image {
    width: 90% !important;
    object-fit: contain !important;
}

@media (max-width: 768px) {
    .card-image .plan-image {
        max-height: 150px;
        margin-bottom: 8px;
    }

    .card-image .plan-thumb {
        width: 34px !important;
        height: 28px !important;
    }
}

.carousel-house-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#carousel-nav-left {
    left: -88px;
}

#carousel-nav-right {
    right: -88px;
}

.house-nav-btn {
    background: #04262C;
    color: #D7992A;
    border: 2px solid #D7992A;
    border-radius: 2.5rem;
    padding: 1rem .3rem;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 8px;
    writing-mode: vertical-lr;
    cursor: pointer;
    min-height: 80px;
    min-width: 40px;
    transition: background 0.2s;
}

.house-nav-btn .nav-label {
    transform: rotate(180deg);
    /* For vertical reading, remove if not wanted */
}

@media (max-width: 900px) {

    #carousel-nav-left,
    #carousel-nav-right {
        display: none;
    }
}

.carousel-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 64px;
    pointer-events: none;
    z-index: 2;
    /* FADE should be behind button, but in front of slider */
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    /* BUTTONS above fade! */
    /* rest of your styling... */
}

/* Hide arrow when .no-arrow is present */
.slick-prev.no-arrow:before,
.slick-next.no-arrow:before {
    content: none !important;
}

.carousel-btn {
    position: absolute;
    /* ...your existing styles... */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    min-width: 64px;
    /* so text doesn't squeeze */
}

.prev-house-indicator,
.next-house-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    height: 80%;
    width: 100%;
}

.vertical-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 1rem;
    color: #D7992A;
    font-weight: 600;
    letter-spacing: 0.04em;
    align-items: center;
    justify-content: center;
    display: flex;
    height: 100%;
    user-select: none;
    padding: 0 4px;
}

.house-label {
    font-size: 0.8em;
    letter-spacing: 0.2em;
    font-weight: 400;
}

.house-num {
    font-size: 2.1em;
    line-height: 1;
    font-weight: 800;
    color: #fff;
    margin-top: 0.2em;
    margin-bottom: 0.2em;
    display: block;
}



/* Responsive adjustments for mobile */
@media (max-width: 600px) {
    .carousel-btn {
        min-width: 36px;
        width: 44px;
        font-size: 0.85rem;
        padding: 0 2px;
    }

    .vertical-label {
        font-size: 0.85rem;
    }

    .house-num {
        font-size: 1.2em;
    }

    .slick-prev.carousel-btn {
        /* left: 5px; */
        right: auto;
    }

    .slick-next.carousel-btn {
        /* right: 5px; */
        left: auto;
    }

    .carousel-btn {
        top: 50%;
        transform: translateY(-50%);
        min-width: 36px;
        width: 44px;
        font-size: 0.85rem;
        padding: 0 2px;
    }

    .carousel-fade {
        width: 28px;
    }
}

.slick-prev:before,
.slick-next:before {
    position: absolute;
    color: #D7992A;
}

.contact-section {
    padding: clamp(3rem, 6vw, 5rem) 1.5rem;
    background: #06353D;
    color: #FFFFFF;
}

.contact-wrapper {
    width: min(100%, 1100px);
    margin: 0 auto;
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: stretch;
    grid-auto-rows: minmax(0, 1fr);
}

.contact-map {
    width: 100%;
    display: flex;
    align-items: stretch;
}

.contact-details h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-details p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-list li {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.contact-list a {
    color: #D7992A;
    text-decoration: none;
}

.contact-list a:hover {
    text-decoration: underline;
}

.contact-map .map-embed {
    width: 100%;
    flex: 1;
    min-height: clamp(260px, 45vw, 420px);
    height: 100%;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    margin: 0 auto;
    position: relative;
}

.contact-map .leaflet-container {
    width: 100% !important;
    height: 100% !important;
}

@media (min-width: 768px) {
    .contact-map .map-embed {
        min-height: clamp(320px, 30vw, 420px);
    }
}

@media (max-width: 600px) {
    .contact-section {
        padding: clamp(2.5rem, 8vw, 3.5rem) 1.25rem;
    }

    .contact-map .map-embed {
        min-height: clamp(240px, 65vw, 360px);
        margin: 0 auto;
    }
}