/* Works Promotion Section - Auto-Rotating */
.works-promotion-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    position: relative;
    overflow: hidden;
}

/* Force Heading Centering */
.works-promotion-section .section-heading,
.section-heading {
    text-align: center !important;
    width: 100% !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}


.works-promotion-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.5), transparent);
}

/* Work Category Tabs */
.works-tabs {
    display: flex;
    gap: 1rem;
    justify-content: center !important;
    margin: 5rem auto 3rem !important;
    /* Increased margin to separate from heading */
    flex-wrap: wrap;
    max-width: 1000px;
}

.work-tab {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    position: relative;
    overflow: hidden;
}

.work-tab::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #D4AF37, #FFD700);
    transition: width 0.4s;
}

.work-tab:hover::before,
.work-tab.active::before {
    width: 100%;
}

.work-tab:hover {
    border-color: rgba(212, 175, 55, 0.4);
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.work-tab.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
    border-color: rgba(212, 175, 55, 0.6);
    color: #D4AF37;
}

.tab-number {
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0.7;
}

.tab-name {
    font-size: 1rem;
    font-weight: 500;
}

/* Works Display Container */
.works-display {
    position: relative;
    min-height: 600px;
    /* Increased min-height to accommodate larger image */
    margin-top: 3rem;
}

.work-content {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
    transition: opacity 0.6s, visibility 0.6s;
}

.work-content.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

/* Work Image */
.work-image {
    position: relative;
    height: 500px;
    /* Increased height significantly */
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-content:hover .work-image img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(0, 0, 0, 0.5));
    opacity: 0.6;
    transition: opacity 0.4s;
}

.work-content:hover .image-overlay {
    opacity: 0.3;
}

/* Work Text */
.work-text {
    padding: 1rem 0;
}

.work-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 1rem;
    position: relative;
    display: block;
    text-align: center;
}

.work-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #D4AF37, transparent);
    transition: width 0.4s;
}

.work-content:hover .work-title::after {
    width: 120px;
}

.work-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.work-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.work-features li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    transition: all 0.3s;
    padding-left: 0;
    text-align: center;
}

.work-features li:hover {
    color: #D4AF37;
}

.work-features i {
    color: #D4AF37;
    font-size: 1.1rem;
}

.work-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #D4AF37, #FFD700);
    color: #1a1a2e;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
}

.work-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.work-cta:hover::before {
    width: 300px;
    height: 300px;
}

.work-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
}

.work-cta i {
    transition: transform 0.4s;
}

.work-cta:hover i {
    transform: translateX(5px);
}

/* Progress Indicator */
.works-progress {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.progress-bar {
    width: 100%;
    max-width: 400px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #D4AF37, #FFD700);
    width: 0%;
    transition: width 0.3s linear;
    border-radius: 2px;
}

.progress-dots {
    display: flex;
    gap: 1rem;
}

.progress-dots .dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.progress-dots .dot.active {
    background: #D4AF37;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
}

.progress-dots .dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    transition: width 0.3s, height 0.3s;
}

.progress-dots .dot.active::after {
    width: 24px;
    height: 24px;
}

/* Tablet */
@media (min-width: 768px) {
    .work-content {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    .work-image {
        height: 400px;
    }

    .work-features {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem 2rem;
    }

    .works-tabs {
        display: flex;
        gap: 1rem;
        justify-content: center !important;
        margin: 3rem auto 2rem !important;
        /* Auto margin for centering */
        flex-wrap: wrap;
        max-width: 1000px;
    }
}

/* Desktop */
@media (min-width: 1200px) {
    .work-content {
        grid-template-columns: 1.2fr 1fr;
        gap: 4rem;
    }

    .work-image {
        height: 500px;
    }

    .work-title {
        font-size: 3rem;
    }

    .work-description {
        font-size: 1.15rem;
    }
}

/* Touch Device Support */
@media (hover: none) and (pointer: coarse) {

    .work-tab,
    .work-cta,
    .progress-dots .dot {
        cursor: auto;
    }

    /* Auto-play indicator */
    .works-progress::after {
        content: 'Otomatik değişiyor';
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.4);
        margin-top: 0.5rem;
    }
}

/* Mobile Fixes for Works Promotion */
@media (max-width: 768px) {

    /* Hide Images */
    .work-image {
        display: none !important;
    }

    .works-display {
        min-height: auto;
        margin-top: 2rem;
    }

    .work-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .work-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    /* Tabs Horizontal Scroll */
    .works-tabs {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        justify-content: flex-start !important;
        padding-bottom: 1rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
        gap: 1rem;
        margin: 3rem 0 2rem !important;
        width: 100%;
        padding-left: 1rem;
        /* Add padding for start of list */
        padding-right: 1rem;
    }

    .works-tabs::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .work-tab {
        flex: 0 0 70%;
        /* Show one tab properly but hint at next */
        min-width: 200px;
        white-space: nowrap;
    }
}