/* ============================================
   SAMSAR - Main Stylesheet
   Premium Real Estate Theme for Morocco
   ============================================ */

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

/* ---- CSS Variables (Light Mode) ---- */
:root {
    --primary: #1a3a5c;
    --primary-light: #2a5a8c;
    --primary-dark: #0f2440;
    --secondary: #e8a838;
    --secondary-light: #f0c060;
    --secondary-dark: #c88a20;
    --accent: #27ae60;
    --accent-light: #2ecc71;
    --danger: #e74c3c;
    --bg-color: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-color: #2c3e50;
    --text-secondary: #6c757d;
    --text-light: #95a5a6;
    --border-color: #e9ecef;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, #1a3a5c, #2a5a8c);
    --gradient-secondary: linear-gradient(135deg, #e8a838, #f0c060);
    --gradient-hero: linear-gradient(135deg, rgba(26, 58, 92, 0.92), rgba(42, 90, 140, 0.85));
    --font-primary: 'Inter', sans-serif;
    --font-arabic: 'Cairo', sans-serif;
    --navbar-height: 80px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
    transition: var(--transition);
}

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

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

a:hover {
    color: var(--secondary);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ---- Navbar ---- */
.samsar-navbar {
    background: var(--bg-secondary);
    padding: 0 0;
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    height: var(--navbar-height);
    transition: var(--transition);
}

.samsar-navbar.scrolled {
    height: 65px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.samsar-navbar .navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary);
}

.samsar-navbar .navbar-brand img {
    height: 45px;
    transition: var(--transition);
}

.samsar-navbar.scrolled .navbar-brand img {
    height: 35px;
}

.samsar-navbar .nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.95rem;
    position: relative;
}

.samsar-navbar .nav-link:hover,
.samsar-navbar .nav-link.active {
    color: var(--secondary) !important;
    background: rgba(232, 168, 56, 0.08);
}

.samsar-navbar .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--secondary);
    border-radius: 3px;
}

.navbar-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: var(--bg-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.nav-icon-btn:hover {
    background: var(--secondary);
    color: #fff;
    transform: scale(1.05);
}

.lang-selector {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 0.85rem;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.lang-selector:hover {
    border-color: var(--secondary);
}

/* ---- Hero Section ---- */
.hero-section {
    background: var(--gradient-hero), url('../images/hero-bg.jpg') center/cover no-repeat;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 140px 20px 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
}

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

.hero-section h1 {
    color: #ffffff;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    animation: fadeInUp 0.8s ease-out;
}

.hero-section p {
    color: rgba(255,255,255,0.9);
    font-size: 1.2rem;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* ---- Hero Search Box ---- */
.hero-search-box {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-search-box .form-control,
.hero-search-box .form-select {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: var(--radius-sm);
    padding: 5px 16px;
    font-size: 0.95rem;
    color: var(--text-color);
    transition: var(--transition);
}

.hero-search-box .form-control:focus,
.hero-search-box .form-select:focus {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(232, 168, 56, 0.3);
}

.hero-search-box .btn-search {
    background: var(--gradient-secondary);
    color: var(--primary-dark);
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 32px;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    width: 100%;
}

.hero-search-box .btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 168, 56, 0.4);
}

/* ---- Buttons ---- */
.btn-primary-samsar {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 28px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary-samsar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 58, 92, 0.3);
    color: #fff;
}

.btn-secondary-samsar {
    background: var(--gradient-secondary);
    color: var(--primary-dark);
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 28px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-secondary-samsar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 168, 56, 0.3);
}

.btn-outline-samsar {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 10px 26px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline-samsar:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

/* ---- Section Styling ---- */
.section-padding {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-secondary);
    border-radius: 2px;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 20px auto 0;
}

/* ---- Property Card ---- */
.property-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    height: 100%;
    position: relative;
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.property-card .property-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.property-card .property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.property-card:hover .property-image img {
    transform: scale(1.08);
}

.property-card .property-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 8px;
    z-index: 5;
}

.property-card .badge-type {
    background: var(--gradient-primary);
    color: #fff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.property-card .badge-status {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-sale {
    background: var(--accent);
    color: #fff;
}

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

.property-card .badge-featured {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--danger);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 5;
}

.property-card .property-body {
    padding: 22px;
}

.property-card .property-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--secondary-dark);
    margin-bottom: 8px;
}

.property-card .property-price span {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.property-card .property-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-card .property-title a {
    color: inherit;
}

.property-card .property-title a:hover {
    color: var(--primary-light);
}

.property-card .property-location {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 15px;
}

.property-card .property-location i {
    color: var(--secondary);
    margin-right: 5px;
}

.property-card .property-meta {
    display: flex;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.property-card .property-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.property-card .property-meta .meta-item i {
    color: var(--primary-light);
    font-size: 0.9rem;
}

/* ---- Property List View Card ---- */
.property-list-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    display: flex;
    margin-bottom: 25px;
}

.property-list-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateX(5px);
}

.property-list-card .list-image {
    width: 320px;
    min-height: 240px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.property-list-card .list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.property-list-card:hover .list-image img {
    transform: scale(1.05);
}

.property-list-card .list-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ---- Stats Section ---- */
.stats-section {
    background: var(--gradient-primary);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M0 0h20v20H0zM20 20h20v20H20z'/%3E%3C/g%3E%3C/svg%3E");
}

.stat-item {
    text-align: center;
    position: relative;
    z-index: 2;
}

.stat-item .stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--secondary);
    display: block;
    line-height: 1.2;
}

.stat-item .stat-label {
    color: rgba(255,255,255,0.85);
    font-size: 1rem;
    font-weight: 500;
    margin-top: 5px;
}

/* ---- Agent Card ---- */
.agent-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

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

.agent-card .agent-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--secondary);
    margin-bottom: 18px;
}

.agent-card h5 {
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
}

.agent-card .agent-role {
    color: var(--secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.agent-card .agent-contact {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.agent-card .agent-contact a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    color: var(--primary);
    transition: var(--transition);
}

.agent-card .agent-contact a:hover {
    background: var(--primary);
    color: #fff;
}

/* ---- Page Header / Breadcrumb ---- */
.page-header {
    background: var(--gradient-primary);
    padding: 120px 0 50px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='50' cy='50' r='40'/%3E%3C/g%3E%3C/svg%3E");
}

.page-header h1 {
    color: #fff;
    font-weight: 800;
    font-size: 2.5rem;
    position: relative;
    z-index: 2;
}

.page-header .breadcrumb {
    background: transparent;
    padding: 0;
    margin-top: 15px;
    position: relative;
    z-index: 2;
}

.page-header .breadcrumb-item a {
    color: var(--secondary);
}

.page-header .breadcrumb-item.active {
    color: rgba(255,255,255,0.8);
}

.page-header .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.5);
}

/* ---- Forms ---- */
.samsar-form .form-group {
    margin-bottom: 20px;
}

.samsar-form label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.samsar-form .form-control,
.samsar-form .form-select {
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 5px 16px;
    font-size: 0.95rem;
    color: var(--text-color);
    transition: var(--transition);
}

.samsar-form .form-control:focus,
.samsar-form .form-select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(232, 168, 56, 0.15);
    background: var(--bg-secondary);
}

/* ---- Auth Cards (Login / Register) ---- */
.auth-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    padding-bottom: 40px;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    padding: 40px;
}

.auth-card .auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-card .auth-logo img {
    height: 60px;
    margin-bottom: 15px;
}

.auth-card .auth-logo h3 {
    font-weight: 800;
    color: var(--primary);
}

.auth-card .auth-logo p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ---- Property Detail Page ---- */
.property-detail-section {
    padding-top: 100px;
    padding-bottom: 60px;
}

.property-gallery {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 30px;
}

.property-gallery .main-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 15px;
}

.property-gallery .thumb-images {
    display: flex;
    gap: 10px;
}

.property-gallery .thumb-images img {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
}

.property-gallery .thumb-images img:hover,
.property-gallery .thumb-images img.active {
    border-color: var(--secondary);
}

.detail-info-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow-card);
    margin-bottom: 25px;
}

.detail-info-card h4 {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
}

.detail-meta-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
}

.detail-meta-item .meta-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.detail-meta-item .meta-text {
    flex: 1;
}

.detail-meta-item .meta-text small {
    color: var(--text-light);
    font-size: 0.75rem;
    display: block;
}

.detail-meta-item .meta-text strong {
    color: var(--text-color);
    font-size: 0.95rem;
}

/* ---- Sidebar ---- */
.sidebar-widget {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow-card);
    margin-bottom: 25px;
}

.sidebar-widget h5 {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

/* ---- Contact Info Box ---- */
.contact-info-box {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.contact-info-box:hover {
    transform: translateX(5px);
    background: var(--bg-secondary);
    box-shadow: var(--shadow);
}

.contact-info-box .info-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ---- Calculator ---- */
.calculator-section {
    padding: 40px 0 80px;
}

.calc-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
}

.calc-result {
    background: var(--gradient-primary);
    border-radius: var(--radius);
    padding: 30px;
    color: #fff;
    text-align: center;
    margin-top: 25px;
}

.calc-result .result-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary);
}

/* ---- Footer ---- */
.samsar-footer {
    background: var(--primary-dark);
    color: #fff;
    padding: 70px 0 0;
}

.samsar-footer h5 {
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 22px;
    font-size: 1.1rem;
}

.samsar-footer p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    line-height: 1.8;
}

.samsar-footer .footer-links {
    list-style: none;
    padding: 0;
}

.samsar-footer .footer-links li {
    margin-bottom: 10px;
}

.samsar-footer .footer-links a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
    font-size: 0.9rem;
}

.samsar-footer .footer-links a:hover {
    color: var(--secondary);
    padding-left: 8px;
}

.samsar-footer .footer-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.samsar-footer .footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.samsar-footer .footer-social a:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

.footer-newsletter .newsletter-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.footer-newsletter .newsletter-form input {
    flex: 1;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    color: #fff;
    font-size: 0.9rem;
}

.footer-newsletter .newsletter-form input::placeholder {
    color: rgba(255,255,255,0.5);
}

.footer-newsletter .newsletter-form button {
    background: var(--gradient-secondary);
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    color: var(--primary-dark);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.footer-newsletter .newsletter-form button:hover {
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    margin-top: 50px;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.85rem;
}

/* ---- Ad Slots ---- */
.ad-slot {
    background: var(--bg-color);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 15px;
    text-align: center;
    margin: 20px 0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-slot.ad-header { min-height: 90px; }
.ad-slot.ad-sidebar { min-height: 250px; }
.ad-slot.ad-in-feed { min-height: 120px; }
.ad-slot.ad-footer { min-height: 90px; }

/* ---- Admin Styles ---- */
.admin-sidebar {
    background: var(--primary-dark);
    min-height: 100vh;
    width: 260px;
    position: fixed;
    left: 0;
    top: 0;
    padding-top: 20px;
    z-index: 1000;
    transition: var(--transition);
}

.admin-sidebar .sidebar-brand {
    padding: 20px 25px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.admin-sidebar .sidebar-brand img {
    height: 40px;
    margin-bottom: 10px;
}

.admin-sidebar .sidebar-brand h5 {
    color: var(--secondary);
    font-weight: 700;
    font-size: 1rem;
    margin: 0;
}

.admin-sidebar .sidebar-menu {
    list-style: none;
    padding: 0;
}

.admin-sidebar .sidebar-menu li {
    margin-bottom: 2px;
}

.admin-sidebar .sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 25px;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.admin-sidebar .sidebar-menu a:hover,
.admin-sidebar .sidebar-menu a.active {
    background: rgba(255,255,255,0.08);
    color: var(--secondary);
    border-left-color: var(--secondary);
}

.admin-sidebar .sidebar-menu a i {
    width: 20px;
    text-align: center;
}

.admin-content {
    margin-left: 260px;
    padding: 30px;
    min-height: 100vh;
    background: var(--bg-color);
}

.admin-top-bar {
    background: var(--bg-secondary);
    padding: 15px 30px;
    margin: -30px -30px 30px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.dashboard-card .card-icon {
    width: 55px;
    height: 55px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 15px;
}

.dashboard-card .card-icon.bg-primary { background: var(--gradient-primary); }
.dashboard-card .card-icon.bg-secondary { background: var(--gradient-secondary); }
.dashboard-card .card-icon.bg-accent { background: linear-gradient(135deg, #27ae60, #2ecc71); }
.dashboard-card .card-icon.bg-danger { background: linear-gradient(135deg, #e74c3c, #c0392b); }

.dashboard-card h3 {
    font-weight: 800;
    font-size: 2rem;
    margin-bottom: 5px;
}

.dashboard-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* ---- Data Tables ---- */
.samsar-table {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.samsar-table table {
    width: 100%;
    margin: 0;
}

.samsar-table th {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    padding: 14px 18px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.samsar-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    vertical-align: middle;
}

.samsar-table tbody tr:hover {
    background: rgba(232, 168, 56, 0.05);
}

.samsar-table .btn-sm {
    padding: 5px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* ---- Search Filter Bar ---- */
.search-filter-bar {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow-card);
    margin-bottom: 30px;
}

/* ---- Pagination ---- */
.samsar-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 40px;
}

.samsar-pagination a,
.samsar-pagination span {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.samsar-pagination a:hover,
.samsar-pagination .active {
    background: var(--gradient-primary);
    color: #fff;
}

/* ---- Alert Messages ---- */
.samsar-alert {
    border-radius: var(--radius-sm);
    padding: 15px 20px;
    margin-bottom: 20px;
    border: none;
    font-weight: 500;
}

.samsar-alert.alert-success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--accent);
    border-left: 4px solid var(--accent);
}

.samsar-alert.alert-danger {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.samsar-alert.alert-warning {
    background: rgba(232, 168, 56, 0.1);
    color: var(--secondary-dark);
    border-left: 4px solid var(--secondary);
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease-out;
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .hero-section {
        min-height: 500px;
        padding: 120px 15px 60px;
    }
    .hero-section h1 {
        font-size: 2rem;
    }
    .property-list-card {
        flex-direction: column;
    }
    .property-list-card .list-image {
        width: 100%;
        min-height: 200px;
    }
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.open {
        transform: translateX(0);
    }
    .admin-content {
        margin-left: 0;
    }
}

@media (max-width: 767px) {
    .hero-section h1 {
        font-size: 1.6rem;
    }
    .section-title h2 {
        font-size: 1.6rem;
    }
    .stat-item .stat-number {
        font-size: 2rem;
    }
    .property-card .property-image {
        height: 180px;
    }
    .auth-card {
        padding: 25px;
        margin: 0 15px;
    }
    .page-header h1 {
        font-size: 1.8rem;
    }
}

/* ---- Utility Classes ---- */
.text-primary-samsar { color: var(--primary) !important; }
.text-secondary-samsar { color: var(--secondary) !important; }
.bg-primary-samsar { background: var(--gradient-primary) !important; }
.bg-secondary-samsar { background: var(--gradient-secondary) !important; }
.mt-navbar { margin-top: var(--navbar-height); }

/* ---- Placeholder Image ---- */
.placeholder-img {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    font-size: 2rem;
}

/* ---- Improved Image Display ---- */
.property-card .property-image img,
.property-list-card .list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.property-card:hover .property-image img {
    transform: scale(1.08);
}

.property-list-card:hover .list-image img {
    transform: scale(1.05);
}

/* Ensure image container clips overflow */
.property-card .property-image,
.property-list-card .list-image {
    overflow: hidden;
    position: relative;
}

/* ---- Gallery Thumbnails ---- */
.property-gallery .thumb-images {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.property-gallery .thumb-images img {
    width: 90px;
    height: 68px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 3px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.7;
}

.property-gallery .thumb-images img:hover,
.property-gallery .thumb-images img.active {
    border-color: var(--secondary);
    opacity: 1;
    transform: translateY(-2px);
}

/* ---- Enhanced Text Readability ---- */
body {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Better contrast for secondary text */
.property-card .property-location,
.property-meta .meta-item {
    color: #5a6577;
    font-size: 0.9rem;
}

.property-card .property-title {
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: -0.01em;
}

.property-card .property-price {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.property-card .property-body {
    padding: 22px;
}

/* Section text improvements */
.section-title h2 {
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.section-title p {
    line-height: 1.8;
    font-size: 1.08rem;
}

/* Sidebar readability */
.sidebar-widget h5 {
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

/* Detail page readability */
.detail-info-card p {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

.detail-info-card h4 {
    font-size: 1.25rem;
}

/* Footer readability */
.samsar-footer p,
.samsar-footer .footer-links a {
    font-size: 0.92rem;
    line-height: 1.9;
}

/* ---- Arabic (Darija) Text Optimization ---- */
body[lang="ar"],
[dir="rtl"] body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    font-size: 16.5px;
    line-height: 1.85;
    letter-spacing: 0;
    word-spacing: 0.05em;
}

[dir="rtl"] .property-card .property-title {
    font-size: 1.05rem;
    line-height: 1.6;
}

[dir="rtl"] .property-card .property-location i {
    margin-right: 0;
    margin-left: 5px;
}

[dir="rtl"] .hero-section h1 {
    font-size: 2.6rem;
    line-height: 1.4;
}

[dir="rtl"] .hero-section p {
    font-size: 1.15rem;
    line-height: 1.8;
}

[dir="rtl"] .section-title h2 {
    font-size: 2rem;
    line-height: 1.4;
}

/* ---- Lazy Loading Fade-in ---- */
img[loading="lazy"] {
    opacity: 0;
    animation: imgFadeIn 0.5s ease-out forwards;
}

@keyframes imgFadeIn {
    to { opacity: 1; }
}

/* ---- Profile Page Image ---- */
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* ---- Image Options Overlay ---- */
.property-image,
.list-image {
    cursor: pointer;
}

.image-options-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 36, 64, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.image-options-overlay.active {
    opacity: 1;
    visibility: visible;
}

.img-option-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    transform: translateY(15px);
    opacity: 0;
    padding: 0;
}

.image-options-overlay.active .img-option-btn {
    transform: translateY(0);
    opacity: 1;
}

.image-options-overlay.active .img-option-btn:nth-child(1) {
    transition-delay: 0.05s;
}
.image-options-overlay.active .img-option-btn:nth-child(2) {
    transition-delay: 0.12s;
}
.image-options-overlay.active .img-option-btn:nth-child(3) {
    transition-delay: 0.19s;
}

.img-option-btn:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    color: var(--primary-dark);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 20px rgba(232, 168, 56, 0.4);
}

.img-option-btn i {
    pointer-events: none;
}

/* Tooltip for option buttons */
.img-option-btn::after {
    content: attr(title);
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.img-option-btn:hover::after {
    opacity: 1;
}

/* Mobile touch friendly */
@media (max-width: 767px) {
    .img-option-btn {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .image-options-overlay {
        gap: 12px;
    }

    .img-option-btn::after {
        display: none;
    }
}

/* RTL adjustments for overlay */
[dir="rtl"] .image-options-overlay {
    flex-direction: row-reverse;
}
