* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    background-color: #E2E8F0;
    color: #0F172A;
    overflow-x: hidden;
    overflow-y: auto;
}

body.adModalOpen {
    /* overflow: hidden; */
}

.adOverlay {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 10% 10%, rgba(212, 175, 55, 0.28), transparent 36%),
        radial-gradient(circle at 88% 88%, rgba(26, 54, 93, 0.35), transparent 40%),
        rgba(10, 17, 28, 0.78);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.45s ease, visibility 0.45s ease;
    padding: clamp(12px, 5vw, 30px);
}

.adOverlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.adModal {
    position: relative;
    width: min(90vw, 860px);
    border-radius: 28px;
    padding: clamp(18px, 3.2vw, 34px);
    background: linear-gradient(145deg, #0f2f57, #142946 42%, #0d2037);
    box-shadow: 0 22px 70px rgba(4, 8, 14, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.45);
    transform: translateY(18px) scale(0.985);
    transition: transform 0.45s ease;
    overflow: hidden;
}

.adOverlay.show .adModal {
    transform: translateY(0) scale(1);
}

.adModal::before,
.adModal::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}

.adModal::before {
    width: clamp(170px, 30vw, 260px);
    height: clamp(170px, 30vw, 260px);
    top: -70px;
    right: -90px;
    background: rgba(212, 175, 55, 0.2);
}

.adModal::after {
    width: clamp(140px, 22vw, 210px);
    height: clamp(140px, 22vw, 210px);
    left: -70px;
    bottom: -70px;
    background: rgba(99, 179, 237, 0.18);
}

.adCloseBtn {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.12);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.adCloseBtn:hover {
    transform: rotate(90deg);
    background: rgba(212, 175, 55, 0.35);
}

.adContent {
    position: relative;
    z-index: 1;
    color: #f8fafc;
    display: grid;
    gap: clamp(12px, 2.4vw, 20px);
}

.adEyebrow {
    margin: 0;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: clamp(11px, 1.8vw, 13px);
    color: #cbd5e1;
    font-weight: 700;
}

.adTitle {
    margin: 0;
    line-height: 1.2;
    font-size: clamp(24px, 4vw, 40px);
    color: #fef3c7;
}

.adDesc {
    margin: 0;
    line-height: 1.6;
    color: #dbeafe;
    font-size: clamp(14px, 2.3vw, 18px);
    max-width: 58ch;
}

.adShuffleStage {
    position: relative;
    width: min(100%, 740px);
    height: clamp(210px, 45vw, 380px);
    margin: clamp(6px, 1.2vw, 10px) auto 0;
    perspective: 1200px;
}

.adCard {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    border-radius: 18px;
    object-fit: cover;
    background-color: #102845;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow:
        0 16px 26px rgba(0, 0, 0, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.16);
    opacity: 0;
    transform: translate3d(0, 0, -10px) rotate(-2deg) scale(0.97);
    transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.adCard.active {
    z-index: 3;
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
    animation: adCardFloat 7.5s ease-in-out infinite;
}

.adCard.next {
    z-index: 2;
    opacity: 0.5;
    transform: translate3d(16px, 10px, -36px) rotate(4deg) scale(0.95);
}

.adActions {
    display: flex;
    justify-content: flex-end;
    margin-top: clamp(6px, 1.2vw, 10px);
}

.adPrimaryBtn {
    border: none;
    border-radius: 999px;
    padding: 12px 24px;
    background: linear-gradient(125deg, #d4af37, #f8d965);
    color: #1f2937;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.adPrimaryBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(212, 175, 55, 0.36);
}

@keyframes adCardFloat {
    0% {
        transform: translate3d(0, 0, 0) rotate(-0.7deg) scale(1);
    }

    50% {
        transform: translate3d(0, -5px, 0) rotate(0.8deg) scale(1.01);
    }

    100% {
        transform: translate3d(0, 0, 0) rotate(-0.7deg) scale(1);
    }
}

/* ─── Landing page navbar (public-facing, NOT the dashboard sidebar) ─── */
.navBar {
    display: flex;
    height: clamp(60px, 12vw, 96px);
    padding: 0 clamp(12px, 5vw, 48px);
    justify-content: space-between;
    align-items: center;
    background: #1A365D;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.10);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navBar #logoAndTitleContainer,
.navBar #logoAndTitle {
    display: flex;
    height: 100%;
    align-items: center;
    gap: clamp(6px, 2.5vw, 12px);
}

.navBar #title {
    color: #FFF;
    font-size: clamp(16px, 4vw, 24px);
    font-weight: 400;
    line-height: 1.3;
    white-space: nowrap;
}

.navBar #btns {
    display: flex;
    align-items: center;
    gap: clamp(6px, 2vw, 16px);
}

.navBar #logInBtn,
.navBar #signUpBtn {
    color: #FFFFFF;
    display: flex;
    padding: clamp(6px, 2.5vw, 12px) clamp(12px, 4vw, 24px);
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    border: 1px solid #D4AF37;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: clamp(12px, 2.8vw, 16px);
    font-weight: 500;
    min-height: 36px;
}

.navBar #logInBtn:hover,
.navBar #signUpBtn:hover {
    background: #D4AF37;
    color: #1A365D;
}

/* ─── Hamburger menu ─── */
.hamburger {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
    gap: 4px;
}

.hamburger span {
    width: 18px;
    height: 2px;
    background: #FFFFFF;
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.btnsMenu {
    display: flex;
    align-items: center;
    gap: clamp(6px, 2vw, 16px);
}

.btnsMenu.mobileOpen {
    display: flex !important;
}

/* ─── Hero / title section ─── */
.title {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    aspect-ratio: 156 / 109;
    min-height: clamp(220px, 38vw, 440px);
    background-image: url("../../assets/img/titleImg.png");
    background-blend-mode: overlay;
    background-color: rgba(0, 0, 0, 0.8);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.title #ttAndTpContainer {
    width: 100%;
    height: 100%;
    padding: clamp(12px, 4.2vw, 38px) clamp(9px, 3vw, 28px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: clamp(8px, 2.4vw, 26px);
}

.title #titleTitle {
    width: 100%;
    max-width: min(95vw, 1200px);
    margin: 0 auto;
    color: #FFF;
    text-align: center;
    font-size: clamp(20px, 7.2vw, 62px);
    font-weight: 400;
    line-height: 1.1;
}

.title #titleP {
    width: 100%;
    max-width: min(95vw, 1200px);
    margin: 0 auto;
    color: #CBD5E1;
    text-align: center;
    font-size: clamp(12px, 2.6vw, 24px);
    font-weight: 400;
    line-height: 1.4;
}

.title #viewBtnContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.title #viewBtn {
    display: flex;
    padding: clamp(7px, 1.6vw, 10px) clamp(12px, 3vw, 20px);
    justify-content: center;
    align-items: center;
    gap: clamp(6px, 1.5vw, 12px);
    border-radius: 8px;
    background: #D4AF37;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: clamp(12px, 2vw, 14px);
    font-weight: 500;
    white-space: nowrap;
    min-height: 34px;
}

.title #viewBtn:hover {
    background: #C5A028;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* ─── About section ─── */
.about {
    display: flex;
    width: 100%;
    padding: clamp(34px, 7vw, 88px) clamp(10px, 4vw, 42px) clamp(24px, 5vw, 52px);
    flex-direction: column;
    align-items: center;
    gap: clamp(24px, 4.5vw, 56px);
}

.about #tpContainer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: clamp(10px, 1.8vw, 18px);
    width: 100%;
    max-width: min(95vw, 1200px);
}

.about #aboutTitle {
    width: 100%;
    text-align: center;
    color: #0F172A;
    font-size: clamp(20px, 4.2vw, 42px);
    font-weight: 400;
    line-height: 1.2;
    margin: 0 0 clamp(12px, 2.5vw, 28px) 0;
}

.about #aboutP {
    width: 100%;
    max-width: min(95vw, 1000px);
    color: #475569;
    text-align: center;
    font-size: clamp(12px, 2vw, 20px);
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
}

.about #aboutCardsContainer {
    display: flex;
    width: 100%;
    max-width: min(95vw, 1200px);
    justify-content: center;
    align-items: flex-start;
    gap: clamp(12px, 3vw, 28px);
    padding: clamp(10px, 2vw, 22px) 0;
    flex-direction: column;
}

.about #aboutCardsList {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    gap: clamp(12px, 4vw, 32px);
    list-style: none;
    margin: 0;
    padding: 0;
}

.about #aboutCardsList li {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.about #aboutCards {
    flex: 1;
    padding: clamp(10px, 2.5vw, 26px) clamp(10px, 2.2vw, 18px);
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    background: #FFF;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.10);
    transition: all 0.3s ease;
    width: 100%;
}

.about #aboutCards:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.15);
}

.about #logos {
    width: clamp(34px, 6.5vw, 52px);
    height: clamp(34px, 6.5vw, 52px);
    margin-bottom: clamp(12px, 3vw, 24px);
}

.about #aboutCardsList #tpContainer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: clamp(8px, 2vw, 16px);
    text-align: center;
}

.about #aboutCardsList #titleP {
    color: #0F172A;
    font-size: clamp(14px, 2.5vw, 18px);
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
}

.about #aboutCardsList p {
    color: #475569;
    font-size: clamp(12px, 1.9vw, 14px);
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
}

/* ─── Available units section ─── */
.au {
    display: flex;
    width: 100%;
    max-width: min(95vw, 1400px);
    margin: 0 auto;
    padding: clamp(34px, 7vw, 88px) clamp(10px, 4vw, 42px) clamp(24px, 5vw, 52px);
    flex-direction: column;
    align-items: center;
    gap: clamp(22px, 4.5vw, 48px);
}

.au #tpContainer {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(10px, 1.8vw, 18px);
}

.au #auTitle1st {
    width: 100%;
    text-align: center;
    color: #0F172A;
    font-size: clamp(20px, 4.2vw, 42px);
    font-weight: 400;
    line-height: 1.2;
    margin: 0;
}

.au #auDesc1 {
    width: 100%;
    max-width: min(95vw, 800px);
    text-align: center;
    color: #475569;
    font-size: clamp(12px, 2vw, 20px);
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
}

.au #clContainer {
    width: 100%;
    max-width: 100%;
}

.au #auCardList {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: clamp(16px, 3vw, 28px);
    padding: 0;
    margin: 0;
    list-style: none;
    width: 100%;
}

.au #units {
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
    background: #FFF;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.au #units:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.au #auImg {
    width: 100%;
    height: clamp(140px, 21vw, 210px);
    object-fit: cover;
    display: block;
}

.au .unit-status-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #ffffff;
    background: #64748b;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.au .unit-status-badge.status-available {
    background: #10b981;
}

.au .unit-status-badge.status-rented {
    background: #dc2626;
}

.au .unit-status-badge.status-unknown {
    background: #64748b;
}

.au #unitDesc {
    display: flex;
    flex-direction: column;
    padding: clamp(10px, 2.3vw, 18px);
    gap: clamp(8px, 1.4vw, 12px);
    flex: 1;
}

.au #a3Container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 1.5vw, 12px);
}

.au #auTitle {
    color: #0F172A;
    font-size: clamp(16px, 3vw, 21px);
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}

.au #auSizeFloor {
    color: #475569;
    font-size: clamp(13px, 2.2vw, 15px);
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
}

.au #auDesc {
    color: #64748B;
    font-size: clamp(12px, 1.9vw, 14px);
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
}

.au #auBtn {
    display: inline-flex;
    padding: clamp(7px, 1.6vw, 10px) clamp(11px, 2.2vw, 18px);
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    border: 1px solid #1A365D;
    background: #FFF;
    color: #1A365D;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: clamp(12px, 2vw, 14px);
    font-weight: 500;
    align-self: flex-start;
    white-space: nowrap;
    min-height: 30px;
}

.au #auBtn:hover {
    background: #1A365D;
    color: #FFF;
}

/* ─── Footer ─── */
footer {
    display: flex;
    width: 100%;
    margin-top: clamp(24px, 5vw, 56px);
    padding: clamp(22px, 5vw, 50px) clamp(10px, 4vw, 42px) clamp(14px, 3vw, 28px);
    flex-direction: column;
    align-items: center;
    gap: clamp(14px, 3vw, 30px);
    background: #1E293B;
}

.fContainer {
    width: 100%;
    max-width: min(95vw, 1400px);
}

.fContainer #footerList {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: flex-start;
    gap: clamp(12px, 3vw, 28px);
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    margin-bottom: 20px;
    padding: 0;
}

.fContainer #fCard {
    flex: 1;
    min-width: clamp(180px, 45vw, 350px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(8px, 1.4vw, 14px);
}

.fContainer #ltCard {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 16px);
}

.fContainer #fLogo {
    width: clamp(20px, 4vw, 30px);
    height: clamp(20px, 4vw, 30px);
    flex-shrink: 0;
}

.fContainer #fTitle {
    color: #FFFFFF;
    font-size: clamp(14px, 2.5vw, 18px);
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.fContainer #fDesc {
    color: #CBD5E1;
    font-size: clamp(12px, 1.9vw, 14px);
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
}

.fContainer .iconWText {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(6px, 1.5vw, 12px);
}

.fContainer .iconWText #fDesc {
    margin: 0;
}

#footerLine {
    width: 100%;
    padding-top: clamp(10px, 2vw, 20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#footerCopyright {
    width: 100%;
    text-align: center;
    color: #CBD5E1;
    font-size: clamp(10px, 1.6vw, 12px);
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .hamburger {
        display: flex;
    }

    .btnsMenu {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(300px, 80%);
        height: 100vh;
        flex-direction: column;
        background: #1A365D;
        padding: clamp(80px, 15vh, 120px) 24px 40px;
        gap: 20px;
        z-index: 999;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
        align-items: stretch;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex; /* Always flex, controlled by right position */
    }

    .btnsMenu.mobileOpen {
        right: 0;
    }

    .navBar #logInBtn,
    .navBar #signUpBtn {
        width: 100%;
        text-align: center;
    }

    .fContainer #footerList {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .fContainer #fCard {
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .title #ttAndTpContainer {
        padding: clamp(32px, 10vw, 64px) 20px;
    }

    .about #aboutCardsList {
        grid-template-columns: 1fr;
    }

    .fContainer .iconWText {
        justify-content: center;
    }

    .adModal {
        width: 92vw;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .navBar #title {
        font-size: 18px;
    }

    .navBar #logo img {
        width: 32px;
    }

    .au #auCardList {
        grid-template-columns: 1fr;
    }

    .title #titleTitle {
        font-size: 32px;
    }

    .about #aboutTitle,
    .au #auTitle1st {
        font-size: 28px;
    }
}