/* =============================================================================
   بخش «چرا آذرنجات» صفحه‌ی اصلی — ویترین سه‌بعدی طلایی (components/sections/home/whyus.php)
   فقط روی pages/home.php، بعد از luxury.css. همه زیر .azw.
   قواعد: فقط transform/opacity متحرک؛ صفحه‌های سه‌بعدی موازی (بدون تقاطع)؛ perspective داخل transform.
   ========================================================================== */
.azw {
    --azw-navy: #0F172A;
    --azw-navy2: #1E293B;
    --azw-gold: #C8A45D;
    --azw-gold-hi: #F3DDA0;
    --azw-gold-lo: #94742F;
    --azw-ink: #7C6128;
    position: relative;
    overflow: hidden;
    padding: 88px 0 96px;
    background:
        radial-gradient(60% 50% at 50% 0%, rgba(200, 164, 93, .14), transparent 70%),
        linear-gradient(rgba(15, 23, 42, .035) 1px, transparent 1px) 0 0 / 44px 44px,
        linear-gradient(90deg, rgba(15, 23, 42, .035) 1px, transparent 1px) 0 0 / 44px 44px,
        #F8F8F6;
}

.azw__wrap {
    position: relative;
}

/* ---------- سرتیتر ---------- */
.azw__head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 56px;
}

.azw__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid rgba(200, 164, 93, .55);
    border-radius: 999px;
    background: #fff;
    color: var(--azw-ink);
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 6px 18px -10px rgba(124, 97, 40, .5);
}

.azw__eyebrow i {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--azw-gold);
}

.azw__eyebrow i::after,
.azw__badge i::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    animation: azw-ping 1.8s ease-out infinite;
}

@keyframes azw-ping {
    from { transform: scale(1); opacity: .8; }
    to { transform: scale(3); opacity: 0; }
}

.azw__title {
    margin: 18px 0 12px;
    color: var(--azw-navy) !important;
    font-size: clamp(28px, 3.4vw, 42px);
    font-weight: 900;
    line-height: 1.5;
}

.azw__title span {
    color: var(--azw-ink);
    background: linear-gradient(180deg, #9C7B33, #6B5220);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.azw__lead {
    margin: 0;
    color: #4B5563 !important;
    line-height: 2;
}

/* ---------- ریل مزیت‌ها + نوار قلب ---------- */
/* نوار قلب زیر کاشی‌ها = جداکننده‌ی زنده بین مزیت‌ها و کارت‌ها */
.azw__rail {
    position: relative;
    padding-bottom: 96px;
}

.azw__ecg,
.azw__pulse {
    position: absolute;
    bottom: 8px;
    height: 72px;
    pointer-events: none;
}

.azw__ecg {
    inset-inline: 0;
    width: 100%;
}

.azw__ecg path,
.azw__pulse path {
    fill: none;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.azw__ecg path {
    stroke: rgba(200, 164, 93, .45);
    stroke-width: 2;
}

/* پالس: پنجره‌ی باریک که حرکت می‌کند و svg داخلش خلاف آن — خط ثابت می‌ماند، نور می‌دود */
.azw__pulse {
    left: 0;
    width: 16%;
    overflow: hidden;
    -webkit-mask: linear-gradient(90deg, transparent, #000 45%, #000 55%, transparent);
    mask: linear-gradient(90deg, transparent, #000 45%, #000 55%, transparent);
    animation: azw-win 4.2s linear infinite;
}

.azw__pulse svg {
    display: block;
    width: 625%;
    height: 100%;
    animation: azw-win-in 4.2s linear infinite;
}

.azw__pulse path {
    stroke: #E9C670;
    stroke-width: 3.5;
    filter: drop-shadow(0 0 4px rgba(233, 198, 112, .9));
}

@keyframes azw-win {
    from { transform: translateX(625%); }
    to { transform: translateX(-100%); }
}

@keyframes azw-win-in {
    from { transform: translateX(-100%); }
    to { transform: translateX(16%); }
}

.azw__grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.azw__tile {
    position: relative;
}

.azw__tile-body {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    height: 100%;
    padding: 26px 12px 22px;
    border: 1px solid rgba(200, 164, 93, .35);
    border-radius: 20px;
    background: linear-gradient(180deg, #fff 0%, #FBF9F4 100%);
    text-align: center;
    /* لبه‌ی پایینی = ضخامت دکمه‌ای کارت */
    box-shadow:
        inset 0 1px 0 #fff,
        0 6px 0 -1px #E8DFCB,
        0 7px 0 -1px rgba(200, 164, 93, .45),
        0 22px 34px -16px rgba(15, 23, 42, .35);
    transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0));
    transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s;
}

.azw__tile:hover {
    --lift: -8px;
}

.azw__tile:hover .azw__tile-body {
    box-shadow:
        inset 0 1px 0 #fff,
        0 6px 0 -1px #E8DFCB,
        0 7px 0 -1px rgba(200, 164, 93, .7),
        0 34px 40px -18px rgba(15, 23, 42, .45);
}

/* مدال: هسته‌ی سرمه‌ای + قاب طلای فلزی + برق */
.azw__medal {
    position: relative;
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    border: 3px solid transparent;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, #2B3A55 0%, var(--azw-navy) 70%) padding-box,
        conic-gradient(from 200deg, var(--azw-gold-hi), var(--azw-gold), var(--azw-gold-lo), var(--azw-gold-hi), var(--azw-gold-lo), var(--azw-gold-hi)) border-box;
    box-shadow: 0 10px 18px -8px rgba(15, 23, 42, .6), 0 0 0 5px rgba(200, 164, 93, .12);
    transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}

.azw__medal::after {
    content: "";
    position: absolute;
    inset: 3px 8px 50% 8px;
    border-radius: 50% 50% 40% 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, .28), transparent);
    pointer-events: none;
}

.azw__tile:hover .azw__medal {
    transform: translateY(-3px) rotateY(180deg);
}

.azw__icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(160deg, var(--azw-gold-hi), var(--azw-gold) 55%, var(--azw-gold-lo));
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
    transition: transform .5s;
}

.azw__tile:hover .azw__icon {
    transform: rotateY(180deg);
}

.azw__label {
    color: #4B5563;
    font-size: 14px;
    line-height: 1.8;
}

.azw__label b {
    display: block;
    color: var(--azw-navy);
    font-size: 16px;
    font-weight: 800;
}

.azw__num {
    position: absolute;
    top: 10px;
    inset-inline-start: 14px;
    color: var(--azw-ink);
    font-size: 12px;
    font-weight: 700;
    opacity: .55;
}

/* ---------- دو کارت سه‌بعدی ---------- */
.azw__cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 8px;
}

.azw__card {
    display: block;
    height: 270px;
    color: #fff;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.azw__card-3d {
    position: relative;
    display: block;
    height: 100%;
    border-radius: 24px;
    background: var(--azw-navy);
    transform-style: preserve-3d;
    transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform .6s cubic-bezier(.2, .8, .2, 1), box-shadow .6s;
    box-shadow:
        0 0 0 1px rgba(200, 164, 93, .35),
        0 30px 50px -24px rgba(15, 23, 42, .55);
}

.azw__card:hover .azw__card-3d,
.azw__card:focus-visible .azw__card-3d {
    box-shadow:
        0 0 0 1px rgba(200, 164, 93, .7),
        0 40px 60px -26px rgba(15, 23, 42, .65),
        0 0 40px -10px rgba(200, 164, 93, .35);
}

.azw__card:focus-visible {
    outline: none;
}

.azw__card:focus-visible .azw__card-3d {
    outline: 3px solid var(--azw-gold);
    outline-offset: 4px;
}

.azw__photo {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
}

.azw__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.08) brightness(.9);
    transition: transform 1.2s cubic-bezier(.2, .8, .2, 1);
}

.azw__card--care .azw__photo img { object-position: left center; }
.azw__card--amb .azw__photo img { object-position: right center; }

.azw__card:hover .azw__photo img {
    transform: scale(1.06);
}

/* پوشش سرمه‌ای + ته‌رنگ طلایی؛ سمت متن تیره‌تر */
.azw__photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(var(--azw-dir, 270deg), rgba(15, 23, 42, .96) 0%, rgba(15, 23, 42, .78) 45%, rgba(15, 23, 42, .2) 100%),
        linear-gradient(0deg, rgba(200, 164, 93, .22), rgba(200, 164, 93, 0) 60%);
}

.azw__card--care { --azw-dir: 270deg; }
.azw__card--amb { --azw-dir: 90deg; }

/* نوار نور طلایی که هنگام hover از روی کارت رد می‌شود */
.azw__sweep {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
}

.azw__sweep::before {
    content: "";
    position: absolute;
    top: -20%;
    bottom: -20%;
    left: 0;
    width: 30%;
    background: linear-gradient(100deg, transparent, rgba(243, 221, 160, .28), transparent);
    transform: translateX(-120%) skewX(-18deg);
}

.azw__card:hover .azw__sweep::before {
    transform: translateX(420%) skewX(-18deg);
    transition: transform 1.1s cubic-bezier(.3, .6, .2, 1);
}

/* گوشه‌های طلایی مانیتوری — جلوتر از عکس */
.azw__corners {
    position: absolute;
    inset: 16px;
    transform: translateZ(28px);
    pointer-events: none;
}

.azw__corners i {
    position: absolute;
    width: 26px;
    height: 26px;
    border: 0 solid var(--azw-gold);
}

.azw__corners i:nth-child(1) { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; border-top-right-radius: 10px; }
.azw__corners i:nth-child(2) { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; border-top-left-radius: 10px; }
.azw__corners i:nth-child(3) { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; border-bottom-right-radius: 10px; }
.azw__corners i:nth-child(4) { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; border-bottom-left-radius: 10px; }

/* پلاک متن — شناور جلوی کارت */
.azw__plate {
    position: absolute;
    top: 50%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    max-width: 62%;
    padding: 0 44px;
    transform: translateY(-50%) translateZ(56px);
}

.azw__card--care .azw__plate { right: 0; }
.azw__card--amb .azw__plate { left: 0; }

.azw__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border: 1px solid rgba(200, 164, 93, .5);
    border-radius: 999px;
    background: rgba(15, 23, 42, .7);
    color: #F3DDA0;
    font-size: 12px;
    font-weight: 700;
}

.azw__badge i {
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--azw-gold);
}

.azw__card-title {
    color: #fff;
    font-size: clamp(20px, 2vw, 27px);
    font-weight: 800;
    line-height: 1.6;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .45);
}

.azw__card-title b {
    display: block;
    color: var(--azw-gold);
}

.azw__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 22px;
    border-radius: 999px;
    background: linear-gradient(180deg, #D9B96E, var(--azw-gold) 60%, #B68E45);
    color: var(--azw-navy);
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 10px 22px -10px rgba(200, 164, 93, .9), inset 0 1px 0 rgba(255, 255, 255, .45);
    transition: transform .35s;
}

.azw__card:hover .azw__btn {
    transform: translateX(-4px);
}

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 1023px) {
    .azw { padding: 64px 0 72px; }
    .azw__head { margin-bottom: 40px; }
    .azw__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
    .azw__rail { padding-bottom: 72px; }
    .azw__ecg, .azw__pulse { height: 52px; bottom: 6px; }
    .azw__cards { grid-template-columns: 1fr; gap: 18px; margin-top: 4px; }
}

@media (max-width: 640px) {
    .azw__tile-body { padding: 18px 6px 16px; gap: 10px; border-radius: 16px; }
    .azw__medal { width: 54px; height: 54px; }
    .azw__icon { width: 26px; height: 26px; }
    .azw__label { font-size: 12px; }
    .azw__label b { font-size: 13.5px; }
    .azw__num { display: none; }
    .azw__card { height: 200px; }
    .azw__plate { max-width: 78%; padding: 0 24px; gap: 9px; }
    .azw__corners { inset: 10px; }
    .azw__btn { padding: 7px 18px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .azw__pulse, .azw__eyebrow i::after, .azw__badge i::after { animation: none; }
    .azw__pulse { display: none; }
    .azw__tile-body, .azw__card-3d, .azw__medal, .azw__icon, .azw__photo img { transition: none; }
}
