/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f9fafb;
    color: #1a1a1a;
    overflow-x: hidden;
}

/* --- Navigation --- */
nav {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 5%;
    transition: filter 0.3s ease;
}

.navigationBar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

#logo-link { text-decoration: none; }

#logo1 {
    font-size: 22px;
    display: flex;
    align-items: center;
    color: #111827;
    font-weight: 800;
}

/* --- Search Container --- */
.search-container {
    background: rgba(243, 244, 246, 0.5); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    width: 40%;
    max-width: 500px;
    border: 2px solid #d1d5db;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: all 0.2s ease;
}

.search-container:focus-within {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-color: #28a745; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

#search {
    border: none;
    background: transparent;
    margin-left: 12px;
    width: 100%;
    outline: none;
    font-size: 16px;
    color: #374151;
}

.nav-icons { display: flex; gap: 16px; align-items: center; }
.nav-icons a, .menu-icon { 
    color: #4b5563; 
    font-size: 20px; 
    text-decoration: none; 
    transition: 0.2s;
    width: 48px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    cursor: pointer;
}
.nav-icons a:hover, .menu-icon:hover {color: #28a745; background-color: rgb(240, 242, 241); }

/* --- Content Blur --- */
.blur-content { 
    filter: blur(5px);
    /* these two disables all mouse / touch interactions on the element */
    pointer-events: none; 
    user-select: none; 
}

#main-content-wrapper { transition: filter 0.3s ease; }

/* --- Header & Filters --- */
.explore-header {
    padding: 40px 3% 20px;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 20px;
}

.header-text h1 { font-size: 32px; font-weight: 800; margin-bottom: 8px; color: #111827; }
.header-text h1 span { color: #28a745; }
.header-text p { color: #6b7280; font-size: 16px; }

.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; }

.filter-btn {
    padding: 8px 20px;
    border-radius: 30px;
    border: 1px solid #e5e7eb;
    background: white;
    color: #4b5563;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
}

.filter-btn:hover { background: #f9fafb; border-color: #d1d5db; }
.filter-btn.active {
    background: #28a745;
    color: white;
    border-color: #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

/* --- Grid System --- */
#container1 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 10px 3% 60px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (min-width: 1200px) {
    #container1 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --- Card Styling --- */
.panel {
    border-radius: 20px;
    overflow: hidden;
    background: white;
    border: 1px solid transparent;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease, transform 0.3s ease; 
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.panel:hover {
    transform: translateY(-2px); 
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1); 
}

.card-image-container {
    margin: 0;
    height: 180px;
    overflow: hidden;
    position: relative;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.panel:hover .card-image-container img { 
    transform: scale(1.1); 
}

.badges-container {
    position: absolute;
    top: 15px; left: 15px; right: 15px;
    display: flex; justify-content: space-between; pointer-events: none;
}

.category-badge {
    background: #111827;
    color: white;
    font-size: 10px;
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
}

.rating-badge {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    color: #42454b;
}
.rating-badge i { color: #fbbe24; margin-right: 4px; }

.panelContent { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }

.panelContent h3 { 
    font-size: 18px; 
    margin-bottom: 8px; 
    font-weight: 800; 
    color: #111827; 
    transition: color 0.3s ease;
}

.panel:hover h3 { color: #28a745; }

.address { 
    color: #6b7280; font-size: 13px; margin-bottom: 20px; 
    display: flex; align-items: flex-start; gap: 8px; line-height: 1.4;
    flex-grow: 1;
}
.address i { margin-top: 3px; font-size: 12px; }

/* --- Footer & Action Buttons --- */
.card-footer {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-top: auto;
}

.price-info span { font-size: 11px; color: #9ca3af; display: block; margin-bottom: 2px;}
.price-info strong { font-size: 20px; color: #111827; font-weight: 800; letter-spacing: -0.5px;}
.price-info strong span { font-size: 13px; font-weight: 500; color: #6b7280; }

.action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.map-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.map-btn:hover {
    background: #e5e7eb;
    color: #28a745;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.book-btn {
    background: #111827;
    color: white;
    padding: 8px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.book-btn:hover { 
    background: #28a745; 
    transform: translateY(-2px);
}

/* --- Sidebar --- */
.sidebar {
    position: fixed; 
    top: 0; 
    right: 0; 
    height: 100vh; 
    width: 380px; /* Default width for desktop */
    background: rgba(255, 255, 255, 0.75); 
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
    display: flex; 
    flex-direction: column; 
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 30px;
    border-left: 1px solid rgba(255, 255, 255, 0.4);
}
.sidebar.active { transform: translateX(0); }

.sidebar-header { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    margin-bottom: 20px; 
    padding-bottom: 20px;
    border-bottom: 1px solid rgb(0 0 0 / 10%);
    position: relative; 
}
.sidebar-header h2 { font-size: 24px; font-weight: 800; color: #374151;}

.close-btn { 
    width: 20px;
    height: 20px;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    color: #989da3; 
    transition: transform 0.3s ease, color 0.3s ease; 
    display: block;
    cursor: pointer;
    font-size: 0; /* Hide any existing icon text */
}
.close-btn:hover { color: #28a745; transform: scale(1.6); }

.close-btn::before, .close-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: currentColor;
    top: 50%;
    left: 50%;
    border-radius: 2px;
    transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

/* Initial State: Lines positioned diagonally outside */
.close-btn::before { transform: translate(-150%, -250%) rotate(460deg); opacity: 0; }
.close-btn::after { transform: translate(150%, 150%) rotate(-45deg); opacity: 0; }

/* Active State: Lines fly in to form the cross */
.sidebar.active .close-btn::before { transform: translate(-50%, -50%) rotate(45deg); opacity: 1; transition-delay: 0.2s; }
.sidebar.active .close-btn::after { transform: translate(-50%, -50%) rotate(-45deg); opacity: 1; transition-delay: 0.3s; }
@keyframes cross-pop {
    0% { transform: scale(2.5); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.sidebar.active .close-btn {
    animation: cross-pop 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s;
}

.sidebar-links { list-style: none; padding: 0; margin-bottom: auto; }
.sidebar-links li { margin-bottom: 20px; }
.sidebar-links a { text-decoration: none; color: #374151; font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 15px; padding: 14px 24px; }
.sidebar-links a i { font-size: 18px; width: 24px; text-align: center; color: #6b7280; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s ease; }
.sidebar-links li:hover { background-color: #2eff621e; border-radius: 10px; }
.sidebar-links a:hover {  color: #189034; }
.sidebar-links a:hover i { color: #189034; transform: scale(1.4); }

/* --- Premium Banner --- */
.premium-banner {
    position: relative;
    border-radius: 16px; 
    padding: 25px; 
    color: white; 
    margin-bottom: 30px;
    overflow: hidden; 
    z-index: 1; 
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.6), 0 0 10px rgba(52, 211, 153, 0.4);
}

.premium-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent, 
        transparent, 
        #ffffff, 
        #4ade80, 
        #28a745, 
        transparent
    );
    animation: rotate-border 3s linear infinite;
    z-index: -2;
}

.premium-banner::after {
    content: '';
    position: absolute;
    inset: 3px; 
    background: linear-gradient(135deg, #34d399 0%, #28a745 100%);
    border-radius: 13px; 
    z-index: -1;
}

@keyframes rotate-border {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.premium-banner h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.premium-banner p { font-size: 14px; margin-bottom: 20px; opacity: 0.9; line-height: 1.4;}

.premium-banner button { 
    background: white; 
    color: #28a745; 
    border: none; 
    padding: 10px 20px; 
    border-radius: 8px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.premium-banner button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.sidebar-footer { border-top: 1px solid rgb(0 0 0 / 13%); padding-top: 20px; color: #3a3e45;font-size: 13px; }

@media (max-width: 900px) {
    .search-container { 
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        max-width: 100%;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 0;
        border: none;
        border-bottom: 1px solid #e5e7eb;
        padding: 15px 5%;
        box-shadow: 0 20px 40px rgba(0,0,0,0.7);
        z-index: 998;
    }
    .search-container.active {
        display: flex;
        animation: slideDown 0.4s ease forwards;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 20px 40px rgba(0,0,0,0.7);
        
    }
    #container1 { grid-template-columns: repeat(2, 1fr); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- UPDATED: Mobile Sidebar Width --- */
@media (max-width: 600px) {
    #container1 { grid-template-columns: 1fr; }
    
    /* Sidebar width reduced to 70% for mobile */
    .sidebar { width: 70%; }
}

/* --- Mobile Search Icon --- */
.mobile-search-btn {
    display: none;
    font-size: 20px;
    color: #4b5563;
    cursor: pointer;
    transition: color 0.2s;
}

@media (max-width: 900px) {
    .mobile-search-btn { display: block; }
}