﻿* {
    box-sizing: border-box;
}

@font-face {
    font-family: 'oldstandardtt-regular';
    src: url('../fonts/oldstandardtt-regular.ttf') format('truetype');
}

@font-face {
    font-family: 'robotoserif-regular';
    src: url('../fonts/robotoserif-regular.ttf') format('truetype');
}

body {
    font-family: robotoserif-regular !important;
    letter-spacing: 2px;
    margin: 0;
    background: #fff;
}



.container {
    max-width: 1600px;
    margin: auto;
    padding: 15px;
    padding-top: 0;
}

/* ================= TOP BAR LAYOUT ================= */

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    position: relative;
}


/* ================= GALLERY LAYOUT ================= */
.gallery-layout {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}



/* ================= MEDIA TABS ================= */

.media-tabs {
    /* حذف float و position قبلی */
    float: none;
    position: static;
    left: auto;
    transform: none;
    /* حالت عمودی */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin: 0;
    padding: 10px;
    /* ثابت کردن عرض */
    flex-shrink: 0;
    width: 70px; /* عرض دلخواه */
    margin-top: 200px;
}




    /* ================= MOVING INDICATOR ================= */

    .media-tabs::before {
        top: 0;
        left: 0;
        height: var(--h, 0px);
        width: 100%;
        transform: translateY(var(--y, 0px));
        background: linear-gradient(135deg,#0f172a,#1e293b,#111827);
        border-radius: 16px;
        z-index: 0;
        transition: transform .6s cubic-bezier(.19,1,.22,1), height .6s cubic-bezier(.19,1,.22,1);
        box-shadow: 0 18px 40px rgba(15,23,42,.25),0 6px 16px rgba(0,0,0,.15);
    }

#slidesContainer {
    flex: 1;
    min-width: 0; /* جلوگیری از overflow */
}

/* ================= TAB BUTTON ================= */

.tab-btn {
    border: none;
    background: transparent;
    padding: 12px 18px;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .25s ease;
}

    .tab-btn img {
        width: 26px;
        height: 26px;
    }

    .tab-btn:hover {
        background: radial-gradient(circle, rgba(99, 101, 241, 0.479), transparent 50%);
        transform: none;
    }

    .tab-btn.active {
        background: radial-gradient(circle, rgba(99, 101, 241, 0.479), transparent 60%);
        transform: scale(1.15);
        color: #e2e8f0;
        pointer-events: none;
        cursor: default;
    }

    .tab-btn::after {
        display: none;
    }

    .tab-btn.active:hover {
        transform: scale(1.15);
    }



.slide-image video {
    height: auto !important;
}




/* ================= RESPONSIVE ================= */

@media(max-width:768px) {

    .top-bar {
        gap: 8px;
    }

    .container {
        padding: 15px !important;
    }

    .gallery-layout {
        flex-direction: column; /* برگشت به حالت ستونی */
        gap: 10px;
    }
    /* تب‌ها جمع‌تر */
    .media-tabs {
        flex-direction: row; /* افقی در موبایل */
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
        width: 100%;
        max-width: 100%;
        padding: 0 10px;
    }

        .media-tabs::before {
            top: 0;
            left: var(--x, 0px);
            height: 100%;
            width: var(--w, 0px);
            transform: translateX(var(--x, 0px));
            transition: transform .6s, width .6s;
        }

    #slidesContainer {
        width: 100%;
    }

    .tab-btn {
        padding: 8px 10px;
    }

        .tab-btn img {
            width: 20px;
            height: 20px;
        }
}
/* خیلی کوچک (موبایل خیلی باریک) */
@media(max-width:420px) {

    .media-tabs {
        gap: 5px;
    }

    .container {
        padding: 15px !important;
    }

    .tab-btn {
        padding: 6px 8px;
    }

        .tab-btn img {
            width: 18px;
            height: 18px;
        }
}




@media(max-width:768px) {
    /* ================= TOP BAR ================= */

    body {
        margin: 0;
        padding: 0;
    }


    .container {
        padding: 15px !important;
    }

    .top-bar {
        display: flex;
        flex-direction: column; /* 👈 کل ساختار ستونی */
        align-items: center;
        justify-content: center;
        gap: 10px;
    }
    /* ================= MEDIA TABS ================= */

    .media-tabs {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap; /* 👈 جلوگیری از overflow */
        gap: 6px;
        width: 100%;
        max-width: 100%;
        padding: 0 10px;
        margin: 0;
    }
    /* دکمه‌ها */
    .tab-btn {
        flex: 0 1 auto;
        padding: 6px 10px;
    }

        .tab-btn img {
            width: 18px;
            height: 18px;
        }
    /* جلوگیری از هرگونه اسکرول افقی */
    html, body {
        overflow-x: hidden;
    }
}
/* ================= SLIDES ================= */

.mySlides {
    display: none;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
}

.slide-content {
    display: flex;
    align-items: center;
    min-height: 650px;
}

.slide-image {
    width: 65%;
    padding: 20px;
    position: relative;
    text-align: center;
    box-sizing: content-box;
}

    .slide-image img,
    .slide-image video {
        width: 100%;
        height: 600px;
        object-fit: contain;
    }

.slide-description {
    width: 35%;
    padding: 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
}

.slide-image .prev {
    left: 15px;
}

.slide-image .next {
    right: 15px;
}
/* ================= THUMBNAILS ================= */

.row {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 15px 5px;
    margin-top: 15px;
    scroll-behavior: smooth;
}

.column {
    flex: 0 0 auto;
}

.demo {
    width: 120px;
    height: 85px;
    border-radius: 10px;
    cursor: pointer;
    object-fit: cover;
    opacity: .6;
    transition: .3s;
}

    .demo:hover, .active {
        opacity: 1;
        transform: scale(1.05);
    }

.divider {
    flex: 0 0 auto;
    width: 4px;
    height: 80px;
    background: #0f172a;
    margin: 0 10px;
    border-radius: 10px;
}

.divider_v {
    width: 100%;
    height: 1px;
    background: #0f172a96;
    margin: 0 10px;
}
/* mobile */
@media(max-width:768px) {
    .slide-content {
        flex-direction: column;
    }

    .slide-image, .slide-description {
        width: 100%;
    }

        .slide-image img, .slide-image video {
            height: 320px;
        }

    .divider_v {
        width: 100%;
        height: 1px;
        background: #0f172a96;
        margin: 10px auto;
        display: block;
    }
}


@media(max-width:768px) {

    .slide-content {
        gap: 15px !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .slide-image {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 auto !important;
    }

        .slide-image img,
        .slide-image video {
            width: 100% !important;
            height: auto !important;
            max-height: 420px !important;
            display: block;
            margin: 0 auto;
        }

    .slide-description {
        width: 100% !important;
        margin-top: 15px !important;
        padding: 0 15px !important;
        text-align: center;
    }

    video {
        display: block;
        margin: 0;
        padding: 0;
    }
}







@media (max-width: 900px) and (orientation: landscape) {

    .container {
        padding: 15px !important;
    }

    .slide-image img,
    .slide-image video {
        width: 100% !important;
        height: auto !important;
        max-height: 420px !important;
        display: block;
        margin: 0 auto;
    }


    video {
        display: block;
        margin: 0;
        padding: 0;
    }

    .media-tabs {
        transform: none;
    }
}
