/* ─── Variables ───────────────────────────────────────────────────────────── */
:root {
    --primary:      #0077b6;
    --primary-light:#00b4d8;
    --secondary:    #f72585;
    --accent:       #7209b7;
    --success:      #06d6a0;
    --bg:           #f0f4f8;
    --surface:      #ffffff;
    --text:         #1a1d2e;
    --text-muted:   #6b7280;
    --border:       rgba(0,0,0,0.07);
    --glass-bg:     rgba(255,255,255,0.75);
    --glass-border: rgba(255,255,255,0.3);
    --shadow-sm:    0 2px 8px rgba(0,0,0,0.06);
    --shadow:       0 8px 32px rgba(31,38,135,0.08);
    --shadow-lg:    0 20px 60px rgba(0,0,0,0.12);
    --radius:       16px;
    --radius-sm:    8px;
}

/* ─── Reset & Base ────────────────────────────────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    background-image:
        radial-gradient(ellipse at 0% 0%,   rgba(0,180,216,0.12) 0, transparent 55%),
        radial-gradient(ellipse at 100% 0%,  rgba(247,37,133,0.10) 0, transparent 55%),
        radial-gradient(ellipse at 50% 100%, rgba(114,9,183,0.08)  0, transparent 55%);
    background-attachment: fixed;
    min-height: 100vh;
}

a { text-decoration:none; color:var(--primary); transition: color .25s ease; }
a:hover { color: var(--primary-light); }
img { max-width: 100%; height: auto; display: block; }

/* ─── Container ───────────────────────────────────────────────────────────── */
.container { width:90%; max-width:1280px; margin:0 auto; }

/* ─── Glassmorphism ───────────────────────────────────────────────────────── */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ─── Header ──────────────────────────────────────────────────────────────── */
.main-header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky; top:0; z-index: 1000;
    padding: 14px 0;
    box-shadow: 0 4px 20px rgba(0,119,182,0.08);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.logo {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}
.logo-icon { font-size: 1.6rem; }
.logo-text { color: var(--primary); }
.logo-text-highlight { color: var(--secondary); }

.main-nav ul { list-style:none; display:flex; gap:6px; align-items:center; }
.main-nav a {
    color: var(--text-muted);
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: all .25s ease;
    font-size: .95rem;
}
.main-nav a:hover, .main-nav a.active {
    color: var(--primary);
    background: rgba(0,119,182,0.08);
}

/* Header Search */
.header-search form {
    display: flex; gap: 8px; align-items: center;
}
.header-search input {
    padding: 9px 16px;
    border: 1.5px solid var(--border);
    border-radius: 50px;
    font-family: inherit;
    font-size: .9rem;
    outline: none;
    width: 220px;
    background: var(--surface);
    transition: border-color .25s, box-shadow .25s;
}
.header-search input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(0,180,216,0.12);
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: .9rem;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s;
    white-space: nowrap;
}
.btn:hover   { transform: translateY(-2px); }
.btn:active  { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    box-shadow: 0 4px 15px rgba(0,119,182,0.3);
}
.btn-primary:hover { box-shadow: 0 8px 25px rgba(0,119,182,0.4); color: white; }

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #b5179e);
    color: white;
    box-shadow: 0 4px 15px rgba(247,37,133,0.3);
}
.btn-secondary:hover { color: white; box-shadow: 0 8px 25px rgba(247,37,133,0.4); }

.btn-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    box-shadow: 0 4px 15px rgba(37,211,102,0.3);
}
.btn-whatsapp:hover { color: white; box-shadow: 0 8px 25px rgba(37,211,102,0.4); }

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: white; }

.btn-sm   { padding: 6px 14px; font-size: .82rem; border-radius: 6px; }
.btn-lg   { padding: 14px 36px; font-size: 1.05rem; }
.btn-icon { padding: 10px 12px; }

/* ─── Layout ──────────────────────────────────────────────────────────────── */
.layout-wrapper {
    display: grid;
    grid-template-columns: 210px 1fr 210px;
    gap: 28px;
    margin: 36px auto;
    padding: 0;
    min-height: 60vh;
    max-width: 1280px;
    width: 90%;
}

/* ─── Ads ─────────────────────────────────────────────────────────────────── */
.ad-box {
    margin-bottom: 18px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .3s ease, box-shadow .3s ease;
}
.ad-box:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.ad-box img { width:100%; height:auto; display:block; }

/* ─── Hero Section ────────────────────────────────────────────────────────── */
.hero-section {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 80px 20px 90px;
    background: linear-gradient(135deg, #0077b6 0%, #00b4d8 40%, #7209b7 100%);
    margin-bottom: 0;
    color: white;
}
.hero-section::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M50 50c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10zM10 10c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10S0 25.523 0 20s4.477-10 10-10z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-section h1 {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 14px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
    position: relative;
}

.hero-section p {
    font-size: 1.15rem;
    opacity: .9;
    margin-bottom: 36px;
    position: relative;
}

.hero-search-form {
    display: flex;
    gap: 10px;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.hero-search-form input {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.hero-stats {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-top: 36px;
    position: relative;
}
.hero-stat {
    text-align: center;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 14px 22px;
    border-radius: var(--radius-sm);
}
.hero-stat .num { font-size: 1.8rem; font-weight: 800; display: block; }
.hero-stat .lbl { font-size: .82rem; opacity: .85; }

/* ─── Section Titles ──────────────────────────────────────────────────────── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}
.section-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    position: relative;
    padding-right: 16px;
}
.section-title::before {
    content: '';
    position: absolute;
    right: 0; top: 50%;
    transform: translateY(-50%);
    width: 4px; height: 70%;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    border-radius: 4px;
}

/* ─── Categories Grid ─────────────────────────────────────────────────────── */
.categories-section { margin-bottom: 52px; }

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
}

.category-card {
    padding: 28px 16px;
    text-align: center;
    color: var(--text);
    transition: transform .3s ease, box-shadow .3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.category-card::after {
    content: '';
    position: absolute; bottom:0; right:0; left:0;
    height: 3px;
    background: var(--cat-color, var(--primary));
    transform: scaleX(0);
    transition: transform .3s ease;
}
.category-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); color: var(--text); }
.category-card:hover::after { transform: scaleX(1); }

.category-icon-wrap {
    width: 68px; height: 68px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--cat-bg, rgba(0,119,182,0.1));
    font-size: 2rem;
    transition: transform .3s ease;
}
.category-card:hover .category-icon-wrap { transform: scale(1.15) rotate(-5deg); }
.category-card h3 { font-size: .95rem; font-weight: 700; margin: 0; }

.badge {
    background: var(--primary-light);
    color: white;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: .75rem;
    font-weight: 700;
}
.badge-primary { background: var(--secondary); }

/* ─── Businesses Grid ─────────────────────────────────────────────────────── */
.businesses-section { margin-bottom: 52px; }

.businesses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 24px;
}

.business-card {
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}
.business-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.business-card-image {
    height: 190px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}
.business-card-image::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.35), transparent 60%);
}

.business-card-badge {
    position: absolute; top: 12px; right: 12px; z-index: 1;
}

.featured-badge {
    background: linear-gradient(135deg, #ffd700, #ff9500);
    color: #4a2f00;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: .75rem;
    font-weight: 800;
    display: flex; align-items: center; gap: 4px;
    box-shadow: 0 2px 8px rgba(255,149,0,0.4);
}

.business-card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.business-card-body h3 { font-size: 1.05rem; font-weight: 700; }
.business-card-body h3 a { color: var(--text); }
.business-card-body h3 a:hover { color: var(--primary); }

.business-category-tag {
    font-size: .8rem;
    font-weight: 700;
    color: var(--secondary);
    display: flex; align-items: center; gap: 4px;
}

.business-meta { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.business-meta-item {
    display: flex; align-items: center; gap: 8px;
    font-size: .85rem; color: var(--text-muted);
}

.business-excerpt {
    color: var(--text-muted);
    font-size: .88rem;
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.business-card-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ─── Business List (category / search) ──────────────────────────────────── */
.businesses-list { display: flex; flex-direction: column; gap: 20px; }

.business-list-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}
.business-list-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.business-list-image {
    height: 100%;
    min-height: 160px;
    background-size: cover;
    background-position: center;
}

.business-list-body { padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.business-list-body h2 { font-size: 1.15rem; font-weight: 700; }
.business-list-body h2 a { color: var(--text); }
.business-list-body h2 a:hover { color: var(--primary); }
.business-list-excerpt { color: var(--text-muted); font-size: .9rem; flex: 1; }

/* ─── Single Business Page ───────────────────────────────────────────────── */
.business-detail { display: grid; grid-template-columns: 1fr 340px; gap: 28px; }

.business-detail-main {}
.business-detail-sidebar {}

.business-hero-image {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.business-title-area { margin-bottom: 20px; }
.business-title-area h1 { font-size: 2rem; font-weight: 800; margin-bottom: 10px; }
.business-title-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.section-block {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.section-block h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }

.contact-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: .95rem;
}
.contact-icon {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.contact-icon.green { background: #dcfce7; }
.contact-icon.blue  { background: #dbeafe; }
.contact-icon.red   { background: #fee2e2; }
.contact-icon.purple{ background: #f3e8ff; }
.contact-icon.amber { background: #fef3c7; }

.cta-box {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}
.cta-box h3 { color: white; border: none; margin-bottom: 12px; font-size: 1.1rem; }
.cta-box .btn-whatsapp { width: 100%; justify-content: center; font-size: 1rem; }

.working-hours-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: #dcfce7; color: #15803d;
    padding: 6px 14px; border-radius: 50px;
    font-size: .85rem; font-weight: 700;
}

/* ─── Page Header ─────────────────────────────────────────────────────────── */
.page-header {
    padding: 32px 36px;
    margin-bottom: 30px;
}
.page-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 6px; }
.page-header p   { color: var(--text-muted); margin: 0; }

/* ─── Search Bar (inline) ─────────────────────────────────────────────────── */
.search-filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.search-filter-bar select, .search-filter-bar input {
    padding: 9px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: .9rem;
    outline: none;
    background: var(--surface);
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */
.main-footer {
    background: var(--text);
    color: rgba(255,255,255,0.75);
    padding: 52px 0 24px;
    margin-top: 64px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 36px;
}
.footer-logo { font-size: 1.7rem; font-weight: 800; margin-bottom: 12px; }
.footer-logo span { color: var(--secondary); }
.footer-desc { font-size: .9rem; line-height: 1.8; opacity: .7; }
.footer-title { font-size: 1rem; font-weight: 700; color: white; margin-bottom: 16px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: rgba(255,255,255,0.6); font-size: .9rem; transition: color .25s; }
.footer-links a:hover { color: var(--primary-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: .85rem; opacity: .55; }

/* ─── Pagination ──────────────────────────────────────────────────────────── */
.pagination-wrapper nav { display: flex; justify-content: center; }
.pagination-wrapper nav svg { height: 18px; }

/* ─── Utility ─────────────────────────────────────────────────────────────── */
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 18px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 40px; }
.mb-2 { margin-bottom: 10px; }
.mb-4 { margin-bottom: 24px; }
.p-4  { padding: 20px; }
.p-5  { padding: 36px; }
.text-center { text-align: center; }

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .layout-wrapper { grid-template-columns: 1fr; width: 92%; }
    .ad-sidebar { display: none; }
    .business-detail { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hero-section h1 { font-size: 2rem; }
    .hero-stats { flex-wrap: wrap; gap: 12px; }
    .header-container { flex-direction: column; gap: 10px; }
    .header-search input { width: 180px; }
    .hero-search-form { flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .business-list-item { grid-template-columns: 1fr; }
    .business-list-image { height: 200px; }
}

@media (max-width: 480px) {
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .businesses-grid { grid-template-columns: 1fr; }
}
