/* ==========================================================================
   MONLY — javni profil agenta i agencije
   Jedan sistem sa javnim profilom firme: navy pano, logo/fotografija koja
   prelazi preko njega, mirna traka tabova i mesing samo na aktivnom stanju.
   Učitava se poslije straničnih stilova, pa drži istu paletu na oba profila.
   ========================================================================== */

body.theme-navy {
  --brand: #001f44;
  --brand-2: #c8a75c;
  --brand-soft: #f7f2e7;
  --blue: #001f44;
  --blue-dark: #061428;
  --blue-soft: #f7f2e7;
  --pd-green: #001f44;
  --pd-gold: #b98f3f;
  --green: #001f44;
  --muted: #5d6b82;
}

/* Zaglavlje u toj istoj navy traci kao javne stranice. */
body.theme-navy .topbar {
  background: #001528;
  border-bottom: 0;
  box-shadow: 0 10px 26px rgba(0, 16, 34, .22);
}

body.theme-navy .topbar .brand {
  color: #fff;
}

body.theme-navy .topbar .brand-symbol {
  border-radius: 9px;
  background: #fff;
  color: #001f44;
}

body.theme-navy .topbar .main-nav a {
  color: rgba(255, 255, 255, .84);
  font: 600 12.5px/1 var(--domis-ui);
  letter-spacing: .01em;
  text-transform: none;
}

body.theme-navy .topbar .main-nav a:hover,
body.theme-navy .topbar .main-nav a[aria-current="page"] {
  color: #fff;
}

body.theme-navy .topbar .login-link {
  color: rgba(255, 255, 255, .88);
}

body.theme-navy .topbar .login-link:hover {
  color: #e6cf97;
}

body.theme-navy .topbar .post-button {
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: 600 11.5px/1 var(--domis-ui);
  letter-spacing: .01em;
  text-transform: none;
  box-shadow: none;
}

body.theme-navy .topbar .post-button:hover {
  background: #fff;
  color: #001f44;
  transform: none;
}

/* ------------------------------------------------------------------ pano */

.ap-cover,
.ag-cover {
  position: relative;
  box-sizing: border-box;
  height: 208px;
  overflow: hidden;
  background:
    radial-gradient(88% 130% at 84% 0%, rgba(200, 167, 92, .24) 0%, rgba(200, 167, 92, 0) 60%),
    linear-gradient(158deg, #0b2a52 0%, #001f44 54%, #061428 100%);
}

.ap-cover::after,
.ag-cover::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #c8a75c 22%, #c8a75c 78%, transparent);
}

.ap-cover .wrap,
.ag-cover .wrap {
  box-sizing: border-box;
  height: 100%;
  display: flex;
  align-items: flex-start;
  padding-top: 20px;
}

.ap-back,
.ag-back {
  margin: 0;
}

.ap-back a,
.ag-back a {
  color: rgba(255, 255, 255, .68);
  font: 600 10px/1 var(--domis-ui);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.ap-back a:hover,
.ag-back a:hover {
  color: #f1dcab;
}

/* ------------------------------------------------- profil agenta: kartica */

.ap-hero {
  padding: 0;
  background: none;
}

.ap-intro {
  position: relative;
  z-index: 2;
  margin-top: -74px;
  padding-bottom: 8px;
}

.ap-card {
  overflow: visible;
  border: 1px solid rgba(20, 45, 80, .1);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 26px 60px rgba(4, 16, 32, .16);
}

/* Identitet je jedan red: fotografija, ime i oznake. */
.ap-card-top {
  display: block;
}

.ap-identity {
  display: flex;
  flex-direction: row;
  /* Oznake i ime počinju uz gornji dio fotografije, nikad iznad nje. */
  align-items: flex-start;
  gap: 20px;
  padding: 16px 26px 0;
  border-right: 0;
  text-align: left;
}

.ap-photo-box {
  display: grid;
  justify-items: center;
  gap: 6px;
  flex: none;
  margin-top: -58px;
}

.ap-photo {
  width: 132px;
  height: 132px;
  border: 4px solid #fff;
  background: #f4f7fc;
  box-shadow: 0 14px 32px rgba(6, 20, 40, .2);
}

.ap-photo-initials {
  font-size: 44px;
  color: #001f44;
}

.ap-identity-body {
  min-width: 0;
  flex: 1 1 0;
  padding-bottom: 4px;
}

/* Radnja stoji na kraju reda sa identitetom — ne ostavlja praznu polovinu kartice. */
.ap-identity > .ap-contact-cta {
  align-self: flex-start;
  margin: 0 0 0 auto;
}

.ap-badges {
  justify-content: flex-start;
  margin: 0 0 8px;
}

.ap-badge {
  border-radius: 999px;
  background: #f7f2e7;
  color: #6b5426;
  font-size: 8px;
}

.ap-badge-quiet {
  background: #f4f6fa;
  color: #5d6b82;
}

.ap-badge-muted {
  background: #f4f6fa;
  color: #6b7790;
}

.ap-identity h1 {
  margin: 0 0 5px;
  font-family: var(--domis-display);
  font-size: clamp(25px, 2.6vw, 33px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.035em;
  color: #001f44;
}

.ap-location {
  margin: 0;
  font-size: 12px;
  color: #5d6b82;
}

.ap-rating {
  justify-content: flex-start;
  margin: 8px 0 0;
}

.ap-rating b {
  color: #001f44;
}

body.theme-navy .ap-stars,
body.theme-navy .ap-stars-inline {
  color: #b98f3f;
}

/* Brojevi u jednom mirnom redu, sa hairline razdjelnicima. */
.ap-quick {
  width: 100%;
  gap: 1px;
  margin: 18px 0 0;
  padding: 0;
  border-top: 1px solid #edf0f5;
  background: #edf0f5;
}

.ap-quick > div {
  padding: 12px 26px 13px;
  background: #fff;
}

.ap-quick b {
  font-family: var(--domis-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.03em;
  color: #001f44;
}

.ap-quick span {
  margin-top: 3px;
  font-size: 9px;
  letter-spacing: .12em;
  color: #6b7790;
}

.ap-figure {
  padding: 14px 26px 4px;
}

/* Tabovi: ista traka kao na profilu firme — tanka linija i mesing. */
body.theme-navy .ap-tabs {
  width: 100%;
  max-width: none;
  gap: 2px;
  flex-wrap: nowrap;
  padding: 0;
  margin: 0 0 16px;
  border: 0;
  border-bottom: 1px solid rgba(20, 45, 80, .1);
  border-radius: 0;
  background: none;
  box-shadow: none;
}

body.theme-navy .ap-tab {
  position: relative;
  padding: 12px 14px 13px;
  border: 0;
  border-radius: 8px 8px 0 0;
  background: none;
  color: #5b6b82;
  font: 600 12px/1 var(--domis-ui);
  letter-spacing: .01em;
  text-transform: none;
}

body.theme-navy .ap-tab:hover {
  background: rgba(20, 45, 80, .045);
  color: #001f44;
}

body.theme-navy .ap-tab.is-active {
  background: none;
  color: #001f44;
  box-shadow: none;
}

body.theme-navy .ap-tab.is-active::after {
  content: '';
  display: block;
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #b98f3f, #e6cf97);
}

.ap-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #edf0f5;
  border-bottom: 0;
  border-radius: 0 0 20px 20px;
}

.ap-metric b {
  color: #001f44;
}

.ap-metric span {
  font-size: 9px;
  letter-spacing: .12em;
  color: #6b7790;
}

.ap-metric small {
  font-size: 10px;
  color: #8b96a9;
}

/* ------------------------------------------------- profil agencije */

.ag-hero {
  padding: 0;
  background: none;
}

.ag-intro {
  position: relative;
  z-index: 2;
  margin-top: -66px;
  padding-bottom: 8px;
}

.ag-card {
  border: 1px solid rgba(20, 45, 80, .1);
  border-radius: 20px;
  box-shadow: 0 26px 60px rgba(4, 16, 32, .16);
}

.ag-head {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: flex-end;
  gap: 22px;
  padding: 16px 26px 0;
}

.ag-logo {
  width: 132px;
  height: 132px;
  margin-top: -74px;
  padding: 6px;
  border: 1px solid rgba(200, 167, 92, .85);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 0 0 8px #fff, 0 20px 40px rgba(6, 20, 40, .22);
  color: #001f44;
  font-size: 44px;
}

.ag-title h1 {
  font-family: var(--domis-display);
  font-size: clamp(25px, 2.5vw, 33px);
  font-weight: 700;
  letter-spacing: -.035em;
  color: #001f44;
}

.ag-title p {
  font-size: 12px;
  color: #5d6b82;
}

.ag-badges .ap-chip {
  border-radius: 999px;
  border-color: #eceef4;
  background: #fbfcfe;
  color: #3d4b63;
}

.ag-cta {
  padding: 12px 20px;
  border: 1px solid #001f44;
  border-radius: 999px;
  background: #001f44;
  color: #fff;
  font: 600 11.5px/1 var(--domis-ui);
  letter-spacing: .01em;
  text-transform: none;
  box-shadow: 0 12px 26px -16px rgba(0, 20, 44, .9);
}

.ag-cta:hover {
  background: #062a4f;
}

/* Naslov sekcije, link i panel filtera u jednom redu — bez prazne trake ispod. */
.ap-block-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 14px;
}

.ag-kpis {
  margin-top: 20px;
  padding: 14px 26px 16px;
  border-top: 1px solid #edf0f5;
}

.ag-kpi span {
  font-size: 9px;
  letter-spacing: .12em;
  color: #6b7790;
}

.ag-kpi b {
  color: #001f44;
}

.ag-kpi small {
  font-size: 10px;
  color: #8b96a9;
}

/* ------------------------------------------------- ostatak profila */

body.theme-navy .ap-eyebrow {
  color: #8a6a2f;
}

body.theme-navy .ap-textlink,
body.theme-navy .ap-link:hover b {
  color: #001f44;
  border-bottom-color: rgba(185, 143, 63, .45);
}

body.theme-navy .ap-btn,
body.theme-navy .ap-form > button {
  border: 1px solid #001f44;
  border-radius: 999px;
  background: #001f44;
  color: #fff;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
}

body.theme-navy .ap-btn:hover,
body.theme-navy .ap-form > button:hover {
  background: #062a4f;
}

body.theme-navy .ap-btn-quiet {
  border-color: #dfe4ee;
  background: #fff;
  color: #001f44;
}

body.theme-navy .ap-btn-quiet:hover {
  background: #f6f8fc;
  color: #001f44;
}

body.theme-navy .ap-contact-phone {
  color: #001f44;
}

body.theme-navy .ap-contact h2,
body.theme-navy .ap-block-head h2 {
  color: #001f44;
}

body.theme-navy .ap-block {
  border-top-color: #eef1f6;
}

/* ------------------------------------------------------------------ telefon */

@media (max-width: 760px) {
  .ap-cover,
  .ag-cover {
    height: 168px;
  }

  .ap-cover .wrap,
  .ag-cover .wrap {
    padding-top: 14px;
  }

  .ap-intro {
    margin-top: -54px;
  }

  .ap-identity {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px 0;
  }

  .ap-identity-body {
    padding-top: 4px;
  }

  .ap-identity > .ap-contact-cta {
    flex: 0 0 100%;
    width: 100%;
    justify-content: center;
    margin: 12px 0 0;
  }

  /* Fotografija i ime kreću sa iste linije — ništa ne „bježi“ iznad kartice. */
  .ap-photo-box {
    margin-top: 0;
  }

  .ap-photo {
    width: 96px;
    height: 96px;
    border-width: 3px;
  }

  .ap-photo-initials {
    font-size: 32px;
  }

  .ap-identity h1 {
    font-size: 23px;
  }

  .ap-quick > div {
    padding: 10px 12px 11px;
  }

  .ap-quick b {
    font-size: 16px;
  }

  .ap-figure {
    padding: 12px 16px 0;
  }

  /* Tri taba u jednom redu, svaki sa svojim dijelom širine — ništa se ne reže. */
  body.theme-navy .ap-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    flex-wrap: nowrap;
    gap: 0;
    overflow: visible;
  }

  body.theme-navy .ap-tabs::-webkit-scrollbar {
    display: none;
  }

  body.theme-navy .ap-tab {
    padding: 11px 4px 12px;
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
  }

  .ap-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 0 0 20px 20px;
  }

  /* Kartice prodaja i oglasa idu u jedan stupac — na telefonu se ne cijepaju. */
  .ap-tabbody {
    min-height: 0;
  }

  .ap-panel.is-active {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    overflow: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
  }

  .ap-metric {
    padding: 11px 12px 12px;
    border-right: 1px solid #f0f3f8;
    border-bottom: 1px solid #f0f3f8;
  }

  .ag-intro {
    margin-top: -48px;
  }

  .ag-head {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    padding: 14px 16px 0;
  }

  /* Logo u punom kvadratu, poravnat sa imenom i oznakama. */
  .ag-logo {
    width: 88px;
    height: 88px;
    margin-top: 0;
    padding: 4px;
    border-radius: 14px;
    box-shadow: 0 0 0 5px #fff, 0 14px 28px rgba(6, 20, 40, .2);
    font-size: 30px;
  }

  .ag-title h1 {
    font-size: 23px;
  }

  .ag-cta {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 14px;
  }

  .ag-kpis {
    grid-template-columns: 1fr 1fr;
    gap: 14px 12px;
    padding: 14px 16px 16px;
  }

  .ag-kpi {
    padding: 0;
    border-right: 0;
  }

  .ap-block-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
  }

  .ap-block-actions .sf-wrap {
    width: 100%;
  }

  .ap-block-actions .sf-toggle {
    width: 100%;
    justify-content: center;
  }
}

/* Telefon agenta stoji uz ime, na svakom profilu — kupac ne mora da skrola do obrasca. */
.ap-contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 9px 0 0;
}

.ap-contact-tel {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 9px;
  border: 1px solid #e4e9f2;
  border-radius: 999px;
  background: #fbfcfe;
  color: #001f44;
  font: 600 12px/1 var(--domis-ui);
  letter-spacing: .01em;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  transition: border-color .16s ease, background .16s ease;
}

.ap-contact-tel svg {
  width: 13px;
  height: 13px;
  color: #b98f3f;
}

.ap-contact-tel:hover {
  border-color: rgba(185, 143, 63, .45);
  background: #fff;
  color: #001f44;
}

/* Kontakt je uvijek pri ruci, odmah uz ime — vodi na obrazac na istoj stranici. */
.ap-contact-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 9px 16px;
  border-radius: 999px;
  background: #001f44;
  color: #fff;
  font: 600 11.5px/1 var(--domis-ui);
  letter-spacing: .01em;
  text-decoration: none;
  box-shadow: 0 12px 24px -18px rgba(0, 31, 68, .95);
  transition: background .16s ease;
}

.ap-contact-cta:hover {
  background: #062a4f;
  color: #fff;
}

#agentContact {
  scroll-margin-top: 86px;
}

@media (max-width: 480px) {
  /* Fotografija lijevo, oznake i ime uz nju — nikad ispod nje. */
  .ap-identity {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
  }

  .ap-photo {
    width: 86px;
    height: 86px;
  }

  /* Kao na profilu agencije: ploča stoji unutar kartice, ne prelazi na pano. */
  .ap-photo-box {
    margin-top: 0;
  }

  .ap-identity h1 {
    font-size: 21px;
  }

  .ap-badge {
    padding: 4px 7px;
    font-size: 7px;
  }

  .ap-contact-cta {
    margin-top: 8px;
    padding: 9px 13px;
    font-size: 10.5px;
  }

  .ap-quick span {
    font-size: 8.5px;
    letter-spacing: .1em;
  }
}

/* ==========================================================================
   Imenik agenata i agencija: ista navy/zlatna paleta kao profili.
   ========================================================================== */
body.theme-navy .hero h1 span,
body.theme-navy .intro h1 span,
body.theme-navy .section-heading h2 span {
  color: #a8874a;
}

body.theme-navy .agent-search button {
  border-radius: 999px;
  background: #001f44;
  color: #fff;
}

body.theme-navy .agent-search button:hover {
  background: #062a4f;
}

body.theme-navy .dir-card h2 a,
body.theme-navy .dir-card h3 a,
body.theme-navy .dir-card .dir-name {
  color: #001f44;
}

body.theme-navy .dir-card h2 a:hover,
body.theme-navy .dir-card h3 a:hover {
  color: #8a6a2f;
}

body.theme-navy .dir-card .dir-strip,
body.theme-navy .dir-strip {
  background: linear-gradient(120deg, #0b2a52 0%, #001f44 100%);
}

body.theme-navy .post-button {
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  letter-spacing: .01em;
  text-transform: none;
  box-shadow: none;
}

body.theme-navy .post-button:hover {
  background: #fff;
  color: #001f44;
}

/* Imenik: u traci je samo pojam, svi ostali filteri su u panelu. */
body.theme-navy .agent-search {
  grid-template-columns: minmax(0, 1fr) auto;
}

body.theme-navy .agent-search button {
  margin-left: 6px;
  padding: 0 20px;
}

@media (max-width: 860px) {
  body.theme-navy .agent-search {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body.theme-navy .agent-search button {
    grid-column: auto;
    margin: 6px;
    width: auto;
  }
}

@media (max-width: 560px) {
  body.theme-navy .agent-search button {
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  body.theme-navy .agent-search .search-submit-label {
    display: none;
  }
}
