/* --- استایل‌های فوق‌العاده جذاب برای ستاره تبلیغ --- */

/* کانتینر اصلی برای ایجاد فضای سه بعدی و مرکزی سازی */
.ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    perspective: 1000px; /* عمق میدان برای افکت 3D */
    background: transparent;
}

/* استایل اصلی ستاره تبلیغاتی */
.ad-star {
    position: relative;
    width: 350px;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transform: rotateY(-15deg) rotateX(10deg); /* زاویه اولیه برای نمایش سه بعدی */
    transition: transform 0.4s ease;
    cursor: pointer;
    filter: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.4)); /* سایه عمیق و نرم */
    -webkit-filter: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.4));
}

/* افکت شناور شدن (hover) روی کانتینر */
.ad-container:hover .ad-star {
    transform: rotateY(0deg) rotateX(0deg) scale(1.05);
}

/* لایه پس زمینه و شکل ستاره */
.ad-star::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #ffc928, #ff9a00); /* گرادینت طلایی زنده */
    clip-path: polygon(
        50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%,
        50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%
    );
    -webkit-clip-path: polygon(
        50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%,
        50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%
    );
    box-shadow: inset 0 0 25px rgba(255, 255, 255, 0.5);
    transform: translateZ(-20px); /* کمی عقب تر برای ایجاد عمق */
}

/* انیمیشن درخشش (شیمر) */
.ad-star::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-30deg);
    -webkit-transform: skewX(-30deg);
    animation: shimmer 4s infinite linear;
    -webkit-animation: shimmer 4s infinite linear;
    animation-delay: 2s;
}

@keyframes shimmer {
    100% { left: 150%; }
}
@-webkit-keyframes shimmer {
    100% { left: 150%; }
}

/* استایل روبان */
.ad-ribbon {
    position: absolute;
    top: 75px;
    left: -40px;
    width: 220px;
    height: 40px;
    background: #d92626;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-45deg);
    -webkit-transform: rotate(-45deg);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    border: 2px solid #fff;
    z-index: 10; /* برای نمایش روی ستاره */
}

.ad-ribbon span {
    color: white;
    font-size: 1.1em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* محتوای اصلی روی ستاره */
.ad-content {
    position: relative;
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateZ(20px); /* کمی جلوتر برای عمق بیشتر */
}

.ad-price {
    margin-top: 40px;
    margin-bottom: 20px;
}

.ad-price .price-value {
    font-size: 4em;
    font-weight: 900;
    color: white;
    line-height: 1;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.ad-price .price-currency {
    font-size: 1.5em;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* دکمه خرید */
.ad-btn {
    padding: 15px 35px;
    background: #e64a19;
    color: white;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 50px;
    border: 3px solid white;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
}

.ad-btn:hover {
    background: #d84315;
    transform: translateY(-5px) scale(1.05);
    -webkit-transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.4);
}

/* --- استایل‌های واکنش‌گرا (Responsive) --- */

@media (max-width: 768px) {
  .cards {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  .card__apple-id {
    width: 90%;
    max-width: 400px;
    margin: 0;
  }
  .header, .hero, .header-content, .ad-container {
    position: static !important;
  }
}

@media (max-width: 480px) {
    .ad-star {
        width: 280px;
        height: 280px;
        transform: rotateY(0) rotateX(0);
        -webkit-transform: rotateY(0) rotateX(0);
    }
    .ad-container:hover .ad-star {
        transform: scale(1.05);
        -webkit-transform: scale(1.05);
    }
    .ad-ribbon {
        top: 55px;
        left: -50px;
        width: 180px;
        font-size: 0.8em;
    }
    .ad-price .price-value {
        font-size: 3.5em;
    }
    .ad-price .price-currency {
        font-size: 1.2em;
    }
    .ad-btn {
        padding: 12px 30px;
        font-size: 1em;
    }
}