﻿/* =================================================================
   NEWS & DISCOUNT CODES PAGE - صفحه کدهای تخفیف و اخبار
   استایل‌های مخصوص صفحه اخبار و کدهای تخفیف با تم سفید و طلایی
   این کدها را به انتهای فایل base.css اضافه کنید
================================================================= */

/* متغیرهای اختصاصی صفحه اخبار */
:root {
    --news-gold-primary: #5A080C;
    --news-gold-secondary: #8B1820;
    --news-gold-dark: #3D0508;
    --news-white-bg: #ffffff;
    --news-cream: #faf8f5;
    --news-beige: #f5f0e8;
    --news-text-light: #6b6b6b;
    --news-text-dark: #2d2d2d;
    --news-card-bg: rgba(255, 255, 255, 0.98);
}

/* بک‌گراند اصلی صفحه اخبار */
.nebula-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: linear-gradient(135deg, #ffffff 0%, #faf8f5 50%, #f5f0e8 100%);
    pointer-events: none;
}

.nebula-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(90, 8, 12, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(90, 8, 12, 0.06) 0%, transparent 50%),
        repeating-linear-gradient(45deg, transparent, transparent 100px, rgba(90, 8, 12, 0.02) 100px, rgba(90, 8, 12, 0.02) 102px);
}

/* ستاره‌های پس‌زمینه */
.stars {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(90, 8, 12, 0.3), transparent),
        radial-gradient(1.5px 1.5px at 60% 70%, rgba(90, 8, 12, 0.2), transparent),
        radial-gradient(1px 1px at 40% 50%, rgba(90, 8, 12, 0.25), transparent);
    background-size: 200px 200px, 300px 300px, 250px 250px;
    animation: newsStarsMove 60s linear infinite;
}

@keyframes newsStarsMove {
    0% {
        background-position: 0 0, 0 0, 0 0;
    }
    100% {
        background-position: 200px 200px, -300px 300px, 250px -250px;
    }
}

/* خط طلایی درخشان */
.golden-line {
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--news-gold-primary), transparent);
    background-size: 200% 100%;
    animation: newsShine 3s linear infinite;
    position: absolute;
    left: 0;
    right: 0;
    box-shadow: 0 2px 10px rgba(90, 8, 12, 0.3);
}

@keyframes newsShine {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* عنوان بخش */
.section-title {
    position: relative;
    display: inline-block;
    font-weight: 900;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--news-gold-dark), var(--news-gold-primary), var(--news-gold-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2.5rem;
    padding-bottom: 0.8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60%;
    height: 4px;
    background: linear-gradient(90deg, var(--news-gold-primary), transparent);
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(90, 8, 12, 0.4);
}

/* کارت‌های تخفیف و اخبار */
.promo-card,
.news-card {
    background: var(--news-card-bg);
    border: 2px solid rgba(90, 8, 12, 0.2);
    border-radius: 1.2rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    backdrop-filter: blur(10px);
    height: 100%;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(90, 8, 12, 0.1);
    position: relative;
}

.promo-card::before,
.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(90, 8, 12, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.promo-card:hover,
.news-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 45px rgba(90, 8, 12, 0.25);
    border-color: var(--news-gold-primary);
}

.promo-card:hover::before,
.news-card:hover::before {
    opacity: 1;
}

/* تصاویر کارت */
.card-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    position: relative;
}

.promo-card:hover .card-img,
.news-card:hover .card-img {
    transform: scale(1.1);
}

/* بادج تخفیف */
.badge-discount {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, var(--news-gold-primary), var(--news-gold-secondary));
    color: var(--news-white-bg);
    font-weight: 800;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.95rem;
    z-index: 10;
    box-shadow: 0 5px 15px rgba(90, 8, 12, 0.4);
    animation: newsPulse 2s ease-in-out infinite;
}

@keyframes newsPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(90, 8, 12, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 25px rgba(90, 8, 12, 0.6);
    }
}

/* بدنه کارت */
.card-body {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
    background: var(--news-white-bg);
}

/* عنوان کارت */
.card-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--news-gold-primary);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
    line-height: 1.6;
}

.promo-card:hover .card-title,
.news-card:hover .card-title {
    color: var(--news-gold-dark);
}

/* متن کارت */
.card-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--news-text-light);
    margin-bottom: 1rem;
}

/* متن طلایی */
.text-gold {
    color: var(--news-gold-primary) !important;
    font-weight: 600;
}

/* متن روشن */
.text-light {
    color: var(--news-text-dark) !important;
}

/* دکمه مشاهده */
.btn-view {
    background: transparent;
    border: 2px solid var(--news-gold-primary);
    color: var(--news-gold-primary);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    margin-top: 1rem;
    width: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-view::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--news-gold-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: -1;
}

.btn-view:hover {
    color: var(--news-white-bg);
    border-color: var(--news-gold-primary);
    box-shadow: 0 5px 15px rgba(90, 8, 12, 0.3);
}

.btn-view:hover::before {
    width: 300px;
    height: 300px;
}

/* باکس کد تخفیف */
.bg-dark {
    background: linear-gradient(135deg, rgba(90, 8, 12, 0.08), rgba(250, 248, 245, 0.8)) !important;
}

.border-gold {
    border-color: var(--news-gold-primary) !important;
}

.border-dashed {
    border-style: dashed !important;
}

/* خط جداکننده */
hr.border-gold {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--news-gold-primary), transparent);
    border: none;
    opacity: 1 !important;
    margin: 3rem 0;
    box-shadow: 0 2px 10px rgba(90, 8, 12, 0.3);
}

/* پیام خالی */
.alert-info {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(250, 248, 245, 0.95)) !important;
    border: 2px solid var(--news-gold-primary) !important;
    border-radius: 20px;
    padding: 3rem !important;
    box-shadow: 0 15px 35px rgba(90, 8, 12, 0.15);
}

.alert-info i {
    color: var(--news-gold-primary) !important;
    filter: drop-shadow(0 4px 10px rgba(90, 8, 12, 0.3));
}

.alert-info h4 {
    color: var(--news-text-dark) !important;
    font-weight: 800;
    margin-top: 1rem;
}

.alert-info p {
    color: var(--news-text-light) !important;
}

/* لینک‌های کارت */
.promo-card a,
.news-card a {
    text-decoration: none;
    color: inherit;
}

/* انیمیشن Fade In Up */
@keyframes newsFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    opacity: 0;
    animation: newsFadeInUp 0.8s ease forwards;
}

/* تنظیم تاخیر انیمیشن */
.animate-fadeInUp:nth-child(1) {
    animation-delay: 0.1s;
}

.animate-fadeInUp:nth-child(2) {
    animation-delay: 0.2s;
}

.animate-fadeInUp:nth-child(3) {
    animation-delay: 0.3s;
}

.animate-fadeInUp:nth-child(4) {
    animation-delay: 0.4s;
}

/* عنوان بخش‌ها */
.h4.text-gold {
    color: var(--news-gold-primary) !important;
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.h4.text-gold::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80px;
    height: 3px;
    background: var(--news-gold-primary);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(90, 8, 12, 0.3);
}

/* تاریخ و متن کوچک */
small {
    font-size: 0.85rem;
}

small.text-gold {
    display: block;
    margin-top: 0.5rem;
    font-weight: 600;
}

/* کانتینر */
.container {
    position: relative;
    z-index: 1;
}

/* opacity */
.opacity-75 {
    opacity: 1 !important;
    color: var(--news-text-light);
}

/* افکت hover برای لینک‌ها */
a.text-decoration-none:hover {
    text-decoration: none !important;
}

/* باکس جزئیات کد تخفیف */
.mt-3.p-3 {
    transition: all 0.3s ease;
}

.promo-card:hover .mt-3.p-3 {
    background: linear-gradient(135deg, rgba(90, 8, 12, 0.12), rgba(250, 248, 245, 0.9)) !important;
}

/* تنظیمات grid */
.g-4 {
    --bs-gutter-y: 1.5rem;
    --bs-gutter-x: 1.5rem;
}

/* Responsive */
@media (max-width: 992px) {
    .section-title {
        font-size: 2rem;
    }
    
    .h4.text-gold {
        font-size: 1.5rem;
    }
    
    .card-img {
        height: 180px;
    }
    
    .card-body {
        padding: 1.2rem;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 1.7rem;
        margin-bottom: 2rem;
    }
    
    .section-title::after {
        width: 80%;
    }
    
    .h4.text-gold {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
    
    .card-img {
        height: 160px;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .card-text {
        font-size: 0.9rem;
    }
    
    .btn-view {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    .badge-discount {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .alert-info {
        padding: 2rem !important;
    }
    
    .alert-info i {
        font-size: 2.5rem !important;
    }
    
    .alert-info h4 {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.5rem;
    }
    
    .h4.text-gold {
        font-size: 1.2rem;
    }
    
    .card-img {
        height: 150px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .card-text {
        font-size: 0.85rem;
        line-height: 1.6;
    }
    
    .btn-view {
        font-size: 0.85rem;
        padding: 0.45rem 0.9rem;
    }
    
    .badge-discount {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
        top: 10px;
        left: 10px;
    }
    
    hr.border-gold {
        margin: 2rem 0;
    }
}

/* افکت‌های اضافی */
.promo-card,
.news-card {
    position: relative;
    overflow: hidden;
}

.promo-card::after,
.news-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(90, 8, 12, 0.05), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    pointer-events: none;
}

.promo-card:hover::after,
.news-card:hover::after {
    left: 100%;
    top: 100%;
}

/* بهبود دسترسی */
.btn-view:focus {
    outline: 2px solid var(--news-gold-primary);
    outline-offset: 2px;
}

/* انیمیشن برای بادج */
@keyframes newsBadgeFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.badge-discount:hover {
    animation: newsBadgeFloat 1s ease infinite;
}

/* افکت shadow برای متن */
.text-light.opacity-75 {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

/* تزئین اضافی برای کارت‌ها */
.card-body small.text-gold {
    transition: all 0.3s ease;
}

.promo-card:hover .card-body small.text-gold,
.news-card:hover .card-body small.text-gold {
    transform: translateX(-3px);
    color: var(--news-gold-dark) !important;
}

/* باکس دریافت کد */
.p-3.bg-dark {
    transition: all 0.3s ease;
}

.p-3.bg-dark .small {
    color: var(--news-text-dark) !important;
}

/* افکت درخشش برای عنوان */
@keyframes newsTitleShine {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(90, 8, 12, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(90, 8, 12, 0.6));
    }
}

.section-title {
    animation: newsTitleShine 3s ease-in-out infinite;
}

/* سایه متحرک برای کارت‌ها */
.promo-card,
.news-card {
    box-shadow: 
        0 10px 25px rgba(90, 8, 12, 0.1),
        0 0 0 1px rgba(90, 8, 12, 0.05);
}

.promo-card:hover,
.news-card:hover {
    box-shadow: 
        0 20px 45px rgba(90, 8, 12, 0.25),
        0 0 50px rgba(90, 8, 12, 0.1);
}