/* =====================================================
   AVAN APPS — CONTACT US
   Neon Blue | Glassmorphism | Fully Responsive
===================================================== */

body {
  --contact-primary: var(--primary-color, #3188cc);
  --contact-bg: var(--background-color, #000616);
  --contact-text: var(--light-text-color, #ffffff);

  position: relative;
  isolation: isolate;

  padding-top: 220px;
  box-sizing: border-box;

  background-color: var(--contact-bg);
  background-image:
    linear-gradient(180deg,
      rgba(0, 6, 22, 0.18),
      rgba(0, 6, 22, 0.78)),
    url("https://avanapps.ir/wp-content/uploads/2026/10/contact-avan-bg.webp");

  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body,
body * {
  box-sizing: border-box;
}

/* =====================================================
   MAIN CONTACT PANEL
===================================================== */

.contact_us_main {
  position: relative;
  isolation: isolate;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;

  width: min(90%, 900px);
  margin: 35px auto 80px;
  padding: 60px 35px 45px;

  border: 1px solid rgba(49, 136, 204, 0.65);
  border-radius: 30px;

  background: linear-gradient(145deg,
      rgba(49, 136, 204, 0.12),
      rgba(0, 6, 22, 0.88) 70%);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  box-shadow:
    0 0 35px rgba(49, 136, 204, 0.16),
    0 25px 70px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.contact_us_main::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 12%;
  right: 12%;
  height: 2px;

  border-radius: 50%;
  background: var(--contact-primary);
  box-shadow: 0 0 18px var(--contact-primary);

  pointer-events: none;
}

.contact_us_main::after {
  content: "";
  position: absolute;
  z-index: -1;

  width: 180px;
  height: 180px;
  top: 20%;
  right: -70px;

  border-radius: 50%;
  background: rgba(49, 136, 204, 0.12);
  filter: blur(65px);

  pointer-events: none;
}

/* =====================================================
   CONTACT IMAGE
===================================================== */

.contact_img {
  position: absolute;
  z-index: 2;

  top: -160px;
  right: -20px;

  width: 250px;
  height: 210px;
  max-width: 65%;

  object-fit: contain;
  object-position: center;

  filter:
    drop-shadow(0 0 15px rgba(49, 136, 204, 0.3)) drop-shadow(0 15px 25px rgba(0, 0, 0, 0.35));

  transition: transform 0.35s ease, filter 0.35s ease;
}

@media (hover: hover) and (pointer: fine) {
  .contact_us_main:hover .contact_img {
    transform: translateY(-5px);
    filter: drop-shadow(0 0 20px rgba(49, 136, 204, 0.45));
  }
}

/* =====================================================
   INTRO
===================================================== */

.contact_us_intro {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;

  width: 100%;
  text-align: center;
}

.contact_us_intro h1,
.contact_us_intro h2 {
  max-width: 100%;
  margin: 0;

  color: var(--contact-text);
  font-weight: 900;
  line-height: 1.8;

  text-shadow: 0 0 18px rgba(49, 136, 204, 0.3);
  overflow-wrap: anywhere;
}

.contact_us_intro p {
  max-width: 650px;
  margin: 0;

  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 2.2;
}

/* =====================================================
   CONTACT SECTION
===================================================== */

.contact_box_section {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 30px;

  width: 100%;
  min-width: 0;
}

.contact_box_section h2 {
  position: relative;

  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 0 12px 18px;

  color: var(--contact-text);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 900;
  line-height: 1.8;
  text-align: center;

  text-shadow: 0 0 14px rgba(49, 136, 204, 0.25);
  overflow-wrap: anywhere;
}

.contact_box_section h2::after {
  content: "";
  position: absolute;

  width: 100%;
  max-width: 180px;
  height: 3px;

  bottom: 0;
  left: 50%;
  transform: translateX(-50%);

  border-radius: 10px;
  background: linear-gradient(90deg,
      transparent,
      var(--contact-primary),
      transparent);

  box-shadow: 0 0 14px rgba(49, 136, 204, 0.5);
}

/* =====================================================
   CONTACT CARDS — CENTER LAST ROW
===================================================== */

.contact_box_container {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;

  gap: 20px;
  width: 100%;
  min-width: 0;
  margin-top: 8px;
}

/* کارت‌ها عرض مشخص دارند و ردیف آخر خودکار وسط می‌ماند */
.contact_box {
  position: relative;
  isolation: isolate;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column-reverse;
  gap: 14px;

  flex: 0 1 200px;
  width: 200px;
  min-width: 0;
  min-height: 175px;
  padding: 25px 15px;

  overflow: hidden;
  overflow-wrap: anywhere;
  text-align: center;

  border: 1px solid rgba(49, 136, 204, 0.45);
  border-radius: 18px;

  background: linear-gradient(145deg,
      rgba(49, 136, 204, 0.12),
      rgba(0, 6, 22, 0.62));

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 8px 24px rgba(0, 0, 0, 0.16);

  transition:
    transform 0.35s ease,
    border-color 0.35s ease,
    border-radius 0.35s ease,
    background 0.35s ease,
    box-shadow 0.35s ease;
}

.contact_box::before {
  content: "";
  position: absolute;

  top: 0;
  right: 25%;
  left: 25%;

  height: 2px;
  border-radius: 0 0 10px 10px;

  background: var(--contact-primary);
  box-shadow: 0 0 12px rgba(49, 136, 204, 0.65);

  transition: right 0.35s ease, left 0.35s ease;
}

.contact_box::after {
  content: "";
  position: absolute;
  z-index: -1;

  width: 100px;
  height: 100px;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);

  border-radius: 50%;
  background: rgba(49, 136, 204, 0.09);
  filter: blur(35px);

  pointer-events: none;
}

/* Icons */

.contact_icon {
  display: block;

  width: 48px !important;
  height: 48px !important;
  max-width: 100%;

  object-fit: contain;
  object-position: center;
  flex-shrink: 0;

  border-radius: 50%;
  filter: drop-shadow(0 0 8px rgba(49, 136, 204, 0.35));

  transition: transform 0.35s ease, filter 0.35s ease;
}

/* Card text */

.contact_box h3,
.contact_box h4,
.contact_box p,
.contact_box span,
.contact_box a {
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
}

.contact_box h3,
.contact_box h4 {
  color: var(--contact-text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.9;
}

.contact_box p,
.contact_box span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  line-height: 2;
}

.contact_box a {
  color: inherit;
  text-decoration: none;
}

/* Hover */

@media (hover: hover) and (pointer: fine) {
  .contact_box:hover {
    transform: translateY(-7px);

    border-color: var(--contact-primary);
    border-radius: 22px;

    background: linear-gradient(145deg,
        rgba(49, 136, 204, 0.22),
        rgba(0, 6, 22, 0.8));

    box-shadow:
      0 0 25px rgba(49, 136, 204, 0.2),
      inset 0 0 22px rgba(49, 136, 204, 0.08);
  }

  .contact_box:hover::before {
    right: 10%;
    left: 10%;
  }

  .contact_box:hover .contact_icon {
    transform: translateY(-4px) scale(1.08);
    filter: drop-shadow(0 0 13px rgba(49, 136, 204, 0.65));
  }
}

.contact_box a:focus-visible {
  outline: 2px solid var(--contact-primary);
  outline-offset: 4px;
}

/* =====================================================
   TABLETS
===================================================== */

@media (min-width: 701px) and (max-width: 1024px) {
  body {
    padding-top: 195px;
    background-attachment: scroll;
  }

  .contact_us_main {
    width: 92%;
    padding: 55px 25px 35px;
    border-radius: 26px;
  }

  .contact_img {
    width: 220px;
    height: 185px;
    top: -140px;
    right: -10px;
  }

  .contact_box_container {
    gap: 17px;
  }

  .contact_box {
    flex-basis: 180px;
    min-height: 160px;
    padding: 23px 14px;
  }
}

/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 700px) {
  body {
    padding-top: 175px;
    background-attachment: scroll;
    background-position: center top;
  }

  .contact_us_main {
    width: 92%;
    margin: 30px auto 55px;
    padding: 48px 20px 30px;
    gap: 24px;
    border-radius: 24px;

    backdrop-filter: blur(13px);
    -webkit-backdrop-filter: blur(13px);
  }

  .contact_img {
    width: 205px;
    height: 175px;
    max-width: 60%;
    top: -130px;
    right: -8px;
  }

  .contact_us_intro {
    gap: 11px;
  }

  .contact_us_intro p {
    font-size: 14px;
    line-height: 2.1;
  }

  .contact_box_section {
    gap: 25px;
  }

  .contact_box_container {
    gap: 13px;
  }

  .contact_box {
    flex: 0 1 calc(50% - 7px);
    width: auto;
    min-height: 145px;
    padding: 20px 10px;
    gap: 11px;
    border-radius: 15px;
  }

  .contact_icon {
    width: 42px !important;
    height: 42px !important;
  }

  .contact_box h3,
  .contact_box h4 {
    font-size: 14px;
  }

  .contact_box p,
  .contact_box span {
    font-size: 12px;
  }
}

/* =====================================================
   SMALL MOBILE
===================================================== */

@media (max-width: 420px) {
  body {
    padding-top: 145px;
  }

  .contact_us_main {
    width: calc(100% - 24px);
    margin: 28px auto 40px;
    padding: 38px 13px 23px;
    gap: 21px;
    border-radius: 20px;
  }

  .contact_img {
    width: 165px;
    height: 140px;
    max-width: 58%;
    top: -105px;
    right: -4px;
  }

  .contact_us_intro h1,
  .contact_us_intro h2 {
    font-size: 23px;
  }

  .contact_us_intro p {
    font-size: 13px;
  }

  .contact_box_section {
    gap: 22px;
  }

  .contact_box_section h2 {
    padding-bottom: 15px;
    font-size: 21px;
  }

  .contact_box_container {
    gap: 10px;
  }

  .contact_box {
    flex-basis: calc(50% - 5px);
    min-height: 125px;
    padding: 16px 7px;
    gap: 9px;
    border-radius: 13px;
  }

  .contact_icon {
    width: 36px !important;
    height: 36px !important;
  }

  .contact_box h3,
  .contact_box h4 {
    font-size: 13px;
    line-height: 1.8;
  }

  .contact_box p,
  .contact_box span {
    font-size: 11px;
    line-height: 1.9;
  }
}

/* =====================================================
   EXTRA SMALL MOBILE
===================================================== */

@media (max-width: 340px) {
  body {
    padding-top: 125px;
  }

  .contact_us_main {
    width: calc(100% - 18px);
    padding: 32px 10px 20px;
  }

  .contact_img {
    width: 145px;
    height: 125px;
    top: -92px;
    right: 0;
  }

  .contact_box_container {
    gap: 8px;
  }

  .contact_box {
    flex-basis: calc(50% - 4px);
    min-height: 115px;
    padding: 13px 5px;
  }

  .contact_icon {
    width: 31px !important;
    height: 31px !important;
  }

  .contact_box h3,
  .contact_box h4 {
    font-size: 12px;
  }

  .contact_box p,
  .contact_box span {
    font-size: 10px;
  }
}

/* =====================================================
   TOUCH & ACCESSIBILITY
===================================================== */

@media (hover: none) {
  .contact_box:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {

  .contact_us_main *,
  .contact_us_main *::before,
  .contact_us_main *::after {
    transition: none !important;
    animation: none !important;
  }
}

.linkedin_link {
  display: none;
}