/* ==========================
   SEARCH MODAL POPUP (Yellow Theme)
   ========================== */
/* Ensure all elements use border-box */
* {
    box-sizing: border-box;
}
.search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
}

.search-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 10001;
    direction: rtl;
    text-align: center;
}

.search-modal.open,
.search-overlay.active {
    display: block;
}

.search-close {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    padding: 5px;
}

.search-close:hover {
    color: #FFD700;
}

/* Search form styling */
.search-form {
    margin-top: 20px;
}

.search-field {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    direction: rtl;
    text-align: right;
    transition: border-color 0.3s ease;
}

.search-field:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.search-submit {
    margin-top: 20px;
    padding: 12px 30px;
    background-color: #FFD700;
    color: #333;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-submit:hover {
    background-color: #FFF8E1;
    color: #333;
}

/* Responsive */
@media (max-width: 480px) {
    .search-modal {
        width: 95%;
        padding: 20px;
    }

    .search-field {
        padding: 12px 16px;
        font-size: 15px;
    }
}
/* ==========================
   SEARCH RESULTS PAGE
   ========================== */

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.search-result-item {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search-result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.search-result-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.search-result-image:hover img {
    transform: scale(1.05);
}

.search-result-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

.search-result-content {
    padding: 20px;
}

.search-result-content h2 {
    font-size: 20px;
    font-weight: bold;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.search-result-content h2 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.search-result-content h2 a:hover {
    color: #FFD700;
}

.search-result-excerpt {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.search-result-meta {
    font-size: 14px;
    color: #999;
    margin-bottom: 15px;
}

.search-result-meta span {
    margin: 0 5px;
}

.read-more-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #FFD700;
    color: #333;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.read-more-button:hover {
    background-color: #FFF8E1;
}

/* No Results Section */
.no-results {
    padding: 60px 20px;
    text-align: center;
}

.no-results .page-title {
    font-size: 24px;
    margin-bottom: 20px;
}

.no-results .page-content p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.no-results .search-form {
    max-width: 400px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
    .search-results-grid {
        padding: 30px 10px;
    }

    .search-result-item {
        margin-bottom: 20px;
    }
}
/* ==========================
   SEARCH RESULTS PAGE
   ========================== */

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.search-result-item {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search-result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.search-result-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.search-result-image:hover img {
    transform: scale(1.05);
}

.search-result-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

.search-result-content {
    padding: 20px;
}

.search-result-content h2 {
    font-size: 20px;
    font-weight: bold;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.search-result-content h2 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.search-result-content h2 a:hover {
    color: #FFD700;
}

.search-result-excerpt {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.search-result-meta {
    font-size: 14px;
    color: #999;
    margin-bottom: 15px;
}

.search-result-meta span {
    margin: 0 5px;
}

.read-more-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #FFD700;
    color: #333;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.read-more-button:hover {
    background-color: #FFF8E1;
}

/* Page Header */
.page-header .page-title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #FFF8E1;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.page-header .page-title .search-icon {
    font-size: 24px;
    color: #FFD700;
    margin-right: 10px;
    vertical-align: middle;
}

/* No Results Section */
.no-results {
    padding: 60px 20px;
    text-align: center;
}

.no-results .page-title {
    font-size: 24px;
    margin-bottom: 20px;
}

.no-results .page-content p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.no-results .search-form {
    max-width: 400px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
    .search-results-grid {
        padding: 30px 10px;
    }

    .search-result-item {
        margin-bottom: 20px;
    }

    .page-header .page-title {
        font-size: 24px;
        padding: 15px;
    }
}