/**
 * Projects Showcase Component - Optimized CSS
 * Bağımsız proje vitrin tasarımı
 * Version: 2.0.0
 * Author: Yükseliş İnşaat
 */

/* ===== ANA CONTAINER ===== */
.ps-container {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-height: 500px;
    margin: 0 20px;
}

@media (max-width: 767.98px) {
    .ps-container {
        margin: 0 10px;
        border-radius: 15px;
        min-height: auto;
    }
}

@media (max-width: 575.98px) {
    .ps-container {
        margin: 0 8px;
        border-radius: 12px;
    }
}

/* ===== ANA LAYOUT ===== */
.ps-layout {
    display: flex;
    height: 500px;
    align-items: stretch;
}

.ps-main-section {
    flex: 0 0 50%;
    position: relative;
    display: flex;
    align-items: stretch;
}

.ps-main-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ps-main-image {
    width: 85%;
    aspect-ratio: 3/4;
    position: relative;
    border-radius: 50px;
    margin: 0 120px;
    overflow: hidden;
}

.ps-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ps-main-info {
    position: absolute;
    bottom: 0;
    left: 120px;
    width: 85%;
    border-radius: 50px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 2;
    gap: 1rem;
}

.ps-main-title {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
}

.ps-main-arrow {
    background: #C59A53;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: black;
    font-size: 1.2rem;
    border: none;
    flex-shrink: 0;
    min-width: 50px;
}

.ps-main-arrow:hover {
    background: #DDBC5D;
    transform: scale(1.1);
}

/* ===== DİKEY PROJE LİSTESİ ===== */
.ps-vertical-section {
    flex: 0 0 50%;
    padding: 1rem;
    background: #ffffff;
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    overflow-x: auto;
    align-items: stretch;
}

.ps-vertical-list {
    height: 100%;
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    flex: 1;
    align-items: stretch;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.ps-vertical-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    border: 2px solid transparent;
    flex: 1;
    min-width: 120px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: 100%;
    overflow: hidden;
    align-self: stretch;
}

.ps-vertical-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ps-vertical-item.ps-active {
    border-color: #C59A53;
    transform: translateX(10px);
    box-shadow: 0 6px 16px rgba(197, 154, 83, 0.3);
}

.ps-vertical-image {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.ps-vertical-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ps-vertical-title {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
    line-height: 1.2;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3));
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    padding: 1rem;
    z-index: 2;
    border-radius: 20px;
    text-transform: uppercase;
}

.ps-vertical-item.ps-active .ps-vertical-title {
    color: #FFD700;
    font-weight: 800;
    background: linear-gradient(45deg, rgba(197, 154, 83, 0.8), rgba(221, 188, 93, 0.6));
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
}

/* ===== RESPONSIVE TASARIM ===== */
@media (max-width: 1199.98px) {
    .ps-main-image {
        margin: 0 80px;
    }
    .ps-main-info {
        left: 80px;
        right: 0px;
    }
}

@media (max-width: 991.98px) {
    .ps-container {
        margin: 0 15px;
        border-radius: 15px;
    }
    .ps-layout {
        height: 450px;
    }
    .ps-main-section {
        flex: 0 0 60%;
    }
    .ps-vertical-section {
        flex: 0 0 40%;
    }
    .ps-main-image {
        margin: 0 50px;
    }
    .ps-main-info {
        left: 50px;
    }
    .ps-main-title {
        font-size: 1.6rem;
    }
    .ps-vertical-title {
        font-size: 0.8rem;
    }
}

@media (max-width: 767.98px) {
    .ps-container {
        margin: 0 10px;
        border-radius: 15px;
    }
    .ps-layout {
        flex-direction: column;
        height: auto;
        align-items: stretch;
    }
    .ps-main-section {
        flex: none;
        height: 350px;
        align-items: stretch;
        margin-bottom: 1rem;
    }
    .ps-main-image {
        border-radius: 20px;
        margin: 0 15px;
        aspect-ratio: 16/9;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        width: calc(100% - 30px);
    }
    .ps-vertical-section {
        flex: none;
        padding: 0.75rem;
        height: 220px;
        align-items: stretch;
        background: #ffffff;
        overflow: visible;
        display: flex;
        flex-direction: column;
    }
    .ps-vertical-list {
        height: 100%;
        gap: 0.5rem;
        flex-direction: row;
        display: flex;
        align-items: stretch;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
        scrollbar-color: #C59A53 #f1f1f1;
        flex: 1;
        padding-bottom: 0.5rem;
    }
    .ps-vertical-list::-webkit-scrollbar {
        height: 6px;
    }
    .ps-vertical-list::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }
    .ps-vertical-list::-webkit-scrollbar-thumb {
        background: #C59A53;
        border-radius: 3px;
    }
    .ps-vertical-list::-webkit-scrollbar-thumb:hover {
        background: #B88A4A;
    }
    .ps-vertical-item {
        width: 90px;
        min-width: 90px;
        max-width: 90px;
        height: 180px;
        padding: 8px;
        border-radius: 15px;
        position: relative;
        overflow: hidden;
        flex: 0 0 90px;
        display: block;
        background: #f0f0f0;
        border: 2px solid #ddd;
        margin-right: 8px;
    }
    .ps-vertical-image {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 15px;
        overflow: hidden;
    }
    .ps-vertical-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .ps-vertical-title {
        font-size: 0.75rem;
        writing-mode: vertical-rl;
        text-orientation: mixed;
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        background: linear-gradient(45deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3));
        color: white;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
        padding: 0.5rem;
        z-index: 2;
        border-radius: 15px;
        font-weight: 600;
        line-height: 1.2;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        overflow: hidden;
        width: 100%;
        height: 100%;
        max-height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    .ps-main-info {
        left: 15px;
        right: 15px;
        width: calc(100% - 30px);
        padding: 1.25rem;
        border-radius: 0 0 20px 20px;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
        align-items: flex-start;
        min-height: fit-content;
    }
    .ps-main-title {
        font-size: 1.4rem;
        font-weight: 700;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
        line-height: 1.2;
        max-height: 3.6em;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    .ps-main-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        background: rgba(255, 255, 255, 0.2);
        border: 2px solid rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(10px);
        transition: all 0.3s ease;
        flex-shrink: 0;
    }
    .ps-main-arrow:hover {
        background: rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.5);
        transform: scale(1.1);
    }
}

@media (max-width: 575.98px) {
    .ps-container {
        margin: 0 8px;
        border-radius: 12px;
    }
    .ps-main-section {
        height: 300px;
        margin-bottom: 0.75rem;
    }
    .ps-main-image {
        margin: 0 10px;
        width: calc(100% - 20px);
        border-radius: 15px;
    }
    .ps-vertical-section {
        height: 200px;
        background: #ffffff;
        padding: 0.5rem;
    }
    .ps-vertical-list {
        gap: 0.4rem;
        padding-bottom: 0.5rem;
    }
    .ps-vertical-item {
        width: 85px;
        min-width: 85px;
        max-width: 85px;
        height: 160px;
        padding: 6px;
        margin-right: 6px;
    }
    .ps-vertical-image {
        height: 100%;
        border-radius: 12px;
    }
    .ps-vertical-title {
        font-size: 0.7rem;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        overflow: hidden;
        padding: 0.4rem;
        max-height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        border-radius: 12px;
    }
    .ps-main-info {
        left: 10px;
        right: 10px;
        width: calc(100% - 20px);
        padding: 1rem;
        border-radius: 0 0 15px 15px;
    }
    .ps-main-title {
        font-size: 1.2rem;
        line-height: 1.2;
        max-height: 2.4em;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    .ps-main-arrow {
        width: 38px;
        height: 38px;
        font-size: 1rem;
        min-width: 38px;
    }
    .ps-vertical-item.ps-active .ps-vertical-title {
        color: #FFD700;
        font-weight: 800;
        background: linear-gradient(45deg, rgba(197, 154, 83, 0.8), rgba(221, 188, 93, 0.6));
        text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
    }
}

/* ===== ANİMASYON SINIFLARI ===== */
.ps-fade-in {
    animation: psFadeIn 0.5s ease-in-out;
}

.ps-fade-out {
    animation: psFadeOut 0.8s ease-in-out forwards;
}

.ps-fade-transition {
    animation: psFadeTransition 0.8s ease-in-out forwards;
}

.ps-slide-in {
    animation: psSlideIn 0.7s ease-in-out forwards;
}

.ps-slide-out {
    animation: psSlideOut 0.7s ease-in-out forwards;
}

.ps-slide-transition {
    animation: psSlideTransition 0.7s ease-in-out forwards;
}

/* ===== KEYFRAME ANİMASYONLARI ===== */
@keyframes psFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes psFadeOut {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    50% {
        opacity: 0.3;
        transform: scale(0.95) translateY(-10px);
    }
    100% {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
}

@keyframes psFadeTransition {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    50% {
        opacity: 0.5;
        transform: translateX(-10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes psSlideIn {
    0% {
        transform: translateX(100px) scale(0.85);
        opacity: 0;
    }
    50% {
        transform: translateX(30px) scale(0.95);
        opacity: 0.8;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes psSlideOut {
    0% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateX(-60px) scale(0.9);
        opacity: 0.4;
    }
    100% {
        transform: translateX(-100px) scale(0.85);
        opacity: 0;
    }
}

@keyframes psSlideTransition {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    50% {
        transform: translateX(-15px);
        opacity: 0.7;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== PROJE SIRALAMA ANİMASYONLARI ===== */
.ps-reordering .ps-vertical-item {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.ps-vertical-item.ps-move-up {
    animation: psMoveUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.ps-vertical-item.ps-move-down {
    animation: psMoveDown 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.ps-vertical-item.ps-move-to-top {
    animation: psMoveToTop 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes psMoveUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(-20px) scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes psMoveDown {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(20px) scale(0.95);
        opacity: 0.8;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes psMoveToTop {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
        z-index: 1;
    }
    30% {
        transform: translateY(-30px) scale(1.1);
        opacity: 0.9;
        z-index: 10;
    }
    70% {
        transform: translateY(-60px) scale(1.05);
        opacity: 0.95;
        z-index: 10;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
        z-index: 1;
    }
}

/* ===== SOLA DOĞRU KAYDIRMA ANİMASYONU ===== */
.ps-vertical-list.ps-sliding-left {
    animation: psSlideLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ps-vertical-list.ps-sliding-left .ps-vertical-item {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ps-vertical-list.ps-sliding-left .ps-vertical-item:not(.ps-active) {
    transform: translateX(-5px);
    opacity: 0.8;
}

.ps-vertical-list.ps-sliding-left .ps-vertical-item.ps-active {
    transform: translateX(0);
    opacity: 1;
    z-index: 2;
}

.ps-vertical-item.ps-move-to-right {
    animation: psMoveToRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.ps-vertical-item.ps-move-to-left {
    animation: psMoveToLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes psSlideLeft {
    0% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(-10px);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes psMoveToRight {
    0% {
        transform: translateX(0);
        opacity: 1;
        z-index: 2;
    }
    50% {
        transform: translateX(10px);
        opacity: 0.8;
        z-index: 1;
    }
    100% {
        transform: translateX(20px);
        opacity: 0.6;
        z-index: 1;
    }
}

@keyframes psMoveToLeft {
    0% {
        transform: translateX(20px);
        opacity: 0.6;
        z-index: 1;
    }
    50% {
        transform: translateX(10px);
        opacity: 0.8;
        z-index: 1;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
        z-index: 2;
    }
}

/* ===== UTILITY SINIFLARI ===== */
.ps-transitioning {
    pointer-events: none;
}

.ps-main-section.ps-updating {
    animation: psMainUpdate 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.ps-hidden {
    display: none !important;
}

.ps-visible {
    display: block !important;
}

.ps-no-scroll {
    overflow: hidden;
}

.ps-loading {
    position: relative;
}

.ps-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #C59A53;
    border-radius: 50%;
    animation: psSpin 1s linear infinite;
}

@keyframes psMainUpdate {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(0.98);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes psSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
