/* Explore Page Styles */

.explore-page {
  max-width: 1200px;
  margin: 0 auto;
}

.explore-header {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.explore-header h1 {
  font-size: 2rem;
  margin-bottom: var(--spacing-sm);
}

.explore-subtitle {
  font-family: var(--font-subtext);
  font-weight: 300;
  color: var(--color-text-secondary);
  font-size: var(--font-size-lg);
  margin-bottom: 0;
}

/* Filters */
.explore-filters {
  margin-bottom: var(--spacing-xl);
}

.filters-row {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.search-field {
  flex: 1;
}

.search-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  color: var(--color-text);
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(85, 85, 85, 0.15);
}

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

.filter-selects {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.filter-select {
  padding: 12px 40px 12px 16px;
  font-size: 14px;
  color: var(--color-text);
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  min-width: 150px;
  flex: 1;
}

.filter-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(85, 85, 85, 0.15);
}

.filter-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background-color: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-reset:hover {
  color: var(--color-text);
  border-color: var(--color-text-secondary);
  background-color: var(--color-card);
}

/* Mentor Grid */
.mentor-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
}

@media (max-width: 1100px) {
  .mentor-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 800px) {
  .mentor-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-selects {
    flex-direction: column;
  }

  .filter-select {
    width: 100%;
  }

  .filter-reset {
    width: 100%;
  }
}

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

/* Mentor Card */
.mentor-card {
  display: block;
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 0;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.mentor-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.mentor-card-photo {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background-color: var(--color-bg);
}

/* Featured work hover overlay */
.mentor-card-work-overlay {
  position: absolute;
  inset: 0;
  background: #fff;
  padding: var(--spacing-sm);
  opacity: 0;
  transition: opacity 0.25s ease;
  overflow: hidden;
}

.mentor-card:hover .mentor-card-work-overlay {
  opacity: 1;
}

.mentor-card-work-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 2px;
}

.mentor-card-photo > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mentor-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #888888, #aaaaaa);
  font-size: 3rem;
  font-weight: 700;
  color: #ffffff;
}

.mentor-card-content {
  padding: var(--spacing-md);
  text-align: center;
}

.mentor-card-name {
  font-family: var(--font-names);
  font-size: var(--font-size-lg);
  font-weight: 300;
  text-transform: none;
  margin-bottom: var(--spacing-xs);
  color: var(--color-text);
}

.mentor-card-title {
  font-family: var(--font-subtext);
  font-weight: 300;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-sm);
}

.mentor-card-industry {
  display: inline-block;
  padding: 4px 10px;
  font-size: var(--font-size-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: rgba(85, 85, 85, 0.1);
  color: #555555;
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-sm);
}
/* Pagination */
.pagination {
  margin-top: var(--spacing-2xl);
  display: flex;
  justify-content: center;
}

.pagination .pagy {
  display: flex;
  gap: var(--spacing-xs);
}

.pagination .pagy a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--spacing-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s;
}

.pagination .pagy a:hover:not([aria-disabled="true"]) {
  color: var(--color-text);
  border-color: var(--color-primary);
}

.pagination .pagy a[aria-current="page"] {
  color: var(--color-text);
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.pagination .pagy a[role="separator"] {
  border: none;
  background: transparent;
}

.pagination .pagy a[aria-disabled="true"] {
  cursor: default;
}

/* Auth Gate */
.mentor-auth-gate {
  position: relative;
  text-align: center;
}

/* Mobile / fallback section: overlaps grid with fade gradient */
.mentor-auth-gate-mobile-section {
  margin-top: -120px;
}

.mentor-auth-gate-fade {
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--color-bg));
  pointer-events: none;
}

.mentor-auth-gate-card {
  background: var(--color-bg);
  padding: var(--spacing-2xl) var(--spacing-xl);
}

.mentor-auth-gate-heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.mentor-auth-gate-sub {
  color: var(--color-text-secondary);
  max-width: 480px;
  margin: 0 auto var(--spacing-xl);
}

.mentor-auth-gate-btn {
  display: inline-block;
  margin-bottom: var(--spacing-md);
}

.mentor-auth-gate-signin {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  margin: 0;
}

.mentor-auth-gate-signin a {
  color: var(--color-primary);
}

/* Frosted glass section - mobile shows 1 card, desktop shows all */
.mentor-auth-gate-frosted {
  display: block;
  position: relative;
  overflow: hidden;
  margin-top: var(--spacing-lg);
}

/* Mobile: single-column grid, show only the 9th mentor */
.mentor-auth-gate-frosted-grid {
  grid-template-columns: 1fr;
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

.mentor-auth-gate-frosted-grid .mentor-card:nth-child(n+2) {
  display: none;
}

.mentor-auth-gate-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--spacing-2xl) var(--spacing-xl);
}

/* Desktop: restore multi-column grid, show all frosted cards */
@media (min-width: 801px) {
  .mentor-auth-gate-frosted-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .mentor-auth-gate-frosted-grid .mentor-card:nth-child(n+2) {
    display: block;
  }
}

@media (min-width: 801px) and (max-width: 1100px) {
  .mentor-auth-gate-frosted-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Auth Gate Dialog (reuses subscribe-dialog base styles) */
.auth-gate-dialog {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 0;
  max-width: 500px;
  width: 90vw;
  margin: auto;
}

.auth-gate-dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}

.auth-gate-dialog-content {
  padding: 32px;
  position: relative;
}

.auth-gate-dialog-header {
  margin-bottom: 24px;
  padding-right: 36px;
}

.auth-gate-dialog-header h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: var(--spacing-2xl);
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.empty-state h3 {
  margin-bottom: var(--spacing-sm);
}

.empty-state p {
  color: var(--color-text-secondary);
  margin: 0;
}

/* Intro call banner */
.explore-intro-banner {
  margin-top: 64px;
  display: flex;
  justify-content: center;
}

.explore-intro-banner__content {
  max-width: 480px;
  width: 100%;
  padding: var(--spacing-2xl) var(--spacing-xl);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background-color: var(--color-card);
  text-align: center;
}

.explore-intro-banner__heading {
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
}

.explore-intro-banner__sub {
  font-family: var(--font-subtext);
  font-weight: 300;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-lg);
}

/* Mentor Match Modal */
.mentor-match-dialog {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 0;
  max-width: 540px;
  width: 90vw;
  margin: auto;
}

.mentor-match-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.mentor-match-dialog__content {
  padding: 32px;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}

.mentor-match-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}

.mentor-match-close:hover {
  color: var(--color-text);
}

.mentor-match-header {
  margin-bottom: 20px;
  padding-right: 32px;
}

.mentor-match-header h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.mentor-match-header p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  margin: 0;
}

.mentor-match-textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--color-text);
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  resize: vertical;
  font-family: inherit;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.mentor-match-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 91, 254, 0.15);
}

.mentor-match-textarea::placeholder {
  color: var(--color-text-muted);
}

.mentor-match-feedback {
  font-size: var(--font-size-sm);
  color: var(--color-error);
  margin-bottom: 12px;
}

.mentor-match-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.mentor-match-prompt {
  padding: 6px 14px;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
}

.mentor-match-prompt:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
}

.mentor-match-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Match Results */
.mentor-match-results__heading {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.mentor-match-results__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.mentor-match-result {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.mentor-match-result__photo {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-card);
}

.mentor-match-result__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mentor-match-result__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #888, #aaa);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
}

.mentor-match-result__info {
  flex: 1;
}

.mentor-match-result__name {
  font-weight: 600;
  margin-bottom: 4px;
}

.mentor-match-result__why {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: 10px;
}

.mentor-match-result__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mentor-match-results__footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
}
