/* =========================================
   SEARCH AREA
========================================= */

#search-area {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  max-width: 750px;
  margin: 25px auto 20px;
}

#search-box {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  color: #fff;
  background: #151515;
  border: 2px solid #555;
  border-radius: 3px;
  outline: none;
  font-family: "Teko", sans-serif;
  font-size: 1.25rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#search-box::placeholder {
  color: #999;
}

#search-box:focus {
  border-color: #a10b0b;
  box-shadow: 0 0 0 3px rgba(161, 11, 11, 0.25);
}

#search-area button {
  flex-shrink: 0;
  padding: 9px 24px;
  color: #fff;
  background: #6b0505;
  border: 2px solid #a10b0b;
  border-radius: 3px;
  font-family: "Changa One", sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

#search-area button:hover {
  background: #a10b0b;
}

#search-area button:active {
  background: #350000;
}

/* =========================================
   BAND SUBMISSION LINK
========================================= */

#desclink {
  width: 100%;
  margin: 15px auto 30px;
  padding: 13px 15px;
  text-align: center;
}

#desclink a {
  color: #fff !important;
  text-shadow: -2px 1px 6px black;
  font-family: "Changa One", sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  text-decoration: none;
  transition: color 0.2s ease;
}

#desclink a:hover {
  color: #fff !important;
  text-decoration: underline;
}

/* =========================================
   BAND RESULTS GRID
========================================= */

#band-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  width: 100%;
  align-items: stretch;
  padding: 2em;
}

/* =========================================
   INDIVIDUAL BAND CARD
========================================= */

.band-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-width: 0;
  min-height: 320px;
  overflow: hidden;
  color: #fff;
  background-color: #191919;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid #444;
  border-bottom: 5px solid #6b0505;
  border-radius: 3px;
  text-decoration: none;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
  isolation: isolate;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

/* Dark gradient over the background image */
.band-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.25) 35%,
    rgba(0, 0, 0, 0.92) 100%
  );
  transition: background 0.2s ease;
}

.band-card:hover {
  transform: translateY(-5px);
  border-color: #a10b0b;
  box-shadow: 5px 8px 0 rgba(0, 0, 0, 0.55);
}

.band-card:hover::before {
  background: linear-gradient(
    to bottom,
    rgba(107, 5, 5, 0.1) 0%,
    rgba(0, 0, 0, 0.45) 40%,
    rgba(0, 0, 0, 0.95) 100%
  );
}

/* =========================================
   CARD CONTENT OVERLAY
========================================= */

.band-overlay {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 100%;
  padding: 22px 18px 20px;
  text-align: center;
}

/* Band logo */
.band-logo {
  display: block;
  width: auto;
  max-width: 85%;
  height: auto;
  max-height: 125px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(2px 3px 4px #000);
}

/* Text information */
.band-info {
  width: 100%;
  overflow-wrap: anywhere;
}

.band-info h2 {
  margin: 0 0 8px;
  color: #fff;
  font-family: "Changa One", sans-serif;
  font-size: 3em;
  line-height: 1.1;
  text-transform: uppercase;
  text-shadow: 2px 2px 3px #000;
}

.band-info p {
  margin: 4px 0;
  color: #e0e0e0;
  font-family: "Teko", sans-serif;
  font-size: 1.5rem;
  line-height: 1.2;
}

.band-info strong {
  color: #ff4545;
  font-weight: 700;
  text-transform: uppercase;
}

/* =========================================
   EMPTY SEARCH RESULTS
========================================= */

#band-results > p {
  grid-column: 1 / -1;
  margin: 15px 0;
  padding: 30px 15px;
  color: #ccc;
  background: #171717;
  border: 1px dashed #555;
  text-align: center;
  font-family: "Teko", sans-serif;
  font-size: 1.5rem;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 1000px) {

  #band-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .band-card {
    min-height: 300px;
  }

  .band-logo {
    max-height: 110px;
  }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

  #search-area {
    gap: 7px;
    margin: 20px auto 16px;
  }

  #search-box {
    padding: 10px 11px;
    font-size: 1.1rem;
  }

  #search-area button {
    padding: 8px 15px;
    font-size: 0.9rem;
  }

  #desclink {
    margin: 15px auto 22px;
    padding: 12px 8px;
  }

  #band-results {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .band-card {
    min-height: 290px;
  }

  .band-overlay {
    padding: 20px 16px;
    gap: 10px;
  }

  .band-logo {
    max-width: 80%;
    max-height: 110px;
  }

  .band-info h2 {
    font-size: 1.65rem;
  }

  .band-info p {
    font-size: 1.15rem;
  }
}

/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 360px) {

  #search-box {
    padding: 9px 8px;
    font-size: 1rem;
  }

  #search-area button {
    padding: 7px 10px;
  }

  .band-card {
    min-height: 260px;
  }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .band-card,
  .band-card::before,
  #search-box,
  #search-area button,
  #desclink a {
    transition: none;
  }

  .band-card:hover {
    transform: none;
  }
}