/* --- Variables & Reset --- */
:root {
    --primary: #6366f1; --primary-dark: #4f46e5; --secondary: #10b981; --accent: #f97316;
    --bg-body: #f8fafc; --bg-card: #ffffff; --text-main: #1e293b; --text-muted: #64748b;
    --border: #e2e8f0; --shadow: 0 10px 40px -10px rgba(0,0,0,0.08);
    --glass: rgba(255, 255, 255, 0.9);
    --gradient-main: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --gradient-hero: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.8) 100%);
    --nav-height: 80px;
}
[data-theme="dark"] {
    --bg-body: #0f172a; --bg-card: #1e293b; --text-main: #f1f5f9; --text-muted: #94a3b8;
    --border: #334155; --glass: rgba(30, 41, 59, 0.9); --shadow: 0 10px 40px -10px rgba(0,0,0,0.5);
    --gradient-hero: linear-gradient(135deg, rgba(0,0,0,0.95) 0%, rgba(15, 23, 42, 0.9) 100%);
}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; scroll-behavior: smooth; }
body { background: var(--bg-body); color: var(--text-main); overflow-x: hidden; transition: background 0.3s; }

/* --- Utility --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; }
.btn { padding: 12px 28px; border-radius: 50px; border: none; font-weight: 600; cursor: pointer; transition: 0.3s; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary { background: var(--gradient-main); color: white; box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-danger-outline { border: 1px solid #ef4444; color: #ef4444; background: transparent; }
.btn-danger-outline:hover { background: #ef4444; color: white; }
.text-gradient { background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.sub-title { display: block; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; font-size: 0.8rem; margin-bottom: 10px; }
.hidden { display: none !important; }

/* --- Navbar --- */
#navbar { position: fixed; top: 0; width: 100%; height: var(--nav-height); background: var(--glass); backdrop-filter: blur(12px); z-index: 1000; border-bottom: 1px solid var(--border); transition: 0.3s; }
.nav-content { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; font-weight: 800; color: var(--text-main); }
.logo-icon { width: 40px; height: 40px; background: var(--gradient-main); color: white; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-weight: 600; font-size: 0.95rem; transition: 0.3s; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-actions { display: flex; gap: 15px; align-items: center; }
.user-greeting { font-weight: 600; color: var(--primary); }
.icon-btn { background: var(--bg-body); border: 1px solid var(--border); width: 40px; height: 40px; border-radius: 50%; color: var(--text-main); cursor: pointer; transition: 0.3s; }

/* --- Hero & Search --- */
#hero { height: 100vh; position: relative; display: flex; align-items: center; justify-content: center; text-align: center; padding-top: var(--nav-height); overflow: visible; }
.hero-bg { position: absolute; inset: 0; background: url('https://images.unsplash.com/photo-1581578731117-10d52143b0d8?auto=format&fit=crop&q=80') center/cover no-repeat; transform: scale(1.1); animation: zoomBg 20s infinite alternate; }
@keyframes zoomBg { from { transform: scale(1); } to { transform: scale(1.2); } }
.hero-overlay { position: absolute; inset: 0; background: var(--gradient-hero); }
.hero-content { position: relative; z-index: 2; max-width: 800px; color: white; }
.badge-pill { display: inline-block; background: rgba(255,255,255,0.15); backdrop-filter: blur(5px); padding: 8px 20px; border-radius: 30px; font-size: 0.85rem; margin-bottom: 20px; border: 1px solid rgba(255,255,255,0.3); }
.hero h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 20px; font-weight: 800; }
.hero p { font-size: 1.2rem; color: rgba(255,255,255,0.8); margin-bottom: 40px; max-width: 600px; margin-left: auto; margin-right: auto; }

.search-container { position: relative; max-width: 650px; margin: 0 auto 50px; z-index: 100; }
.search-bar-wrapper { display: flex; align-items: center; background: white; border-radius: 50px; padding: 5px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.search-filter { position: relative; padding-left: 15px; display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.search-filter select { appearance: none; border: none; background: transparent; padding: 10px; font-weight: 600; color: var(--text-main); cursor: pointer; outline: none; max-width: 140px; }
.divider-vertical { width: 1px; height: 30px; background: #e2e8f0; margin: 0 10px; }
.search-input-box { flex: 1; display: flex; align-items: center; position: relative; }
.search-icon { position: absolute; left: 10px; color: var(--text-muted); font-size: 1.1rem; }
.search-input-box input { width: 100%; border: none; padding: 12px 10px 12px 40px; font-size: 1rem; outline: none; border-radius: 0 50px 50px 0; color: #333; }
.search-results-dropdown { position: absolute; top: 110%; left: 0; width: 100%; background: var(--bg-card); border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); overflow: hidden; max-height: 350px; overflow-y: auto; border: 1px solid var(--border); animation: slideDown 0.3s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.search-result-item { display: flex; align-items: center; gap: 15px; padding: 15px 20px; cursor: pointer; transition: 0.2s; border-bottom: 1px solid var(--border); }
.search-result-item:hover { background: rgba(99, 102, 241, 0.05); }
.sr-icon { width: 40px; height: 40px; background: rgba(99, 102, 241, 0.1); color: var(--primary); border-radius: 10px; display: grid; place-items: center; }

/* --- Catalog --- */
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-size: 2.5rem; margin-bottom: 10px; color: var(--text-main); }
.category-wrapper { overflow-x: auto; padding-bottom: 15px; margin-bottom: 30px; display: flex; justify-content: flex-start; scrollbar-width: thin; }
.category-tabs { display: flex; gap: 12px; padding: 0 5px; margin: 0 auto; width: max-content; }
.tab-btn { background: var(--bg-card); padding: 10px 20px; border-radius: 30px; border: 1px solid var(--border); color: var(--text-muted); cursor: pointer; white-space: nowrap; transition: 0.3s; font-weight: 500; }
.tab-btn.active, .tab-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 30px; }
.service-card { background: var(--bg-card); border-radius: 20px; padding: 30px 20px; text-align: center; border: 1px solid var(--border); transition: 0.3s; cursor: pointer; position: relative; overflow: hidden; }
.service-card:hover { transform: translateY(-10px); box-shadow: var(--shadow); border-color: var(--primary); }
.service-icon { width: 70px; height: 70px; background: rgba(99, 102, 241, 0.1); color: var(--primary); border-radius: 50%; display: grid; place-items: center; font-size: 2rem; margin: 0 auto 20px; transition: 0.3s; }
.service-cat { font-size: 0.8rem; color: var(--accent); font-weight: 600; text-transform: uppercase; }
.service-type-badge { position: absolute; top: 10px; right: 10px; font-size: 0.7rem; padding: 4px 10px; border-radius: 10px; font-weight: 700; text-transform: uppercase; }
.badge-home { background: #dbeafe; color: #1e40af; }
.badge-office { background: #fef3c7; color: #92400e; }
.load-more-container { text-align: center; margin-top: 50px; }

/* --- Booking --- */
.bg-gradient-mesh { background: var(--gradient-main); position: relative; }
.booking-layout { display: flex; flex-wrap: wrap; gap: 50px; align-items: flex-start; }
.booking-info { flex: 1; min-width: 300px; padding-top: 20px; }
.booking-form-wrapper { flex: 1.2; min-width: 350px; }
.white-text { color: white; }
.white-text-70 { color: rgba(255,255,255,0.8); line-height: 1.6; margin-bottom: 30px; }
.glass-form { background: rgba(255, 255, 255, 0.95); padding: 40px; border-radius: 24px; box-shadow: 0 20px 50px rgba(0,0,0,0.2); }
[data-theme="dark"] .glass-form { background: rgba(30, 41, 59, 0.95); }
.glass-form h3 { margin-bottom: 25px; display: flex; align-items: center; gap: 10px; color: var(--primary); }
.input-group label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; display: block; }
.input-field { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: 0 15px; background: var(--bg-body); transition: 0.3s; position: relative; }
.input-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); }
.input-field i { color: var(--text-muted); margin-right: 10px; }
.input-field input, .input-field select { border: none; background: transparent; width: 100%; padding: 12px 0; outline: none; color: var(--text-main); font-size: 1rem; }
.row-group { display: flex; gap: 20px; margin-bottom: 20px; }
.input-group { margin-bottom: 20px; width: 100%; }
.read-only-field { background: #e2e8f0; opacity: 0.8; }

/* --- Custom Calendar Widget Styles --- */
.date-wrapper { cursor: pointer; }
.custom-calendar {
    position: absolute; top: 110%; left: 0; width: 100%; min-width: 280px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    padding: 20px; z-index: 100;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.calendar-header button { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text-muted); width: 30px; height: 30px; border-radius: 50%; transition: 0.2s; }
.calendar-header button:hover { background: var(--bg-body); color: var(--primary); }
.calendar-header span { font-weight: 700; color: var(--text-main); }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 10px; font-weight: 600; }
.calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.calendar-day {
    aspect-ratio: 1; display: flex; justify-content: center; align-items: center;
    cursor: pointer; border-radius: 50%; font-size: 0.9rem; color: var(--text-main);
    transition: 0.2s;
}
.calendar-day:hover:not(.empty) { background: rgba(99, 102, 241, 0.1); color: var(--primary); }
.calendar-day.selected { background: var(--gradient-main); color: white !important; box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4); }
.calendar-day.today { border: 1px solid var(--primary); color: var(--primary); }
.calendar-day.disabled { opacity: 0.3; cursor: not-allowed; }

/* Booking Info Boxes */
.location-info-box, .expert-preview-box { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.3); border-radius: 16px; padding: 20px; margin-bottom: 20px; backdrop-filter: blur(5px); }
.loc-header, .ep-header { color: rgba(255,255,255,0.8); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.loc-details, .ep-card { display: flex; gap: 15px; align-items: center; color: white; font-weight: 500; }
.loc-details i { font-size: 1.2rem; color: #fbbf24; }
.map-container { margin-top: 15px; border-radius: 10px; overflow: hidden; border: 2px solid rgba(255,255,255,0.2); }
.expert-contact { margin-top: 15px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,0.2); color: white; display: flex; align-items: center; gap: 10px; }
.ep-card .avatar { width: 50px; height: 50px; background: white; color: var(--primary); border-radius: 50%; font-weight: bold; display: grid; place-items: center; font-size: 1.2rem; }

/* --- Dashboard --- */
.dashboard-card { background: var(--bg-card); border-radius: 20px; box-shadow: var(--shadow); padding: 30px; border: 1px solid var(--border); max-width: 100%; overflow: hidden; }
.table-wrapper { width: 100%; overflow-x: auto; padding-bottom: 10px; }
.custom-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.custom-table th, .custom-table td { padding: 15px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.status-badge { background: rgba(16, 185, 129, 0.15); color: #10b981; padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; }
.dash-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.dash-tabs { display: flex; gap: 10px; }

/* --- Modals --- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); z-index: 2000; display: none; justify-content: center; align-items: center; padding: 20px; }
.modal-content { background: var(--bg-card); width: 100%; max-width: 600px; border-radius: 24px; overflow: hidden; position: relative; animation: slideUpModal 0.4s ease; }
@keyframes slideUpModal { from { transform: translateY(50px) scale(0.9); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
.modal-header-bg { height: 100px; background: var(--gradient-main); }
.modal-close { position: absolute; top: 15px; right: 15px; background: rgba(0,0,0,0.2); color: white; border: none; width: 35px; height: 35px; border-radius: 50%; cursor: pointer; z-index: 5; }
.modal-body-content { padding: 0 30px 30px; position: relative; top: -40px; }
.modal-icon-badge { width: 80px; height: 80px; background: var(--bg-card); border-radius: 20px; display: grid; place-items: center; font-size: 2.5rem; color: var(--primary); box-shadow: 0 10px 20px rgba(0,0,0,0.1); margin-bottom: 15px; }
.modal-tags { display: flex; gap: 10px; margin: 10px 0; }
.modal-cat-tag { display: inline-block; background: rgba(99, 102, 241, 0.1); color: var(--primary); padding: 4px 12px; border-radius: 10px; font-size: 0.8rem; font-weight: 600; }
.modal-type-tag { display: inline-block; background: #f3f4f6; color: var(--text-muted); padding: 4px 12px; border-radius: 10px; font-size: 0.8rem; font-weight: 600; }
.expert-row-card { display: flex; justify-content: space-between; align-items: center; padding: 15px; border: 1px solid var(--border); border-radius: 12px; transition: 0.2s; }
.expert-row-card:hover { border-color: var(--primary); background: rgba(99, 102, 241, 0.05); }

/* Small Modals */
.small-modal { max-width: 400px; padding: 40px; }
.auth-header, .payment-header { text-align: center; margin-bottom: 30px; }
.auth-header h2 { font-size: 2rem; margin-bottom: 5px; }
.price-tag { font-size: 2.5rem; font-weight: 800; color: var(--primary); margin-top: 10px; }
.payment-methods { display: flex; flex-direction: column; gap: 15px; margin-bottom: 30px; }
.pay-option { display: flex; align-items: center; gap: 15px; padding: 15px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: 0.2s; }
.pay-option:hover { border-color: var(--primary); background: rgba(99, 102, 241, 0.05); }
.pay-option input { accent-color: var(--primary); }

/* --- Mobile --- */
.hamburger { display: none; flex-direction: column; gap: 6px; cursor: pointer; }
.hamburger span { width: 25px; height: 2px; background: var(--text-main); }
@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-links { position: absolute; top: var(--nav-height); left: 0; width: 100%; background: var(--bg-card); flex-direction: column; padding: 20px; display: none; box-shadow: var(--shadow); }
    .nav-links.active { display: flex; }
    .hero h1 { font-size: 2.5rem; }
    .search-container { width: 95%; }
    .search-bar-wrapper { flex-direction: column; align-items: stretch; border-radius: 20px; gap: 10px; padding: 10px; }
    .divider-vertical { display: none; }
    .search-input-box input { border-radius: 10px; padding-left: 35px; }
    .booking-layout { flex-direction: column; }
    .row-group { flex-direction: column; gap: 0; }
    .hero-stats { flex-direction: column; gap: 15px; }
}