/* فایل استایل برای افزونه WP Advertisement Search */
.ad-search-simple,
.ad-search-advanced {
    margin: 20px 0;
}

.search-form-inner {
    display: flex;
    gap: 10px;
    margin: 0 auto;
}

.search-form-inner input[type="text"] {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .search-form-inner input[type="text"] {
        width: 400%;
    }
}

.search-form-inner input[type="text"]:focus {
    border-color: #480371;
    outline: none;
    box-shadow: 0 0 5px rgba(72, 3, 113, 0.3);
}

.search-form-inner select {
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 180px;
}

.search-form-inner button {
    padding: 12px 25px;
    background: #480371;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.search-form-inner button:hover {
    background: #3a0259;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 3, 113, 0.3);
}

/* استایل‌های صفحه نتایج */
.ad-search-results-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.search-form-top {
    margin-bottom: 30px;
}

.search-form-bottom {
    margin-top: 40px;
}

.filters-container {
    margin-bottom: 30px;
}

.filters-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    flex-direction: row;
    justify-content: space-between;
}

.filter-container {
    width: 100px;
    min-width: 80px;
}

.role-select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    min-width: 150px;
}

.results-counter {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
    min-width: 100px;
    border: 2px solid #e0e0e0;
    padding: 8px 12px;
    border-radius: 6px;
}

.counter-text {
    display: flex;
    align-items: center;
    gap: 5px;
}

.current-range,
.total-count {
    font-weight: bold;
    color: #333;
}

/* گرید نتایج */
.advertisements-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(300px, 1fr));
    gap: 20px;
}

.advertisement-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    background: white;
}

.advertisement-card:hover {
    scale: 1.01;
}

.ad-role {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    z-index: 2;
    width: 68px;
    text-align: center;
}

.role-freelancer {
    background: #1b5e20;
    color: white;
}

.role-employer {
    background: #0d47a1;
    color: white;
}

.ad-image img {
    width: 100%;
    height: 180px !important;
    object-fit: cover;
}

.ad-image-placeholder {
    width: 100%;
    height: 180px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

/* محتوای کارت */
.ad-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
}
    .ad-height {
        height: 13rem;
    }
/* @media (min-width: 769px) {*/
/*    .ad-height {*/
/*        height: 49%;*/
/*    }*/
/*}*/

/*@media (max-width: 768px) {*/
/*    .ad-height {*/
/*        height: 52%;*/
/*    }*/
/*}*/

/*@media (max-width: 559px) {*/
/*    .ad-height {*/
/*        height: 44%;*/
/*    }*/
/*} */

.ad-header {
    margin-bottom: 10px;
}

.ad-header h3 {
    font-family :'yekanbakh';
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #333;
    line-height: 1.4;
}

.date {
    margin-top: 10px;
}

.ad-date {
    background-color: #2b2b2b;
    padding: 6px 14px;
    border-radius: 50px;
    color: #fff;
    font-size: 14px;
}

.ad-description {
    flex-grow: 1;
    margin-bottom: 10px;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

.ad-meta {
    margin-bottom: 10px;
}

.ad-price {
    font-size: 12px;
    margin: 0;
    font-weight: bold;
}

.ad-price span {
    font-size: 14px;
}

.ad-action {
    margin-top: auto;
}

.view-ad-btn {
    width: 100%;
    text-align: center;
    display: inline-block;
    padding: 8px 12px;
    font-size: 14px;
    text-decoration: none !important;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    transform: translateZ(0);
    border: 2px solid #480371;
    font-weight: 600;
    color: #480371;
    background: white;
}

.view-ad-btn:hover {
    color: #480371;
    background: #faf6fe;
    transform: scale(1.05, 0.95);
    box-shadow: 0 4px 12px rgba(72, 3, 113, 0.3);
}

.view-ad-btn:focus {
    color: #480371;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    grid-column: 1 / -1;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

/* رسپانسیو */
@media (max-width: 1024px) {
    .advertisements-grid {
        grid-template-columns: repeat(2, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .advertisements-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .filters-row {
        flex-wrap: wrap;
        gap: 15px;
    }

    .results-counter {
        width: auto;
        justify-content: flex-start;
    }

    .role-select {
        min-width: 120px;
    }

    .search-form-inner {
        flex-direction: column;
    }

    .search-form-inner select {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .ad-search-results-page {
        padding: 15px;
    }

    .advertisements-grid {
        grid-template-columns: 1fr;
    }

    .filters-container {
        padding: 0;
        gap: 10px;
    }

    .counter-text {
        font-size: 13px;
    }

    .role-select {
        min-width: 110px;
        font-size: 13px;
    }

    .search-form-inner input[type="text"],
    .search-form-inner select,
    .search-form-inner button {
        padding: 10px 12px;
    }
}