/* ================================================
   AGENCIES — /agencje i /agencje/{slug}
   assets/css/pages/agencies.css
   ================================================ */

/* ── Shared hero (listing + detail) ── */
.ag-hero {
  background: linear-gradient(135deg,#1A0533,#3B1278);
  padding: 2.25rem 0 2rem;
}
.ag-hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.ag-breadcrumb {
  font-size: .75rem;
  color: rgba(255,255,255,.6);
  margin-bottom: .5rem;
  display: flex;
  align-items: center;
  gap: .3rem;
}
.ag-breadcrumb a { color: rgba(255,255,255,.7); text-decoration: none; }
.ag-breadcrumb a:hover { color: #F472B6; }
.ag-breadcrumb span { color: rgba(255,255,255,.5); }
.ag-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 .35rem;
  letter-spacing: -.01em;
  line-height: 1.1;
}
.ag-title em { font-style: normal; color: #F472B6; }
.ag-count {
  font-size: .88rem;
  color: rgba(255,255,255,.7);
}
.ag-count strong { color: #fff; font-weight: 700; }

/* Search */
.ag-hero__search {
  position: relative;
  width: 340px;
  flex-shrink: 0;
}
.ag-hero__search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #AAAACC;
  pointer-events: none;
}
.ag-hero__search input {
  width: 100%;
  padding: .85rem 1rem .85rem 2.85rem;
  border: 1.5px solid #E2E0F0;
  border-radius: 14px;
  background: #fff;
  color: #1A1A2E;
  font-size: .9rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(100,60,220,.06);
}
.ag-hero__search input::placeholder { color: #AAAACC; }
.ag-hero__search input:focus {
  border-color: var(--color-primary, #7C3AED);
  box-shadow: 0 0 0 3px rgba(124,58,237,.1);
}

/* ── Filter bar ── */
.ag-filters {
  background: #fff;
  border-bottom: 1px solid #EAE8F5;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.ag-filters__inner {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.ag-filters__inner::-webkit-scrollbar { display: none; }
.ag-filter-select {
  flex-shrink: 0;
  padding: .5rem .9rem;
  border: 1.5px solid #E2E0F0;
  border-radius: 8px;
  font-size: .855rem;
  font-family: inherit;
  color: #3D3D5C;
  background: #FAFAFA;
  cursor: pointer;
  outline: none;
  transition: border-color .2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239A9ABA' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .6rem center;
  padding-right: 2rem;
  min-width: 120px;
}
.ag-filter-select:focus { border-color: var(--color-primary, #7C3AED); }
.ag-filter-select.is-active {
  border-color: var(--color-primary, #7C3AED);
  background-color: #FAF5FF;
  color: var(--color-primary, #7C3AED);
  font-weight: 600;
}
.ag-filters__count {
  flex-shrink: 0;
  margin-left: auto;
  font-size: .82rem;
  color: #9A9ABA;
  white-space: nowrap;
}
.ag-filters__count strong { color: #3D3D5C; }
.ag-filters__reset {
  flex-shrink: 0;
  padding: .5rem .9rem;
  border: 1.5px solid #E2E0F0;
  border-radius: 8px;
  font-size: .82rem;
  color: #9A9ABA;
  background: none;
  cursor: pointer;
  font-family: inherit;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.ag-filters__reset:hover { color: var(--color-primary, #7C3AED); border-color: var(--color-primary, #7C3AED); }

/* ── Main layout ── */
.ag-main { padding: 2.5rem 0 4rem; min-height: 50vh; }

/* ── Agency card grid ── */
.ag-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

/* Agency card */
.acard {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(50,30,120,.07);
  border: 1.5px solid #F0EEF8;
  transition: box-shadow .25s, transform .25s, border-color .25s;
  text-decoration: none;
  display: block;
  position: relative;
  cursor: pointer;
}
/* Stretched link — name link covers the whole card */
.acard__name a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
}
.acard:hover {
  box-shadow: 0 8px 32px rgba(50,30,120,.13);
  transform: translateY(-3px);
  border-color: #D8D0F5;
}
.acard--premium { border-color: #F5D68A; }
.acard--premium:hover { border-color: #EAC840; }

/* Cover photo */
.acard__cover {
  height: 90px;
  background: linear-gradient(135deg, #EDE9FE, #DDD6FE);
  position: relative;
  overflow: hidden;
}
.acard__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.acard__premium-badge {
  position: absolute;
  top: .6rem;
  right: .6rem;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  background: linear-gradient(135deg, #D97706, #F59E0B);
  border-radius: 20px;
  padding: .2rem .55rem;
  font-size: .65rem;
  font-weight: 700;
  color: #fff;
}

/* Logo */
.acard__logo-wrap {
  position: absolute;
  left: 1.25rem;
  top: 64px;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #fff;
  border: 2px solid #EAE8F5;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(50,30,120,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.acard__cover { position: relative; }
.acard__logo-wrap img { width: 100%; height: 100%; object-fit: contain; border-radius: 12px; }
.acard__logo-initials {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-primary, #7C3AED);
  background: linear-gradient(135deg, #EDE9FE, #DDD6FE);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

/* Card body */
.acard__body {
  padding: 2rem 1.25rem 1.25rem;
}
.acard__name {
  font-size: 1rem;
  font-weight: 800;
  color: #1A1A2E;
  margin: 0 0 .3rem;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acard__type-badge {
  display: inline-block;
  padding: .18rem .6rem;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 600;
  background: #EDE9FE;
  color: #5B21B6;
  border: 1px solid #DDD6FE;
  margin-bottom: .55rem;
}
.acard__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem;
  font-size: .78rem;
  color: #9A9ABA;
  margin-bottom: .75rem;
}
.acard__meta-item {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.acard__tagline {
  font-size: .8rem;
  color: #6B6B8A;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: .75rem;
}
.acard__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.acard__verif {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: 20px;
}
.acard__verif--verified { background: #E8F5E9; color: #1B5E20; }
.acard__verif--unverified { background: #F5F5F5; color: #9E9E9E; }
.acard__cta {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .4rem .85rem;
  background: linear-gradient(135deg, #7C3AED, #9333EA);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity .2s;
  position: relative;
  z-index: 1;
}
.acard__cta:hover { opacity: .9; }

/* ── Empty state ── */
.ag-empty {
  text-align: center;
  padding: 5rem 2rem;
  color: #9A9ABA;
}
.ag-empty__icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: #F0EEF8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}
.ag-empty__title { font-size: 1.2rem; font-weight: 700; color: #3D3D5C; margin: 0 0 .5rem; }

/* ── Pagination ── */
.ag-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  flex-wrap: wrap;
}

/* ════════════════════════════════════════════════
   AGENCY DETAIL — /agencje/{slug}
   ════════════════════════════════════════════════ */

/* Cover + logo header */
.agd-cover {
  height: 240px;
  background: linear-gradient(135deg, #EDE9FE, #DDD6FE);
  position: relative;
  overflow: hidden;
}
.agd-cover img { width: 100%; height: 100%; object-fit: cover; }

.agd-header-wrap {
  background: #fff;
  border-bottom: 1px solid #EAE8F5;
  padding-bottom: 1.5rem;
}
.agd-header-inner {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  padding-top: 0;
}
.agd-logo-pull {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  background: #fff;
  border: 2.5px solid #EAE8F5;
  overflow: hidden;
  flex-shrink: 0;
  margin-top: -40px;
  box-shadow: 0 4px 16px rgba(50,30,120,.12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.agd-logo-pull img { width: 100%; height: 100%; object-fit: contain; border-radius: 15px; }
.agd-logo-initials {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--color-primary, #7C3AED);
  background: linear-gradient(135deg, #EDE9FE, #DDD6FE);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
}
.agd-name-area { flex: 1; padding-top: 1rem; }
.agd-name {
  font-size: 1.85rem;
  font-weight: 900;
  color: #1A1A2E;
  margin: 0 0 .35rem;
  letter-spacing: -.025em;
}
.agd-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: .5rem;
}
.agd-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .22rem .65rem;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
}
.agd-badge--verified { background: #E8F5E9; color: #1B5E20; border: 1px solid #A5D6A7; }
.agd-badge--premium  { background: #FFF8E1; color: #E65100; border: 1px solid #FFE082; }
.agd-badge--type     { background: #EDE9FE; color: #5B21B6; border: 1px solid #DDD6FE; }
.agd-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .83rem;
  color: #6B6B8A;
}
.agd-meta__item { display: flex; align-items: center; gap: .35rem; }

.agd-actions { display: flex; gap: .75rem; align-items: center; flex-shrink: 0; padding-top: 1rem; }
.agd-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .75rem 1.4rem;
  border-radius: 12px;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: opacity .2s, transform .15s;
}
.agd-btn:hover { opacity: .9; transform: translateY(-1px); }
.agd-btn--primary { background: linear-gradient(135deg, #7C3AED, #9333EA); color: #fff; }
.agd-btn--secondary { background: #F0EEF8; color: #5B21B6; border: 1.5px solid #DDD6FE; }

/* Agency detail layout */
.agd-wrap { padding: 2rem 0 4rem; }
.agd-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: flex-start;
}

/* Sections */
.agd-section {
  background: #fff;
  border: 1.5px solid #EAE8F5;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.agd-section__title {
  font-size: .97rem;
  font-weight: 800;
  color: #1A1A2E;
  margin: 0 0 1rem;
  padding-bottom: .65rem;
  border-bottom: 1.5px solid #EAE8F5;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.agd-section__title svg { color: var(--color-primary, #7C3AED); flex-shrink: 0; }

.agd-desc { font-size: .9rem; color: #4B4B6A; line-height: 1.7; }
.agd-tagline { font-size: 1.05rem; font-weight: 600; font-style: italic; color: #3D3D5C; margin-bottom: .75rem; }

/* Stats sidebar */
.agd-stats-box {
  background: #FAF9FF;
  border: 1.5px solid #EAE8F5;
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.agd-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1rem; }
.agd-stat {
  background: #fff;
  border-radius: 10px;
  padding: .75rem .85rem;
  border: 1px solid #EAE8F5;
  text-align: center;
}
.agd-stat__num { display: block; font-size: 1.35rem; font-weight: 800; color: #1A1A2E; line-height: 1.1; }
.agd-stat__label { font-size: .68rem; color: #9A9ABA; margin-top: .1rem; }

/* Social links */
.agd-socials { display: flex; flex-wrap: wrap; gap: .5rem; }
.agd-social-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .85rem;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .2s;
  border: 1.5px solid transparent;
}
.agd-social-link:hover { opacity: .85; }
.agd-social-link--instagram { background: #FCE4EC; color: #AD1457; border-color: #F8BBD9; }
.agd-social-link--linkedin  { background: #E3F2FD; color: #1565C0; border-color: #BBDEFB; }
.agd-social-link--facebook  { background: #E3F2FD; color: #0D47A1; border-color: #BBDEFB; }
.agd-social-link--website   { background: #F3E5F5; color: #4A148C; border-color: #E1BEE7; }
.agd-social-link--other     { background: #F5F5F5; color: #424242; border-color: #E0E0E0; }

/* Members grid */
.agd-members-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
}
.agd-member {
  text-align: center;
  text-decoration: none;
  display: block;
}
.agd-member__photo {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #EDE9FE, #DDD6FE);
  margin-bottom: .5rem;
  position: relative;
}
.agd-member__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.agd-member:hover .agd-member__photo img { transform: scale(1.05); }
.agd-member__name { font-size: .75rem; font-weight: 700; color: #1A1A2E; line-height: 1.3; }
.agd-member__role { font-size: .65rem; color: #9A9ABA; }

/* Contact info */
.agd-contact-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem 0;
  border-bottom: 1px solid #F0EEF8;
  font-size: .87rem;
  color: #1A1A2E;
}
.agd-contact-item:last-child { border-bottom: none; }
.agd-contact-item svg { color: #9A9ABA; flex-shrink: 0; }
.agd-contact-item a { color: #1A1A2E; text-decoration: none; font-weight: 600; }
.agd-contact-item a:hover { color: var(--color-primary, #7C3AED); }

/* Login gate */
.agd-gate {
  background: linear-gradient(135deg, #FAF5FF, #F0EEF8);
  border: 1.5px solid #DDD6FE;
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
}
.agd-gate__title { font-size: .95rem; font-weight: 800; color: #1A1A2E; margin-bottom: .4rem; }
.agd-gate__desc { font-size: .82rem; color: #6B6B8A; margin-bottom: 1rem; line-height: 1.5; }
.agd-gate__btns { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }

/* Responsive */
@media (max-width: 1100px) {
  .ag-grid { grid-template-columns: repeat(2, 1fr); }
  .agd-layout { grid-template-columns: 1fr 280px; }
  .agd-members-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
  .ag-grid { grid-template-columns: repeat(2, 1fr); }
  .agd-layout { grid-template-columns: 1fr; }
  .agd-cover { height: 160px; }
  .agd-header-inner { flex-direction: column; align-items: flex-start; gap: .75rem; }
  .agd-actions { padding-top: 0; }
  .agd-members-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 540px) {
  .ag-grid { grid-template-columns: 1fr; }
  .agd-members-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Login nudge ── */
.profiles-login-nudge {
  background: linear-gradient(135deg, #FAF5FF, #F5F3FF);
  border: 1px solid #DDD6FE;
  border-radius: 14px;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.profiles-login-nudge__text {
  flex: 1;
  min-width: 200px;
  font-size: .9rem;
  color: #4C1D95;
}
.profiles-login-nudge__text strong { font-weight: 700; }
.profiles-login-nudge__actions {
  display: flex;
  gap: .6rem;
  flex-shrink: 0;
}
