/* ===== BASE STYLES ===== */
:root {
    --primary-color: #1A6FC9;
    --primary-light: #6993cf;
    --secondary-color: #2c3e50;
    --text-color: #333;
    --light-gray: #f5f7fa;
    --card-gray: #f8f9fa;
    --card-whatsapp: #075E54;
    --border-gray: #e0e0e0;
    --available-color: #d4edda;
    --available-text: #155724;
    --full-color: #f8d7da;
    --full-text: #721c24;
    --maintenance-color: #fff3cd;
    --maintenance-text: #856404;
}



* {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

body {
    background: var(--light-gray);;
}


/* ===== SUB-HEADER SECTION ===== */
.subheader {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 10px;
    background-color: #f5f5f5;    
    margin-top: 4rem;
}

/* Styling untuk setiap area */
.subheader > div {
    padding: 10px;
    border-radius: 6px;    
}

/* Area judul - lebih besar di desktop */
.subheader > div:first-child {
    flex: 3; 
    padding-top:20px;
    min-width: 250px;
    color:white;
}

/* Area info */
.subheader > div:nth-child(2) {
    flex: 1;  
    color:white;
    min-width: 150px;
    margin-top:20px;
}

/* Area gambar */
.subheader > div:last-child {
    flex: 1;      
}

/* Responsive untuk tablet */
@media screen and (max-width: 768px) {
    .subheader > div:first-child {
        flex: 3; 
    }
    .subheader img { display:none; }
}

/* Responsive untuk mobile */
@media screen and (max-width: 480px) {
    .subheader {
        flex-direction: column; 
        gap: 15px;
    }

    .subheader img { display:none; }
    
    .subheader > div {
        width: 100%;  
        min-width: auto;  
        text-align: center;
    }
    
    .subheader > div:first-child {
        flex: none;  /* Reset flex */
    }
    
    .subheader > div:nth-child(2),
    .subheader > div:last-child {
        flex: none;  /* Reset flex */
    }
}



/* ===== HEADER SECTION ===== */
.kos-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    margin-top: 0.1rem;
    padding: 5rem 0 0.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.kos-header-content {
    max-width: 98%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
}


/* Group untuk header right section */
.header-right-group {
    display: flex;
    align-items: center;
    gap: 1rem; /* Atur jarak antara info dan gambar */
}

.header-badge {
    width: auto; /* Sesuaikan dengan ukuran asli gambar */
    height: auto;
    max-width: 100px; /* Batasi ukuran maksimal jika perlu */
}

.kos-title h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.kos-title p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.area-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 400px;
}

.area-text {
    text-align: left;
}

@media (min-width: 768px) {
    .kos-header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .area-text {
        text-align: right;
    }
}

@media screen and (max-width: 480px) {
    .area-text {
        text-align: center;
    }
}



/* ===== NAVIGATION TABS ===== */
.nav-tabs {
    background: white;
    margin: 1.5rem auto;
    max-width: 97%;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.nav-list {
    display: flex;
    list-style: none;
    flex-direction: column;
    width: 100%;
}

@media (min-width: 768px) {
    .nav-list {
        flex-direction: row;
    }
}

.nav-item {
    flex: 1;
    text-align: center;
}

.nav-link {
    display: block;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #555;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background-color: var(--card-gray);
    border-bottom: 3px solid var(--primary-color);
}

.nav-link.greycolor {
    color: #ccc;
    pointer-events: none;
}



/* ===== LAYOUT CONTAINERS ===== */
.container {
    width:100%;
    margin:0 auto;
}

.main-content { 
    display: flex;
    max-width: 1280px;    
    margin:0 auto !important;
    width:100%;
}

.left-column { flex: 2; 
    padding:0 10px;
}
.right-column { flex: 1; 
    padding:0 15px;
}

@media (max-width: 768px) {
    .main-content {
        flex-direction:column;
    }

    .left-column, .right-column {
        flex: none; width: 100%;
    }
}


/* ===== CARD COMPONENTS ===== */
.card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;  
    margin-bottom:20px;   
    padding:1.5rem;   
    padding-bottom:1rem;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.card-title {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--card-gray);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.card-title i {
    color: var(--primary-color);
    font-size: 1.25rem;
    min-width: 24px;    
}

.card-title h2 {
    font-size: 1.4rem;
    color: var(--secondary-color);
    flex: 1;
    margin-right: 1rem;
}

@media (min-width: 768px) {
    .card {
        /* padding: 0.5rem; */
    }
}



/* ===== GALLERY SECTION ===== */
.gallery-container {
    position: relative;
}

.main-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .main-image {
        height: 400px;
    }
}

.image-thumbnails {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .image-thumbnails {
        grid-template-columns: repeat(4, 1fr);
    }
}

.thumbnail {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.thumbnail:hover {
    transform: scale(1.05);
}

.see-more-btn {
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-weight: 600;
    border: none;
    font-size: 1rem;
    grid-column: span 2;
}

@media (min-width: 640px) {
    .see-more-btn {
        grid-column: span 1;
    }
}

.see-more-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(26, 111, 201, 0.3);
}

.see-more-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}


/* ===== MODAL/GALLERY POPUP ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 1rem;
}

.modal-content {
    background: transparent;
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    position: relative;
}

.modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    z-index: 10;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.modal-close {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.gallery-slider {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.gallery-slides-container {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.gallery-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.slide-image {
    width: 100%;
    height: calc(100% - 60px);
    object-fit: contain;
    border-radius: 10px;
}

.slide-caption {
    color: white;
    text-align: center;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.5);
    width: 100%;
    border-radius: 0 0 10px 10px;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}


@media (min-width: 768px) {
    .gallery-nav {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.nav-prev {
    left: 1rem;
}

.nav-next {
    right: 1rem;
}


/* ===== INFO GRID ===== */
.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 0.5rem;
}

@media (min-width: 640px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.info-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--card-gray);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.info-item:hover {
    background: #e9ecef;
}


.info-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-text h4 {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.25rem;
}

.info-text p {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-color);
}


/* ===== FACILITIES ===== */
.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.facility-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: var(--card-gray);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.facility-item:hover {
    background: #e3f2fd;
    transform: translateY(-2px);
}

.facility-item i {
    margin-right: 0.75rem;
    color: var(--primary-color);
    font-size: 1.1rem;
    min-width: 20px;
}

.facility-item span {
    font-size: 0.9rem;
}


/* ===== ROOM TYPES ===== */
.room-type {
    border: 1px solid var(--border-gray);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.room-type:last-child {
    margin-bottom: 0;
}

.room-type:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.1);
}

.room-type-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .room-type-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.room-type-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.room-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: #e74c3c;
    text-align: left;
}

@media (min-width: 640px) {
    .room-price {
        text-align: right;
    }
}

.room-price span {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 400;
}

.room-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.room-feature {
    background: #e8f4fc;
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.room-price-details {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--card-gray);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.room-price-details:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.room-price-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    text-align: center;
}

.price-period {
    font-weight: 600;
    color: #555;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.price-amount {
    font-weight: 700;
    color: #111;
    font-size: 1.1rem;
    line-height: 1.3;
}


/* ===== STATUS BADGES ===== */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 0.2rem;
    align-self: flex-start;
}

.status-available {
    background: var(--available-color);
    color: var(--available-text);
}

.status-full {
    background: var(--full-color);
    color: var(--full-text);
}

.status-maintenance {
    background: var(--maintenance-color);
    color: var(--maintenance-text);
}



/* ===== CONTACT & OWNER ===== */
.owner-card {
    text-align: center;
    padding: 1.5rem;
}

.owner-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--secondary-color);
}

.owner-role {
    color: #7f8c8d;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background: var(--primary-color);
    border-radius: 8px;
    color: var(--light-gray);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background: var(--card-whatsapp);
    border-radius: 8px;
    color: var(--light-gray);
    text-decoration: none;
    transition: all 0.3s ease;    
}

.contact-whatsapp:hover {
    background: var(--primary-color);
}

.contact-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.contact-item i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* ===== RULES LIST ===== */
.rules-list ul {
    list-style-type: none;
}

.rules-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--card-gray);
    display: flex;
    align-items: flex-start;
    line-height: 1.5;
}

.rules-list li:last-child {
    border-bottom: none;
}

.rules-list i {
    margin-right: 0.75rem;
    color: #2ecc71;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

/* ===== LOCATION SECTION ===== */
.location-map {
    width: 100%;
    height: 200px;
    background: #e0e0e0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
    margin-top: 1rem;
    font-size: 1.1rem;
    overflow: hidden;
}

.address {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--card-gray);
    border-radius: 10px;
    line-height: 1.6;
}

.address p {
    margin-bottom: 0.75rem;
}

.address p:last-child {
    margin-bottom: 0;
}

.address strong {
    color: var(--secondary-color);
    display: block;
    margin-bottom: 0.25rem;
}

