/* Root variables */
    :root {
        --primary-color: #1a365d;
        --secondary-color: #4361ee;
        --background-color: #f8f9fa;
        --text-color: #333;
        --border-color: #e1e1e1;
    }

    /* Global styles */
    body {
        margin: 0;
        padding: 0;
        font-family: 'Inter', sans-serif;
        background-color: var(--background-color);
    }
    header {
    background-color: #1a3e62;
    padding: 1rem;
    display: flex;
    align-items: start;
    gap: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}
#unit-info{
    font-family: "Merriweather", sans-serif;
    color: #f0eeec;
    font-size: 2rem;
    
}

.material-icons {
    font-size: 2rem;
    cursor: pointer;
    color:#fff;
}

    /* Main content styles */
#title{
    width: 85vw;
    font-family: "Lato", sans-serif;
    color: #edbd75;
    justify-content: center;
    text-align: center;
    font-size: 2rem;
}

   #logo {
    height: 5rem;
    width: auto;
    margin-left: 2rem;
}

.page-title {
    text-align: center;
    font-size: 3rem;
    color: #edbd75;
    font-family: "Lato", sans-serif;
    margin: 0;
}

.content-wrapper {
    margin-top: 80px; /* Adjust based on header height */
    padding: 20px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 2rem;
}

.main-content {
    padding: 2rem;
}

    /* Units grid */
    .units-container {
    padding: 1rem;
}
.main-content {
    
    height: 100vh;
    overflow-y: hidden;
    padding: 1rem;
    flex-grow: 1;
    justify-content: flex-start;
}
.unit-btn{
    text-decoration: none;
    width:100%; 
    border: none; 
    background:transparent; 
    cursor: pointer; 
    padding: 0;
}
.units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    padding: 0.5rem;
}

/* Unit card */
.unit-card {
    height: 12vh;
    width: 15vw;
    background-color: white;
    border-radius: 12px;
    border-color: #edbd75;
    border-width: 0.01rem;
    border-style: solid;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.unit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.unit-card-link{
    text-decoration: none;
    width: 100%; 
    border: none; 
    background: none; 
    cursor: pointer; 
    padding: 0;
}

.unit-number {
    text-align: center;
    font-family: "Lato", sans-serif;
    font-size: 2rem;
    font-weight: 600;
    margin-top: 3.25vh;
    color: #2d3436;
}




    /* Modal styles */
    .modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }

    .modal-content {
        position: relative;
        background-color: #fff;
        margin: 5% auto;
        padding: 30px;
        width: 90%;
        max-width: 800px;
        border-radius: 8px;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .close {
        color: #aaa;
        float: right;
        font-size: 28px;
        font-weight: bold;
        cursor: pointer;
        position: absolute;
        right: 20px;
        top: 10px;
        transition: color 0.2s;
    }

    .close:hover {
        color: #333;
    }

    .unit-details-container {
    display: flex;
    flex-direction: row;
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    gap: 2rem;
    max-width: 900px;
    width: 100%;
}

.unit-details-left {
    flex: 1;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.unit-details-left h1 {
    font-size: 3rem;
    margin-bottom: 32px;
    font-weight: 700;
}

.unit-details-left p {
    font-size: 1.2rem;
    margin-bottom: 24px;
}

#tenant {
    font-size: 2.5rem;
    margin-bottom: 32px;
    font-weight: 700;
}

.tenant-details-right {
    line-height: 5vh;
    font-size: 1.25rem;
    padding: 1.5rem;
}


    .unit-details-box h2 {
        margin-bottom: 4vh;
        font-size: 1.5em;
        color: #1a3e62 ;
    }

    .unit-details-box p {
        margin: 8px 0;
        font-size: 1.2em;
    }

    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(-20px); }
        to { opacity: 1; transform: translateY(0); }
    }


    @media (max-width: 768px) {
        .sidebar {
            transform: translateX(-100%);
            z-index: 1000;
        }

        .main-content {
            margin-left: 0;
        }

        .header h1 {
            font-size: 2rem;
        }

        .units-grid {
            grid-template-columns: 1fr;
        }

        .modal-content {
            margin: 15% auto;
            width: 95%;
            padding: 20px;
        }
    }

    .alert {
        padding: 15px;
        margin: 20px;
        border-radius: 4px;
        font-size: 14px;
    }

    .alert-error {
        background-color: #fee2e2;
        color: #991b1b;
        border: 1px solid #fecaca;
    }

    .alert-success {
        background-color: #dcfce7;
        color: #166534;
        border: 1px solid #bbf7d0;
    }

    .unit-details {
    padding: 20px 0;
}

.unit-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
}

.unit-info {
    font-size: 16px;
    line-height: 1.6;
    margin: 15px 0;
}

.unit-info p {
    margin: 8px 0;
    font-size: 20px;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: 8px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateX(100%);
  transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}



.carousel-nav.prev {
    left: 10px;
}

.carousel-nav.next {
    right: 10px;
}

.carousel-container .prev,
.carousel-container .next {
  position: absolute;
  top: 50%;              /* center vertically */
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4); /* transparent black circle */
  color: white;
  border: none;
  border-radius: 53%;
  padding: 10px 14px;
  cursor: pointer;
  z-index: 2;
  font-size: 20px;
}

/* Position left arrow */
.carousel-container .prev {
  left: 10px;
}

/* Position right arrow */
.carousel-container .next {
  right: 10px;
}

.carousel-container .prev:hover,
.carousel-container .next:hover {
  background: rgba(0,0,0,0.7);
}


.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    z-index: 10;
}

.close-modal:hover {
    color: #000;
}@media (max-width: 768px) {
    header {
        padding: 0.75rem;
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    #unit-info {
        font-size: 1.25rem; /* smaller text */
    }

    #logo {
        height: 3rem; /* shrink logo */
        margin-left: 1rem;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .content-wrapper {
        margin-top: 70px;
        padding: 1rem;
        grid-template-columns: 1fr; /* stack content */
        gap: 1rem;
    }

    .units-grid {
        grid-template-columns: 1fr; /* one card per row */
    }


    .unit-card {
        width: 100% !important;   /* override vw */
        height: auto !important;  /* override vh */
        padding: 1rem;
        box-sizing: border-box;   /* ensures padding doesn’t overflow */
    }

    .unit-number {
        font-size: 1.25rem;
        margin: 0.5rem 0 0; /* tighter spacing */
    }

    .modal-content {
        width: 95%;
        padding: 15px;
        grid-template-columns: 1fr; /* stack modal sections */
        gap: 1rem;
    }

    .unit-details-container {
        flex-direction: column; /* stack left/right sections */
        padding: 1rem;
        gap: 1rem;
    }

    .unit-details-left h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    #tenant {
        font-size: 1.5rem;
    }

    .tenant-details-right {
        font-size: 1rem;
        line-height: 1.5rem;
        padding: 1rem;
    }
}


@media screen and (min-width: 1200px) and (max-width: 1500px) {
    .page-title {
        font-size: 2.5rem;
    }

    .unit-card {
        width: 18vw; 
        height: 14vh;
    }

    .unit-number {
        font-size: 1.8rem;
    }

    .unit-details-left h1 {
        font-size: 2.5rem;
    }

    #tenant {
        font-size: 2rem;
    }
}