/* ===== RESPONSIVE STYLES ===== */

/* تبلت */
@media (max-width: 992px) {
    .about-content,
    .contact-content {
        flex-direction: column;
    }

    .footer-content {
        flex-wrap: wrap;
    }

    .footer-col {
        flex: 0 0 48%;
        margin-bottom: 30px;
    }
 
}

/* موبایل */
@media (max-width: 768px) {
    /* هدر */
    [dir="rtl"] .nav-links {
        left: auto;
        right: -100%;
    }

    [dir="rtl"] .nav-links.active {
        left: auto;
        right: 0;
    }

    [dir="rtl"] .portfolio-filter {
        flex-direction: row;
        flex-wrap: wrap;
    }

    [dir="rtl"] .about-content,
    [dir="rtl"] .contact-content {
        flex-direction: column;
    }
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 85%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: flex-end;
        padding: 30px 25px;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 5px 0 25px rgba(0,0,0,0.15);
        z-index: 1000;
        border-right: 1px solid rgba(138, 109, 59, 0.1);
    }

    .nav-links.active {
        left: 0;
    }

    /* برای حالت فارسی */
    [dir="rtl"] .nav-links {
        left: auto;
        right: -100%;
        border-right: none;
        border-left: 1px solid rgba(138, 109, 59, 0.1);
        box-shadow: -5px 0 25px rgba(0,0,0,0.15);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    [dir="rtl"] .nav-links.active {
        left: auto;
        right: 0;
    }

    /* انیمیشن برای آیتم‌های منو - کار برای فارسی و انگلیسی */
    .nav-links li {
        margin: 0;
        width: 100%;
        opacity: 0;
        transform: translateX(-30px);
        transition: all 0.5s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
    }

    /* انیمیشن مخصوص برای فارسی */
    [dir="rtl"] .nav-links li {
        transform: translateX(30px) !important;
    }

    [dir="rtl"] .nav-links.active li {
        transform: translateX(0) !important;
    }

    /* تأخیر برای انیمیشن آیتم‌ها */
    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.15s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.25s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.3s; }

    /* همین تأخیرها برای فارسی */
    [dir="rtl"] .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    [dir="rtl"] .nav-links.active li:nth-child(2) { transition-delay: 0.15s; }
    [dir="rtl"] .nav-links.active li:nth-child(3) { transition-delay: 0.2s; }
    [dir="rtl"] .nav-links.active li:nth-child(4) { transition-delay: 0.25s; }
    [dir="rtl"] .nav-links.active li:nth-child(5) { transition-delay: 0.3s; }

    .nav-links a {
        display: block;
        padding: 18px 20px;
        font-size: 18px !important;
        font-weight: 600;
        color: var(--dark);
        text-decoration: none;
        border-radius: 12px;
        transition: all 0.3s ease;
        margin-bottom: 8px;
        text-align: left;
    }

    [dir="rtl"] .nav-links a {
        text-align: right;
    }

    .nav-links a:hover {
        background: var(--primary);
        color: white !important;
        transform: translateX(8px);
        box-shadow: 0 5px 15px rgba(138, 109, 59, 0.3);
    }

    [dir="rtl"] .nav-links a:hover {
        transform: translateX(-8px) !important;
    }

    /* لوگو در منو */
    .nav-links::before {
        content: '';
        display: block;
        width: 80px;
        height: 80px;
        background-image: url('../images/khosh_logo.jpg');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        margin: 0 auto 30px;
        border-radius: 50%;
        border: 3px solid var(--primary);
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
        transition: all 0.5s ease 0.05s;
    }

    .nav-links.active::before {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

    [dir="rtl"] .nav-links::before {
        transform: scale(0.8) translateY(-20px);
    }

    [dir="rtl"] .nav-links.active::before {
        transform: scale(1) translateY(0);
    }

    /* بک‌دراپ */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(0,0,0,0.5);
        z-index: 999;
        backdrop-filter: blur(2px);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .nav-overlay.active {
        display: block;
        opacity: 1;
    }

    [dir="rtl"] .nav-overlay {
        left: auto;
        right: 0;
    }
    header {
        height: 70px !important;
        padding: 0 !important;
    }

    nav {
        height: 70px !important;
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    /* لوگو */
    .logo {
        font-size: 18px !important;
        display: flex;
        align-items: center;
    }

    .logo img {
        width: 45px !important;
        height: 45px !important;
        margin-right: 8px;
    }

    .logo span {
        font-size: 16px !important;
        font-weight: 700;
    }

    /* تغییر زبان */
    .language-switcher {
        display: flex;
        gap: 6px;
        margin-left: auto;
    }

    .lang-btn {
        padding: 6px 12px;
        font-size: 11px;
        border: 1.5px solid var(--primary);
        border-radius: 15px;
    }

    /* منوی همبرگری */
    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        gap: 4px;
        cursor: pointer;
        padding: 8px;
    }

    .menu-toggle span {
        width: 20px;
        height: 2px;
        background: var(--primary);
    }

    /* منوی اصلی */
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 85%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: flex-start;
        padding: 25px;
        transition: all 0.4s ease;
        box-shadow: 5px 0 25px rgba(0,0,0,0.15);
        z-index: 1000;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 0;
        width: 100%;
        opacity: 0;
        transform: translateX(-20px);
        transition: all 0.4s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-links a {
        display: block;
        padding: 16px 20px;
        font-size: 17px !important;
        border-radius: 10px;
        margin-bottom: 8px;
        text-align: left;
    }

    /* محتوا */
    .hero h1 {
        font-size: 2.2rem;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .footer-col {
        flex: 0 0 100%;
    }

    /* RTL */
    [dir="rtl"] {
        .nav-links {
            left: auto;
            right: -100%;
            align-items: flex-end;
        }

        .nav-links.active {
            left: auto;
            right: 0;
        }

        .nav-links li {
            transform: translateX(20px);
        }

        .nav-links a {
            text-align: right;
        }

        .language-switcher {
            margin-left: 0;
            margin-right: auto;
        }

        .logo img {
            margin-right: 0;
            margin-left: 8px;
            
        }
    }
}
@media (max-width: 768px) {
    .logo img {
        width: 40px !important;
        height: 60px !important;
    }
}
/* موبایل کوچک */
@media (max-width: 480px) {
    .logo img {
        width: 40px !important;
        height: 60px !important;
    }

    .logo span {
        font-size: 15px !important;
    }

    .lang-btn {
        padding: 5px 10px;
        font-size: 10px;
    }

    .nav-links {
        width: 90%;
        padding: 20px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }

    .btn-outline {
        margin-left: 0;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== JUSTIFY TEXT ===== */
.about-text p,
.contact-info p,
.footer-col p,
.portfolio-info p {
    text-align: justify;
    text-justify: inter-word;
}

/* ===== COMMON STYLES ===== */
.portfolio-img {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.hover-effect .img-normal,
.hover-effect .img-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hover-effect .img-hover {
    opacity: 0;
    transform: scale(1.1);
}

.hover-effect:hover .img-normal {
    opacity: 0;
}

.hover-effect:hover .img-hover {
    opacity: 1;
    transform: scale(1);
}

.copyright .separator {
    margin: 0 15px;
    color: var(--accent);
}

.copyright .dev-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
@media (max-width: 360px) {
    .logo {
        font-size: 14px !important;
    }

    .logo img {
        width: 30px !important;
        height: 50px !important;
        margin-right: 4px;
    }

    .logo span {
        font-size: 13px !important;
    }

    .lang-btn {
        padding: 3px 6px;
        font-size: 9px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }
}
/* ===== زیر 270px ===== */
@media (max-width: 270px) {
    /* هدر */
    header { height: 50px !important; }
    nav { height: 50px !important; gap: 3px; }

    /* لوگو */
    .logo { font-size: 12px !important; }
    .logo img { width: 25px !important; height: 40px !important; margin-right: 4px; }
    .logo span { font-size: 11px !important; }

    /* زبان */
    .language-switcher { gap: 2px; }
    .lang-btn { padding: 2px 4px; font-size: 8px; }

    /* منو */
    .menu-toggle { padding: 4px; }
    .menu-toggle span { width: 15px; height: 1.5px; }
    .nav-links { width: 95%; padding: 15px; top: 50px; height: calc(100vh - 50px); }
    .nav-links a { padding: 10px 12px; font-size: 14px !important; }

    /* هیرو */
    .hero { height: 60vh; min-height: 300px; margin-top: 50px; }
    .hero h1 { font-size: 1.3rem; margin-bottom: 0.5rem; }
    .hero p { font-size: 0.8rem; margin-bottom: 1rem; }

    /* محتوا */
    .section-title h2 { font-size: 1.5rem; }
    .about-text h3 { font-size: 1.2rem; }

    /* گالری */
    .portfolio-grid { gap: 10px; }
    .portfolio-img { height: 150px; }

    /* دکمه */
    .btn { padding: 8px 15px; font-size: 12px; }
}
/* ===== LANGUAGE SWITCHER - FULLY RESPONSIVE ===== */

/* دسکتاپ - موقعیت اصلی */
.language-switcher {
    display: flex;
    gap: 10px;
    margin-left: 20px;
}

/* تبلت بزرگ 1200px به پایین */
@media (max-width: 1200px) {
    .language-switcher {
        margin-left: 15px;
        gap: 8px;
    }
    .lang-btn {
        padding: 7px 14px;
        font-size: 13px;
        min-width: 70px;
    }
}

/* تبلت 992px به پایین */
@media (max-width: 992px) {
    .language-switcher {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: 60px;
        background: rgba(255, 255, 255, 0.95);
        padding: 8px 16px;
        border-radius: 25px;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(138, 109, 59, 0.2);
        margin: 0;
        gap: 10px;
    }
    .lang-btn {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 65px;
    }
}

/* تبلت کوچک 768px به پایین */
@media (max-width: 768px) {
    .language-switcher {
        top: 55px;
        padding: 6px 12px;
        gap: 8px;
    }
    .lang-btn {
        padding: 5px 10px;
        font-size: 11px;
        min-width: 60px;
    }
}

/* موبایل بزرگ 564px به پایین */
@media (max-width: 564px) {
    .language-switcher {
        top: 50px;
        padding: 5px 10px;
        gap: 6px;
    }
    .lang-btn {
        padding: 4px 8px;
        font-size: 10px;
        min-width: 55px;
    }
}

/* موبایل متوسط 480px به پایین */
@media (max-width: 480px) {
    .language-switcher {
        top: 45px;
        padding: 4px 8px;
        gap: 4px;
    }
    .lang-btn {
        padding: 3px 6px;
        font-size: 9px;
        min-width: 50px;
    }
}

/* موبایل کوچک 360px به پایین */
@media (max-width: 360px) {
    .language-switcher {
        top: 40px;
        padding: 3px 6px;
        gap: 3px;
    }
    .lang-btn {
        padding: 2px 4px;
        font-size: 8px;
        min-width: 45px;
    }
}

/* RTL برای همه سایزها */
[dir="rtl"] .language-switcher {
    margin-left: 0;
    margin-right: 20px;
}

[dir="rtl"] .language-switcher {
    left: 50%;
    transform: translateX(-50%);
}
/* مطمئن شو هدر تو موبایل fixed هست */
@media (max-width: 768px) {
    header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
    }
    
    body {
        padding-top: 70px !important; /* قد هدر موبایل */
    }
    
    .products-page {
        padding: 90px 0 40px !important;
    }
}
@media (max-width: 768px) {
    /* هیرو اسلایدر برای موبایل */
    .hero-slider {
        height: 70vh;
        min-height: 500px;
    }
    
    .slide-content {
        height: 70vh;
        min-height: 500px;
        padding: 40px 15px 20px; /* فضای کمتر بالا و پایین */
        justify-content: space-between;
    }
    
    .slide-content h1 {
        font-size: 2rem;
        margin-top: 20px; /* فاصله کمتر از بالا */
        margin-bottom: 0;
        order: 1;
        text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7); /* سایه بیشتر برای خوانایی */
        line-height: 1.3;
        padding: 0 10px;
    }
    
    .slide-buttons {
        margin-top: 0;
        margin-bottom: 20px; /* فاصله کمتر از پایین */
        order: 3;
        width: 100%;
        gap: 12px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
        width: 140px;
        backdrop-filter: blur(5px);
        background: rgba(138, 109, 59, 0.9); /* کمی شفاف برای بهتر دیده شدن */
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .btn-outline {
        background: rgba(255, 255, 255, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.5);
    }
    
    .btn-outline:hover {
        background: rgba(255, 255, 255, 0.9);
        color: var(--dark);
    }
    
    /* بهبود overlay برای بهتر دیده شدن متن */
    .slide-image::after {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.5) 0%,
            rgba(0, 0, 0, 0.3) 30%,
            rgba(0, 0, 0, 0.2) 70%,
            rgba(0, 0, 0, 0.5) 100%
        );
    }
}

@media (max-width: 480px) {
    .hero-slider {
        height: 65vh;
        min-height: 450px;
    }
    
    .slide-content {
        height: 65vh;
        min-height: 450px;
        padding: 30px 10px 15px;
    }
    
    .slide-content h1 {
        font-size: 1.7rem;
        margin-top: 15px;
        padding: 0 5px;
    }
    
    .slide-buttons {
        margin-bottom: 15px;
        gap: 8px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.8rem;
        width: 130px;
    }
    
    /* کنترل‌ها و ایندیکیتورها را هم کوچک‌تر کنیم */
    .slider-controls {
        padding: 0 5px;
    }
    
    .slider-prev,
    .slider-next {
        width: 35px;
        height: 35px;
    }
    
    .slider-indicators {
        bottom: 10px;
    }
    
    .indicator {
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 360px) {
    .slide-content h1 {
        font-size: 1.5rem;
        margin-top: 10px;
    }
    
    .btn {
        padding: 7px 14px;
        font-size: 0.75rem;
        width: 120px;
    }
    
    .slide-buttons {
        flex-direction: column;
        align-items: center;
    }
}
@media (max-width: 844px) {
  .logo span{
    display: none !important;
  }
}
@media (max-width: 634px) {
    .portfolio-img {
        height: 300px!important;
    }
   
}