/* ============================================================
   Swisscort Search Page
   Modern, fluid, premium search experience
   ============================================================ */

:root {
  --bg: #090909;
  --bg-secondary: #0f0f0f;
  --surface: #1a1a1a;
  --surface-hover: #252525;
  --border: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --text-muted: #888888;
  --text-secondary: #666666;
  --accent: #e05888;
  --accent-dark: #d83878;
  --success: #22c55e;
  --warning: #f59e0b;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.search-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(9, 9, 9, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 70px;
}

.brand-text {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.brand-text::first-letter {
  color: var(--accent);
}

/* Header Search */
.header-search {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.95rem;
  transition: var(--transition);
}

.header-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224, 88, 136, 0.1);
}

.header-search input::placeholder {
  color: var(--text-secondary);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* Language Selector */
.language-selector {
  display: flex;
  gap: 4px;
}

.lang-btn {
  padding: 6px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn:hover {
  color: var(--text);
  background: var(--surface);
}

.lang-btn.active {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(224, 88, 136, 0.1);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(224, 88, 136, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(224, 88, 136, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--accent);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(224, 88, 136, 0.05);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Banner ===== */
.search-banner {
  padding: 120px 0 60px;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(224, 88, 136, 0.08) 0%, transparent 50%),
    var(--bg-secondary);
  text-align: center;
}

.search-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.search-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Main Layout ===== */
.search-main {
  padding: 40px 0 80px;
}

.search-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

/* Mobile Filters Button */
.mobile-filters-btn {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  margin-bottom: 20px;
}

/* ===== Filters Sidebar ===== */
.filters-sidebar {
  position: sticky;
  top: 90px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.filters-sidebar::-webkit-scrollbar {
  width: 6px;
}

.filters-sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.filters-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.filters-header h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
}

.close-filters {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
}

.filters-content {
  padding: 20px;
}

.filters-footer {
  display: flex;
  gap: 12px;
  padding: 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

/* Filter Groups */
.filter-group {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.filter-group:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-group h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

/* Select Inputs */
.filter-option {
  margin-bottom: 12px;
}

.filter-option label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.filter-option select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-option select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Checkboxes */
.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.filter-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.filter-checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}

.badge-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.badge-icon.verified { background: var(--success); }
.badge-icon.premium { background: var(--accent); }
.badge-icon.new { background: var(--warning); }
.badge-icon.online { background: var(--success); box-shadow: 0 0 8px var(--success); }

/* Filter Tags */
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tag {
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-tag:hover,
.filter-tag.active {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(224, 88, 136, 0.1);
}

/* Range Sliders */
.range-slider {
  margin-top: 8px;
}

.range-values {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.range-slider input[type="range"] {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}

.range-slider input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Overlay for Mobile */
.filters-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.filters-overlay.active {
  opacity: 1;
}

/* ===== Search Results ===== */
.search-results {
  min-height: 600px;
}

/* Sort Bar */
.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.results-count {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.results-count strong {
  color: var(--text);
  font-weight: 600;
}

.sort-select {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sort-select label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.sort-select select {
  padding: 8px 32px 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

/* Results Grid */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* Result Cards */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.result-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-lg);
  border-color: rgba(224, 88, 136, 0.2);
}

.card-media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(45deg, #1a1a1a, #1a1a1a 12px, #141414 12px, #141414 24px);
}

.placeholder-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-badges .badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge.verified {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.badge.premium {
  background: rgba(224, 88, 136, 0.2);
  color: var(--accent);
}

.badge.new {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: var(--transition);
}

.result-card:hover .card-overlay {
  opacity: 1;
}

.card-info {
  padding: 16px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.card-header h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
}

.card-header .age {
  font-weight: 400;
  color: var(--text-muted);
}

.online-status {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.online-status.online {
  color: var(--success);
}

.card-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.card-location svg {
  color: var(--accent);
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Load More */
.load-more {
  text-align: center;
  margin-top: 48px;
}

/* Footer */
.search-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.search-footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[data-aos="fade-up"] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-aos="fade-up"].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .search-layout {
    grid-template-columns: 1fr;
  }

  .filters-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 320px;
    max-height: 100vh;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    border-radius: 0;
  }

  .filters-sidebar.active {
    transform: translateX(0);
  }

  .filters-header {
    display: flex;
  }

  .mobile-filters-btn {
    display: inline-flex;
  }

  .filters-overlay.active {
    display: block;
  }

  .header-search {
    display: none;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .header-inner {
    height: 60px;
  }

  .language-selector {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .search-banner {
    padding: 100px 0 40px;
  }

  .sort-bar {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .results-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .card-header h3 {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .results-grid {
    grid-template-columns: 1fr;
  }

  .btn-lg {
    padding: 12px 20px;
    font-size: 0.9rem;
  }
}
