/* =========================================================
   Ukrainci Poruch — Basic Profile Final CSS
   For single-up_profile pages
   ========================================================= */

/* ===== Astra / theme reset for profile page only ===== */

body.single-up_profile .site-content,
body.single-up_profile .site-content > .ast-container,
body.single-up_profile .ast-container,
body.single-up_profile #primary,
body.single-up_profile .content-area,
body.single-up_profile .site-main,
body.single-up_profile .ast-article-single,
body.single-up_profile .entry-content {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  background: transparent !important;
}

body.single-up_profile .entry-header,
body.single-up_profile .ast-page-entry-header,
body.single-up_profile #secondary {
  display: none !important;
}

body.single-up_profile .site-content > .ast-container {
  display: block !important;
}

/* ===== Page tokens ===== */

.up-profile-page {
  --up-blue: #005BBB;
  --up-blue-dark: #004C9D;
  --up-blue-deep: #002C5E;
  --up-yellow: #FFD700;
  --up-yellow-dark: #E6C000;
  --up-green: #1AAB6D;
  --up-green-soft: #DEF3E9;
  --up-ink: #141C2E;
  --up-text: #3A4A68;
  --up-muted: #7D90AA;
  --up-line: #E2E8F2;
  --up-bg: #F8F7F2;
  --up-card: #FFFFFF;
  --up-shadow: 0 8px 28px rgba(0, 50, 120, 0.08);
  --up-shadow-lg: 0 18px 50px rgba(0, 50, 120, 0.12);

  width: 100% !important;
  min-height: 100vh;
  background: var(--up-bg);
  color: var(--up-ink);
  font-family: "Helvetica Neue", Arial, sans-serif;
  padding: 34px 0 78px;
  overflow-x: hidden;
}

.up-profile-page *,
.up-profile-page *::before,
.up-profile-page *::after {
  box-sizing: border-box;
}

.up-profile-page a {
  text-decoration: none !important;
}

/* ===== Main centered container ===== */

.up-profile-container {
  width: min(1440px, calc(100vw - 72px)) !important;
  max-width: 1440px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* ===== Breadcrumbs ===== */

.up-profile-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--up-muted);
  font-size: 13px;
  line-height: 1.4;
}

.up-profile-breadcrumbs a {
  color: var(--up-blue);
  font-weight: 800;
}

.up-profile-breadcrumbs a:hover {
  text-decoration: underline !important;
}

/* ===== Layout ===== */

.up-profile-layout {
  display: block !important;
  width: 100% !important;
}

.up-profile-main {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
}

/* Sidebar is hidden because contacts are already in the main profile card */
.up-profile-sidebar {
  display: none !important;
}

/* ===== Cards ===== */

.up-profile-card,
.up-profile-block,
.up-sidebar-card,
.up-sidebar-small {
  width: 100%;
  background: var(--up-card);
  border: 1px solid var(--up-line);
  border-radius: 24px;
  box-shadow: var(--up-shadow);
}

.up-profile-card {
  overflow: hidden;
}

/* ===== Hero card ===== */

.up-profile-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 300px;
  padding: 42px 46px;
  background: linear-gradient(135deg, var(--up-blue) 0%, var(--up-blue-deep) 100%);
  color: #ffffff;
  overflow: hidden;
}

.up-profile-top::after {
  content: "♡";
  position: absolute;
  right: 48px;
  top: 36px;
  color: rgba(255, 255, 255, 0.08);
  font-size: 160px;
  line-height: 1;
  font-weight: 900;
  pointer-events: none;
}

.up-profile-avatar {
  position: relative;
  z-index: 2;
  width: 132px;
  height: 132px;
  flex: 0 0 132px;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.up-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.up-profile-head {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.up-profile-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 12px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--up-yellow);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.up-profile-head h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(36px, 4vw, 54px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.up-profile-spec {
  margin: 10px 0 0;
  color: var(--up-yellow);
  font-size: 19px;
  line-height: 1.35;
  font-weight: 900;
}

.up-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
  color: #d6e6fb;
  font-size: 14px;
  line-height: 1.45;
}

.up-profile-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 18px;
  padding: 8px 13px;
  border-radius: 11px;
  background: rgba(26, 171, 109, 0.22);
  border: 1px solid rgba(140, 245, 190, 0.42);
  color: #c8f5de;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

/* ===== Contact buttons under hero ===== */

.up-profile-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  padding: 18px !important;
  background: #ffffff !important;
  align-items: stretch !important;
}

/* если WordPress обернул ссылки в <p> */
.up-profile-actions > p {
  display: contents !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* порядок кнопок */
.up-profile-actions .up-contact--mail {
  order: 1 !important;
}

.up-profile-actions .up-contact--site {
  order: 2 !important;
}

.up-profile-actions .up-contact--tel {
  order: 3 !important;
}

.up-profile-actions .up-contact {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 52px !important;
  margin: 0 !important;
  padding: 13px 16px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border-radius: 14px !important;
  border: 0 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.up-profile-actions .up-contact span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
  line-height: 1 !important;
  font-size: 15px !important;
}

.up-contact:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 50, 120, 0.14);
}

.up-contact--mail {
  background: var(--up-blue) !important;
  color: #ffffff !important;
}

.up-contact--mail:hover {
  background: var(--up-blue-dark) !important;
}

.up-contact--site {
  background: var(--up-blue-deep) !important;
  color: #ffffff !important;
}

.up-contact--site:hover {
  background: #00234d !important;
}

.up-contact--tel {
  background: var(--up-yellow) !important;
  color: var(--up-ink) !important;
  box-shadow: 0 8px 18px rgba(255, 215, 0, 0.2);
}

.up-contact--tel:hover {
  background: var(--up-yellow-dark) !important;
  color: var(--up-ink) !important;
}

.up-contact--wa {
  background: #25D366 !important;
}

.up-contact--tg {
  background: #2AABEE !important;
}

/* ===== Content blocks ===== */

.up-profile-block {
  margin-top: 22px;
  padding: 30px;
}

.up-profile-block h2 {
  margin: 0 0 18px;
  color: var(--up-blue-deep);
  font-size: 27px;
  line-height: 1.22;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.up-profile-block p {
  max-width: 980px;
  margin: 0 0 13px;
  color: var(--up-text);
  font-size: 16px;
  line-height: 1.75;
}

.up-profile-block p:last-child {
  margin-bottom: 0;
}

.up-profile-block strong {
  color: var(--up-ink);
  font-weight: 900;
}

/* ===== Services ===== */

.up-services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.up-service-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-height: 82px;
  padding: 15px;
  border: 1px solid var(--up-line);
  border-radius: 16px;
  background: #fbfdff;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.up-service-item:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 91, 187, 0.25);
  box-shadow: 0 10px 24px rgba(0, 50, 120, 0.08);
}

.up-service-item span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 9px;
  background: #e8f1fb;
  color: var(--up-blue);
  font-weight: 900;
}

.up-service-item p {
  max-width: none;
  margin: 0;
  color: var(--up-text);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 800;
}

/* ===== Bullets ===== */

.up-bullets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.up-bullet {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--up-green-soft);
  color: #15784E;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

/* ===== Details ===== */

.up-info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.up-info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--up-line);
  border-radius: 16px;
  background: #fbfdff;
}

.up-info-row > span {
  width: 32px;
  flex: 0 0 32px;
  font-size: 21px;
  line-height: 1.2;
}

.up-info-row small {
  display: block;
  margin-bottom: 4px;
  color: var(--up-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.up-info-row strong,
.up-info-row a {
  color: var(--up-ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.4;
  text-decoration: none !important;
}

.up-info-row a {
  color: var(--up-blue);
}

.up-info-row a:hover {
  text-decoration: underline !important;
}

/* ===== Hidden sidebar fallback ===== */

.up-sidebar-card,
.up-sidebar-small {
  display: none;
}

/* ===== Mobile bottom bar ===== */

.up-mobile-contact-bar {
  display: none;
}

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

@media (max-width: 1024px) {
  .up-profile-container {
    width: calc(100vw - 40px) !important;
    max-width: none !important;
  }

  .up-profile-top {
    min-height: 250px;
    padding: 32px;
  }

  .up-profile-head h1 {
    font-size: 40px;
  }

  .up-services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

@media (max-width: 768px) {
  .up-profile-page {
    padding: 18px 0 92px;
  }

  .up-profile-container {
    width: calc(100vw - 28px) !important;
  }

  .up-profile-breadcrumbs {
    display: none;
  }

  .up-profile-top {
    display: block;
    min-height: auto;
    padding: 24px 18px;
    border-radius: 0;
  }

  .up-profile-top::after {
    right: -8px;
    top: 0;
    font-size: 92px;
  }

  .up-profile-avatar {
    width: 86px;
    height: 86px;
    border-radius: 18px;
    margin-bottom: 15px;
    font-size: 28px;
  }

  .up-profile-kicker {
    margin-bottom: 10px;
    font-size: 10px;
  }

  .up-profile-head h1 {
    font-size: 30px;
    line-height: 1.12;
  }

  .up-profile-spec {
    font-size: 15px;
  }

  .up-profile-meta {
    display: grid;
    gap: 7px;
    margin-top: 13px;
    font-size: 13px;
  }

  .up-profile-badge {
    margin-top: 14px;
    font-size: 12px;
  }

  .up-profile-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 14px !important;
  }

  .up-profile-actions .up-contact--mail,
  .up-profile-actions .up-contact--site,
  .up-profile-actions .up-contact--tel {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .up-contact {
    min-height: 50px;
    padding: 13px 16px;
    border-radius: 13px;
    font-size: 14px;
  }

  .up-profile-block {
    margin-top: 16px;
    padding: 18px;
    border-radius: 18px;
  }

  .up-profile-block h2 {
    margin-bottom: 13px;
    font-size: 22px;
  }

  .up-profile-block p {
    max-width: none;
    font-size: 14.5px;
    line-height: 1.65;
  }

  .up-services-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .up-service-item {
    min-height: auto;
    padding: 13px;
  }

  .up-bullets {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .up-bullet {
    border-radius: 12px;
  }

  .up-info-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .up-info-row {
    padding: 13px;
  }

  .up-mobile-contact-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 10px 14px;
    background: #ffffff;
    border-top: 1px solid var(--up-line);
    box-shadow: 0 -4px 18px rgba(20, 45, 85, 0.12);
  }

  .up-mobile-contact-bar .up-contact {
    min-height: 46px;
    padding: 12px;
    font-size: 14px;
  }
}

@media (max-width: 380px) {
  .up-profile-container {
    width: calc(100vw - 22px) !important;
  }

  .up-profile-head h1 {
    font-size: 27px;
  }

  .up-profile-block {
    padding: 16px;
  }
}
/* =========================================================
   Final centering fix for profile content
   ========================================================= */

body.single-up_profile .entry-content,
body.single-up_profile .entry-content > *,
body.single-up_profile .wp-block-post-content,
body.single-up_profile .wp-block-post-content > * {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.single-up_profile .up-profile-container {
  width: min(1320px, calc(100vw - 80px)) !important;
  max-width: 1320px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: block !important;
}

body.single-up_profile .up-profile-card,
body.single-up_profile .up-profile-block {
  max-width: 1320px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body.single-up_profile .up-profile-actions {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 14px !important;
  padding: 22px !important;
}

body.single-up_profile .up-profile-actions .up-contact {
  width: 100% !important;
  min-height: 58px !important;
  margin: 0 !important;
}

@media (max-width: 900px) {
  body.single-up_profile .up-profile-container {
    width: calc(100vw - 32px) !important;
    max-width: none !important;
  }

  body.single-up_profile .up-profile-actions {
    grid-template-columns: 1fr !important;
  }
}
/* ===== Mobile contact buttons final ===== */

@media (max-width: 768px) {
  .up-profile-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 14px !important;
  }

  .up-profile-actions .up-contact {
    min-height: 50px !important;
    white-space: normal !important;
  }
}
/* =========================================================
   Profiles list page
   ========================================================= */

.up-profiles-list-page {
  background: #f8f7f2;
  padding: 46px 0 76px;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.up-profiles-list-container {
  width: min(1320px, calc(100vw - 72px));
  margin: 0 auto;
}

.up-profiles-list-head {
  max-width: 820px;
  margin: 0 auto 34px;
  text-align: center;
}

.up-profiles-list-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #e8f1fb;
  color: #005BBB;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.up-profiles-list-head h1 {
  margin: 0;
  color: #002C5E;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.up-profiles-list-head p {
  margin: 14px auto 0;
  color: #3a4a68;
  font-size: 16px;
  line-height: 1.65;
}

.up-profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 380px));
  justify-content: center;
  gap: 22px;
}

.up-profile-list-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e2e8f2;
  border-radius: 22px;
  box-shadow: 0 8px 28px rgba(0, 50, 120, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.up-profile-list-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 91, 187, 0.28);
  box-shadow: 0 16px 42px rgba(0, 50, 120, 0.13);
}

.up-profile-list-card__media {
  display: grid;
  place-items: center;
  height: 190px;
  background: linear-gradient(135deg, #005BBB 0%, #003f8a 100%);
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 46px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.up-profile-list-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.up-profile-list-card__body {
  padding: 20px;
}

.up-profile-list-card__badge {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #def3e9;
  color: #15784E;
  font-size: 12px;
  font-weight: 900;
}

.up-profile-list-card h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 900;
}

.up-profile-list-card h2 a {
  color: #141C2E;
  text-decoration: none !important;
}

.up-profile-list-card h2 a:hover {
  color: #005BBB;
}

.up-profile-list-card__spec {
  margin: 8px 0 0;
  color: #005BBB;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.4;
}

.up-profile-list-card__location {
  margin: 10px 0 0;
  color: #7d90aa;
  font-size: 14px;
  font-weight: 700;
}

.up-profile-list-card__text {
  min-height: 66px;
  margin: 12px 0 18px;
  color: #3a4a68;
  font-size: 14px;
  line-height: 1.55;
}

.up-profile-list-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  border-radius: 13px;
  background: #005BBB;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none !important;
  transition: background 0.18s ease, transform 0.18s ease;
}

.up-profile-list-card__btn:hover {
  background: #003f8a;
  transform: translateY(-1px);
}

.up-profiles-empty {
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 24px;
  background: #ffffff;
  border: 1px solid #e2e8f2;
  border-radius: 22px;
  text-align: center;
  box-shadow: 0 8px 28px rgba(0, 50, 120, 0.08);
}

.up-profiles-empty h2 {
  margin: 0 0 10px;
  color: #002C5E;
  font-size: 28px;
  font-weight: 900;
}

.up-profiles-empty p {
  margin: 0;
  color: #3a4a68;
}

@media (max-width: 700px) {
  .up-profiles-list-page {
    padding: 30px 0 56px;
  }

  .up-profiles-list-container {
    width: calc(100vw - 28px);
  }

  .up-profiles-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .up-profile-list-card__media {
    height: 160px;
  }

  .up-profiles-list-head {
    margin-bottom: 24px;
  }

  .up-profiles-list-head p {
    font-size: 14px;
  }
}