/*
 * Iran Agency Map — Modern Oristech skin
 * Drop-in replacement for iam-style.css
 * Keeps existing plugin markup/classes intact.
 */

@font-face {
  font-family: "Vazir";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src:
    url("../fonts/vazir/Vazir.woff2") format("woff2"),
    url("../fonts/vazir/Vazir.woff") format("woff"),
    url("../fonts/vazir/Vazir.ttf") format("truetype");
}

:root {
  --iam-bg: #f7f6f2;
  --iam-surface: #ffffff;
  --iam-surface-2: #f2f2ef;
  --iam-text: #161616;
  --iam-muted: #6c6c6c;
  --iam-border: #e5e3dc;
  --iam-brand: #b79a58;
  --iam-brand-dark: #8f763d;
  --iam-dark: #0b0b0b;
  --iam-radius: 18px;
  --iam-radius-sm: 12px;
  --iam-shadow: 0 14px 34px rgba(0, 0, 0, .07);
  --iam-shadow-hover: 0 18px 42px rgba(0, 0, 0, .11);
}

.iam-section,
.iam-section * {
  box-sizing: border-box;
}

.iam-section {
  direction: rtl;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px;
  font-family: "Vazir", Tahoma, Arial, sans-serif;
  color: var(--iam-text);
}

.iam-clear {
  clear: both;
}

/* ===== Main map area ===== */

.iam-section .mapael {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: 28px;
  align-items: stretch;
  width: 100%;
}

.iam-section .map,
.iam-section .province-button {
  float: none !important;
  width: 100% !important;
  position: relative;
}

.iam-section .map {
  min-height: 500px;
  padding: 24px;
  background: var(--iam-surface);
  border: 1px solid var(--iam-border);
  border-radius: var(--iam-radius);
  box-shadow: var(--iam-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.iam-section .map svg {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-height: 500px;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.08));
}

.iam-section path {
  transition: opacity .18s ease, filter .18s ease, transform .18s ease;
  transform-origin: center;
  transform-box: fill-box;
}

.iam-section path:hover {
  cursor: pointer;
  opacity: .88;
  filter: brightness(.96) saturate(1.08);
}

/* ===== Tooltip ===== */

.iam-section .mapael .mapTooltip {
  position: absolute;
  display: none;
  z-index: 1000;
  max-width: 260px;
  padding: 10px 14px;
  border: 1px solid rgba(183, 154, 88, .25);
  border-radius: 10px;
  background: rgba(11, 11, 11, .95);
  color: #fff;
  opacity: 1;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  font-size: 12px;
  line-height: 1.8;
  pointer-events: none;
}

/* ===== Province buttons ===== */

.iam-section .province-button {
  padding: 22px;
  background: var(--iam-surface);
  border: 1px solid var(--iam-border);
  border-radius: var(--iam-radius);
  box-shadow: var(--iam-shadow);
}

.iam-section .provinces-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.iam-section .province-button ul li {
  float: none !important;
  width: auto !important;
  display: block;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

.iam-section .province-button ul li a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--iam-border);
  border-radius: 10px;
  background: var(--iam-surface-2);
  color: var(--iam-text);
  text-decoration: none;
  font-family: "Vazir", Tahoma, Arial, sans-serif;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  box-shadow: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease,
              transform .18s ease, box-shadow .18s ease;
}

.iam-section .province-button ul li a:hover,
.iam-section .province-button ul li a:focus {
  background: var(--iam-dark);
  color: #fff;
  border-color: var(--iam-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,.10);
  outline: none;
}

.iam-section .province-button ul li a:focus-visible {
  box-shadow: 0 0 0 3px rgba(183,154,88,.24);
}

.iam-section .provinces-list li:hover ~ .mapTooltip {
  display: none;
}

/* ===== Agencies results ===== */

.iam-section .Agencies {
  width: 100%;
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.iam-section .branch {
  float: none !important;
  overflow: hidden;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 22px;
  direction: rtl;
  color: var(--iam-text);
  background: var(--iam-surface);
  border: 1px solid var(--iam-border);
  border-radius: var(--iam-radius);
  box-shadow: var(--iam-shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.iam-section .branch:hover {
  transform: translateY(-3px);
  box-shadow: var(--iam-shadow-hover);
  border-color: rgba(183,154,88,.45);
}

.iam-section .branch > div:first-child {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
}

.iam-section .branch img {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--iam-border);
  background: #fff;
}

.iam-section .right {
  float: none !important;
}

.iam-section .info {
  float: none !important;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0 !important;
}

.iam-section .info li {
  list-style: none;
  font-family: "Vazir", Tahoma, Arial, sans-serif;
}

.iam-section .cityname {
  margin-bottom: 5px;
  padding: 0;
  color: var(--iam-brand-dark);
  font-size: 12px;
  font-weight: 700;
}

.iam-section .fullname {
  color: var(--iam-text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.8;
}

/* ===== Contact info ===== */

.iam-section .contact {
  clear: both;
  margin-top: 0;
  padding-top: 16px;
  border-top: 1px solid var(--iam-border);
}

.iam-section .contact ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 0;
}

.iam-section .contact ul li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 10px 2px;
  border-bottom: 1px dashed var(--iam-border);
  color: #3e3e3e;
  font-family: "Vazir", Tahoma, Arial, sans-serif;
  font-size: 12px;
  line-height: 1.9;
  list-style: none;
}

.iam-section .contact ul li:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.iam-section .contact ul li span {
  flex: 0 0 auto;
  color: var(--iam-text);
  font-weight: 700;
  font-family: "Vazir", Tahoma, Arial, sans-serif;
}

.iam-section .contact ul li i {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 3px 0 0 4px;
  display: inline-flex;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: .72;
}

.iam-section .profile-icon {
  background-image: url(../img/iam-user.png);
}

.iam-section .address-icon {
  background-image: url(../img/iam-address.png);
}

.iam-section .tell-icon {
  background-image: url(../img/iam-phone.png);
}

.iam-section .mobile-icon {
  background-image: url(../img/iam-mobile.png);
}

/* ===== About blocks ===== */

.iam-section .aboutus,
.iam-section .about-desc {
  float: none !important;
  overflow: hidden;
  width: 100% !important;
  margin: 28px 0 0 !important;
  padding: 22px;
  direction: rtl;
  color: var(--iam-text);
  background: var(--iam-surface);
  border: 1px solid var(--iam-border);
  border-radius: var(--iam-radius);
  box-shadow: var(--iam-shadow);
}

.iam-section .aboutus p,
.iam-section .about-desc .about-us p {
  margin: 0;
  padding: 0;
  color: var(--iam-text);
  font-family: "Vazir", Tahoma, Arial, sans-serif;
  font-size: 13px;
  line-height: 2;
  text-align: right;
}

/* ===== Tablet ===== */

@media (max-width: 980px) {
  .iam-section {
    padding: 18px;
  }

  .iam-section .mapael {
    grid-template-columns: 1fr;
  }

  .iam-section .map {
    min-height: 390px;
  }

  .iam-section .provinces-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ===== Mobile ===== */

@media (max-width: 620px) {
  .iam-section {
    padding: 10px;
  }

  .iam-section .map,
  .iam-section .province-button,
  .iam-section .Agencies {
    width: 100% !important;
  }

  .iam-section .map {
    min-height: 300px;
    padding: 14px;
    border-radius: 14px;
  }

  .iam-section .province-button {
    padding: 14px;
    border-radius: 14px;
  }

  .iam-section .provinces-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .iam-section .province-button ul li a {
    min-height: 44px;
    font-size: 11px;
  }

  .iam-section .Agencies {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 22px;
  }

  .iam-section .branch {
    padding: 16px;
    border-radius: 14px;
  }

  .iam-section .branch img {
    width: 54px;
    height: 54px;
    border-radius: 12px;
  }

  .iam-section .fullname {
    font-size: 14px;
  }

  .iam-section .contact ul li {
    font-size: 11px;
  }
}

/* ===== Oristech theme map + hide agency images ===== */
.iam-section .map {
  background: linear-gradient(180deg, #f8f5ef 0%, #f1ece1 100%);
}

.iam-section .map svg path {
  fill: #d8d4c9 !important;
  stroke: #ffffff !important;
  stroke-width: 1.2px;
  transition: fill .18s ease, opacity .18s ease, filter .18s ease, transform .18s ease;
}

.iam-section .map svg path:hover {
  fill: #b79a58 !important;
  opacity: 1 !important;
  filter: brightness(.98) saturate(1.02);
}

/* seas and surrounding water */
.iam-section .map svg path[id*="caspian"],
.iam-section .map svg path[id*="persian"],
.iam-section .map svg path[id*="gulf"],
.iam-section .map svg path[id*="sea"],
.iam-section .map svg path[data-id*="caspian"],
.iam-section .map svg path[data-id*="persian"],
.iam-section .map svg path[data-id*="gulf"],
.iam-section .map svg path[data-id*="sea"] {
  fill: #d7c086 !important;
}

/* map labels / plots */
.iam-section .map svg circle,
.iam-section .map svg .plot,
.iam-section .map svg [class*="plot"],
.iam-section .map svg [id*="plot"] {
  fill: #0b0b0b !important;
  stroke: #ffffff !important;
  stroke-width: 1.5px !important;
}

/* remove agency images from cards under the map */
.iam-section .branch img {
  display: none !important;
}

.iam-section .branch > div:first-child {
  display: block;
  padding-bottom: 12px;
}

.iam-section .info {
  padding-right: 0 !important;
}

.iam-section .cityname {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(183,154,88,.12);
  color: var(--iam-brand-dark);
}

.iam-section .fullname {
  margin-top: 2px;
}

/* ===== Province list — Oristech theme ===== */
.iam-section .province-button {
  background: linear-gradient(180deg, #fbf9f4 0%, #f3eee3 100%) !important;
  border-color: #e3dac5 !important;
}

.iam-section .province-button ul li a {
  background: #f4efe4 !important;
  color: #151515 !important;
  border: 1px solid #dfd3b8 !important;
  box-shadow: none !important;
  font-weight: 500;
}

.iam-section .province-button ul li a:hover,
.iam-section .province-button ul li a:focus {
  background: #b79a58 !important;
  color: #ffffff !important;
  border-color: #b79a58 !important;
  box-shadow: 0 7px 16px rgba(143, 118, 61, .18) !important;
}

/* selected/active province — supports common plugin states */
.iam-section .province-button ul li.active a,
.iam-section .province-button ul li.current a,
.iam-section .province-button ul li.selected a,
.iam-section .province-button ul li a.active,
.iam-section .province-button ul li a.current,
.iam-section .province-button ul li a.selected {
  background: #0b0b0b !important;
  color: #ffffff !important;
  border-color: #b79a58 !important;
}

/* If the plugin marks selection only with an inline border, keep it branded */
.iam-section .province-button ul li a[style*="border"] {
  border-color: #b79a58 !important;
}

/* typography */
.iam-section .province-button ul li a {
  font-size: 12px !important;
  line-height: 1.7 !important;
}

/* ===== Click-to-call for Oristech agency cards ===== */
.iam-section .iam-phone-content {
  display: inline;
  direction: rtl;
  unicode-bidi: plaintext;
}

.iam-section .iam-phone-content .iam-tel-link {
  display: inline-block;
  margin: 0 2px;
  color: #8f763d !important;
  font-weight: 700;
  text-decoration: none !important;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}

.iam-section .iam-phone-content .iam-tel-link:hover,
.iam-section .iam-phone-content .iam-tel-link:focus {
  color: #0b0b0b !important;
  text-decoration: underline !important;
}

@media (max-width: 620px) {
  .iam-section .iam-phone-content .iam-tel-link {
    font-size: 14px !important;
    line-height: 2 !important;
  }
}

/* ===== Oristech agency cards — Energy-style layout, Oristech palette ===== */

/* Card grid */
.iam-section .Agencies {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 18px !important;
  align-items: start !important;
  margin-top: 30px !important;
}

/* Main card */
.iam-section .branch {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 20px !important;
  overflow: hidden !important;
  background: #ffffff !important;
  border: 1px solid #e5e3dc !important;
  border-top: 3px solid #d7c086 !important;
  border-radius: 16px !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .07) !important;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease !important;
}

.iam-section .branch:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .11) !important;
  border-color: rgba(215, 192, 134, .55) !important;
}

/* Oristech cards do not need agency images */
.iam-section .branch img,
.iam-section .branch .profile {
  display: none !important;
}

/* Card header */
.iam-section .branch > div:first-child {
  display: block !important;
  padding: 0 0 15px !important;
  margin: 0 !important;
}

.iam-section .info {
  float: none !important;
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.iam-section .info li {
  list-style: none !important;
}

.iam-section .cityname {
  display: inline-block !important;
  margin: 0 0 8px !important;
  padding: 4px 10px !important;
  background: rgba(215, 192, 134, .14) !important;
  color: #8f763d !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.7 !important;
}

.iam-section .fullname {
  margin: 0 !important;
  color: #161616 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.9 !important;
}

/* Contact section */
.iam-section .contact {
  margin-top: 0 !important;
  padding-top: 15px !important;
  border-top: 1px solid #e5e3dc !important;
}

.iam-section .contact ul {
  margin: 0 !important;
  padding: 0 !important;
  border-top: 0 !important;
  list-style: none !important;
}

.iam-section .contact ul li {
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 10px 2px !important;
  border-bottom: 1px dashed #e5e3dc !important;
  color: #3e3e3e !important;
  font-size: 13px !important;
  line-height: 1.95 !important;
}

.iam-section .contact ul li:last-child {
  border-bottom: 0 !important;
  padding-bottom: 2px !important;
}

.iam-section .contact ul li span {
  flex: 0 0 auto !important;
  color: #161616 !important;
  font-weight: 700 !important;
}

.iam-section .contact ul li i {
  flex: 0 0 18px !important;
  width: 18px !important;
  height: 18px !important;
  margin: 3px 0 0 4px !important;
  opacity: .58 !important;
}

/* Click-to-call numbers in requested Oristech gold */
.iam-section .iam-phone-content .iam-tel-link,
.iam-section .contact a.iam-tel-link {
  color: #d7c086 !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  direction: ltr !important;
  unicode-bidi: isolate !important;
  white-space: nowrap !important;
}

.iam-section .iam-phone-content .iam-tel-link:hover,
.iam-section .iam-phone-content .iam-tel-link:focus,
.iam-section .contact a.iam-tel-link:hover,
.iam-section .contact a.iam-tel-link:focus {
  color: #8f763d !important;
  text-decoration: underline !important;
}

/* Mobile */
@media (max-width: 620px) {
  .iam-section .Agencies {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .iam-section .branch {
    padding: 16px !important;
    border-radius: 14px !important;
  }

  .iam-section .cityname {
    font-size: 13px !important;
  }

  .iam-section .fullname {
    font-size: 15px !important;
  }

  .iam-section .contact ul li {
    font-size: 13px !important;
    line-height: 2 !important;
    padding: 10px 2px !important;
  }
}

/* =========================================================
   FINAL ORISTECH CARD OVERRIDES
   Energy-like compact card layout, without agency images
   ========================================================= */

/* Keep cards compact and visually closer to Energy */
.iam-section .branch {
  min-height: 0 !important;
  padding: 20px 22px !important;
  border: 1px solid #e5e3dc !important;
  border-top: 3px solid #d7c086 !important;
  border-radius: 16px !important;
  background: #fff !important;
}

/* No agency images on Oristech */
.iam-section .branch img,
.iam-section .branch img.profile,
.iam-section .branch .profile {
  display: none !important;
}

/* Compact header */
.iam-section .branch > div:first-child {
  display: block !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 0 14px !important;
  text-align: right !important;
}

.iam-section .branch .info {
  display: block !important;
  float: none !important;
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: right !important;
}

/* City like Energy: simple small brand-colored text, not a tall badge */
.iam-section .branch .info .cityname {
  display: block !important;
  float: none !important;
  position: static !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 0 4px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #d7c086 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.8 !important;
  text-align: right !important;
}

/* Agency name */
.iam-section .branch .info .fullname {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #161616 !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  line-height: 1.9 !important;
  text-align: right !important;
}

/* Contact rows */
.iam-section .branch .contact {
  margin: 0 !important;
  padding-top: 14px !important;
  border-top: 1px solid #e5e3dc !important;
}

.iam-section .branch .contact ul li {
  font-size: 14px !important;
  line-height: 2 !important;
  padding: 10px 2px !important;
}

.iam-section .branch .contact ul li span {
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #161616 !important;
}

/* Strong override for ALL click-to-call links, regardless of theme link styles */
.iam-section .branch .contact ul li a[href^="tel:"],
.iam-section .branch .contact .iam-phone-content a.iam-tel-link,
.iam-section .branch .contact a.iam-tel-link {
  color: #d7c086 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  direction: ltr !important;
  unicode-bidi: isolate !important;
  white-space: nowrap !important;
}

.iam-section .branch .contact ul li a[href^="tel:"]:hover,
.iam-section .branch .contact ul li a[href^="tel:"]:focus,
.iam-section .branch .contact .iam-phone-content a.iam-tel-link:hover,
.iam-section .branch .contact .iam-phone-content a.iam-tel-link:focus {
  color: #8f763d !important;
  text-decoration: underline !important;
}

/* Mobile readability */
@media (max-width: 620px) {
  .iam-section .branch {
    padding: 17px !important;
  }

  .iam-section .branch .info .cityname {
    font-size: 13px !important;
  }

  .iam-section .branch .info .fullname {
    font-size: 16px !important;
  }

  .iam-section .branch .contact ul li,
  .iam-section .branch .contact ul li span,
  .iam-section .branch .contact ul li a[href^="tel:"] {
    font-size: 14px !important;
  }
}

