/* ==========================================================================
   DOWNLOADS PAGE (downloads.html) SPECIFIC STYLES
   ========================================================================== */

/* Search & Category Filters Bar */
.search-filter-box {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Search Input Wrapper & Icon */
.search-input-wrap {
  flex: 1;
  position: relative;
  min-width: 280px;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-gold);
  font-size: 1.1rem;
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(255, 207, 51, 0.5));
  transition:
    transform var(--transition-fast),
    color var(--transition-fast);
}

/* Styled Pill Search Input */
.search-input {
  width: 100%;
  padding: 0.85rem 1.25rem 0.85rem 3.2rem;
  border-radius: var(--radius-full);
  background: rgba(43, 5, 13, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid var(--color-border);
  color: var(--color-cream);
  outline: none;
  font-size: 0.98rem;
  font-weight: 500;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.5),
    inset 0 0 10px rgba(0, 0, 0, 0.3);
  transition: var(--transition-fast);
}

.search-input::placeholder {
  color: rgba(242, 213, 220, 0.55);
  font-weight: 400;
}

.search-input:focus {
  background: rgba(54, 7, 17, 0.95);
  border-color: var(--color-gold);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.65),
    0 0 18px var(--color-gold-glow);
}

.search-input-wrap:focus-within .search-icon {
  transform: translateY(-50%) scale(1.15);
  color: var(--color-gold-light);
}

/* Category Filter Dropdown */
.filter-select-wrap {
  min-width: 250px;
}

#download-category-filter {
  width: 100%;
  padding: 0.85rem 2.8rem 0.85rem 1.4rem;
  border-radius: var(--radius-full);
  background: rgba(43, 5, 13, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid var(--color-border);
  color: var(--color-gold-light);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.5),
    inset 0 0 10px rgba(0, 0, 0, 0.3);
  transition: var(--transition-fast);

  /* Custom Golden Down Chevron Icon */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffcf33' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.25rem center;
  background-size: 16px;
}

#download-category-filter:focus {
  background-color: rgba(54, 7, 17, 0.95);
  border-color: var(--color-gold);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.65),
    0 0 18px var(--color-gold-glow);
}

#download-category-filter option {
  background-color: #2b050d;
  color: var(--color-cream);
  font-size: 0.95rem;
  padding: 10px;
}

/* Professional Table */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface-glass);
  color: var(--color-cream);
  text-align: left;
}

.custom-table th,
.custom-table td {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.custom-table th {
  background: rgba(30, 4, 9, 0.95);
  color: var(--color-gold);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.custom-table tbody tr:hover {
  background: rgba(255, 207, 51, 0.08);
}

.download-doc-title {
  font-weight: 700;
  color: var(--color-gold-light);
  display: block;
  font-size: 1rem;
}

.download-doc-desc {
  font-size: 0.84rem;
  color: var(--color-text-muted);
  margin-top: 3px;
}

/* Badges */
.download-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-saffron {
  background: rgba(255, 42, 75, 0.2);
  color: #ff6b81;
  border: 1px solid rgba(255, 42, 75, 0.4);
}
.badge-gold {
  background: rgba(255, 207, 51, 0.2);
  color: #ffcf33;
  border: 1px solid rgba(255, 207, 51, 0.4);
}
.badge-crimson {
  background: rgba(200, 0, 40, 0.25);
  color: #ff5277;
  border: 1px solid rgba(200, 0, 40, 0.5);
}
.badge-teal {
  background: rgba(0, 200, 180, 0.2);
  color: #38ef7d;
  border: 1px solid rgba(0, 200, 180, 0.4);
}
.badge-solid-gold {
  background: var(--color-gold);
  color: #2b050d;
}

@media (max-width: 768px) {
  .search-filter-box {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-select-wrap {
    width: 100%;
  }
}

/* ==========================================================================
   HD WALLPAPERS GRID & MODAL STYLES
   ========================================================================== */

/* 3x3 Grid Layout */
.wallpaper-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.wallpaper-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--color-border);
  cursor: pointer;
  background: var(--color-surface);
  aspect-ratio: 4 / 3;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.wallpaper-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.wallpaper-overlay {
  position: absolute;
  inset: 0;
  background: rgba(35, 4, 10, 0.65);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: var(--color-gold-light);
  font-weight: 700;
  font-size: 1.15rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.wallpaper-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-gold);
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.7),
    0 0 15px rgba(255, 207, 51, 0.25);
}

.wallpaper-card:hover img {
  transform: scale(1.08);
}

.wallpaper-card:hover .wallpaper-overlay {
  opacity: 1;
}

/* Wallpaper Download Modal UI */
.wallpaper-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(15, 2, 5, 0.95);
  display: none; /* Hidden initially */
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.wallpaper-modal.is-active {
  display: flex;
  animation: fadeIn 0.3s ease-out forwards;
}

.wallpaper-modal-content {
  background: var(--color-surface);
  border: 2px solid var(--color-gold);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 950px;
  position: relative;
  padding: 3rem;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.9),
    0 0 30px rgba(255, 207, 51, 0.15);
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: var(--color-gold-light);
  font-size: 1.5rem;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    color 0.2s ease;
}

.close-modal:hover {
  transform: scale(1.15);
  color: #fff;
}

/* Inspiration Layout (Image Left, Buttons Right) */
.wallpaper-modal-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  align-items: center;
}

.wallpaper-modal-left h3 {
  color: var(--color-text-dark);
  margin-bottom: 1.2rem;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.wallpaper-modal-left img {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  max-height: 55vh;
  object-fit: cover;
  background: #000;
}

.wallpaper-modal-right p {
  color: var(--color-cream);
  font-weight: 600;
  margin-bottom: 2rem;
  font-size: 1.15rem;
  line-height: 1.5;
}

.modal-dl-btn {
  display: flex;
  width: 100%;
  margin-bottom: 1rem;
  padding: 1rem;
  font-size: 1rem;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive Rules for Wallpapers */
@media (max-width: 992px) {
  .wallpaper-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .wallpaper-modal-body {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .wallpaper-modal-content {
    padding: 2rem;
  }
}

@media (max-width: 576px) {
  .wallpaper-grid {
    grid-template-columns: 1fr;
  }
}
