/* Reset کامل */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ساختار کلی اسلایدر - فول صفحه */
.bain-full {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    color: white;
    font-family: "Helvetica Neue", Arial, "Segoe UI", Tahoma, sans-serif;
    margin: 0;
    padding: 0;
    left: 0;
    right: 0;
}

/* بک‌گراندهای متغیر - پایه */
.bain-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: all 1s ease;
    z-index: 1;
}

.bain-bg.active {
    opacity: 1;
    z-index: 2;
}

/* انیمیشن‌های مختلف برای بک‌گراند */

/* فید (پیشفرض) */
.bain-bg.fade {
    opacity: 0;
}
.bain-bg.fade.active {
    opacity: 1;
}

/* زوم این */
.bain-bg.zoom-in {
    transform: scale(1.2);
    opacity: 0;
}
.bain-bg.zoom-in.active {
    opacity: 1;
    transform: scale(1);
}

/* زوم اوت */
.bain-bg.zoom-out {
    transform: scale(0.8);
    opacity: 0;
}
.bain-bg.zoom-out.active {
    opacity: 1;
    transform: scale(1);
}

/* اسلاید از چپ */
.bain-bg.slide-left {
    transform: translateX(100%);
    opacity: 0;
}
.bain-bg.slide-left.active {
    opacity: 1;
    transform: translateX(0);
}

/* اسلاید از راست */
.bain-bg.slide-right {
    transform: translateX(-100%);
    opacity: 0;
}
.bain-bg.slide-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* اسلاید از پایین */
.bain-bg.slide-up {
    transform: translateY(100%);
    opacity: 0;
}
.bain-bg.slide-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* اسلاید از بالا */
.bain-bg.slide-down {
    transform: translateY(-100%);
    opacity: 0;
}
.bain-bg.slide-down.active {
    opacity: 1;
    transform: translateY(0);
}

/* فید و زوم */
.bain-bg.fade-zoom {
    transform: scale(1.1);
    opacity: 0;
}
.bain-bg.fade-zoom.active {
    opacity: 1;
    transform: scale(1);
}

/* محتوای مرکزی - موقعیت‌های مختلف */
.bain-content {
    position: absolute;
    top: 35%;
    text-align: center;
    width: 100%;
    max-width: 100%;
    z-index: 10;
    opacity: 0;
    transition: all 0.8s ease;
    padding: 0 20px;
}

/* موقعیت چپ */
.bain-content.left {
    left: 10%;
    right: auto;
    transform: translateX(0);
    text-align: left;
    max-width: 50%;
}

/* موقعیت راست */
.bain-content.right {
    left: auto;
    right: 10%;
    transform: translateX(0);
    text-align: right;
    max-width: 50%;
}

/* موقعیت مرکز */
.bain-content.center {
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    max-width: 100%;
}

.bain-content.active {
    opacity: 1;
}

/* انیمیشن‌های محتوا */

/* فید این (پیشفرض) */
.bain-content.fade-in {
    opacity: 0;
}
.bain-content.fade-in.active {
    opacity: 1;
}

/* اسلاید از پایین */
.bain-content.slide-up {
    transform: translateY(50px);
    opacity: 0;
}
.bain-content.slide-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* اسلاید از بالا */
.bain-content.slide-down {
    transform: translateY(-50px);
    opacity: 0;
}
.bain-content.slide-down.active {
    opacity: 1;
    transform: translateY(0);
}

/* اسلاید از چپ - برای موقعیت مرکزی */
.bain-content.center.slide-left {
    transform: translateX(-60%);
    opacity: 0;
}
.bain-content.center.slide-left.active {
    opacity: 1;
    transform: translateX(-50%);
}

/* اسلاید از راست - برای موقعیت مرکزی */
.bain-content.center.slide-right {
    transform: translateX(-40%);
    opacity: 0;
}
.bain-content.center.slide-right.active {
    opacity: 1;
    transform: translateX(-50%);
}

/* اسلاید از چپ - برای موقعیت چپ */
.bain-content.left.slide-left {
    transform: translateX(-50px);
    opacity: 0;
}
.bain-content.left.slide-left.active {
    opacity: 1;
    transform: translateX(0);
}

.bain-content.left.slide-right {
    transform: translateX(50px);
    opacity: 0;
}
.bain-content.left.slide-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* اسلاید از راست - برای موقعیت راست */
.bain-content.right.slide-left {
    transform: translateX(50px);
    opacity: 0;
}
.bain-content.right.slide-left.active {
    opacity: 1;
    transform: translateX(0);
}

.bain-content.right.slide-right {
    transform: translateX(-50px);
    opacity: 0;
}
.bain-content.right.slide-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* زوم این */
.bain-content.zoom-in {
    transform: scale(0.8);
    opacity: 0;
}
.bain-content.zoom-in.active {
    opacity: 1;
    transform: scale(1);
}

/* استایل‌های تایپوگرافی */
.bain-content h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    letter-spacing: -0.5px;
}

.bain-content p {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.95);
    line-height: 1.6;
    margin: 0 auto 2rem;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
    max-width: 800px;
    font-weight: 300;
}

/* استایل دکمه */
.bain-button-wrapper {
    margin-top: 2rem;
    text-align: center;
}

.bain-button {
    display: inline-block;
    background-color: #d6001c;
    color: #ffffff;
    padding: 14px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(214, 0, 28, 0.3);
}

.bain-button:hover {
    background-color: #b30017;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(214, 0, 28, 0.4);
    border-color: rgba(255,255,255,0.2);
}

.bain-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(214, 0, 28, 0.3);
}

/* نوار پایین */
.bain-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100vw;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 3rem;
    z-index: 20;
    box-sizing: border-box;
}

.bain-item {
    position: relative;
    cursor: pointer;
    text-align: center;
    min-width: 140px;
    transition: all 0.3s ease;
    padding: 10px 0;
}

.bain-item:hover {
    transform: translateY(-2px);
}

.bain-item.active {
    transform: translateY(-2px);
}

.bain-item span {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
    color: #fff;
    padding-top: 8px;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.bain-item:hover span,
.bain-item.active span {
    color: #d6001c;
}

/* نوار پیشرفت */
.progress-line {
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(255,255,255,0.2);
    overflow: hidden;
    border-radius: 2px;
}

.progress-line .fill {
    height: 100%;
    width: 0%;
    background: #d6001c;
    border-radius: 2px;
    will-change: width;
    transition: none;
}

/* افکت overlay برای خوانایی بهتر */
.bain-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* استایل‌های رسپانسیو */

/* تبلت - افقی */
@media (max-width: 1024px) {
    .bain-content h2 {
        font-size: 2.8rem;
        margin-bottom: 1.2rem;
    }
    
    .bain-content p {
        font-size: 1.2rem;
        max-width: 700px;
        margin-bottom: 1.8rem;
    }
    
    .bain-bottom {
        gap: 2rem;
        padding: 1.5rem 1rem;
    }
    
    .bain-button {
        padding: 12px 28px;
        font-size: 1rem;
    }
    
    .bain-content.left,
    .bain-content.right {
        max-width: 60%;
    }
}

/* تبلت - عمودی */
@media (max-width: 768px) {
    .bain-content {
        top: 30%;
        padding: 0 15px;
    }
    
    .bain-content h2 {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }
    
    .bain-content p {
        font-size: 1.1rem;
        padding: 0 15px;
        max-width: 600px;
        margin-bottom: 1.5rem;
    }
    
    .bain-bottom {
        padding: 1.2rem 0.5rem;
        gap: 1.5rem;
    }
    
    .bain-item {
        min-width: 120px;
        padding: 8px 0;
    }
    
    .bain-item span {
        font-size: 0.95rem;
        padding-top: 6px;
    }
    
    .bain-button {
        padding: 11px 24px;
        font-size: 0.95rem;
    }
    
    .bain-button-wrapper {
        margin-top: 1.5rem;
    }
    
    .bain-content.left,
    .bain-content.right {
        max-width: 70%;
        left: 5%;
        right: 5%;
    }
}

/* موبایل */
@media (max-width: 480px) {
    .bain-full {
        height: 100vh;
    }
    
    .bain-content {
        top: 25%;
        padding: 0 10px;
    }
    
    .bain-content h2 {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
        letter-spacing: -0.3px;
    }
    
    .bain-content p {
        font-size: 1rem;
        padding: 0 10px;
        max-width: 100%;
        margin-bottom: 1.2rem;
        line-height: 1.5;
    }
    
    .bain-bottom {
        padding: 1rem 0.5rem;
        gap: 1rem;
    }
    
    .bain-item {
        min-width: 100px;
        padding: 6px 0;
    }
    
    .bain-item span {
        font-size: 0.85rem;
        padding-top: 4px;
    }
    
    .bain-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .bain-button-wrapper {
        margin-top: 1.2rem;
    }
    
    .bain-content.left,
    .bain-content.right {
        max-width: 90%;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        text-align: center;
    }
}

/* موبایل بسیار کوچک */
@media (max-width: 360px) {
    .bain-content h2 {
        font-size: 1.6rem;
    }
    
    .bain-content p {
        font-size: 0.9rem;
    }
    
    .bain-bottom {
        gap: 0.8rem;
        padding: 0.8rem 0.3rem;
    }
    
    .bain-item {
        min-width: 90px;
    }
    
    .bain-item span {
        font-size: 0.8rem;
    }
    
    .bain-button {
        padding: 9px 18px;
        font-size: 0.85rem;
    }
}

/* حالت لنداسکیپ برای موبایل */
@media (max-height: 500px) and (orientation: landscape) {
    .bain-full {
        height: 100vh;
    }
    
    .bain-content {
        top: 25%;
    }
    
    .bain-content h2 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .bain-content p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .bain-button-wrapper {
        margin-top: 1rem;
    }
    
    .bain-bottom {
        padding: 1rem 0.5rem;
    }
}

/* پشتیبانی از حالت تاریک/روشن */
@media (prefers-color-scheme: dark) {
    .bain-content h2,
    .bain-content p,
    .bain-item span {
        text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
    }
}

/* پشتیبانی از کاهش حرکت */
@media (prefers-reduced-motion: reduce) {
    .bain-bg,
    .bain-content,
    .bain-item,
    .bain-button {
        transition-duration: 0.1s !important;
    }
    
    .bain-bg.zoom-in,
    .bain-bg.zoom-out,
    .bain-bg.slide-left,
    .bain-bg.slide-right,
    .bain-bg.slide-up,
    .bain-bg.slide-down,
    .bain-bg.fade-zoom {
        transform: none !important;
    }
}

/* پشتیبانی از تاچ */
.bain-item {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.bain-button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* بهبود عملکرد انیمیشن‌ها */
.bain-bg,
.bain-content {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000;
}

/* استایل‌های focus برای دسترسی‌پذیری */
.bain-button:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.bain-item:focus {
    outline: 2px solid #d6001c;
    outline-offset: 4px;
    border-radius: 2px;
}

/* حذف اسکرول افقی */
html, body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* استایل برای حالت ادیتور المنتور */
.elementor-editor-active .bain-full {
    min-height: 400px;
}

/* استایل‌های خاص برای مرورگرهای مختلف */

/* Safari */
@supports (-webkit-touch-callout: none) {
    .bain-full {
        height: -webkit-fill-available;
    }
}

/* Firefox */
@-moz-document url-prefix() {
    .bain-bottom {
        background: rgba(0,0,0,0.7);
    }
}

/* Microsoft Edge */
@supports (-ms-ime-align: auto) {
    .bain-bg {
        transform: none;
    }
}

/* انیمیشن‌های ظریف برای تجربه کاربری بهتر */
.bain-content h2 {
    animation: fadeInUp 0.8s ease;
}

.bain-content p {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.bain-button-wrapper {
    animation: fadeInUp 0.8s ease 0.4s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* لودینگ اسکلتون برای زمان لود تصاویر */
.bain-bg:not([style*="background-image"]) {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* استایل برای زمانی که جاوااسکریپت غیرفعال است */
.no-js .bain-bg {
    display: none;
}

.no-js .bain-bg:first-child {
    display: block;
    opacity: 1;
}

.no-js .bain-content {
    display: none;
}

.no-js .bain-content:first-child {
    display: block;
    opacity: 1;
}

.no-js .bain-bottom {
    display: none;
}

/* استایل‌های چاپ */
@media print {
    .bain-full {
        height: auto;
        position: relative;
    }
    
    .bain-bg {
        position: relative;
        height: 300px;
    }
    
    .bain-content {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        color: #000;
        padding: 20px;
    }
    
    .bain-bottom {
        display: none;
    }
    
    .bain-button {
        display: none;
    }
}