/* =========================================
   1. RESET & BASE STYLES
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #fdfbfb; /* Background halaman utama */
    transition: all 0.3s ease;
}

/* =========================================
   2. AUTH GUARD (LOGIN REQUIRED)
   ========================================= */
/* Sembunyikan konten jika belum login */
body.logged-out #protected-content {
    display: none;
}

/* Tampilan Overlay Pesan Login */
.login-required-overlay {
    display: none;
    height: 90vh;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5dc 0%, #d2b48c 100%);
}

body.logged-out .login-required-overlay {
    display: flex;
}

.msg-box {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 450px;
}

.msg-box i {
    font-size: 5rem;
    color: #daa520;
    margin-bottom: 1.5rem;
}

/* =========================================
   3. ANIMASI MENGETIK (TYPEWRITER)
   ========================================= */
.typing-text {
    display: inline-block;
    overflow: hidden; 
    border-right: 3px solid #daa520; /* Cursor */
    white-space: nowrap; 
    margin: 0 auto;
    letter-spacing: 2px;
    animation: 
        typing 5s steps(30, end), 
        blink-caret 1s step-end infinite;
    max-width: fit-content;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #daa520 }
}

/* =========================================
   4. HEADER & NAVBAR
   ========================================= */
header {
    background-color: #8fbc8f;
    padding: 10px 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 50px;
    transition: transform 0.3s;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li { margin: 0 15px; }

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover { color: #daa520; }

.login-btn {
    background: #daa520;
    color: white;
    padding: 8px 25px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.login-btn:hover { background: #b8860b; }

.logout-mode { background-color: #ff4d4d !important; }

/* =========================================
   5. HERO SECTION (BACKGROUND BARU)
   ========================================= */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), 
                url('https://images.unsplash.com/photo-1542314831-068cd1dbfeeb?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Efek Paralaks */
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.hero-content h2 { font-size: 3rem; margin-bottom: 1rem; }
.hero-content p { font-size: 1.2rem; margin-bottom: 2rem; }

.cta-btn {
    background: #8fbc8f;
    color: white;
    padding: 12px 35px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
}

.cta-btn:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }

/* =========================================
   6. ROOMS & CARDS
   ========================================= */
.section { padding: 80px 10%; text-align: center; }

.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.room-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.room-card:hover { transform: translateY(-10px); }

.room-card img { width: 100%; height: 200px; object-fit: cover; }

.room-card h3 { padding: 20px 0 10px; }

.price { color: #8fbc8f; font-weight: bold; font-size: 1.2rem; }

/* =========================================
   7. MODAL (LOGIN, REGISTER, BOOKING)
   ========================================= */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 400px;
    margin: 80px auto;
    padding: 30px;
    border-radius: 20px;
    position: relative;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-login, .close {
    position: absolute;
    right: 20px; top: 15px;
    font-size: 24px; cursor: pointer;
}

.tab-container { display: flex; margin-bottom: 20px; }
.tab-btn {
    flex: 1; padding: 10px; border: none; background: #f0f0f0; cursor: pointer;
}
.tab-btn.active { background: #8fbc8f; color: white; }

input, select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
}

form button {
    width: 100%;
    padding: 12px;
    background: #8fbc8f;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 10px;
}

/* =========================================
   8. RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .nav-links { display: none; } /* Hamburger menu logic in JS */
    .hero-content h2 { font-size: 2rem; }
    .typing-text { white-space: normal; border: none; animation: none; }
}

/* --- Tambahan / Perbaikan Navigasi Mobile --- */

/* Sembunyikan Menu Toggle di Desktop */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    font-size: 1.5rem;
    color: white;
}

/* Responsif untuk HP (Layar di bawah 768px) */
@media (max-width: 768px) {
    .menu-toggle {
        display: block; /* Tampilkan garis 3 di HP */
    }

    .nav-links {
        display: none; /* Sembunyikan menu bawaan */
        flex-direction: column;
        position: absolute;
        top: 70px; /* Sesuaikan dengan tinggi header */
        left: 0;
        width: 100%;
        background-color: #8fbc8f; /* Warna hijau seperti header */
        padding: 20px 0;
        text-align: center;
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    }

    /* Saat menu memiliki class 'active' (diklik) */
    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 15px 0;
    }

    /* Penyesuaian Login Button di Mobile */
    .login-section {
        margin-top: 10px;
    }
    
    .typing-text {
        font-size: 1.5rem; /* Perkecil teks ketik di HP agar tidak pecah */
        white-space: normal; /* Biarkan membungkus di HP */
        border-right: none;
        animation: none;
    }
}

/* --- Efek Zoom Logo --- */
.logo-img {
    height: 50px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Zoom yang halus dan sedikit membal */
}

.logo-img:hover {
    transform: scale(3); /* Ukuran membesar 30% saat disentuh kursor */
    cursor: pointer;
}

/* --- Layout Visi Misi --- */
.visi-misi-wrapper {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    justify-content: center;
}

.card-interactive {
    flex: 1; /* Membuat kolom kiri & kanan sama rata */
    background: #ffffff;
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #8fbc8f;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.card-interactive:hover {
    background-color: #f9fdf9;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    margin: 0;
    color: #2e8b57;
}

/* Teks yang disembunyikan */
.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.3s ease;
    opacity: 0;
}

/* Saat teks ditampilkan */
.collapsible-content.active {
    max-height: 200px; /* Batas tinggi maksimal saat terbuka */
    opacity: 1;
    margin-top: 15px;
}

/* Responsif untuk HP agar Visi Misi jadi tumpuk atas-bawah */
@media (max-width: 768px) {
    .visi-misi-wrapper {
        flex-direction: column;
    }
}

/* --- Kamar & Card --- */
.room-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: 0.3s;
    text-align: left;
}

.room-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.room-info { padding: 20px; }
.room-info h3 { margin-bottom: 10px; color: #2e8b57; }

.rating-stars { color: #ffca28; margin-bottom: 10px; }

/* --- Fasilitas Umum (Grid Ikon) --- */
.facilities-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.fac-item {
    background: white;
    padding: 20px;
    border-radius: 15px;
    transition: 0.3s;
    border: 1px solid #eee;
}

.fac-item:hover {
    transform: translateY(-5px);
    background: #8fbc8f;
    color: white;
}

.icon-box {
    font-size: 2.5rem;
    color: #daa520;
    margin-bottom: 10px;
}

.fac-item:hover .icon-box { color: white; }

/* --- Detail Modal Kamar --- */
.detail-modal {
    max-width: 800px;
    width: 95%;
}

.image-gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.image-gallery img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

.detail-desc { margin: 20px 0; }
.review-section {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
}

.review-item {
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
}

.review-item:last-child { border: none; }

/* --- CONTACT SECTION --- */
.contact-section {
    background-color: #f9fdf9;
}

.contact-wrapper {
    display: flex;
    gap: 40px;
    margin-top: 50px;
    text-align: left;
}

.contact-info {
    flex: 1;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.info-card i {
    font-size: 1.5rem;
    color: #8fbc8f;
    background: #f0f7f0;
    padding: 15px;
    border-radius: 50%;
}

.map-placeholder {
    height: 150px;
    background: #e0e0e0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    cursor: pointer;
    transition: 0.3s;
}

.map-placeholder:hover { background: #d0d0d0; }

.contact-form-container {
    flex: 1;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.full-width { width: 100%; }

/* --- FOOTER STYLES --- */
.main-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 60px 0 20px;
    margin-top: 50px;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    padding: 0 20px;
}

.footer-col h4 {
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 50px; height: 2px;
    background: #daa520;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: 0.3s;
}

.footer-col ul li a:hover { color: #8fbc8f; padding-left: 5px; }

.footer-logo {
    height: 60px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1); /* Membuat logo jadi putih di footer gelap */
}

/* Sosmed Icons */
.social-links { display: flex; gap: 15px; }
.social-icon {
    width: 40px; height: 40px;
    background: #34495e;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: 0.3s;
}

.social-icon:hover { transform: translateY(-5px); }
.fb:hover { background: #3b5998; }
.ig:hover { background: #e1306c; }
.wa:hover { background: #25d366; }

.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #3e4f5f;
    font-size: 0.9rem;
    color: #95a5a6;
}

/* Responsive */
@media (max-width: 768px) {
    .contact-wrapper, .footer-container {
        flex-direction: column;
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-col h4::after { left: 50%; transform: translateX(-50%); }
    .social-links { justify-content: center; }
}

/* --- NOTIFIKASI (TOAST) --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: #ffffff;
    border-left: 5px solid #8fbc8f;
    padding: 15px 25px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideIn 0.5s ease-out, fadeOut 0.5s ease-out 4.5s forwards;
    min-width: 300px;
}

.toast.success { border-left-color: #2ecc71; }
.toast.info { border-left-color: #3498db; }

.toast i {
    font-size: 1.5rem;
    color: #2ecc71;
}

.toast-content h4 {
    margin: 0;
    font-size: 1rem;
    color: #333;
}

.toast-content p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    to { transform: translateX(100%); opacity: 0; }
}

/* --- MAP STYLING --- */
.map-container {
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 12px;
    overflow: hidden;
}