body {
    font-family: "League Spartan", sans-serif;
    background-color: rgba(173, 166, 153, 0.95); /* fallback background */
    margin: 0;
    padding: 0;
}

body.items-page {
    font-family: "League Spartan", sans-serif;
    background-image: url('picture-for-claim-page.jpg') !important;
    background-size: 100% auto;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Semi-transparent central container */
.container {
    max-width: 80%;
    margin: 50px auto; /* centers horizontally */
    padding: 40px;
    background-color: rgba(210, 202, 186, 0.577); /* semi-transparent white-ish color*/
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.custom-select {
    position: relative;
    flex: 1;
    user-select: none;
}

.select-trigger {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.25); 
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.129);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.select-trigger:hover {
    background: rgba(255, 255, 255, 0.4); /* Slight highlight on hover */
}

/* This is the part that fixes the "blue list" issue */
.options-list {
    position: absolute;
    top: 100%; 
    left: 0;
    right: 0;
    margin-top: 5px; 
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.custom-select {
    position: relative;
    flex: 0 0 250px;
    height: 55px; /* Matches search bar height */
}

.custom-select.open .options-list {
    display: block;
}

.option {
    padding: 12px 25px;
    cursor: pointer;
    transition: background 0.2s;
    color: #333;
}

.option:hover {
    background: rgba(79, 127, 138, 0.2); /* Light version of your theme color */
}

.option.active {
    background: rgba(79, 127, 138, 0.1);
    font-weight: bold;
}

.search-filter-container {
    display: flex;
    flex-direction: row; /* Forces side-by-side */
    justify-content: center; /* Centers the group in the container */
    align-items: stretch; /* Makes them the same height */
    gap: 15px; /* Space between the two */
    width: 90%;
    max-width: 1000px; /* Adjust based on your layout preference */
    margin: 0 auto 30px auto; /* Centers the whole container */
}

/* Search Bar Fix */
.search-bar-items {
    flex: 2; /* Search bar takes 2/3 of the space */
    width: auto; /* Remove the 90% or 100% width that causes shifting */
    margin: 0; /* Remove auto margins that break flex alignment */
    height: 55px;
    padding: 0 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.433);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Custom Select Container Fix */
.custom-select {
    flex: 1; /* Dropdown takes 1/3 of the space */
    min-width: 200px; /* Prevents it from getting too squashed */
}

.page-title {
    text-align:center;
    font-size: 40px;
    color: #000000;
    margin-bottom: 15px;
    text-decoration: underline;
}

.page-subtitle {
    text-align:center;
    font-size: 21px;
    color: #3b9986;
    margin-bottom: 25px;
}

/* The grid container */
.item-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* Individual card styling */
.item {
    background: rgba(255, 255, 255, 0.1); /* Lighter glass for the cards */
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    width: 850px;
    max-width: 100%; /* Fixed card width */
    display: flex; 
    flex-wrap: nowrap; /* Allows the button to drop to its own line at the bottom */
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
    text-align: left; /* Changed from center to left for the new layout */
    color: rgb(0, 0, 0);
    transition: transform 0.3s ease;
    overflow: visible;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.164);
    position: relative; 
    padding-bottom: 100px; 
    height: auto;
    min-height: 350px;
}

.item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

.item-text-content {
    flex: 1;             /* Takes up all available space on the left */
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    word-break: break-all;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-height: 150px;
    padding-right: 20px;
}

.item img {
    max-width: 50%;          /* Fills half the card width */
    height: auto;    /* Keeps height consistent */
    object-fit: contain;    /* Crops image to fit without stretching */
    flex-shrink: 0;
    border-radius: 10px;
}

.search-bar-items {
    justify-content: center;
    margin: 0 auto;
    box-sizing: border-box;
    display: block;
    width: 90%;
    padding: 12px 20px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.433);
    color: rgb(0, 0, 0);
    font-size: 16px;
    margin-bottom: 20px;
    outline: none;
    backdrop-filter: blur(10px);
}

.search-bar-items::placeholder {
    color: rgba(0, 0, 0, 0.6);
}

.item button {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%); 
    width: 90%;
    max-width: 750px;
    background-color: #4F7F8A;
    color: white;
    padding: 12px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    border: none;
    margin: 0; /* Removed margin auto as it breaks absolute positioning */
    transition: background 0.3s;
}

.item button:hover {
    background-color: #3F6770;
}

.pagination-nav {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding-bottom: 40px; /* Extra space at the bottom of the container */
}

/* Page text "Page X of Y" */
.pagination-nav span {
    font-size: 18px;
    font-weight: bold;
    color: #000000; /* Dark text to match your Title colors */
    font-family: "League Spartan", sans-serif;
}

/* The buttons (Prev/Next) */
.pagination-nav .nav-btn {
    background-color: #4F7F8A; /* Matches your claim button color */
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 20px; /* Rounded pill shape like your claim button */
    cursor: pointer;
    font-weight: bold;
    font-family: "League Spartan", sans-serif;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Hover effect */
.pagination-nav .nav-btn:hover:not(:disabled) {
    background-color: #3F6770;
    transform: translateY(-2px);
}

/* Disabled state (when on page 1 or the last page) */
.pagination-nav .nav-btn:disabled {
    background-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.4);
    cursor: not-allowed;
    box-shadow: none;
}

@media (max-width: 768px) {
  body.items-page {
    background-size: cover;
    background-attachment: scroll;
  }

  .container {
    max-width: 100%;
    padding: 20px;
    margin: 20px 12px;
  }

  .page-title {
    font-size: 30px;
  }

  .page-subtitle {
    font-size: 18px;
  }

  .item {
    flex-direction: column;
    align-items: center;
    padding-bottom: 30px;
    min-height: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.274);
  }

  .item-text-content {
    padding-right: 0;
    text-align: center;
  }

  .item img {
    max-width: 100%;
    margin-bottom: 15px;
  }

  .item button {
    position: static;
    transform: none;
    width: 100%;
    max-width: 100%;
    margin-top: 20px;
  }

  .search-bar-items {
    width: 100%;
  }

  .pagination-nav span {
    font-size: 18px;
    font-weight: bold;
    color: #000000;
    font-family: "League Spartan", sans-serif;
  }

  .pagination-nav .nav-btn {
    width: 100px;
    background-color: #4F7F8A; /* Matches your claim button color */
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 20px; /* Rounded pill shape like your claim button */
    cursor: pointer;
    font-weight: bold;
    font-family: "League Spartan", sans-serif;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }
}

