/* ==========================================================================
   MAHABADI — Redesign layer
   Loaded last; refines the app-like mobile UX, cards, icons and details.
   ========================================================================== */

:root {
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --ring: 0 0 0 1px color-mix(in srgb, var(--ink) 7%, transparent);
  --card-border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
  --shadow-soft: 0 1px 2px color-mix(in srgb, var(--ink) 6%, transparent),
                 0 10px 26px -18px color-mix(in srgb, var(--ink) 34%, transparent);
  --shadow-lift: 0 2px 4px color-mix(in srgb, var(--ink) 7%, transparent),
                 0 26px 48px -26px color-mix(in srgb, var(--ink) 40%, transparent);
  --tabbar-h: 64px;
}

/* ============================ NOTIFICATION BAR ========================= */
.notice-bar {
  background: var(--notice-bg, var(--blue));
  color: var(--notice-fg, #fff);
  font-size: var(--step--1);
  position: relative;
  z-index: 121;
}
.notice-bar__inner {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 48px;
  padding-block: 7px;
}
.notice-bar__icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, currentColor 16%, transparent);
  flex: none;
}
.notice-bar__icon svg { width: 15px; height: 15px; }
.notice-bar__text {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-weight: 500;
  line-height: 1.65;
}
.notice-bar__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, currentColor 15%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 26%, transparent);
  color: inherit;
  font-weight: 600;
  transition: background-color var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
}
.notice-bar__cta:hover { background: color-mix(in srgb, currentColor 26%, transparent); transform: translateY(-1px); }
.notice-bar__cta svg { width: 16px; height: 16px; }
.notice-bar__close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: var(--radius-pill);
  color: inherit;
  opacity: .72;
  transition: opacity var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.notice-bar__close:hover { opacity: 1; background: color-mix(in srgb, currentColor 18%, transparent); }
.notice-bar__close svg { width: 16px; height: 16px; }
html.mb-notice-off .notice-bar { display: none !important; }

@media (max-width: 720px) {
  .notice-bar__inner { flex-wrap: wrap; row-gap: 6px; }
  .notice-bar__text { flex-basis: calc(100% - 40px); }
  .notice-bar__cta { order: 4; }
}

/* ============================== ICON POLISH ============================ */
.icon { stroke-width: 1.7; }
.hbtn svg, .tabbar__item svg, .slider-arrow svg, .hero-slider__btn svg { transition: transform var(--dur) var(--ease); }
.hbtn:hover svg { animation: ic-pop var(--dur-slow) var(--ease); }

/* Brand-tinted social icons (progressive enhancement). */
.footer-socials a { position: relative; overflow: hidden; }
.footer-socials a:has(use[href*="instagram"]):hover { background: linear-gradient(45deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888); color: #fff; }
.footer-socials a:has(use[href*="telegram"]):hover { background: #229ed9; color: #fff; }
.footer-socials a:has(use[href*="whatsapp"]):hover,
.footer-socials a:has(use[href*="message"]):hover { background: #25d366; color: #fff; }
.footer-socials a:has(use[href*="linkedin"]):hover,
.footer-socials a:has(use[href*="briefcase"]):hover { background: #0a66c2; color: #fff; }
.footer-socials a:has(use[href*="youtube"]):hover { background: #ff0033; color: #fff; }
.footer-socials a:has(use[href*="aparat"]):hover { background: #ed145b; color: #fff; }
.footer-socials a:has(use[href*="x-twitter"]):hover { background: #0f1419; color: #fff; }

/* ========================= CARDS / SURFACE DETAILS ===================== */
.panel {
  background: var(--surface);
  border: var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.side-card {
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--sand) 60%, var(--surface)));
  border: var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.side-card__head {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: var(--space-s) var(--space-m);
  border-bottom: var(--card-border);
  background: color-mix(in srgb, var(--blue) 5%, transparent);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  font-weight: 700;
  color: var(--blue);
}
.side-card__head svg { width: 19px; height: 19px; color: var(--orange-ink); }

.trust-item { border: var(--card-border); }

/* Category tiles + blog cards: consistent borders and hover lift. */
.blog-card, .cat-tile, .step-card, .flow__step, .license, .price-table {
  border-radius: var(--radius-lg);
}
.blog-card { border: var(--card-border); box-shadow: var(--shadow-soft); }
.blog-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-4px); }

/* ============================== HERO SLIDER ============================ */
@media (max-width: 900px) {
  .hero-slider { box-shadow: var(--shadow-soft); }
}
@media (max-width: 720px) {
  /* Full image on mobile — no cropping. */
  .hero-slide { aspect-ratio: auto; background: var(--sand); display: grid; }
  .hero-slide img { width: 100%; height: auto; object-fit: contain; }
  .hero-slider__dots { bottom: var(--space-2xs); right: var(--space-2xs); }
  .hero-slider__dot { background: color-mix(in srgb, var(--ink) 30%, transparent); }
}

/* ========================= CATEGORY SLIDER (redesign) ================== */
.cat-slider { position: relative; }
.slider-track { gap: var(--space-s); }

.cat-card {
  flex: 0 0 216px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--surface) 0%, color-mix(in srgb, var(--sand) 55%, var(--surface)) 100%);
  border: var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--orange) 45%, transparent); }

.cat-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  padding: var(--space-s);
  background:
    radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, var(--blue) 7%, transparent), transparent 70%),
    color-mix(in srgb, var(--sand) 70%, var(--surface));
  overflow: hidden;
}
.cat-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px color-mix(in srgb, var(--ink) 22%, transparent));
  transition: transform var(--dur-slow) var(--ease-out);
}
.cat-card:hover .cat-card__media img { transform: scale(1.06); }

.cat-card__count {
  position: absolute;
  top: var(--space-2xs);
  right: var(--space-2xs);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(6px);
  border: var(--card-border);
  font-size: var(--step--2);
  font-weight: 600;
  color: var(--ink-2);
}

.cat-card__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xs);
  padding: var(--space-xs) var(--space-s);
  border-top: var(--card-border);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.cat-card__title {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--blue);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cat-card__go {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--blue) 8%, transparent);
  color: var(--blue);
  flex: none;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.cat-card__go svg { width: 15px; height: 15px; }
.cat-card:hover .cat-card__go { background: var(--orange); color: #fff; transform: translateX(-3px); }

/* Slider controls — clearer affordance. */
.slider-arrows { gap: var(--space-2xs); }
.slider-arrow {
  width: 46px;
  height: 46px;
  background: var(--surface);
  border: var(--card-border);
  color: var(--blue);
  box-shadow: var(--shadow-soft);
}
.slider-arrow:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.slider-arrow:hover svg { transform: translateX(-2px); }
.slider-arrow[disabled], .slider-arrow:disabled { opacity: .4; }

/* ============================== APP HEADER ============================= */
.hbtn {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--blue) 7%, var(--surface));
  color: var(--blue);
  border: var(--card-border);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
}
.hbtn:hover { background: var(--blue); color: #fff; }
.hbtn:active { transform: scale(.94); }
.hbtn svg { width: 20px; height: 20px; }
.hbtn--call { background: color-mix(in srgb, var(--orange) 16%, var(--surface)); color: var(--orange-ink); }

@media (max-width: 1024px) {
  .header-main__inner { position: relative; padding-block: 8px; row-gap: 0; flex-wrap: nowrap; }
  .hamburger {
    display: grid;
    order: -1;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--blue);
  }
  .brand { margin-inline-end: auto; min-width: 0; }
  .header-actions { gap: 6px; flex-wrap: nowrap; }
  .hbtn { display: grid; }
  /* Search lives in the bottom tab bar on mobile. */
  .hbtn--search { display: none; }

  /* Search collapses into a toggle-able panel on mobile. */
  .header-search {
    order: 10;
    flex-basis: 100%;
    max-width: none;
    display: none;
    padding-bottom: 4px;
  }
  .header-search.is-open { display: block; }
  .header-search .input { min-height: 46px; background: var(--sand); }

  .header-cta span, .header-login span { display: none; }
  .header-cta, .header-login { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: var(--radius-md); }
  .header-login { border-color: color-mix(in srgb, var(--blue) 22%, transparent); }
}

@media (max-width: 420px) {
  .brand__logo { height: 42px; max-width: 120px; }
  .brand__names strong { font-size: var(--step--1); }
  .header-actions { gap: 5px; }
  .hamburger { width: 42px; height: 42px; }
  .header-cta, .header-login { width: 42px; height: 42px; min-height: 42px; }
}

@media (max-width: 720px) {
  .header-actions .btn--outline { display: inline-flex; }
  .header-actions .btn span { display: none; }
  .header-actions .btn { padding-inline: 0; }
}

/* ========================== MOBILE BOTTOM TABBAR ======================= */
.tabbar {
  display: none;
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 130;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-top: var(--card-border);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -12px 30px -24px color-mix(in srgb, var(--ink) 60%, transparent);
}
.tabbar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: var(--tabbar-h);
  padding: 6px 4px;
  color: var(--ink-3);
  font-size: 10.5px;
  font-weight: 500;
  background: none;
  border: 0;
  transition: color var(--dur) var(--ease);
}
.tabbar__item svg { width: 22px; height: 22px; }
.tabbar__item:hover, .tabbar__item.is-active { color: var(--blue); }
.tabbar__item.is-active svg { animation: ic-pop var(--dur-slow) var(--ease); }
.tabbar__item.is-active::after {
  content: "";
  position: absolute;
  top: 0;
  width: 26px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--orange);
}
.tabbar__item { position: relative; }

@media (max-width: 1024px) {
  .tabbar { display: flex; }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .quick-contact { display: none; }
  .to-top { bottom: calc(var(--tabbar-h) + var(--space-s) + env(safe-area-inset-bottom)); }
  .drawer { padding-bottom: env(safe-area-inset-bottom); }
}

/* ============================== DRAWER ================================= */
.drawer__search { padding: var(--space-s) var(--space-xs) var(--space-2xs); }
.drawer__search .input { background: var(--sand); border-radius: var(--radius-md); }
.drawer__login {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  margin: 0 var(--space-xs) var(--space-2xs);
  padding: var(--space-xs) var(--space-s);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--blue) 7%, var(--surface));
  border: var(--card-border);
  color: var(--blue);
  font-weight: 600;
}
.drawer__login svg { width: 19px; height: 19px; }
.drawer__login .chev { margin-inline-start: auto; width: 16px; height: 16px; opacity: .6; }
.drawer__login:hover { background: var(--blue); color: #fff; }
.drawer__body { padding-bottom: var(--space-s); }

.side-card__body { padding-top: var(--space-s); }

/* ========================= PRODUCT SUPPORT CARD ======================== */
.support-card { text-align: center; }
.support-card__ico {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin: 0 auto var(--space-xs);
  border-radius: 30px;
  color: #fff;
  background: linear-gradient(145deg, var(--blue), color-mix(in srgb, var(--blue) 62%, #000));
  box-shadow: 0 18px 34px -20px color-mix(in srgb, var(--blue) 80%, transparent),
              inset 0 1px 0 color-mix(in srgb, #fff 22%, transparent);
}
.support-card__ico svg { width: 42px; height: 42px; }
.support-card__pulse {
  position: absolute;
  bottom: 12px;
  inset-inline-end: 12px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-pill);
  background: var(--ok);
  border: 3px solid var(--surface);
}
.support-card__pulse::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 2px solid var(--ok);
  animation: sup-pulse 2s var(--ease-out) infinite;
}
@keyframes sup-pulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.1); opacity: 0; } }

.support-card__name { font-size: var(--step-1); margin-bottom: 2px; }
.support-card__role { font-size: var(--step--1); color: var(--orange-ink); font-weight: 600; margin-bottom: var(--space-2xs); }
.support-card__note { font-size: var(--step--1); color: var(--ink-2); line-height: 1.8; margin-bottom: var(--space-s); }

.support-card__actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2xs); }
.support-card__actions:empty { display: none; }

.support-card__phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  margin-top: var(--space-xs);
  min-height: 48px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--blue) 7%, var(--surface));
  border: var(--card-border);
  font-weight: 700;
  font-size: var(--step-0);
  color: var(--blue);
}
.support-card__phone:hover { background: var(--blue); color: #fff; }
.support-card__phone:hover svg { animation: ic-ring var(--dur-slow) var(--ease); }
.support-card__phone svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) { .support-card__pulse::after { animation: none; } }

/* ============================ MISC POLISH ============================== */
/* Keep anchor jumps clear of the sticky header. */
section[id], [id^="cat"] { scroll-margin-top: calc(var(--header-h) + var(--topbar-h) + var(--space-s)); }
@media (max-width: 1024px) { section[id] { scroll-margin-top: calc(var(--header-h) + var(--space-s)); } }
.sec-head .slider-arrows { flex: none; }
.sec-head__eyebrow { letter-spacing: .01em; }
.btn { letter-spacing: -.005em; }
.btn--outline { border-color: color-mix(in srgb, var(--blue) 24%, transparent); }

/* Softer focus ring everywhere. */
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .cat-card:hover .cat-card__media img,
  .cat-card:hover .cat-card__go,
  .tabbar__item.is-active svg { animation: none; transform: none; }
}
