/* =========================================
   1. RESET & CORE STYLES
========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.far-landing {
    background-color: #181818;
    color: #f0f0f0;
    font-family: var(--font-main, 'Tahoma', sans-serif) !important;
    overflow: hidden;
    direction: rtl;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    position: fixed;
}

/* =========================================
   2. INTRO LAYER & ANIMATIONS
========================================= */
#intro-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: var(--intro-bg, #b41a23);
    z-index: 800;
    pointer-events: none;
    clip-path: circle(150% at 50% 50%);
    animation: liquidMask 1.2s cubic-bezier(0.7, 0, 0.3, 1) 1s forwards;
    transform: translate3d(0, 0, 0);
}

@keyframes liquidMask {
    0% {
        clip-path: circle(150% at 50% 50%);
    }
    100% {
        clip-path: circle(0% at 50% 50%);
    }
}

/* =========================================
   3. HERO SECTION
========================================= */
.far-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 900;
}

.far-hero {
    position: relative;
    width: 100%;
    max-width: 450px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Logo Fixes for RTL */
.far-logo-wrap {
    position: relative;
    z-index: 1001;
    transform: translate3d(0, 0, 10px);
    animation: moveLogoUpDesktop 1s cubic-bezier(0.25, 1, 0.5, 1) 1.8s forwards;
    width: 100%;
    display: flex;
    justify-content: center;
}

.far-logo {
    max-width: 150px;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

.hero-content-delayed {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    opacity: 0;
    padding-top: 80px;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeUpContent 0.8s ease-out 2.2s forwards;
}

@keyframes moveLogoUpDesktop {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-100px);
    }
}

@keyframes fadeUpContent {
    to {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
}

@media screen and (max-width: 768px) {
    .far-logo-wrap {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 100%;
        max-width: 150px;
        transform: translate(-50%, -50%) translate3d(0, 0, 10px);
        animation: moveLogoUpMobile 1s cubic-bezier(0.25, 1, 0.5, 1) 1.8s forwards;
    }

    .hero-content-delayed {
        padding-top: 0;
        top: 42%;
        transform: translateY(40px);
    }

    @keyframes moveLogoUpMobile {
        0% {
            top: 50%;
            transform: translate(-50%, -50%);
        }
        100% {
            top: 25%;
            transform: translate(-50%, -50%);
        }
    }
}

/* =========================================
   4. BACKGROUND PAINT
========================================= */
.paint-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    overflow: hidden;
    background: #181818;
}

.paint-bg span {
    position: absolute;
    display: block;
    width: 200%;
    height: 300px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    transform: rotate(-45deg) translateX(-100%);
    filter: blur(15px);
    opacity: 0;
    animation: brushStroke 12s infinite linear;
}

.paint-bg span:nth-child(1) {
    top: -10%;
    left: -50%;
    animation-delay: 0s;
    height: 200px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.25), transparent);
}

.paint-bg span:nth-child(3) {
    top: 50%;
    left: -40%;
    animation-delay: 2s;
    height: 250px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.paint-bg span:nth-child(5) {
    top: 10%;
    right: -50%;
    transform: rotate(45deg) translateX(100%);
    animation: brushStrokeReverse 15s infinite linear;
}

@keyframes brushStroke {
    0% {
        transform: rotate(-45deg) translateX(-50%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: rotate(-45deg) translateX(50%);
        opacity: 0;
    }
}

@keyframes brushStrokeReverse {
    0% {
        transform: rotate(45deg) translateX(50%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: rotate(45deg) translateX(-50%);
        opacity: 0;
    }
}

/* =========================================
   5. UI ELEMENTS
========================================= */
.far-welcome {
    font-size: 1.6rem;
    margin-bottom: 10px;
    font-weight: 700;
    text-align: center;
}

.far-desc {
    font-size: 0.95rem;
    color: #ccc;
    margin-bottom: 20px;
    line-height: 1.6;
    text-align: center;
    padding: 0 20px;
}

.far-nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    padding: 0 20px;
    max-width: 400px;
}

.far-btn {
    padding: 16px;
    font-size: 1.1rem;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: transform 0.2s;
    border: 2px solid transparent;
    width: 100%;
}
[type=button]:focus, [type=button]:hover, [type=submit]:focus, [type=submit]:hover, button:focus, button:hover{
    background-color: #4b0c10 !important;
    color: #ffffff !important;
}

.far-btn:active {
    transform: scale(0.96);
}

.cafe-btn {
    background-color: var(--btn1-bg);
    color: var(--btn1-col);
}

.class-btn {
    background-color: var(--btn2-bg);
    color: var(--btn2-col);
    border-color: var(--btn2-col);
}

/* =========================================
   6. OVERLAYS
========================================= */
.far-overlay {
    position: fixed;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: #151515;
    z-index: 2000;
    transition: top 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.far-overlay.active {
    top: 0;
}

.far-header {
    padding: 20px;
    display: flex;
    align-items: center;
    background: #202020;
    z-index: 2001;
}

.far-back {
    background: none;
    border: none;
    color: var(--btn1-bg, #d4af37);
    font-size: 1rem;
    cursor: pointer;
    padding: 5px 10px;
    font-family: inherit;
}

.far-header h2 {
    flex-grow: 1;
    text-align: center;
    font-size: 1.1rem;
    margin-right: -40px;
    color: #fff;
}

.far-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 25px 20px 80px 20px;
    -webkit-overflow-scrolling: touch;
}

/* =========================================
   7. MENU STYLES
========================================= */
.cat-title {
    color: var(--btn1-bg, #d4af37);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.menu-item {
    margin-bottom: 20px;
}

.item-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.item-name {
    font-weight: bold;
}

.item-line {
    flex-grow: 1;
    border-bottom: 1px dotted #444;
    margin: 0 10px;
}

.item-desc {
    font-size: 0.8rem;
    color: #888;
    margin-top: 5px;
}

/* =========================================
   8. CLASS ACCORDION (CINEMATIC REDESIGN)
========================================= */
.class-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

.class-general-intro {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    line-height: 1.8;
    border-right: 3px solid var(--btn1-bg, #d4af37);
}

.course-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    width: 100%;
}

.course-card {
    background: #222;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 1px solid #333;
    width: 100%;
}

.course-card.open {
    border-color: var(--btn1-bg, #d4af37);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

/* Cinematic Header */
.course-header {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    position: relative;
    z-index: 1;
    transition: transform 0.3s;
}

.course-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.9));
    z-index: -1;
    transition: opacity 0.3s;
}

.course-card:hover .course-header::before {
    opacity: 0.8;
}

.course-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.course-icon {
    font-size: 2rem;
    color: var(--btn1-bg, #d4af37);
    transition: transform 0.3s;
}

.course-card.open .course-icon {
    transform: rotate(45deg);
}

/* Body */
.course-body {
    display: none;
    padding: 0;
    background: #1a1a1a;
}

.course-content-wrap {
    padding: 30px 20px;
}

.course-section {
    margin-bottom: 25px;
    padding-right: 15px;
    /*border-right: 2px solid rgba(212, 175, 55, 0.3);*/
}

.course-section h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: bold;
    border-bottom: 1px solid #fcfcfc50;
}

.course-text {
    font-size: 0.95rem;
    line-height: 1.9;
    color: #ccc;
}

/* =========================================
   9. POSTER GALLERY (MODERN V3)
========================================= */
.gallery-section {
    padding: 30px 0 40px 0;
    background: #111;
    border-top: 1px solid #333;
}

.gallery-section h4 {
    padding: 0 25px;
    margin-bottom: 20px;
    color: #fff;
    font-size: 1.2rem;
}

.art-gallery-scroller {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 0 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.art-gallery-scroller::-webkit-scrollbar {
    display: none;
}

.art-gallery-item {
    flex: 0 0 280px;
    height: 380px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    scroll-snap-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s;
    cursor: zoom-in;
}

.art-gallery-item:hover {
    transform: scale(1.02);
}

.art-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================
   10. MOBILE FIXES (Edge-to-Edge)
========================================= */
@media screen and (max-width: 768px) {
    .class-container {
        padding: 10px 10px 80px 10px;
    }

    .class-general-intro {
        margin: 0 20px 30px 20px;
    }

    .course-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .course-header {
        padding: 10px 15px;
        /*min-height: 100px;*/
    }

    .course-title {
        font-size: 1.0rem;
    }

    .course-content-wrap {
        padding: 20px 20px;
    }

    .art-gallery-item {
        flex: 0 0 80vw;
        height: 300px;
    }

    .gallery-section h4 {
        padding: 0 20px;
    }
}

/* =========================================
   11. LIGHTBOX & FOOTER
========================================= */
#far-lightbox {
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
}

#lb-img {
    max-width: 95%;
    max-height: 85vh;
    border-radius: 4px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 1);
}

#lb-close, .lb-nav {
    position: absolute;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 3001;
    
}

#lb-close {
    top: 20px;
    right: 20px;
    font-size: 50px;
}

#lb-prev, #lb-next {
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    color: #111;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    font-size: 20px;
    cursor: pointer;
}

#lb-prev {
    right: 15px;
}

#lb-next {
    left: 15px;
}

.class-footer-info {
    margin-top: 40px;
    text-align: center;
    padding: 0 20px;
}

.contact-btn {
    display: inline-block;
    background: var(--btn1-bg, #d4af37);
    color: #000;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

/*استایل اول باکس کلاس ها*/
/* =========================================
   NEW: CLASS INFO BOX
========================================= */
.far-class-info-box {
    display: flex;
    flex-direction: column;
    background: #222;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
}

@media screen and (min-width: 768px) {
    .far-class-info-box {
        flex-direction: row;
        align-items: stretch;
    }
}

.info-box-img {
    flex: 0 0 40%;
    position: relative;
    min-height: 250px;
}
@media screen and (max-width: 768px) {
    .info-box-img {
    min-height: 400px;
}
    
}

.info-box-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-box-content {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-title {
    color: var(--btn1-bg, #d4af37);
    font-size: 1.4rem;
    margin-bottom: 20px;
    font-weight: 800;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.info-list li {
    position: relative;
    padding-right: 20px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #ccc;
}

.info-list li::before {
    content: '■';
    position: absolute;
    right: 0;
    top: 2px;
    color: var(--btn1-bg, #d4af37);
    font-size: 0.8rem;
}

.info-contact {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.8;
    border-right: 3px solid var(--btn1-bg, #d4af37);
}

.info-phone {
    display: inline-block;
    margin-top: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--btn1-bg, #d4af37);
    text-decoration: none;
    direction: ltr;
}

@media screen and (max-width: 768px) {
    .info-box-content {
        padding: 20px;
    }
    .far-class-info-box {
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-bottom: 30px;
    }
}

/* =========================================
   SCROLL DOWN HINT
========================================= */
@media screen and (min-width: 800px) {
    .scroll-down-hint {
        display:none !important;
    }
}
.scroll-down-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 0 20px;
    background: linear-gradient(to top, rgba(21, 21, 21, 1) 37%, rgba(21, 21, 21, 0.8) 60%, transparent);
    z-index: 2010;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.scroll-down-hint span {
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.scroll-arrow {
    width: 15px;
    height: 15px;
    border-right: 2px solid var(--btn1-bg, #d4af37);
    border-bottom: 2px solid var(--btn1-bg, #d4af37);
    transform: rotate(45deg);
    animation: arrowBounce 2s infinite;
}

@keyframes arrowBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) rotate(45deg);
    }
    40% {
        transform: translateY(-10px) rotate(45deg);
    }
    60% {
        transform: translateY(-5px) rotate(45deg);
    }
}