.my-ad-container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 15px;
}

.all-ads-title {
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 20px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

.filter-label {
    margin-left: 10px;
    font-weight: bold;
    color: var(--title-color);
}


#province {
    text-transform: none;
    padding: 10px;
    border-radius: 5px;
    background-color: #f2f2f2;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: white;
    min-width: 150px;
}

.search-box {
    flex-grow: 1;
    margin: 5px 10px;
    max-width: 300px;
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.search-form {
    width: 100%;
    background-color: var(--secondary);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.search-form .form-group {
    width: 50%;
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (max-width: 768px) {
    .search-form .form-group {
        width: 100%;
    }
}

.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ad-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.ad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.ad-image-container {
    position: relative;
    width: 100%;
    height: 200px; /* تأكيد على حجم الصورة */
    overflow: hidden;
    margin-bottom: 15px; /* تقليل المسافة بين الصورة وبقية المحتوى */
}

.ad-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* لضمان أن الصورة تغطي المساحة المخصصة لها */
}

.ad-content {
    padding: 10px;
}

.ad-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--title-color);
    margin-top: 10px;
    margin-bottom: 10px; /* تقليل المسافة تحت العنوان */
}

.ad-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--yellow);
    margin: 15px 0; /* تقليل المسافة بين السعر وبقية المحتوى */
}

.ad-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* تقليل المسافات بين العناصر */
    margin-bottom: 15px;
}

.ad-detail {
    flex: 1 0 48%; /* توزيع العناصر داخل التفاصيل */
    margin-bottom: 10px;
    color: var(--paragraph-color);
    font-size: 14px;
}

.ad-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
}

.status-indicator {
    display: flex;
    align-items: center;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 5px;
}

.status-active {
    background-color: #2ecc71;
}

.status-pending {
    background-color: #f39c12;
}

.status-expired {
    background-color: #e74c3c;
}

.status-text {
    font-size: 14px;
    color: var(--paragraph-color);
}

.ad-date {
    font-size: 14px;
    color: var(--paragraph-color);
}

.ad-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
}
.ad-actions a {
    background: linear-gradient(-45deg, #2d1a0c 50%, rgba(56, 25, 14, .91) 90%, #2e140a);
    color: var(--button-text);
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.ad-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.ad-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ad-badge {
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.badge-real-estate {
    background-color: rgba(46, 204, 113, 0.8);
}

.badge-job {
    background-color: rgba(52, 152, 219, 0.8);
}

.badge-car {
    background-color: rgba(155, 89, 182, 0.8);
}

.ad-content {
    padding: 15px;
}

.ad-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--title-color);
    margin-top: 10px;
}

.ad-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--yellow);
    margin: 20px 0;
}

.ad-details {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.ad-detail {
    flex: 1 0 50%;
    margin-bottom: 20px;
    color: var(--paragraph-color);
    font-size: 14px;
}

.ad-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
}

.status-indicator {
    display: flex;
    align-items: center;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 5px;
}

.status-active {
    background-color: #2ecc71;
}

.status-pending {
    background-color: #f39c12;
}

.status-expired {
    background-color: #e74c3c;
}


.btn-edit {
    background-color: #3498db;
    background: linear-gradient(-45deg, #2d1a0c 50%, rgba(56, 25, 14, .91) 90%, #2e140a);
    color: var(--button-text);
}

.btn-edit:hover {
    background-color: var(--button-hover);
}

.btn-delete {
    background-color: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background-color: #c0392b;
}

.ad-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.page-item {
    margin: 0 5px;
}

.page-link {
    display: block;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    background-color: white;
    color: var(--title-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.page-item.active .page-link {
    background: linear-gradient(-45deg, #2d1a0c 50%, rgba(56, 25, 14, .91) 90%, #2e140a);
    color: white;
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.empty-state-icon {
    font-size: 60px;
    color: var(--title-color);
    margin-bottom: 20px;
}

.empty-state-text {
    font-size: 18px;
    color: var(--paragraph-color);
    margin-bottom: 20px;
}

@media screen and (max-width: 768px) {
    .dashboard-stats {
        flex-direction: column;
    }

    .stat-card {
        margin: 0 0 15px 0;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        margin-bottom: 10px;
    }

    .search-box {
        max-width: 100%;
        margin: 10px 0;
    }

    .ads-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .ads-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}




.ad-card {
    background-color: var(--secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.ad-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    width: 100%;
}

.ad-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 1;
}

.ad-badge {
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--button-text);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.badge-real-estate {
    background-color: rgba(46, 204, 113, 0.8);
}

.badge-job {
    background-color: rgba(52, 152, 219, 0.8);
}

.badge-car {
    background-color: rgba(155, 89, 182, 0.8);
}

.ad-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ad-title {
    font-size: clamp(1rem, 3vw, 1.125rem);
    font-weight: bold;
    color: var(--title-color);
    margin-top: 10px;
    word-break: break-word;
}

.ad-price {
    font-size: clamp(1.125rem, 3vw, 1.25rem);
    font-weight: bold;
    color: var(--button-bg);
    margin: 15px 0;
}

.ad-details {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 10px;
    gap: 5px;
}

.ad-detail {
    flex: 1 0 calc(50% - 5px);
    margin-bottom: 10px;
    color: var(--paragraph-color);
    font-size: clamp(0.75rem, 2vw, 0.875rem);
}

.ad-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    flex-wrap: wrap;
    gap: 5px;
}

.status-indicator {
    display: flex;
    align-items: center;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 5px;
}

.status-active {
    background-color: #2ecc71;
}

.status-pending {
    background-color: #f39c12;
}

.status-expired {
    background-color: #e74c3c;
}

.status-text {
    font-size: clamp(0.75rem, 2vw, 0.875rem);
    color: var(--paragraph-color);
}

.ad-date {
    font-size: clamp(0.75rem, 2vw, 0.875rem);
    color: var(--paragraph-color);
}








