/* assets/css/style.css - Global Stylesheet & Design System */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables */
:root {
    --primary: #006C35;
    --primary-dark: #005328;
    --primary-light: #EAF7F0;
    --secondary: #D4AF37;
    --secondary-dark: #B59329;
    --secondary-light: #FAF6E8;
    --dark: #111E16;
    --slate: #2B3A31;
    --text: #4E5F55;
    --text-muted: #83978B;
    --light: #F2F7F4;
    --border: #DEE7E2;
    --white: #FFFFFF;
    
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;
    
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Outfit', sans-serif;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.08);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Globals */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: inherit;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--light);
    color: var(--slate);
    line-height: 1.6;
}

body[dir="rtl"] {
    font-family: var(--font-ar);
}

body[dir="ltr"] {
    font-family: var(--font-en);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

input, select, textarea, button {
    outline: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.95rem;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 108, 53, 0.1);
}

button {
    cursor: pointer;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    font-weight: 600;
}

button:hover {
    background-color: var(--primary-dark);
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-sidebar { display: grid; grid-template-columns: 280px 1fr; gap: 30px; }
.grid-detail { display: grid; grid-template-columns: 1fr 380px; gap: 30px; }

/* Sticky Premium Header */
header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: var(--transition);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
}

.logo img {
    height: 40px;
}

.logo span {
    color: var(--dark);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--slate);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-secondary {
    background-color: var(--primary-light);
    color: var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: var(--white);
}

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

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* Language Switcher Button */
.lang-switcher {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    background-color: var(--light);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, #153A24 100%);
    color: var(--white);
    padding: 100px 0 120px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--light);
    clip-path: ellipse(60% 40px at 50% 40px);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

body[dir="rtl"] .hero h1 {
    font-size: 3.2rem;
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
}

/* Hero Search Bar */
.search-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-lg);
}

.search-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 100px;
    gap: 8px;
}

.search-form input, .search-form select {
    background-color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    color: var(--dark);
    height: 58px;
    width: 100%;
}

.search-form button {
    border-radius: var(--radius-md);
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* Category Grid Item */
.category-card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
}

.category-card:hover .category-icon {
    background-color: var(--primary);
    color: var(--white);
}

.category-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Business Listing Card */
.business-card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.business-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    height: 200px;
    position: relative;
    background-size: cover;
    background-position: center;
}

.card-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

body[dir="rtl"] .card-badges {
    flex-direction: row-reverse;
}

.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-featured {
    background-color: var(--secondary);
    color: var(--dark);
}

.badge-verified {
    background-color: var(--primary);
    color: var(--white);
}

.badge-status {
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--white);
}

.card-logo {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    background-color: var(--white);
    padding: 5px;
    position: absolute;
    bottom: -35px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

body[dir="rtl"] .card-logo {
    right: 20px;
}

body[dir="ltr"] .card-logo {
    left: 20px;
}

.card-body {
    padding: 50px 20px 20px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.star-rating {
    color: var(--border);
}

.star-rating i.filled {
    color: var(--secondary);
}

.card-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: var(--light);
    color: var(--text);
    transition: var(--transition);
}

.btn-icon:hover {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn-icon.whatsapp-btn:hover {
    background-color: #25D366;
    border-color: #25D366;
    color: white;
}

/* List view variations */
.listings-wrapper.list-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.listings-wrapper.list-view .business-card {
    flex-direction: row;
    height: 220px;
}

.listings-wrapper.list-view .card-image {
    width: 280px;
    height: 100%;
    flex-shrink: 0;
}

.listings-wrapper.list-view .card-logo {
    bottom: 15px;
}

body[dir="rtl"].listings-wrapper.list-view .card-logo {
    right: auto;
    left: 15px;
}

body[dir="ltr"].listings-wrapper.list-view .card-logo {
    left: auto;
    right: 15px;
}

.listings-wrapper.list-view .card-body {
    padding: 20px;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
}

.section-title p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 5px;
}

.section-pad {
    padding: 80px 0;
}

/* CTA Area */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 60px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    margin-bottom: 80px;
}

.cta-content {
    max-width: 650px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cta-content h2 {
    font-size: 2.2rem;
    font-weight: 800;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

/* Details Page CSS */
.biz-hero {
    height: 360px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.biz-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.7) 100%);
}

.biz-header-content {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    z-index: 10;
    color: var(--white);
}

.biz-header-flex {
    display: flex;
    align-items: flex-end;
    gap: 30px;
}

.biz-detail-logo {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-md);
    background-color: var(--white);
    padding: 8px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.biz-detail-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.biz-detail-info h1 {
    font-size: 2.5rem;
    font-weight: 800;
}

.biz-badge-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.detail-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.detail-section h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--light);
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Gallery layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.gallery-item {
    border-radius: var(--radius-sm);
    overflow: hidden;
    height: 100px;
    border: 1px solid var(--border);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Sidebar Box styles */
.sidebar-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.sidebar-box h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--dark);
}

.hours-table {
    width: 100%;
    border-collapse: collapse;
}

.hours-table tr {
    border-bottom: 1px solid var(--light);
}

.hours-table td {
    padding: 10px 0;
    font-size: 0.9rem;
}

.hours-table td.day {
    font-weight: 600;
}

.hours-table td.time {
    text-align: right;
}

body[dir="rtl"] .hours-table td.time {
    text-align: left;
}

.hours-table tr.current-day {
    color: var(--primary);
    font-weight: 700;
}

/* Dashboard Styles */
.dashboard-sidebar {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: fit-content;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--slate);
    font-weight: 600;
    transition: var(--transition);
}

.sidebar-menu-item:hover, .sidebar-menu-item.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

.dashboard-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin: 10px 0;
}

/* Bilingual Tab Panel Styling */
.tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
}

.tab-btn {
    background: none;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    background-color: var(--primary);
    color: var(--white);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Footer Section */
footer {
    background-color: var(--dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 80px 0 30px 0;
    border-top: 5px solid var(--primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    color: var(--white);
    font-size: 1.15rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--secondary);
}

body[dir="rtl"] .footer-col h4::after {
    left: auto;
    right: 0;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col ul a:hover {
    color: var(--secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

/* Filters UI */
.filters-container {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
}

.filter-group {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--light);
    padding-bottom: 15px;
}

.filter-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.filter-group h4 {
    margin-bottom: 12px;
    font-size: 1rem;
    color: var(--dark);
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Alert styles */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-weight: 600;
}

.alert-success {
    background-color: #DEF7EC;
    color: #03543F;
    border: 1px solid #BCF0DA;
}

.alert-danger {
    background-color: #FDE8E8;
    color: #9B1C1C;
    border: 1px solid #FBD5D5;
}

.alert-warning {
    background-color: #FEF08A;
    color: #713F12;
    border: 1px solid #FDE047;
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .grid-detail { grid-template-columns: 1fr; }
    .grid-sidebar { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .search-form { grid-template-columns: 1fr; }
    .search-form input, .search-form select, .search-form button { height: 50px; }
    .footer-grid { grid-template-columns: 1fr; }
    .header-container { height: 70px; }
    .logo { font-size: 1.3rem; }
    .logo img { height: 32px; }
    .biz-header-flex { flex-direction: column; align-items: center; text-align: center; }
    .listings-wrapper.list-view .business-card { flex-direction: column; height: auto; }
    .listings-wrapper.list-view .card-image { width: 100%; height: 180px; }
}

@media (max-width: 480px) {
    .grid-4 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
}
