/* LIGHT THEME (DEFAULT) */
:root {
    --bg-main: #f8f9fa;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f3f5;
    --gold: #c59b27;
    --gold-light: #d4af37;
    --gold-soft: rgba(197, 155, 39, 0.12);
    --gold-border: rgba(197, 155, 39, 0.35);
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --text-dim: #9ca3af;
    --border-subtle: rgba(0, 0, 0, 0.08);
    --input-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --input-shadow-focus: 0 15px 40px rgba(0, 0, 0, 0.12);
    --modal-overlay: rgba(0, 0, 0, 0.4);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-pill: 999px;
    --transition: all 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Topbar specifics */
    --topbar-bg: rgba(255, 255, 255, 0.85);
    --topbar-title: #111827;
    --topbar-btn-bg: rgba(0, 0, 0, 0.04);
    --topbar-btn-hover: rgba(0, 0, 0, 0.08);
}

/* DARK THEME OVERRIDE */
[data-theme="dark"] {
    --bg-main: #0a0b0e;
    --bg-elevated: #12141b;
    --bg-card: #151821;
    --bg-card-hover: #1b1f2b;
    --gold: #d4af37;
    --gold-light: #e6c65a;
    --gold-soft: rgba(212, 175, 55, 0.12);
    --gold-border: rgba(212, 175, 55, 0.35);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dim: #6b7280;
    --border-subtle: rgba(255, 255, 255, 0.07);
    --input-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    --input-shadow-focus: 0 20px 50px rgba(0, 0, 0, 0.65);
    --modal-overlay: rgba(0, 0, 0, 0.78);
    
    /* Topbar specifics */
    --topbar-bg: rgba(10, 11, 14, 0.82);
    --topbar-title: #ffffff;
    --topbar-btn-bg: rgba(255, 255, 255, 0.03);
    --topbar-btn-hover: rgba(255, 255, 255, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Subtly dynamic background accents based on theme */
[data-theme="dark"] body {
    background-image: 
        radial-gradient(circle at 15% 0%, rgba(212, 175, 55, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 85% 100%, rgba(41, 128, 185, 0.04) 0%, transparent 45%);
}

[data-theme="light"] body {
    background-image: 
        radial-gradient(circle at 15% 0%, rgba(197, 155, 39, 0.04) 0%, transparent 45%),
        radial-gradient(circle at 85% 100%, rgba(41, 128, 185, 0.03) 0%, transparent 45%);
}

/* ===== TOP BAR ===== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    background: var(--topbar-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px 28px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.topbar-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.topbar .left,
.topbar .right {
    flex: 1;
    display: flex;
    align-items: center;
}

.topbar .right {
    justify-content: flex-end;
}

.back-tour-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
    background: var(--topbar-btn-bg);
    border: 1px solid var(--border-subtle);
    padding: 6px 16px 6px 6px;
    border-radius: var(--radius-pill);
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: var(--transition);
}

.tour-icon-wrap {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
}

.back-tour-btn:hover {
    border-color: var(--gold-border);
    background: var(--gold-soft);
    transform: translateX(-2px);
}

.back-tour-btn:hover .tour-icon-wrap {
    background: var(--gold);
    color: #ffffff;
}

.topbar .center {
    text-align: center;
}

.brand-subtitle {
    display: block;
    font-size: 10px;
    letter-spacing: 0.28em;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 2px;
}

.topbar h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--topbar-title);
}

.admin-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--topbar-btn-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: var(--transition);
}

.admin-icon:hover {
    color: var(--gold);
    border-color: var(--gold-border);
    background: var(--gold-soft);
}

/* ===== HERO & SEARCH SECTION ===== */
.hero-section {
    padding: 64px 24px 36px;
    text-align: center;
}

.hero-inner {
    max-width: 760px;
    margin: 0 auto;
}

.search-container {
    position: relative;
    max-width: 640px;
    margin: 0 auto 28px;
}

.search-icon {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-size: 16px;
    pointer-events: none;
}

#search {
    width: 100%;
    padding: 18px 50px 18px 52px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-main);
    font-size: 15px;
    font-family: inherit;
    box-shadow: var(--input-shadow);
    transition: var(--transition);
}

#search::placeholder {
    color: var(--text-dim);
}

#search:focus {
    outline: none;
    border-color: var(--gold-border);
    box-shadow: var(--input-shadow-focus), 0 0 0 4px var(--gold-soft);
}

.clear-search-btn {
    display: none;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--topbar-btn-hover);
    color: var(--text-muted);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.clear-search-btn:hover {
    background: var(--gold);
    color: #ffffff;
}

/* Category Pills */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.pill {
    background: var(--topbar-btn-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 9px 20px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.pill:hover {
    color: var(--text-main);
    border-color: var(--text-dim);
}

.pill.active {
    background: var(--gold);
    color: #ffffff;
    border-color: var(--gold);
    font-weight: 600;
}

/* ===== MAIN DIRECTORY CONTENT ===== */
.content {
    max-width: 1320px;
    margin: 0 auto;
    padding: 10px 28px 80px;
}

.category-section {
    margin-bottom: 56px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}

h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--topbar-title);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.category-line {
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, var(--gold-border) 0%, transparent 100%);
}

/* ===== LUXURY GRID & CARDS ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 28px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .card {
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.card:hover {
    transform: translateY(-5px);
    background: var(--bg-card-hover);
    border-color: var(--gold-border);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .card:hover {
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
}

.card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.place-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 14px;
    background: var(--gold-soft);
    border: 1px solid rgba(197, 155, 39, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.place-titles {
    flex: 1;
}

.place {
    font-size: 18px;
    font-weight: 700;
    color: var(--topbar-title);
    line-height: 1.3;
    margin-bottom: 4px;
}

.place-cat-tag {
    display: inline-block;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--gold);
    font-weight: 600;
}

.place-desc {
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.55;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-subtle);
}

.phones-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 22px;
}

.phone-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14.5px;
    color: var(--text-main);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.phone-item i {
    color: var(--gold);
    font-size: 13px;
}

/* Action Buttons */
.row {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    background: var(--topbar-btn-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    transition: var(--transition);
}

.btn i {
    color: var(--gold);
    transition: var(--transition);
}

.btn.call-btn:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: #ffffff;
}

.btn.call-btn:hover i {
    color: #ffffff;
}

.btn.map {
    background: rgba(41, 128, 185, 0.08);
    border-color: rgba(41, 128, 185, 0.3);
    color: #2980b9;
}

[data-theme="dark"] .btn.map {
    color: #7ed6df;
}

.btn.map i {
    color: inherit;
}

.btn.map:hover {
    background: #2980b9;
    border-color: #2980b9;
    color: #ffffff;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 64px 24px;
    background: var(--bg-elevated);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-lg);
    margin: 20px 0 40px;
}

.empty-state i {
    font-size: 36px;
    color: var(--gold);
    margin-bottom: 14px;
}

.empty-state h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 26px;
    margin-bottom: 6px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== FOOTER ===== */
.footer {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 70px;
    padding-top: 32px;
    border-top: 1px solid var(--border-subtle);
}

.footer-inner {
    text-align: center;
    font-size: 13px;
    color: var(--text-dim);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ===== LOGIN MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-overlay);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--gold-border);
    color: var(--text-main);
    padding: 36px 30px;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 360px;
    text-align: center;
    position: relative;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .modal-box {
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.75);
}

.modal-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0 auto 14px;
}

.modal-box h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 4px;
}

.modal-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.modal-box input {
    width: 100%;
    padding: 13px 16px;
    margin-bottom: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 15px;
    font-family: inherit;
}

.modal-box input:focus {
    outline: none;
    border-color: var(--gold);
}

.modal-box button {
    width: 100%;
    padding: 13px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--gold);
    color: #ffffff;
    font-weight: 600;
    font-size: 14.5px;
    cursor: pointer;
    transition: var(--transition);
}

[data-theme="dark"] .modal-box button {
    color: #0a0b0e;
}

.modal-box button:hover {
    background: var(--gold-light);
}

.modal-box .close {
    position: absolute;
    top: 14px;
    right: 16px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 18px;
}

#loginMsg {
    color: #ef4444;
    font-size: 13px;
    margin-top: 10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .topbar {
        padding: 12px 16px;
    }
    .tour-btn-text {
        display: none;
    }
    .back-tour-btn {
        padding: 4px;
    }
    .topbar h1 {
        font-size: 20px;
    }
    .hero-section {
        padding: 40px 16px 24px;
    }
    #search {
        padding: 15px 44px 15px 46px;
        font-size: 14.5px;
    }
    .content {
        padding: 10px 16px 60px;
    }
    .grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .card {
        padding: 22px;
    }
}