/* ════════════════════════════════════════════════
   INFLUMODELS — Profil firmy (/firma/{slug})
   pages/company-detail.php używa prefiksu .ag-*
   Język wizualny spójny z profilem agencji (.agd-* w agencies.css).
   ════════════════════════════════════════════════ */

/* ── Breadcrumb ── */
.ag-breadcrumb a:hover { color: #7C3AED; }

/* ── Hero: okładka + logo + nazwa ── */
.ag-hero {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  background-color: #EDE9FE;
  overflow: hidden;
}
.ag-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 10, 45, .82) 0%, rgba(20, 10, 45, .45) 55%, rgba(20, 10, 45, .18) 100%);
  pointer-events: none;
}
.ag-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  padding-top: 2.5rem;
  padding-bottom: 1.75rem;
  width: 100%;
}

.ag-hero__logo {
  width: 104px;
  height: 104px;
  border-radius: 20px;
  background: #fff;
  border: 3px solid rgba(255, 255, 255, .9);
  box-shadow: 0 10px 30px rgba(20, 10, 45, .3);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ag-hero__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 6px;
  box-sizing: border-box;
}
.ag-hero__logo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--color-primary, #7C3AED);
  background: linear-gradient(135deg, #EDE9FE, #DDD6FE);
}

.ag-hero__info { flex: 1; min-width: 0; }

/* Skrot do panelu edycji — widoczny tylko dla wlasciciela firmy */
.ag-hero__edit {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: .9rem;
  padding: .5rem 1.05rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(255, 255, 255, .65);
  color: #5B21B6;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s, transform .15s;
}
.ag-hero__edit:hover { background: #fff; transform: translateY(-1px); }
.ag-hero__edit svg { flex-shrink: 0; }

.ag-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: .6rem;
}
.ag-badge {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  padding: .24rem .7rem;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}
.ag-badge--verified { background: #E8F5E9; color: #1B5E20; border: 1px solid #A5D6A7; }
.ag-badge--premium  { background: #FFF8E1; color: #E65100; border: 1px solid #FFE082; }
.ag-badge--type     { background: #EDE9FE; color: #5B21B6; border: 1px solid #DDD6FE; }

.ag-hero__name {
  font-size: 2.1rem;
  font-weight: 900;
  color: #fff;
  margin: 0 0 .3rem;
  letter-spacing: -.025em;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}
.ag-hero__tagline {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .92);
  margin: 0 0 .7rem;
  line-height: 1.5;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
}
.ag-hero__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.1rem;
  font-size: .85rem;
  color: rgba(255, 255, 255, .88);
}
.ag-hero__meta span,
.ag-hero__meta a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .35);
}
.ag-hero__meta a { text-decoration: none; }
.ag-hero__meta a:hover { color: #fff; text-decoration: underline; }
.ag-hero__meta svg { flex-shrink: 0; opacity: .9; }

/* ── Układ: treść + panel boczny ── */
.ag-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: flex-start;
}
.ag-main { min-width: 0; }

/* ── Sekcje treści ── */
.ag-section {
  background: #fff;
  border: 1.5px solid #EAE8F5;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.ag-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;
}
.ag-section__title svg { color: var(--color-primary, #7C3AED); flex-shrink: 0; }
.ag-desc-text {
  font-size: .9rem;
  color: #555;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

/* ── Rekomendacje od osób ── */
.ag-rev-avg {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding-bottom: 1rem;
  margin-bottom: .5rem;
  border-bottom: 1px solid #F0EEF8;
}
.ag-rev-avg__num   { font-size: 2rem; font-weight: 900; color: #1A1A2E; line-height: 1; }
.ag-rev-avg__stars { font-size: 1.05rem; color: #F59E0B; line-height: 1.1; }
.ag-rev-avg__stars .is-off { opacity: .25; }
.ag-rev-avg__cnt   { font-size: .75rem; color: #9A9ABA; margin-top: .15rem; }

.ag-rev { padding: .9rem 0; border-bottom: 1px solid #F5F3FB; }
.ag-rev:last-child { border-bottom: none; padding-bottom: 0; }
.ag-rev__head { display: flex; align-items: center; gap: .6rem; margin-bottom: .45rem; }
.ag-rev__ava {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.ag-rev__ava--init {
  background: linear-gradient(135deg, #EDE9FE, #DDD6FE);
  color: var(--color-primary, #7C3AED); font-weight: 800; font-size: .9rem;
}
.ag-rev__meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ag-rev__name { font-size: .87rem; font-weight: 700; color: #1A1A2E; text-decoration: none; }
a.ag-rev__name:hover { color: #7C3AED; text-decoration: underline; }
.ag-rev__date { font-size: .72rem; color: #9A9ABA; }
.ag-rev__stars { font-size: .9rem; color: #F59E0B; flex-shrink: 0; }
.ag-rev__stars .is-off { opacity: .25; }
.ag-rev__text { font-size: .88rem; color: #4B4B6A; line-height: 1.65; margin: 0; overflow-wrap: anywhere; }

/* ── Pusty profil ── */
.ag-empty {
  background: #fff;
  border: 1.5px dashed #E4E2F0;
  border-radius: 16px;
  padding: 3rem 1.5rem;
  text-align: center;
  color: #9A9ABA;
}
.ag-empty p { margin: .9rem 0 0; font-size: .9rem; }

/* ── Panel boczny: dane kontaktowe ── */
.ag-sidebar { position: sticky; top: 90px; }
.ag-contact-card {
  background: #fff;
  border: 1.5px solid #EAE8F5;
  border-radius: 16px;
  padding: 1.35rem;
}
.ag-contact-card__title {
  font-size: .9rem;
  font-weight: 800;
  color: #1A1A2E;
  margin-bottom: 1rem;
  padding-bottom: .65rem;
  border-bottom: 1.5px solid #EAE8F5;
}
.ag-contact-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem 0;
  font-size: .86rem;
  color: #3D3D5C;
  overflow-wrap: anywhere;
}
.ag-contact-row svg { flex-shrink: 0; }
.ag-contact-row a { color: #3D3D5C; text-decoration: none; }
.ag-contact-row a:hover { color: #7C3AED; text-decoration: underline; }

/* ── Przyciski CTA (gość) ── */
.ag-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  width: 100%;
  padding: .75rem 1.2rem;
  border-radius: 12px;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: opacity .18s ease, transform .15s ease;
  box-sizing: border-box;
}
.ag-cta-btn:hover { opacity: .92; transform: translateY(-1px); }
.ag-cta-btn--primary   { background: linear-gradient(135deg, #7C3AED, #9333EA); color: #fff; }
.ag-cta-btn--secondary { background: #F0EEF8; color: #5B21B6; border: 1.5px solid #DDD6FE; }

/* ── Responsywność ── */
@media (max-width: 1024px) {
  .ag-layout { grid-template-columns: 1fr 280px; gap: 1.5rem; }
}
@media (max-width: 860px) {
  .ag-layout { grid-template-columns: 1fr; }
  .ag-sidebar { position: static; }
}
@media (max-width: 640px) {
  .ag-hero { min-height: 220px; }
  .ag-hero__content {
    flex-direction: column;
    align-items: flex-start;
    gap: .9rem;
    padding-top: 2rem;
    padding-bottom: 1.35rem;
  }
  .ag-hero__logo { width: 78px; height: 78px; border-radius: 16px; }
  .ag-hero__logo-placeholder { font-size: 1.6rem; }
  .ag-hero__name { font-size: 1.5rem; }
  .ag-hero__tagline { font-size: .92rem; }
  .ag-hero__meta { gap: .7rem; font-size: .8rem; }
  .ag-section { padding: 1.15rem; border-radius: 14px; }
}
