@font-face {
  font-family: "KhavariYekan";
  src: url("../fonts/yekan.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --icon-whatsapp: url("../icons/whatsapp.svg");
  --icon-contact: url("../icons/contact.svg");
  --icon-gallery: url("../icons/gallery.svg");
  --icon-instagram: url("../icons/instagram.svg");
  --icon-phone: url("../icons/phone.svg");
  --icon-price: url("../icons/price.svg");
  --icon-telegram: url("../icons/telegram.svg");
  --icon-rubika: url("../icons/rubika.svg");
  --icon-eitaa: url("../icons/eitaa.svg");
  --icon-bale: url("../icons/bale.svg");
  --icon-website: url("../icons/website.svg");
  --icon-soroush: url("../icons/soroush.svg");
  --icon-balad: url("../icons/balad.svg");
  --icon-neshan: url("../icons/neshan.svg");
  --icon-googlemaps: url("../icons/google-maps.svg");
  --icon-basalam: url("../icons/basalam.svg");
  --icon-shad: url("../icons/shad.svg");
  --icon-facebook: url("../icons/facebook.svg");
  --icon-tiktok: url("../icons/tiktok.svg");
  --icon-aparat: url("../icons/aparat.svg");
  --icon-youtube: url("../icons/youtube.svg");
  --icon-video: url("../icons/video.svg");
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "KhavariYekan", Tahoma, Arial, sans-serif;
  color: var(--text-color);
  background: var(--page-bg);
}

.page {
  direction: rtl;
  min-height: 100vh;
  padding: 22px 10px;
  color: var(--text-color);
  background-color: var(--page-bg);
  background-image: var(--page-pattern), var(--page-glow), var(--page-gradient);
  background-repeat: repeat, no-repeat, no-repeat;
  background-size: var(--pattern-size), auto, auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* کادر بزرگ اصلی حذف شده/شفاف */
.card {
  width: min(455px, calc(100vw - 18px));
  margin: 0 auto;
  padding: 18px 0 24px;
  border-radius: 30px;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: hidden;
}

.profile {
  padding: 0 6px 8px;
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-badge {
  width: 96px;
  height: 96px;
  min-width: 96px;
  border-radius: 50%;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--profile-ring);
  box-shadow: var(--logo-shadow);
}

.logo-badge span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  text-align: center;
  line-height: 1.65;
  font-size: 14px;
  font-weight: 900;
  color: var(--logo-text);
  background: var(--logo-inner);
  border: 4px solid var(--logo-gap);
}

.logo-badge.logo-image span {
  padding: 0;
  overflow: hidden;
  color: transparent;
  font-size: 0;
  background: var(--logo-inner);
}

.logo-badge.logo-image span img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transform: none;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.title {
  margin: 0 0 8px;
  font-size: 25px;
  font-weight: 900;
  color: var(--title-color);
  line-height: 1.45;
  text-align: right;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.stat {
  text-align: center;
  padding: 7px 3px;
  border-radius: 15px;
  background: var(--stat-bg);
  border: 1px solid var(--item-border);
  cursor: default;
  transition: .18s ease;
  box-shadow: 0 8px 18px var(--soft-shadow);
}

.stat:hover {
  transform: translateY(-2px) scale(1.01);
  background: var(--hover-bg);
  border-color: var(--hover-border);
  box-shadow: 0 10px 20px var(--hover-shadow);
}

.stat b {
  display: block;
  color: var(--item-title);
  font-size: 12px;
  line-height: 1.6;
}

.stat span {
  display: block;
  color: var(--muted-text);
  font-size: 9.5px;
  line-height: 1.5;
  white-space: nowrap;
}

.stat:hover b,
.stat:hover span {
  color: var(--hover-text);
}

.subtitle {
  font-size: 13px;
  line-height: 2;
  margin: 12px 2px 12px;
  color: var(--subtitle-color);
  text-align: right;
}

.quick-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 0 2px 14px;
}

.quick-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 9px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--badge-text);
  background: var(--quick-bg);
  border: 1px solid var(--badge-border);
  font-size: 12px;
  font-weight: 900;
  transition: .18s ease;
  box-shadow: 0 8px 18px var(--soft-shadow);
}

.quick-action span {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background-color: var(--icon-bg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 15px 15px;
}

.quick-static {
  cursor: default;
  opacity: .95;
}

.quick-action:hover,
.quick-action:focus {
  transform: translateY(-2px) scale(1.02);
  color: var(--hover-text);
  background: var(--hover-bg);
  border-color: var(--hover-border);
  outline: none;
}

.highlight-row {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 16px;
  overflow-x: auto;
  padding: 10px 8px 17px;
  margin: 6px 0 10px;
  scrollbar-width: none;
  border-bottom: 1px solid var(--soft-border);
}

.highlight-row::-webkit-scrollbar {
  display: none;
}

.highlight {
  width: 72px;
  min-width: 72px;
  color: var(--text-color);
  text-decoration: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: .18s ease;
}

.highlight-icon {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  display: block;
  border-radius: 50%;
  background-color: var(--icon-bg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 32px 32px;
  border: 3px solid var(--highlight-border);
  outline: 2px solid var(--highlight-outline);
  outline-offset: 2px;
  box-shadow: 0 8px 18px var(--icon-shadow);
  transition: .18s ease;
}

.highlight:hover,
.highlight:focus {
  transform: translateY(-3px);
  outline: none;
}

.highlight:hover .highlight-icon,
.highlight:focus .highlight-icon {
  background-color: var(--hover-bg);
  border-color: var(--hover-border);
  outline-color: var(--hover-border);
  box-shadow: 0 12px 24px var(--hover-shadow);
  transform: scale(1.08);
}

.highlight b {
  display: block;
  width: 100%;
  margin-top: 7px;
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.6;
  color: var(--item-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.highlight:hover b,
.highlight:focus b {
  color: var(--hover-text);
}

/* کادرهای کوچک سفید/تمیز */
.section-box {
  margin-top: 15px;
  padding: 10px;
  border-radius: 22px;
  background: var(--section-bg);
  border: 1px solid var(--soft-border);
  box-shadow: 0 10px 24px var(--section-shadow);
}

.section-title {
  display: block;
  text-align: right;
  font-size: 13px;
  color: var(--section-color);
  margin: 2px 0 10px;
  font-weight: 900;
}

.link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.link-item {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: var(--text-color);
  background: var(--item-bg);
  border: 1px solid var(--item-border);
  border-radius: 18px;
  padding: 12px 10px;
  min-height: 66px;
  transition: .2s ease;
  box-shadow: 0 6px 14px var(--soft-shadow);
}

.link-item + .link-item {
  margin-top: 10px;
}

.link-grid .link-item + .link-item {
  margin-top: 0;
}

.link-item:hover,
.link-item:focus {
  transform: translateY(-2px) scale(1.01);
  background: var(--hover-bg);
  border-color: var(--hover-border);
  box-shadow: 0 12px 24px var(--hover-shadow);
  outline: none;
}

.link-item:hover .text b,
.link-item:focus .text b,
.link-item:hover .text span,
.link-item:focus .text span {
  color: var(--hover-text);
}

.full-row {
  grid-column: 1 / -1;
}

.static-item {
  cursor: default;
}

.static-item:hover,
.static-item:focus {
  transform: none;
  background: var(--item-bg);
  border-color: var(--item-border);
  box-shadow: 0 6px 14px var(--soft-shadow);
}

.icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background-color: var(--icon-bg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 23px 23px;
  box-shadow: 0 8px 18px var(--icon-shadow);
  border: 1px solid var(--soft-border);
}

.text {
  flex: 1;
  text-align: right;
  min-width: 0;
}

.text b {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
  line-height: 1.8;
  color: var(--item-title);
}

.text span {
  display: block;
  color: var(--muted-text);
  font-size: 10px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.address-box .text b {
  font-size: 15px;
}

.address-box .text span {
  font-size: 12.5px;
  line-height: 2;
}

.footer {
  text-align: center;
  color: var(--footer-color);
  font-size: 11px;
  line-height: 2;
  margin-top: 22px;
}

.footer a {
  color: var(--footer-link);
  text-decoration: none;
  font-weight: 900;
}

.footer a:hover {
  text-decoration: underline;
}

.i-whatsapp { background-image: var(--icon-whatsapp); }
.i-contact { background-image: var(--icon-contact); }
.i-gallery { background-image: var(--icon-gallery); }
.i-instagram { background-image: var(--icon-instagram); }
.i-phone { background-image: var(--icon-phone); }
.i-price { background-image: var(--icon-price); }
.i-telegram { background-image: var(--icon-telegram); }
.i-rubika { background-image: var(--icon-rubika); }
.i-eitaa { background-image: var(--icon-eitaa); }
.i-bale { background-image: var(--icon-bale); }
.i-website { background-image: var(--icon-website); }
.i-soroush { background-image: var(--icon-soroush); }
.i-balad { background-image: var(--icon-balad); }
.i-neshan { background-image: var(--icon-neshan); }
.i-googlemaps { background-image: var(--icon-googlemaps); }
.i-basalam {
  background-image: var(--icon-basalam);
  background-color: #ff5638;
  background-size: 31px 31px;
}

.i-shad { background-image: var(--icon-shad); }
.i-facebook { background-image: var(--icon-facebook); }
.i-tiktok { background-image: var(--icon-tiktok); }
.i-aparat { background-image: var(--icon-aparat); }
.i-youtube { background-image: var(--icon-youtube); }
.i-video { background-image: var(--icon-video); }

@media (max-width: 390px) {
  .page { padding: 14px 8px; }
  .card { border-radius: 24px; padding: 16px 0 22px; }
  .profile { padding: 0 6px; }
  .profile-top { gap: 11px; }
  .logo-badge { width: 86px; height: 86px; min-width: 86px; }
  .logo-badge span { width: 78px; height: 78px; font-size: 13px; }
  .title { font-size: 21px; }
  .stat { padding: 6px 2px; }
  .stat b { font-size: 11px; }
  .stat span { font-size: 8.5px; }
  .highlight { width: 66px; min-width: 66px; }
  .highlight-icon {
    width: 58px;
    height: 58px;
    min-width: 58px;
    min-height: 58px;
    background-size: 29px 29px;
  }
}

@media (max-width: 350px) {
  .profile-top { align-items: flex-start; }
  .stat-row { grid-template-columns: 1fr; }
  .link-grid { grid-template-columns: 1fr; }
}
