/* Reset و فونت */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
@font-face {
  font-family: 'titr';
  src: url('fonts/B Titr Bold_0.ttf') format('ttf');
}
@font-face {
  font-family: 'iran';
  src: url('fonts/fa-Iran-sans-web-bold.woff2') format('woff2');
}
@font-face {
  font-family: 'vazir';
  src: url('fonts/Vazirmatn-Bold.woff2') format('woff2');
}
body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    text-align: right; /* برای راست چین شدن محتوا */
}
/* استایل پیشرفته برای کارت‌های خودرو */
.peugeot-206-container {
    perspective: 1000px;
    margin: 4rem 0;
}

.cards-wrapper {
    justify-content:center;
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    padding: 1rem;
}
.transmission-type {
    color: red;
    font-weight: bold;
}
.engine-card {
    position: relative;
    width: 320px;
    min-height: 480px;
    height: auto;
    transform-style: preserve-3d;
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

/* رنگ‌های مختلف برای کارت‌ها */
.engine-card:nth-child(1) {
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
}

.engine-card:nth-child(2) {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.engine-card:nth-child(3) {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}
.engine-card:nth-child(4) {
    background: linear-gradient(135deg, pink 0%, red 100%);
}
.engine-card:nth-child(5) {
    background: linear-gradient(135deg, gray 0%, blaCK 100%);
}
.engine-card:hover {
    transform: translateY(-15px) rotateX(5deg) rotateY(-5deg);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.2);
}

.engine-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    z-index: 2;
    pointer-events: none;
}

.engine-header {
    height: 250px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* افکت شیشه‌ای برای هدر کارت */
.engine-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1;
}

.engine-title {
    font-family: 'titr' !important;
    font-size: 1.8rem;
    color: white;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 3;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.engine-subtitle {
    font-family: 'vazir' !important;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    position: relative;
    z-index: 3;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.car-models {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.2rem;
    position: relative;
    z-index: 3;
}

.model-badge {
    font-family: 'vazir' !important;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.model-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.engine-specs {
    padding: 2rem;
    height: 55%;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.spec-item::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #1e3c72 0%, #2a5298 100%);
    transition: width 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.spec-item:hover::after {
    width: 100%;
    right: auto;
    left: 0;
}

.spec-label {
    font-family: 'vazir' !important;
    color: #666;
    font-weight: 500;
    font-size: 0.95rem;
}

.spec-value {
    font-family: 'vazir' !important;
    color: #1e3c72;
    font-weight: bold;
    font-size: 1rem;
}

/* استایل دکمه‌های کارت */
.detail-btn {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 3rem);
    text-align: center;
    color: white;
    padding: 1rem;
    border-radius: 10px;
    text-decoration: none;
    font-family: 'vazir' !important;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 3;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    opacity: 0;
    border: none;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

/* رنگ دکمه‌ها بر اساس کارت والد */
.engine-card:nth-child(1) .detail-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.4);
}

.engine-card:nth-child(2) .detail-btn {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    box-shadow: 0 10px 25px rgba(46, 204, 113, 0.4);
}

.engine-card:nth-child(3) .detail-btn {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    box-shadow: 0 10px 25px rgba(243, 156, 18, 0.4);
}
.engine-card:nth-child(4) .detail-btn {
    background: linear-gradient(135deg, pink 0%, red 100%);
    box-shadow: 0 10px 25px rgba(173,1,1,1);
}
.engine-card:nth-child(5) .detail-btn {
    background: linear-gradient(135deg, gray 0%, black 100%);
    box-shadow: 0 10px 25px rgba(106,106,106,1);
}
/* افکت نورانی برای دکمه‌ها */
.detail-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255,255,255,0.3), 
        transparent);
    transition: all 0.6s ease;
}

.detail-btn:hover::before {
    left: 100%;
}

/* آیکون برای دکمه */
.detail-btn::after {
    content: '→';
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.detail-btn:hover::after {
    transform: translateX(5px);
}

/* افکت hover برای دکمه‌ها */
.detail-btn:hover {
    transform: translateX(-50%) translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

/* انیمیشن ظاهر شدن دکمه */
.engine-card:hover .detail-btn {
    bottom: 1.5rem;
    opacity: 1;
    animation: btnAppear 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes btnAppear {
    0% { 
        bottom: -50px;
        opacity: 0;
        transform: translateX(-50%) scale(0.8);
    }
    70% {
        transform: translateX(-50%) scale(1.05);
    }
    100% { 
        bottom: 1.5rem;
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

/* افکت هولوگرافیک روی کارت‌ها */
.engine-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.1) 50%,
        rgba(255,255,255,0) 100%
    );
    transform: translateX(-100%) skewX(-15deg);
    transition: all 0.8s ease;
}

.engine-card:hover::after {
    transform: translateX(100%) skewX(-15deg);
}

/* انیمیشن شناور */
@keyframes float {
    0% { transform: translateY(0) rotateX(0) rotateY(0); }
    50% { transform: translateY(-20px) rotateX(5deg) rotateY(5deg); }
    100% { transform: translateY(0) rotateX(0) rotateY(0); }
}

.engine-card {
    animation: float 6s ease-in-out infinite;
}

.engine-card:nth-child(1) { animation-delay: 0s; }
.engine-card:nth-child(2) { animation-delay: 0.2s; }
.engine-card:nth-child(3) { animation-delay: 0.4s; }
.engine-card:nth-child(4) { animation-delay: 0.6s; }
.engine-card:nth-child(5) { animation-delay: 0.8s; }

/* افکت نور پس‌زمینه */
.engine-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(255,255,255,0.3) 0%,
        rgba(255,255,255,0) 70%
    );
    transform: scale(0);
    transition: transform 0.8s ease;
    z-index: 1;
}

.engine-card:hover::before {
    transform: scale(1);
}

/* رسپانسیو */
@media (max-width: 768px) {
    .engine-card {
        width: 280px;
        height: 440px;
    }
    
    .engine-header {
        padding: 1.5rem;
    }
    
    .engine-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .engine-card {
        width: 260px;
        height: 420px;
    }
    
    .engine-header {
        padding: 1.2rem;
    }
    
    .engine-title {
        font-size: 1.3rem;
    }
    
    .spec-item {
        padding: 0.6rem 0;
    }
}