* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #c9f8f8;
    padding: 20px;
    min-height: 100vh;
}

.main-title {
    text-align: center;
    color: #333;
    margin-bottom: 40px;
    font-size: 2em;
    font-weight: 600;
}

/* Back Button Styling */
.back-button {
    display: inline-block;
    margin-bottom: 50px;
    color: #0410ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f5f5;
    border-radius: 100%;
    width: 75px;
    height: 75px;
    transition: 0.2s;
}
.back-button:hover {
    background-color: #0410ff;
}
.icon {
    width: 20px;
    height: 20px;
    filter: invert(0.3);
    transition: 0.2s;
}
.back-button:hover .icon {
    filter: invert(1);
}


/* Search Container */
.search-container {
    max-width: 600px;
    margin: 0 auto 40px;
    text-align: center;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 18px 55px 18px 25px;
    font-size: 1.1em;
    border: 3px solid #e0e0e0;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fff;
}

.search-input:focus {
    border-color: #0066cc;
    box-shadow: 0 6px 25px rgba(0, 102, 204, 0.25);
    transform: translateY(-2px);
}

.search-input::placeholder {
    color: #aaa;
    font-weight: 400;
}

/* Search Icon */
.search-container::after {
    content: "🔍";
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3em;
    pointer-events: none;
    opacity: 0.5;
}

.search-count {
    margin-top: 12px;
    color: #666;
    font-size: 1em;
    min-height: 24px;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Grid Container - 4 kolom per baris */
.master-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 20px 10px;
    max-width: 1800px;
    margin: 0 auto;
}

.gallery-wrapper {
    text-align: center;
}

.city-title {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.4em;
    font-weight: 600;
}

.gallery-layout {
    display: flex;
    width: 100%;
    height: 450px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.clickable-gallery {
    cursor: pointer;
}

.gallery-layout:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.background-column {
    position: absolute; /* HARUS ABSOLUTE */
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover; /* PASTIKAN INI COVER */
    background-position: center;
    z-index: 1;
}

.person-column {
    position: absolute; /* Pastikan ini absolute */
    bottom: 0; /* Tempatkan di bagian bawah */
    left: 50%; /* Pusatkan secara horizontal */
    transform: translateX(-50%); /* Koreksi posisi agar benar-benar di tengah */
    width: 60%;
    height: 65%; /* Sesuaikan tinggi secara otomatis */
    background-color: #fff;
    padding: 3px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.person-column img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

/* Hidden class untuk search */
.hidden {
    display: none !important;
}

/* No results message */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 1.2em;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .master-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .master-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .gallery-layout {
        height: 400px;
    }
    
    .main-title {
        font-size: 1.8em;
    }
}

@media (max-width: 768px) {
    .master-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .gallery-layout {
        height: 350px;
    }
    
    .main-title {
        font-size: 1.5em;
    }
    
    .city-title {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .master-grid-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gallery-layout {
        height: 400px;
    }
    
    .person-column {
        width: 70%;
    }
}