/* Search Bar Container - For proper spacing and max-width control */
.search-bar-container {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 100;
}

.search-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 30px 60px;
    background: rgba(17, 17, 17, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(250, 185, 62, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 100;
}

/* Search Input Wrapper with Icon */
.search-input-wrapper {
    position: relative;
    flex: 1 1 auto;
    min-width: 250px;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    pointer-events: none;
    transition: color 0.3s ease;
}

.search-input-wrapper:focus-within .search-icon {
    color: #fab93e;
}

.search-bar .search-input {
    width: 100%;
    padding: 14px 20px 14px 50px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    height: 54px;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    font-size: 15px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    outline: none;
}

.search-bar .search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
}

.search-bar .search-input:focus {
    border-color: #fab93e;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(250, 185, 62, 0.1);
}

/* Custom Select Dropdown */
.custom-select-wrapper {
    position: relative;
    flex: 0 1 auto;
    min-width: 200px;
    max-width: 240px;
    z-index: 10;
}

.custom-select-wrapper.active {
    z-index: 15000;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    height: 54px;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    font-size: 15px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    user-select: none;
}

.custom-select-trigger:hover {
    border-color: rgba(250, 185, 62, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.custom-select-wrapper.active .custom-select-trigger {
    border-color: #fab93e;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(250, 185, 62, 0.1);
}

.custom-select-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-arrow {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    transition: all 0.3s ease;
    margin-left: 12px;
}

.custom-select-trigger:hover .custom-select-arrow {
    color: #fab93e;
}

.custom-select-wrapper.active .custom-select-arrow {
    transform: rotate(180deg);
    color: #fab93e;
}

/* Dropdown Options */
.custom-select-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    background: rgba(17, 17, 17, 0.98);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(250, 185, 62, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 15001;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-select-wrapper.active .custom-select-options {
    max-height: 300px;
    overflow-y: auto;
    opacity: 1;
    transform: translateY(0);
}

.custom-option {
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.custom-option:first-child {
    border-radius: 10px 10px 0 0;
}

.custom-option:last-child {
    border-radius: 0 0 10px 10px;
}

.custom-option:hover {
    background: linear-gradient(90deg, rgba(250, 185, 62, 0.15) 0%, rgba(250, 185, 62, 0.05) 100%);
    color: #fab93e;
    border-left-color: #fab93e;
    padding-left: 24px;
}

.custom-option.selected {
    background: rgba(250, 185, 62, 0.1);
    color: #fab93e;
    font-weight: 600;
    border-left-color: #fab93e;
}

.custom-option.selected:hover {
    background: linear-gradient(90deg, rgba(250, 185, 62, 0.2) 0%, rgba(250, 185, 62, 0.1) 100%);
}

/* Custom Scrollbar for Options */
.custom-select-options::-webkit-scrollbar {
    width: 6px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: rgba(250, 185, 62, 0.4);
    border-radius: 10px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
    background: rgba(250, 185, 62, 0.6);
}

/* Modern Search Button */
.search-btn {
    border: none;
    background: linear-gradient(135deg, #fab93e 0%, #f0a020 100%);
    color: #000;
    cursor: pointer;
    padding: 14px 32px;
    border-radius: 12px;
    height: 54px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(250, 185, 62, 0.3);
    white-space: nowrap;
}

.search-btn i {
    font-size: 16px;
}

.search-btn:hover {
    background: linear-gradient(135deg, #f0a020 0%, #e09510 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(250, 185, 62, 0.4);
}

.search-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(250, 185, 62, 0.3);
}

/* Responsive Design */
@media (max-width: 1280px) {
    .search-bar {
        flex-wrap: wrap;
        gap: 12px;
    }

    .search-input-wrapper {
        flex: 1 1;
        min-width: 100%;
    }

    .custom-select-wrapper {
        flex: 1 1;
        min-width: 180px;
        max-width: none;
    }

    .search-btn {
        flex: 1 1;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .search-bar-container {
        padding: 0 15px !important;
    }

    .search-bar {
        align-items: stretch;
        padding: 20px;
        gap: 12px;
    }

    .search-input-wrapper,
    .custom-select-wrapper,
    .search-btn {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
    }

    .search-btn {
        justify-content: center;
    }
}

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

    .search-bar {
        padding: 15px;
        border-radius: 15px;
    }

    .search-bar .search-input,
    .custom-select-trigger,
    .search-btn {
        height: 48px;
        font-size: 14px;
    }

    .custom-option {
        padding: 10px 16px;
        font-size: 14px;
    }
}

#projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

@media (max-width: 480px) {
    #projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 360px) {
    #projects-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}
