body {
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
}
.premium-showcase.light-theme {
    position: relative;
    width: 96%;
    margin-right: 2%;
    min-height: 100vh;
    overflow: hidden;
    direction: rtl;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 0;
}
.showcase-header {
    text-align: center;
    margin-bottom: 4rem;
    z-index: 10;
}
.showcase-header h2 {
    font-size: 3rem;
    color: var(--color1701);
    margin: 0;
    font-family: Sahel-Bold;
}
.accent-text {
    color: var(--color1702);
    font-family: Sahel-Bold;
}
.subtitle {
    color: color-mix(in srgb, var(--color1701) 70%, var(--color1702));
    font-size: 1.2rem;
    margin-top: 10px;
    letter-spacing: 1px;
    font-weight: 500;
}

.slider-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 520px; /* تنظیم ارتفاع برای تصاویر افقی */
    perspective: 1500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide {
    position: absolute;
    width: 580px; /* عرض بیشتر برای تصاویر افقی */
    height: 340px; /* ارتفاع کمتر برای تصاویر افقی */
    /* حذف filter از اینجا برای جلوگیری از پرش انعکاس */
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform, opacity;
    border-radius: 20px;
    cursor: pointer;
    opacity: 0;
    z-index: 0;
    /* انعکاس بسیار محوتر و شفاف‌تر */
    -webkit-box-reflect: below 10px linear-gradient(transparent 75%, rgba(255,255,255,0.15));
}

.slide-img-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    background: #ffffff;
    /* انتقال فیلتر رنگی به این بخش */
    transition: filter 0.8s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.5s ease;
}

.slide-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.slide.active {
    opacity: 1;
    transform: translateX(0) scale(1) translateZ(0);
    z-index: 10;
}

.slide.active .slide-img-wrapper {
    box-shadow: 0 20px 50px color-mix(in srgb, var(--color1702) 10%, transparent), 0 0 0 4px #ffffff;
    filter: brightness(1) contrast(1);
}

.slide.active:hover .slide-img-wrapper img {
    transform: scale(1.05);
}

/* فاصله‌ها (TranslateX) برای کارت‌های افقی و پهن‌تر تنظیم شده است */
.slide.prev {
    opacity: 0.9;
    transform: translateX(45%) scale(0.85) translateZ(-200px) rotateY(-20deg);
    z-index: 5;
}

.slide.next {
    opacity: 0.9;
    transform: translateX(-45%) scale(0.85) translateZ(-200px) rotateY(20deg);
    z-index: 5;
}

.slide.prev .slide-img-wrapper, 
.slide.next .slide-img-wrapper {
    filter: brightness(0.7) contrast(0.9);
}

.slide.prev-2 {
    opacity: 0.4;
    transform: translateX(75%) scale(0.7) translateZ(-400px) rotateY(-30deg);
    z-index: 2;
}

.slide.next-2 {
    opacity: 0.4;
    transform: translateX(-75%) scale(0.7) translateZ(-400px) rotateY(30deg);
    z-index: 2;
}

.slide.prev-2 .slide-img-wrapper, 
.slide.next-2 .slide-img-wrapper {
    filter: brightness(0.5) contrast(0.9);
}
/* =========================================
   پنل اطلاعات (منتقل شده به بالای تصویر)
========================================= */
.glass-panel {
    position: absolute;
    bottom: 100%; /* این دستور پنل را دقیقاً به بالای عکس می‌فرستد */
    left: 50%;
    width: 90%; /* کمی از عرض تصویر کوچکتر برای زیبایی بیشتر */
    margin-bottom: 25px; /* فاصله از لبه بالایی عکس */
    
    /* استایل پنل با پس‌زمینه روشن‌تر چون دیگر روی عکس نیست */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 15px 20px;
    
    /* انیمیشن و موقعیت اولیه */
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1) 0.1s;
    z-index: 20;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    
    /* وسط‌چین کردن محتوا */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* انیمیشن ورود هنگام فعال شدن اسلاید */
.slide.active .glass-panel {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* افکت شناور شدن هنگام هاور */
.slide.active:hover .glass-panel {
    transform: translateX(-50%) translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08), 0 0 20px color-mix(in srgb, var(--color1702) 10%, transparent);
    background: rgba(255, 255, 255, 0.95);
}

.glass-panel h3 {
    color: #0f172a;
    font-size: 1.3rem;
    margin: 0 0 10px 0;
    font-weight: 800;
    /* سایه متن حذف شد چون پس‌زمینه روشن و خوانا است */
}

/* جداکننده در وسط */
.accent-separator {
    width: 220px;
    height: 4px;
    background: linear-gradient(90deg, var(--color1702), color-mix(in srgb, var(--color1702) 50%, #ffffff));
    border-radius: 3px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px color-mix(in srgb, var(--color1702) 30%, transparent);
}

.glass-panel p {
    color: #475569;
    font-size: 0.95rem;
    margin: 0;
    font-weight: 600;
    line-height: 1.5;
}
/* =========================================
   راهنمای Drag و تنظیمات موس
========================================= */
.slider-container {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y; /* فقط اجازه اسکرول عمودی را به مرورگر می‌دهد */
}

/* این کلاس جدید را اضافه کنید */
.slide img {
    -webkit-user-drag: none; /* جلوگیری از درگ شدن خود عکس (سایه عکس) توسط مرورگر */
}
.slider-container:active {
    cursor: grabbing;
}

.drag-guide {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #64748b;
    margin-top: 15px;
    font-size: 0.95rem;
    font-weight: 500;
    animation: pulse 2s infinite;
}
.drag-guide svg {
    color: var(--color1702);
}
@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* =========================================
   مودال (نمایش عکس بزرگ)
========================================= */
.project-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.project-modal.show {
    display: flex;
    opacity: 1;
}
.modal-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    object-fit: contain;
}
.project-modal.show .modal-content {
    transform: scale(1);
}
.close-modal {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #fff;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10000;
}
.close-modal:hover {
    color: var(--color1702);
}

/* --- ریسپانسیو برای تبلت‌ها --- */
@media (max-width: 768px) {
    .premium-showcase.light-theme {
        min-height: unset;
    }
    .showcase-header {
        margin-top: 2.5rem;
        margin-bottom: 2rem;
    }
    .showcase-header h2 {
        font-size: 2rem;
    }
    .slider-container {
        height: 450px;
    }
    .slide {
        width: 420px;
        height: 250px;
    }
    
    .glass-panel {
        padding: 12px 15px;
        margin-bottom: 15px;
        width: 85%; /* جلوگیری از بیرون زدن پنل از عرض عکس */
    }
    
    .glass-panel h3 {
        font-size: 1.1rem;
    }
    
    .glass-panel p {
        font-size: 0.85rem;
    }
}

/* --- ریسپانسیو برای گوشی‌های موبایل --- */
@media (max-width: 480px) {
    .slider-container {
        height: 350px;
        perspective: 700px;
    }
    
    .slide {
        width: 280px;
        height: 170px;
    }
    
    .glass-panel {
        padding: 8px 12px;
        margin-bottom: 10px;
        width: 95%; 
    }
    
    .glass-panel h3 {
        font-size: 1rem;
        margin-bottom: 5px;
    }
    
    .glass-panel .divider {
        margin: 5px auto;
    }
    
    .glass-panel p {
        font-size: 0.75rem;
    }

    .drag-guide {
        font-size: 0.85rem;
        margin-top: 15px;
    }
    
    .drag-guide svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 420px) {
    .slider-container {
        perspective: 690px;
    }
}
@media (max-width: 410px) {
    .slider-container {
        perspective: 600px;
    }
}
@media (max-width: 390px) {
    .slider-container {
        perspective: 470px;
    }
}
@media (max-width: 370px) {
    .slider-container {
        perspective: 410px;
    }
}



/* =========================================================
MODERN PROJECT GALLERY
کد جدید - CSS قبلی دست نخورده باقی مانده است
========================================================= */

.projects-gallery {
width: 96%;
max-width: 1200px;


margin: 0 auto;

padding: 0 0 60px;

direction: rtl;


}

/* =========================================================
GALLERY HEADER
========================================================= */

.projects-gallery-header {
display: flex;


align-items: flex-end;

gap: 25px;

margin-bottom: 28px;


}

.projects-gallery-title {
flex-shrink: 0;
}

.projects-eyebrow {
display: block;


margin-bottom: 5px;

color: var(--color1702);

font-size: 0.68rem;

font-weight: 800;

letter-spacing: 3px;

direction: ltr;


}

.projects-gallery-title h2 {
margin: 0;


color: #0f172a;

font-family: Sahel-Bold;

font-size: 1.75rem;

line-height: 1.5;


}

.projects-gallery-title h2 span {
color: var(--color1702);
}

.projects-gallery-line {
flex: 1;


height: 1px;

margin-bottom: 11px;

background:
    linear-gradient(
        to left,
        color-mix(
            in srgb,
            var(--color1702) 35%,
            transparent
        ),
        transparent
    );


}

/* =========================================================
SMART MASONRY GRID
========================================================= */

.projects-grid {
width: 100%;


display: grid;

/*
   12 ستون باعث می‌شود بتوانیم
   نسبت‌های مختلف را دقیق‌تر نمایش دهیم.
*/
grid-template-columns:
    repeat(12, minmax(0, 1fr));

/*
   ارتفاع پایه عمداً کوچک است
   تا صفحه بیش از حد بلند نشود.
*/
grid-auto-rows: 62px;

/*
   dense باعث می‌شود فضاهای خالی تا حد ممکن پر شوند.
*/
grid-auto-flow: dense;

gap: 15px;


}

/* =========================================================
BASE PROJECT CARD
========================================================= */

.project-card {
position: relative;


min-width: 0;
min-height: 0;

overflow: hidden;

border-radius: 17px;

background: #ffffff;

cursor: pointer;

box-shadow:
    0 8px 25px rgba(15, 23, 42, 0.055),
    0 1px 2px rgba(15, 23, 42, 0.04);

transition:
    transform 0.45s cubic-bezier(.2,.8,.2,1),
    box-shadow 0.45s ease;


}

.project-card:hover {
transform: translateY(-5px);


box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.12),
    0 0 0 1px
    color-mix(
        in srgb,
        var(--color1702) 15%,
        transparent
    );


}

/* =========================================================
IMAGE
========================================================= */

.project-image {
position: relative;


width: 100%;
height: 100%;

overflow: hidden;

background:
    linear-gradient(
        135deg,
        #f8fafc,
        #eef2f7
    );


}

.project-image img {
width: 100%;
height: 100%;


/*
   مهم:
   عکس‌ها کراپ نمی‌شوند.
*/
object-fit: contain;

display: block;

transition:
    transform 0.7s cubic-bezier(.2,.8,.2,1),
    filter 0.5s ease;


}

.project-card:hover .project-image img {
transform: scale(1.045);
}

/* =========================================================
IMAGE OVERLAY
========================================================= */

.project-overlay {
position: absolute;


inset: 0;

display: flex;

align-items: flex-end;

justify-content: space-between;

padding: 12px;

opacity: 0;

background:
    linear-gradient(
        to top,
        rgba(15, 23, 42, 0.68),
        transparent 58%
    );

transition: opacity 0.35s ease;


}

.project-card:hover .project-overlay {
opacity: 1;
}

.project-number {
color: rgba(255,255,255,0.9);


font-size: 0.7rem;

font-weight: 800;

direction: ltr;


}

.project-open {
display: flex;


align-items: center;

gap: 5px;

padding: 6px 9px;

border-radius: 20px;

color: #ffffff;

font-size: 0.7rem;

font-weight: 700;

background:
    rgba(255,255,255,0.16);

border:
    1px solid rgba(255,255,255,0.22);

backdrop-filter: blur(8px);

-webkit-backdrop-filter: blur(8px);


}

/* =========================================================
PROJECT INFORMATION
========================================================= */

.project-card-info {
position: absolute;


left: 9px;
right: 9px;
bottom: 9px;

display: flex;

align-items: center;

justify-content: space-between;

gap: 8px;

min-height: 50px;

padding: 8px 11px;

border-radius: 12px;

background:
    rgba(255,255,255,0.88);

border:
    1px solid rgba(255,255,255,0.75);

backdrop-filter: blur(12px);

-webkit-backdrop-filter: blur(12px);

box-shadow:
    0 8px 25px rgba(15,23,42,0.08);

transition:
    transform 0.35s ease,
    background 0.35s ease;


}

.project-card:hover .project-card-info {
transform: translateY(-3px);


background:
    rgba(255,255,255,0.96);


}

.project-text {
min-width: 0;
}

.project-card-info h3 {
margin: 0 0 2px;


color: #0f172a;

font-size: 0.82rem;

font-weight: 800;

line-height: 1.4;

white-space: nowrap;

overflow: hidden;

text-overflow: ellipsis;


}

.project-card-info p {
margin: 0;


color: #64748b;

font-size: 0.65rem;

font-weight: 500;

line-height: 1.4;

white-space: nowrap;

overflow: hidden;

text-overflow: ellipsis;


}

.project-arrow {
flex-shrink: 0;


width: 28px;
height: 28px;

display: flex;

align-items: center;

justify-content: center;

border-radius: 50%;

color: var(--color1702);

background:
    color-mix(
        in srgb,
        var(--color1702) 9%,
        #ffffff
    );

font-size: 1rem;

transition:
    transform 0.3s ease,
    background 0.3s ease;


}

.project-card:hover .project-arrow {
transform:
translate(-2px, -2px);


background:
    color-mix(
        in srgb,
        var(--color1702) 16%,
        #ffffff
    );


}

/* =========================================================
IMAGE TYPES
JavaScript این کلاس‌ها را تعیین می‌کند.
========================================================= */

/* مربع */

.project-card.grid-square {
grid-column: span 3;
grid-row: span 4;
}

/* افقی */

.project-card.grid-landscape {
grid-column: span 4;
grid-row: span 3;
}

/* افقی خیلی عریض */

.project-card.grid-wide {
grid-column: span 6;
grid-row: span 3;
}

/* عمودی */

.project-card.grid-portrait {
grid-column: span 3;
grid-row: span 5;
}

/* عمودی خیلی بلند */

.project-card.grid-tall {
grid-column: span 3;
grid-row: span 6;
}

/* =========================================================
TABLET
========================================================= */

@media (max-width: 900px) {


.projects-gallery {
    margin-top: 65px;
}

.projects-grid {
    grid-template-columns:
        repeat(6, minmax(0, 1fr));

    grid-auto-rows: 60px;

    gap: 13px;
}

.project-card.grid-square {
    grid-column: span 3;
    grid-row: span 4;
}

.project-card.grid-landscape {
    grid-column: span 3;
    grid-row: span 3;
}

.project-card.grid-wide {
    grid-column: span 6;
    grid-row: span 3;
}

.project-card.grid-portrait {
    grid-column: span 3;
    grid-row: span 5;
}

.project-card.grid-tall {
    grid-column: span 3;
    grid-row: span 5;
}


}

/* =========================================================
MOBILE
========================================================= */

@media (max-width: 600px) {


.projects-gallery {
    width: 92%;

    margin-top: 50px;

    padding-bottom: 40px;
}

.projects-gallery-header {
    margin-bottom: 20px;
}

.projects-gallery-title h2 {
    font-size: 1.35rem;
}

.projects-eyebrow {
    font-size: 0.6rem;
    letter-spacing: 2px;
    text-align: center;
}

.projects-grid {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    grid-auto-rows: 65px;

    gap: 10px;
}

.project-card.grid-square {
    grid-column: span 1;
    grid-row: span 3;
}

.project-card.grid-landscape {
    grid-column: span 2;
    grid-row: span 3;
}

.project-card.grid-wide {
    grid-column: span 2;
    grid-row: span 3;
}

.project-card.grid-portrait {
    grid-column: span 1;
    grid-row: span 4;
}

.project-card.grid-tall {
    grid-column: span 1;
    grid-row: span 5;
}

.project-card {
    border-radius: 13px;
}

.project-card-info {
    left: 6px;
    right: 6px;
    bottom: 6px;

    min-height: 43px;

    padding: 6px 8px;

    border-radius: 9px;
}

.project-card-info h3 {
    font-size: 0.7rem;
}

.project-card-info p {
    font-size: 0.58rem;
}

.project-arrow {
    width: 23px;
    height: 23px;

    font-size: 0.8rem;
}

.project-overlay {
    display: none;
}


}

/* =========================================================
SMALL PHONES
========================================================= */

@media (max-width: 380px) {


.projects-gallery {
    width: 94%;
}

.projects-grid {
    gap: 8px;

    grid-auto-rows: 60px;
}

.project-card-info {
    left: 5px;
    right: 5px;
    bottom: 5px;

    padding: 5px 7px;
}

.project-card-info h3 {
    font-size: 0.66rem;
}


}
