/* FILTERS */

* {
    box-sizing: border-box; /* Ensure consistent sizing across all elements */
}

.filters {
    display: flex;
    justify-content: space-between;
    padding: 0 10%;
    margin: 10px 0;
}

.search {
    display: flex;
    align-items: center;
    gap: 8px; /* Optional spacing between input and button */
}

.search input,
.search button {
    font-size: 14px;
    padding: 6px 12px;
    height: 36px;
    border: solid 1px #E4E6E7;
    border-radius: 5px;
    background-color: white;
    box-sizing: border-box;
}

.search input:focus {
    outline: none;
    border-color: #B33791;
    box-shadow: 0 0 0 1px #007EC6;
}

.search button {
    cursor: pointer;
}

/* Dropdowns */

.chevron {
    padding: 0;
    display: flex;
    align-items: center;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-button {
    padding: 6px 12px;
    background-color: white;
    border: solid 1px #E4E6E7;
    cursor: pointer;
    border-radius: 4px;
    width: 100%;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dropdown-content {
    display: none;
    position: absolute;
    margin-top: 7px;
    background-color: white;
    border: solid 1px #E4E6E7;
    min-width: 160px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
    z-index: 1;
    border-radius: 4px;
    overflow: hidden;
}

.dropdown-content-filter {
    display: none;
    position: absolute;
    margin-top: 7px;
    right: -20px;
    background-color: white;
    border: solid 1px #E4E6E7;
    min-width: 400px;
    max-height: 500px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
    z-index: 1;
    border-radius: 4px;
    overflow: hidden;
    overflow-y: scroll;
    padding-top: 10px;
}

.dropdown-content-filter hr {
    border: none;
    height: 1px;
    background-color: lightgray;
    transform: scaleY(0.5); /* visually 0.5px thick */
    transform-origin: top;
    width: calc(100% - 10px);
}

.dropdown-content-filter strong {
    padding: 10px;
    margin-top: 10px;
    top: 10px;
}

.dropdown-content a,
.dropdown-content-filter a {
    padding: 10px;
    display: block;
    text-decoration: none;
    color: black;
}

.dropdown-content a:hover,
.dropdown-content-filter a:hover {
    background-color: #f0f0f0;
}

.dropdown-content.show {
    display: block;
}

.dropdown-content-filter.show {
    display: block;
}

.sort {
    width: 200px;
}

.filter-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    padding: 0 10px;
    padding-top: 10px;
}

.filter-categories a {
    padding: 4px;
    border-radius: 2px;
}


/* Challenges */

.challenge-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    padding: 0 10%;
    min-height: calc(100vh - 408px);
    align-content: start;
}

.challenge-list::before {

    flex-basis: 100%;
    height: 0;
    order: -1;
}

.challenge-card {
    background: #fff;
    border: 1px solid #E4E6E7;
    padding: 10px;
    border-radius: 5px;

    min-height: 120px;
    max-height: 200px;
    /* height: fit-content; */

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    flex: 0 0 calc((100% - 14px) / 3);
    box-sizing: border-box;

    word-break: break-word;
    overflow-wrap: break-word;

    transition: all 0.4s ease;
}

.challenge-card:hover {
    box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;
    border: solid 1px #B33791;
}

/* 
background: linear-gradient(
    to right,
    #462523 0,
    #cb9b51 22%,
    #f6e27a 45%,
    #f6f2c0 50%,
    #f6e27a 55%,
    #fb9b51 78%,
    #464523 100%
);
*/

.sponsor-challenge-card {
    border: 1px solid #E4E6E7;
    padding: 10px;
    border-radius: 5px;

    min-height: 120px;
    /* height: fit-content; */

    flex-direction: column;
    justify-content: space-between;

    flex: 0 0 calc((100% - 14px) / 3);
    box-sizing: border-box;

    word-break: break-word;
    overflow-wrap: break-word;
    color: #000000;
    background-image: linear-gradient(180deg, #f6e27a 20%, #cb9b51 80%);

    font-weight: bold;

    border-width: 0;
    display: flex;
  
    /* box-shadow: 0 4px 12px 0 #ffcd57; */
    transition: all 0.5s ease;
  
    position: relative;
    overflow: hidden;
}

.sponsor-challenge-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 220px;
    transform: translateX(-100%);
    z-index: 1;
    
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 50%, rgba(128,186,232,0) 99%, rgba(125,185,232,0) 100%);
    
    transition: transform 0.5s ease;
    pointer-events: none;
}

.sponsor-challenge-card:hover::after {
    animation: slide 2s forwards;
}

@keyframes slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}


.card-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.bar-container {
    display: flex;
    gap: 2px;
}

.bar {
    width: 7px;
    height: 25px;
    background-color: #C3C3C3;
    border-radius: 2px;
}


.challenge-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #000;
    text-decoration: none;
}

.challenge-desc {
    color: #333;
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    min-height: 4.2em;
}

/* TAGS */

.tags {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 8px;
}

.category {
    width: fit-content;
    padding: 1px 5px;
    color: white;
    text-transform: uppercase;
}

.category_c {
    background-color: #007EC6;
    width: fit-content;
    padding: 1px 5px;
    color: white;
    text-transform: uppercase;
}

.category_go {
    background-color: #93cced;
    width: fit-content;
    padding: 1px 5px;
    color: white;
    text-transform: uppercase;
}

.category_java {
    background-color: #644738;
    width: fit-content;
    padding: 1px 5px;
    color: white;
    text-transform: uppercase;
}
