/* --- Global Ad System --- */
.ad-container {
    width: 100%;
    margin: 20px 0;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ad-top {
    min-height: 90px;
    margin-top: 80px;
    margin-bottom: 20px;
}

/* Below Fixed Header */
.ad-sidebar {
    min-height: 250px;
    margin-bottom: 20px;
}

.ad-footer {
    min-height: 90px;
    margin-top: 40px;
}

.ad-content {
    min-height: 100px;
    margin: 30px 0;
}

.ad-placeholder {
    color: #94a3b8;
    font-weight: bold;
    font-size: 0.9rem;
    padding: 20px;
    width: 100%;
}

/* Hide ads on very small screens if needed, or adjust */
@media (max-width: 480px) {
    .ad-top {
        min-height: 60px;
        margin-top: 70px;
    }
}

/* --- End Ad System --- */

:root {
    /* --- SAFE CLEAN DARK THEME --- */
    --primary: #0f172a;
    /* Dark Navy */
    --primary-light: #334155;
    --action: #d97706;
    /* Amber (Gold) */
    --action-hover: #b45309;

    --bg-body: #f1f5f9;
    /* Light Gray */
    --bg-card: #ffffff;

    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #f8fafc;
    /* White text for dark backgrounds */

    --border: #e2e8f0;
    --radius: 10px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Cairo', sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

/* --- UTILITIES --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 🧠 Smart Brain UI - Badges & Lists */
.services-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.service-badge {
    background-color: #f0f7ff;
    border: 1px solid #dbeafe;
    color: #0070cd;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
    transition: 0.2s;
    white-space: nowrap;
}
.service-badge:hover {
    background: #0070cd;
    color: #fff;
    transform: translateY(-2px);
}
.brain-services-list { list-style: none; padding: 0; margin: 15px 0; }
.brain-services-list li { position: relative; padding-right: 25px; margin-bottom: 12px; line-height: 1.6; color: #4b5563; }
.brain-services-list li::before { content: "✦"; position: absolute; right: 0; color: #0070cd; font-weight: bold; }
.brain-services-list li strong { color: #1e293b; margin-left: 5px; }

.grid {
    display: grid;
    gap: 20px;
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media(max-width: 768px) {

    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }

    .grid-cols-mobile-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* --- HEADER (FIXED ALIGNMENT) --- */
.glass-header {
    background: var(--primary);
    /* Solid Dark Color - No Glass to avoid issues */
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Unified Flex Container for Header */
.header-container,
.nav-content {
    display: flex;
    justify-content: flex-start;
    /* Was space-between */
    gap: 30px;
    /* Bring them closer */
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: white !important;
    display: flex;
    align-items: center;
    min-width: 150px;
    /* Ensure logo area is stable */
}

.nav-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-right: auto;
    /* Push to the Left (End in RTL) */
}

/* --- NAVIGATION MENU (Global) --- */
.nav-links {
    display: flex;
    gap: 20px;
    margin: 0;
    /* Was 0 auto - Removed to sit next to logo */
    list-style: none;
    padding: 0;
}

/* Header Buttons */
.glass-header .btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    background: transparent;
}

.glass-header .btn-outline:hover {
    background: white;
    color: var(--primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
}

.btn-primary:hover {
    background: var(--action-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.2s;
    justify-content: center;
    border: none;
    width: 100%;
    font-size: 0.95rem;
}

.btn-action:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--radius);
    border: 1px dashed var(--border);
    margin: 40px 0;
}

.empty-state ion-icon {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--text-muted);
    margin: 0;
    font-size: 1.2rem;
}

/* --- HERO & SEARCH --- */
.vezeeta-search-bar {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    margin: -30px auto 40px;
    /* Floating effect */
    position: relative;
    max-width: 900px;
    z-index: 10;
    border: 1px solid #e2e8f0;
}

.search-input-group {
    flex: 1;
    padding: 15px;
    border-left: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.search-label {
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--text-muted);
    margin-bottom: 5px;
    display: flex;
    gap: 5px;
}

.search-input-field {
    border: none;
    width: 100%;
    font-size: 0.95rem;
    font-weight: 600;
    outline: none;
    background: transparent;
}

/* Fix Dropdown Visibility */
.search-input-field option {
    background-color: white;
    color: #1e293b;
    padding: 10px;
}

.btn-search-red {
    background: var(--action);
    color: white;
    font-weight: bold;
    border: none;
    padding: 0 30px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

@media(max-width: 768px) {
    .vezeeta-search-bar {
        flex-direction: column;
        margin-top: 20px;
    }

    .search-input-group {
        border-left: none;
        border-bottom: 1px solid #eee;
    }

    .btn-search-red {
        width: 100%;
        padding: 15px;
        justify-content: center;
    }
}

/* --- CARDS --- */
.sector-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: 0.3s;
}

.sector-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.icon-circle {
    width: 60px;
    height: 60px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 15px;
    transition: 0.3s;
}

.sector-card:hover .icon-circle {
    background: var(--primary);
    color: var(--action);
}

.provider-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: 0.3s;
}

.provider-card:hover {
    box-shadow: var(--shadow);
}

.provider-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* Text Gradient for Titles */
.text-gradient {
    color: var(--action);
    /* Fallback */
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* Search Tabs */
.search-tabs-container {
    display: flex;
    max-width: 900px;
    margin: 0 auto;
    padding-right: 20px;
}

.search-tab {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    margin-left: 5px;
    font-weight: bold;
    display: flex;
    gap: 5px;
    align-items: center;
}

.search-tab.active {
    background: white;
    color: var(--primary);
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(10px);
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Helpers */
.badge-premium {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--action);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

/* --- CATEGORY & SEARCH PAGE STYLES --- */

/* Sub-Category Cards */
.sub-cat-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: 0.3s;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.sub-cat-card:hover {
    background: white;
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--action);
}

/* Layout Grid */
.search-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-top: 30px;
}

@media (max-width: 900px) {
    .search-layout {
        display: block;
    }
}

/* Sidebar Filters */
.filters-sidebar {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    height: fit-content;
}

.filter-group {
    margin-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
}

.filter-group h4 {
    margin: 0 0 10px 0;
    color: var(--primary);
    font-size: 1rem;
    font-weight: 700;
}

.filter-group label,
.filter-group div {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
}

.filter-group input {
    margin-left: 8px;
}

.btn-filter {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

/* Mobile Filter Toggle */
.btn-mobile-filter {
    display: none;
    background: var(--primary);
    color: white;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
}

@media (max-width: 900px) {
    .filters-sidebar {
        display: none;
        /* Hidden by default on mobile unless active */
        position: fixed;
        inset: 0;
        z-index: 2000;
        overflow-y: auto;
    }

    .filters-sidebar.active {
        display: block;
    }

    .btn-mobile-filter {
        display: block;
    }

    .close-filters {
        display: block;
        position: absolute;
        top: 20px;
        left: 20px;
        font-size: 1.5rem;
        cursor: pointer;
    }
}

/* Horizontal Provider Card (Vezeeta Style) */
.provider-card-row {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    transition: 0.2s;
}

.provider-card-row:hover {
    box-shadow: var(--shadow);
    border-color: #cbd5e1;
}

.card-main {
    flex: 1;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.provider-img-lg {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    /* Circle profile layout */
    object-fit: cover;
    border: 3px solid #f8fafc;
}

.p-name {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    color: var(--action);
}

.p-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.p-rating {
    color: #f59e0b;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.p-loc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Right/Bottom Action Column */
.card-actions {
    width: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid #f1f5f9;
    /* Divider for RTL */
    padding-right: 20px;
    gap: 15px;
}

.booking-strip-sm {
    background: #f8fafc;
    border-radius: 8px;
    display: flex;
    overflow: hidden;
    text-align: center;
    font-size: 0.75rem;
}

.day-slot {
    flex: 1;
    padding: 5px;
    border-left: 1px solid #fff;
    cursor: pointer;
}

.day-slot.active {
    background: #e0f2fe;
    color: #0284c7;
}

.book-txt {
    font-weight: bold;
    margin-top: 2px;
}

/* Responsive Row */
@media (max-width: 600px) {
    .provider-card-row {
        flex-direction: column;
    }

    .card-actions {
        width: 100%;
        border-right: none;
        border-top: 1px solid #eee;
        padding-top: 15px;
        padding-right: 0;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .card-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .booking-strip-sm {
        display: none;
    }


    /* --- NAVIGATION MENU (Global) --- */
    .nav-links {
        display: flex;
        gap: 30px;
        margin: 0 auto;
        list-style: none;
        padding: 0;
    }

    .nav-links li {
        position: relative;
    }

    .nav-links a {
        color: rgba(255, 255, 255, 0.9);
        text-decoration: none;
        font-weight: 600;
        font-size: 1rem;
        transition: 0.3s;
        padding: 5px 0;
    }

    .nav-links a:hover,
    .nav-links a.active {
        color: var(--action);
    }

    .nav-links a::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 0%;
        height: 2px;
        background: var(--action);
        transition: 0.3s;
    }

    .nav-links a:hover::after {
        width: 100%;
        left: 0;
    }

}

/* End max-width: 600px */

@media (max-width: 900px) {
    .nav-links {
        display: none;
        /* Mobile Menu Hidden for now */
    }
}

/* --- SERVICES BADGES (TAGS) --- */
.services-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 25px;
}

.service-badge {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.3s;
    display: inline-block;
    cursor: default;
}

.service-badge:hover {
    background-color: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
    transform: translateY(-1px);
}