/*
 * Search Bar and Social Media Styling
 * متطابق مع تصميم الموقع الرئيسي
 * الألوان الرئيسية: #181A1C (داكن), #FECE1A (ذهبي), #FFF (أبيض)
 */

/* Search Bar Section */
.search-bar-section {
    background: #181a1c;
    border-bottom: 3px solid #fece1a;
    padding: 15px 0;
    margin: 0;
    position: relative;
    z-index: 999;
}

.search-social-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

/* Search Form Container */
.search-form-container {
    flex: 1;
    max-width: 600px;
    min-width: 300px;
}

.search-form {
    margin: 0;
}

.search-input-group {
    display: flex;
    background: #fff;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    height: 30px;
}

.search-input-group:focus-within {
    box-shadow: 0 6px 25px rgba(254, 206, 26, 0.4);
    border-color: #fece1a;
    transform: translateY(-2px);
}

.search-input {
    flex: 1;
    border: none;
    padding: 15px 25px;
    font-size: 16px;
    font-family: "Droid Arabic Kufi", Arial, sans-serif;
    background: transparent;
    color: #181a1c;
    outline: none;
    direction: rtl;
    text-align: right;
    font-weight: 500;
}

.search-input::placeholder {
    color: #888;
    font-style: normal;
    font-weight: 400;
}

.search-btn {
    background: linear-gradient(135deg, #fece1a 0%, #e6b800 100%);
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    position: relative;
    overflow: hidden;
}

.search-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.search-btn:hover::before {
    left: 100%;
}

.search-btn:hover {
    background: linear-gradient(135deg, #e6b800 0%, #d4a600 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(254, 206, 26, 0.3);
}

.search-btn:active {
    transform: scale(0.98);
}

.search-btn i {
    font-size: 20px;
    color: #181a1c;
    font-weight: bold;
    z-index: 1;
    position: relative;
}

/* Social Media Container */
.social-media-container {
    display: flex;
    align-items: center;
}

.social-media-icons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fece1a;
    color: #181a1c;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 18px;
}

.social-icon:hover {
    background: #fff;
    color: #fece1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(254, 206, 26, 0.4);
}

/* Search Results Styling - Using same design as products */
.search-results-header {
    background: #fece1a;
    color: #181a1c;
    padding: 40px 0;
    margin-bottom: 0;
    border-bottom: 4px solid #181a1c;
}

/* Search Results Grid - Same as portfolio grid */
#search-results-grid {
    margin-top: 30px;
}

#search-results-grid .thumbnail {
    position: relative;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    text-align: center;
    background: #191a1c;
    margin-bottom: 30px;
    overflow: hidden;
}

#search-results-grid .thumbnail img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

#search-results-grid .thumbnail:hover img {
    transform: scale(1.05);
}

#search-results-grid .thumbnail h3 {
    color: #fece1a;
    margin-top: 10px;
    font-size: 18px;
    padding: 0 15px;
}

#search-results-grid .thumbnail p {
    padding: 10px 20px 20px;
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
}

/* Type Badge for Search Results */
.result-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
}

.type-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.product-badge {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: #fff;
}

.section-badge {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    color: #fff;
}

.category-badge {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: #fff;
}

/* Meta information styling */
.result-meta {
    padding: 0 20px 15px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.result-meta small {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #fece1a;
    background: rgba(254, 206, 26, 0.1);
    padding: 4px 8px;
    border-radius: 10px;
}

.result-meta i {
    font-size: 12px;
}

/* More button styling for search results */
#search-results-grid .thumbnail .more {
    display: block;
    z-index: 4;
    position: absolute;
    top: -100px;
    left: 50%;
    margin: 0 auto;
    margin-left: -41px;
    width: 80px;
    height: 80px;
    font-size: 40px;
    color: #fff;
    text-decoration: none;
    line-height: 70px;
    text-align: center;
    background: rgba(254, 206, 26, 0.9);
    border-radius: 50%;
    transition: all 0.3s ease;
}

#search-results-grid .thumbnail:hover .more {
    top: 50%;
    margin-top: -41px;
    background: #fece1a;
    color: #181a1c;
}

/* Mask effect for search results */
#search-results-grid .thumbnail .mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(24, 26, 28, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Hide search results single-project details by default */
.search-results-header + .content-section .toggleDiv {
    display: none;
}

#search-results-grid .thumbnail:hover .mask {
    opacity: 1;
}

/* No Results and Empty Search */
.no-results,
.empty-search {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results-icon,
.search-icon {
    font-size: 80px;
    color: #ddd;
    margin-bottom: 20px;
}

.no-results h3,
.empty-search h3 {
    color: #181a1c;
    margin-bottom: 15px;
}

.suggested-sections {
    margin-top: 30px;
}

.suggested-sections h4 {
    color: #181a1c;
    margin-bottom: 15px;
}

.section-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.section-link {
    display: inline-block;
    padding: 8px 16px;
    background: #fece1a;
    color: #181a1c;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.section-link:hover {
    background: #181a1c;
    color: #fece1a;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-social-wrapper {
        flex-direction: column;
        gap: 15px;
    }

    .search-form-container {
        width: 100%;
        max-width: none;
    }

    .social-media-icons {
        justify-content: center;
    }

    #search-results-grid .thumbnail img {
        height: 200px;
    }

    #search-results-grid .thumbnail h3 {
        font-size: 16px;
    }

    #search-results-grid .thumbnail p {
        font-size: 13px;
        padding: 8px 15px 15px;
    }

    .section-links {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .search-bar-section {
        padding: 10px 0;
    }

    .search-input {
        font-size: 14px;
        padding: 10px 15px;
    }

    .search-btn {
        padding: 10px 15px;
    }

    .social-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}
