/* static/css/pages/profiles.css */
/* =========================================================
   PROFILES PAGE — polished, responsive, accessible
   Works with your existing markup in profiles_list.html
   ========================================================= */

/* ---------- page shell ---------- */
.profiles{
  padding: 18px 0 18px;
}

.main {
    flex: 1;
    display: flex;
    padding: 18px 0 44px;
    width: 100%;
    width: 93vw;
    max-width: 100vw;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
}

/* container alignment if base uses a centered wrapper */
.profiles .card,
.profiles-head,
#profilesGrid{
  width: 100%;
}

.profiles :where(.muted){
  color: var(--muted, rgba(15,23,42,.62));
}

/* ---------- HEAD ---------- */
.profiles-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 14px;
  margin: 4px 0 14px;
}

.profiles-title{
  margin: 0 0 6px;
  font-size: clamp(26px, 3.4vw, 34px);
  letter-spacing: -0.6px;
  line-height: 1.05;
}

.profiles-head .muted{
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
}

/* ---------- FILTERS CARD ---------- */
.filters{
  margin-bottom: 14px;
  border-radius: 18px;
  overflow: hidden;

  /* if your .card already has bg/border, this still looks ok */
  background: radial-gradient(1200px 280px at 10% -10%, rgb(37 99 235 / 0%), transparent 60%), radial-gradient(1000px 260px at 90% 0%, rgba(236, 72, 153, .08), transparent 60%), linear-gradient(180deg, rgba(255, 255, 255, .96), rgb(255 255 255 / 20%));
  border: 1px solid rgba(15,23,42,.08);
  box-shadow:
    0 18px 44px rgba(11,27,58,.10),
    0 0 0 1px rgba(15,23,42,.04);
}

.filters-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 14px;
}

.filters .field{
  display:grid;
  gap: 8px;
}

.filters .label{
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .2px;
  color: rgba(15,23,42,.78);
}

.filters .input{
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.92);
  color: rgba(2,6,23,.92);

  padding: 10px 12px;
  font-size: 14px;
  font-weight: 750;
  outline: none;
  transition: box-shadow .14s ease, border-color .14s ease, transform .14s ease;
}

.filters .input::placeholder{
  color: rgba(15,23,42,.45);
  font-weight: 700;
}

/* focus ring */
.filters .input:focus{
  border-color: rgba(37,99,235,.45);
  box-shadow:
    0 0 0 3px rgba(37,99,235,.16),
    0 10px 24px rgba(11,27,58,.08);
}

/* dropdown mount spacing */
#catDropdownMount{
  min-height: 44px;
}

.native-select-hidden{
  position:absolute;
  opacity: 0;
  pointer-events:none;
  height: 0;
  width: 0;
  padding: 0;
  border: 0;
}

/* small helper */
.small{ font-size: 12px; }

/* divider spacing (assuming you have .divider in base) */
.filters .divider{
  margin: 0 14px;
  opacity: .7;
}

/* ---------- GEO ROW ---------- */
.geo-row {
    display: flex;
    gap: 12px;
    padding: 14px;
    align-content: flex-start;
    align-items: flex-start;
    justify-content: space-between;
    flex-direction: row;
}

.seg-btn.is-active {
    border-color: rgb(255 62 103);
    box-shadow: 0 0 0 6px rgb(255 68 124 / 17%);
}

.btn.ghost {
    background: linear-gradient(135deg, #ffd9e1, #fff4f8);
    color: #3d3d3d;
    border-color: rgb(255 255 255);
}

.geo-left {
    display: flex;
    gap: 10px;
    align-items: center;
    align-content: center;
    flex-direction: row;
    flex-wrap: nowrap;
}

.geo-toggle{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  font-weight: 900;
  user-select:none;
}

.geo-toggle input[type="checkbox"]{
  width: 18px;
  height: 18px;
  accent-color: rgba(37,99,235,.95);
}

#geoHint, #geoPoint{
  line-height: 1.25;
}

.geo-right{
  display:grid;
  gap: 10px;
}

.geo-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filters-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 12px 14px 14px;
}

#profilesStatus{
  font-weight: 850;
  color: rgba(15,23,42,.62);
}

/* make buttons feel consistent even if base styles vary */
.filters .btn{
  border-radius: 14px;
}

/* ---------- GRID ---------- */
.profiles-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding-bottom: 6px;
}

/* ---------- CARD ---------- */
.pcard{
  --accent: rgba(37,99,235,.55);
  border-radius: 20px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(15,23,42,.08);
  overflow: hidden;

  box-shadow:
    0 18px 46px rgba(11,27,58,.12),
    0 0 0 1px rgba(15,23,42,.04),
    0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);

  transform: translateY(0);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.pcard-link{
  display:block;
  color: inherit;
  text-decoration:none;
}

.pcard-link:hover{
  text-decoration:none;
  transform: translateY(-2px);
  box-shadow:
    0 24px 62px rgba(11,27,58,.16),
    0 0 0 1px rgba(15,23,42,.04),
    0 0 0 3px color-mix(in srgb, var(--accent) 26%, transparent);
}

/* keyboard focus for accessibility */
.pcard-link:focus-visible{
  outline: none;
  box-shadow:
    0 24px 62px rgba(11,27,58,.16),
    0 0 0 2px rgba(255,255,255,.95),
    0 0 0 5px rgba(37,99,235,.35);
  border-radius: 20px;
}

/* ---------- IMAGE / CAROUSEL ---------- */
.pimg{
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(1200px 220px at 20% 0%, rgba(37,99,235,.16), transparent 60%),
    radial-gradient(900px 240px at 80% 0%, rgba(236,72,153,.14), transparent 65%),
    linear-gradient(180deg, rgba(2,6,23,.03), rgba(2,6,23,.00));
  border-bottom: 1px solid rgba(15,23,42,.06);
  overflow:hidden;
}

/* slider */
.pslider{
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: pan-y;
}

.pslides{
  height: 100%;
  display: flex;
  transition: transform .22s ease;
  will-change: transform;
}

.pslide{
  flex: 0 0 100%;
  height: 100%;
  background:
    radial-gradient(900px 320px at 40% 10%, rgba(255,255,255,.08), transparent 55%),
    rgba(2,6,23,.92);
}

.pslide img{
  width: 100%;
  height: 100%;
  object-fit: cover; 
  object-position: center;
  display:block;
  user-select: none;
  -webkit-user-drag: none;
  filter: saturate(1.02) contrast(1.02);
}

/* no-photo fallback */
.pimg-fallback{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 950;
  font-size: 30px;
  letter-spacing: .8px;
  color: rgba(15,23,42,.70);
}

/* dots */
.pdots{
  position:absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display:flex;
  justify-content:center;
  gap: 7px;
  pointer-events:none;
}

.pdot{
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.42);
  box-shadow: 0 8px 18px rgba(0,0,0,.22);
  transform: translateY(0);
}

.pdot.is-active{
  background: rgba(255,255,255,.92);
  transform: translateY(-.5px);
}

/* overlay for readability */
.pimg-overlay{
  position:absolute;
  inset:0;
  background: linear-gradient(
    180deg,
    rgba(2,6,23,.04) 0%,
    rgba(2,6,23,.12) 45%,
    rgba(2,6,23,.76) 100%
  );
  pointer-events:none;
}

/* meta on image */
.pimg-meta{
  position:absolute;
  left: 12px;
  right: 12px;
  bottom: 30px;
  display:flex; /* (у тебя не было display:flex — добавил) */
  align-items:flex-end;
  justify-content:space-between;
  gap: 10px;
}

.pimg-name{
  color: rgba(255,255,255,.96);
  font-weight: 950;
  font-size: 18px;
  line-height: 1.12;
  text-shadow: 0 12px 28px rgba(0,0,0,.46);
  max-width: 72%;
}

/* status */
.pstatus{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  font-weight: 900;
  font-size: 12px;
  color: rgba(255,255,255,.92);
  white-space: nowrap;
  text-shadow: 0 12px 28px rgba(0,0,0,.46);
}

.dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(255,255,255,.16);
}
.dot.green{ background: #22c55e; }
.dot.yellow{ background: #f59e0b; }

/* ---------- BODY ---------- */
.pbody{
  padding: 12px 12px 12px;
  display:grid;
  gap: 10px;
}

.pcard-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}

.pcard-top-left{
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

/* category pill */
.badge-cat{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(37,99,235,.10);
  font-weight: 900;
  font-size: 12px;
  color: rgba(15,23,42,.92);
}

.badge-cat.blue{
  background: rgba(37,99,235,.12);
  border-color: rgba(37,99,235,.22);
}
.badge-cat.pink{
  background: rgba(236,72,153,.12);
  border-color: rgba(236,72,153,.22);
}

.badge-favorite{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(236,72,153,.24);
  background: rgba(236,72,153,.10);
  color: #9d174d;
  font-weight: 900;
  font-size: 12px;
}

.pid{
  font-weight: 850;
  font-size: 12px;
  color: var(--muted, rgba(15,23,42,.55));
}

/* chips */
.pchips{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip{
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 850;
  font-size: 12px;
  color: rgba(15,23,42,.70);
  background: rgba(255,255,255,.92);
}

/* bio */
.pbio{
  color: rgba(15,23,42,.78);
  font-size: 13px;
  line-height: 1.4;
  margin-top: 2px;
}

/* footer */
.pfooter{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid rgba(15,23,42,.08);
  color: rgba(15,23,42,.55);
  font-weight: 850;
  font-size: 12px;
}

/* ---------- EMPTY GRID STATE (optional if you want) ---------- */
.profiles-grid:empty::before{
  content: "No profiles found.";
  display:block;
  padding: 16px;
  border-radius: 16px;
  border: 1px dashed rgba(15,23,42,.18);
  color: rgba(15,23,42,.65);
  font-weight: 850;
  background: rgba(255,255,255,.75);
}

/* ---------- RESPONSIVE ---------- */
@media (min-width: 520px){
  .profiles-grid{ gap: 14px; }
  .pcard{ border-radius: 22px; }
  .pbody{ padding: 13px 13px 13px; }
}

@media (min-width: 680px){
  .filters-grid{
    grid-template-columns: 1fr 1fr 180px;
    align-items:start;
  }
  .profiles-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filters .divider{ margin: 0 14px; }

  
}

@media (min-width: 980px){
  .profiles-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (min-width: 1280px){
  .profiles-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 750px){
  .geo-row{
    flex-direction: column;
    margin-top: 9px;
  }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce){
  .pcard,
  .pcard-link:hover,
  .pslides{
    transition: none !important;
  }
}

/* ---------- PAGINATION ---------- */
.pagination {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-controls .btn {
  min-width: 40px;
  padding: 8px 12px;
}

.pagination-controls span {
  padding: 0 8px;
  color: var(--muted);
}

