/* ==========================================================================
   RE/MAX Elmas — Dijital kartvizit (QR ile acilan sayfa)
   Site stillerinden bagimsizdir: kart sayfasi tek basina, hizli yuklenmelidir.

   Yerlesim kurallari:
   - Negatif margin YOK. Onceki surumde "Rehbere Kaydet" butonu negatif
     margin ile basligin uzerine tasiyordu; margin collapse yuzunden govdenin
     tamami 28px yukari kayiyor ve basligin altindaki marka seridi butonun
     altinda kaliyordu. Artik bloklar ust uste binmiyor.
   - Yukseklik olcusu 100dvh: mobil tarayicilarda adres cubugu acilip
     kapandiginda 100vh sayfayi ziplatir.
   - Guvenli alan (env(safe-area-inset-*)): iPhone centigi ve alt cubugu.
   ========================================================================== */

:root {
  --red: #dc1c2e;
  --blue: #003da5;
  --navy: #001e52;
  --wa: #25d366;
  --ink: #101623;
  --muted: #5f6b7d;
  --line: #e6eaf1;
  --soft: #f4f6fa;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --display: 'Montserrat', 'Segoe UI', Arial, sans-serif;

  --pad: 20px;           /* kart ici yatay bosluk */
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.vcard-page {
  margin: 0;
  min-height: 100vh;   /* dvh desteklemeyen eski tarayicilar icin yedek */
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--soft);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

/* --- Kart kabi ------------------------------------------------------------- */
.vcard {
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
  background: #fff;
  overflow: hidden;
}

/* --- Ust blok -------------------------------------------------------------- */
.vcard__head {
  position: relative;
  padding: calc(26px + var(--safe-t)) var(--pad) 30px;
  text-align: center;
  color: #fff;
  background: linear-gradient(160deg, var(--blue) 0%, var(--navy) 100%);
}
/* RE/MAX marka seridi: basligin en altinda, kesintisiz. */
.vcard__head::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 5px;
  background: linear-gradient(90deg, var(--blue) 0 50%, var(--red) 50% 100%);
}

.vcard__logo {
  margin: 0 auto 20px;
  height: 38px;
  width: auto;
  aspect-ratio: 250 / 68;   /* logo inmeden once de yer kaplasin: zipla yok */
}

.vcard__avatar {
  width: 92px;
  height: 92px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 32px;
  line-height: 1;
  color: var(--navy);
  background: #fff;
  border: 4px solid rgba(255, 255, 255, .35);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .22);
}

.vcard__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(21px, 6vw, 26px);
  line-height: 1.2;
  margin: 0 0 6px;
  color: #fff;
  text-wrap: balance;
}
.vcard__title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, .92);
}
.vcard__org {
  display: inline-block;
  margin: 0;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .28);
}

/* --- Govde ----------------------------------------------------------------- */
.vcard__body {
  padding: 22px var(--pad) calc(32px + var(--safe-b));
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 15px 20px;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  border: 0;
  cursor: pointer;
  transition: background-color .15s, box-shadow .15s, transform .08s;
}
.btn--save {
  color: #fff;
  background: var(--red);
  box-shadow: 0 8px 20px rgba(220, 28, 46, .28);
}
.btn--save:active { transform: translateY(1px); box-shadow: 0 4px 12px rgba(220, 28, 46, .26); }
.btn__icon { display: grid; place-items: center; flex: none; }
.btn__icon svg { width: 21px; height: 21px; }

.vcard__hint {
  margin: 11px 0 20px;
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

/* --- Bilgi satirlari -------------------------------------------------------- */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li + li { border-top: 1px solid var(--line); }

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 12px 6px;
  margin-inline: -6px;          /* dokunma alani genis, hizalama bozulmuyor */
  border-radius: 10px;
  transition: background-color .15s;
}
.row:active { background: var(--soft); }

.row__ico {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
}
.row__ico svg { width: 20px; height: 20px; }
.row__ico--blue { background: var(--blue); }
.row__ico--navy { background: var(--navy); }
.row__ico--red  { background: var(--red); }
.row__ico--wa   { background: var(--wa); }

.row__text { display: flex; flex-direction: column; min-width: 0; }
.row__label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
.row__value {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  overflow-wrap: anywhere;
}

/* --- Alt blok --------------------------------------------------------------- */
.vcard__foot { margin-top: 24px; text-align: center; }
.btn--ghost {
  color: var(--blue);
  background: var(--soft);
  border: 1px solid var(--line);
  font-size: 15px;
  min-height: 48px;
}
.vcard__legal { margin: 13px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); }

/* --- Masaustu: kart ekranin ortasinda, cerceveli ----------------------------- */
@media (min-width: 600px) {
  body.vcard-page {
    display: grid;
    place-items: center;
    padding: 40px 20px;
    background:
      radial-gradient(1100px 520px at 50% -10%, #e8edf7 0%, var(--soft) 60%);
  }
  .vcard {
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(0, 30, 82, .16), 0 2px 6px rgba(0, 30, 82, .06);
  }
  /* Masaustunde centik/ev cubugu yok; guvenli alan paylari sifirlanir. */
  .vcard__head { padding-top: 30px; }
  .vcard__body { padding-bottom: 32px; }

  .row:hover { background: var(--soft); }
  .btn--save:hover { background: #c61828; box-shadow: 0 10px 26px rgba(220, 28, 46, .34); }
  .btn--ghost:hover { background: #e9edf5; }
}

/* --- Genis ekran: yatay kartvizit; sayfa kaydirmadan tek ekrana sigar -------- */
@media (min-width: 900px) {
  .vcard {
    max-width: 780px;
    display: grid;
    grid-template-columns: 312px minmax(0, 1fr);
    align-items: stretch;
  }
  .vcard__head {
    display: flex;
    flex-direction: column;
    align-items: center;      /* stretch olsaydi logo yatayda gerilirdi */
    justify-content: center;
    padding: 36px 24px;
  }
  /* Marka seridi yatay yerlesimde iki sutunu ayiran dikey cizgiye doner. */
  .vcard__head::after {
    inset: 0 0 0 auto;
    width: 5px;
    height: auto;
    background: linear-gradient(180deg, var(--blue) 0 50%, var(--red) 50% 100%);
  }
  .vcard__logo { margin-bottom: 24px; }
  .vcard__body { padding: 28px 30px 30px; }
  .vcard__hint { text-align: left; }
  .vcard__foot { margin-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* --- Kart listesi (ofis ici) ------------------------------------------------ */
.cards-index { max-width: 760px; margin: 0 auto; padding: 40px 20px 60px; }
.cards-index h1 { font-family: var(--display); font-size: 26px; margin: 0 0 6px; }
.cards-index p.lead { margin: 0 0 26px; color: var(--muted); }
.cards-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.cards-grid a {
  display: block;
  padding: 18px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(16, 22, 35, .05);
}
.cards-grid strong { display: block; font-family: var(--display); font-size: 17px; }
.cards-grid span { font-size: 13px; color: var(--muted); }
.cards-grid code { display: block; margin-top: 10px; font-size: 12px; color: var(--blue); word-break: break-all; }
