/* Projects Page Modern Redesign */

:root {
    --primary-color: #ffc107;
    /* Matches the yellow in existing site */
    --text-dark: #2c3e50;
    --text-light: #ecf0f1;
    --bg-light: #f8f9fa;
    --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
    --card-hover-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.2);
    --transition-speed: 0.4s;
}

/* Main Page Title (Relocated) */
.section-title-main {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 5px 0;
    /* Tight margins */
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.title-separator {
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
}

/* Force removal of background images (yellow lines) */
body {
    background-image: none !important;
    background-color: #fafafa !important;
}

/* References Strip */
.references-strip {
    background-color: #f8f9fa;
    padding: 10px 0 0 0;
    /* Minimal padding */
    margin: 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.02);
}

/* Header Background Fix for Projects Page */
#header {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.references-strip h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 auto 0 auto;
    position: relative;
    display: block;
    text-align: center;
    padding-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.references-strip h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* Slick Slider Structure Adjustments */
.customer-logos.slider {
    margin-top: 5px;
    /* Minimal gap for the yellow underline visibility */
}

/* Modern Reference Item */
.references-strip .slide {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin: 10px 15px;
    /* Reduced vertical margin */
    padding: 15px;
    /* Reduced padding */
    height: 120px;
    /* Slightly smaller */
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.references-strip .slide:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.references-strip .slide img {
    max-height: 90px;
    max-width: 100%;
    width: auto !important;
    /* Override slick default */
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.4s ease;
}

.references-strip .slide:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* Timeline Sidebar (Desktop Default) */
.timeline-sidebar {
    position: sticky;
    top: 120px;
    padding: 15px;
    border-right: 2px solid #e9ecef;
    height: auto;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    z-index: 90;
    /* width & float removed to fit in col-lg-2 */
}

.timeline-year {
    display: block;
    padding: 10px 15px;
    margin-bottom: 10px;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 0.6;
    position: relative;
    cursor: pointer;
}

.timeline-year:hover,
.timeline-year.active {
    background-color: var(--primary-color);
    color: #fff;
    opacity: 1;
    padding-left: 25px;
    /* Slight movement */
}

/* Project Year Section */
.year-section {
    position: relative;
    padding-left: 20px;
    margin-bottom: 30px;
    /* Reduced from 60px */
    scroll-margin-top: 160px;
    /* Offset for sticky bar */
}


.year-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 30px;
    line-height: 1.2;
    position: relative;
    top: auto;
    left: auto;
    z-index: 1;
    opacity: 1;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 10px;
}

/* Project Card */
.project-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed) cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy effect */
    aspect-ratio: 4/3;
    margin-bottom: 30px;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--card-hover-shadow);
    z-index: 2;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover .project-img {
    transform: scale(1.1);
}

/* Overlay Content on Hover */
.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0) 100%);
    padding: 30px 20px;
    transform: translateY(100px);
    /* Initially hidden mostly */
    opacity: 0;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.project-card:hover .project-overlay {
    transform: translateY(0);
    opacity: 1;
}

.project-title {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.project-meta {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.project-meta i {
    color: var(--primary-color);
}

.project-actions {
    display: flex;
    gap: 10px;
}

.btn-project {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    backdrop-filter: blur(5px);
    transition: all 0.3s;
    text-decoration: none;
}

.btn-project:hover {
    background: var(--primary-color);
    color: #000;
    transform: rotate(90deg);
}

/* Status Badge */
.project-status {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.status-completed {
    background-color: #2ecc71;
    color: #fff;
}

.status-ongoing {
    background-color: var(--primary-color);
    color: #000;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .timeline-sidebar {
        position: sticky !important;
        top: 125px !important;
        /* Visible below fixed header */
        z-index: 100 !important;
        background: #fff;
        padding: 5px 10px !important;
        margin-bottom: 20px;
        border-right: none;
        border-bottom: 1px solid #eee;
        display: flex !important;
        overflow-x: auto;
        white-space: nowrap;
        gap: 10px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        align-items: center;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        width: 100% !important;
        float: none !important;
    }

    .timeline-divider {
        display: none;
    }

    .timeline-sidebar::-webkit-scrollbar {
        display: none;
    }

    .timeline-sidebar h4 {
        display: block !important;
        font-size: 0.9rem;
        margin-bottom: 0 !important;
        color: var(--primary-color) !important;
        font-weight: 700;
        margin-right: 10px;
        padding-left: 5px;
        border-right: 1px solid #ddd;
        padding-right: 10px;
    }

    .timeline-year {
        display: inline-block;
        padding: 6px 15px;
        margin-bottom: 0;
        font-size: 0.85rem;
        border-radius: 20px;
        background: #f5f5f5;
        opacity: 1;
        flex: 0 0 auto;
    }

    .timeline-year:hover,
    .timeline-year.active {
        padding-left: 15px !important;
    }

    .year-section {
        padding-left: 0;
    }

    .year-title,
    .references-strip h2,
    .section-title-main {
        font-size: 1.6rem !important;
        text-align: center;
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .year-title {
        border-bottom: none !important;
        width: 100%;
        margin-bottom: 20px;
    }

    .year-title::after {
        content: '';
        display: block;
        width: 40px;
        height: 3px;
        background: var(--primary-color);
        margin: 8px auto;
    }

    /* Mobile Title Visibility Fix */
    .project-overlay {
        transform: translateY(0) !important;
        opacity: 1 !important;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%) !important;
        padding: 15px !important;
        height: auto;
        min-height: 45%;
    }

    .project-title {
        font-size: 1rem !important;
        margin-bottom: 5px;
    }

    .project-meta {
        margin-bottom: 5px;
        font-size: 0.75rem;
        gap: 10px;
    }

    .project-actions {
        display: none !important;
    }

    .project-card {
        aspect-ratio: 16/9;
        margin-bottom: 25px;
    }
}

@media (max-width: 576px) {
    .references-strip .slide img {
        max-height: 50px;
    }

    .section-title-main,
    .year-title,
    .references-strip h2 {
        font-size: 1.3rem !important;
    }

    .timeline-sidebar {
        top: 110px !important;
        /* Adjusted for smaller header on mobile */
    }
}

/* Prevent horizontal overflow on mobile from components */
@media (max-width: 991px) {

    html,
    body {
        overflow-x: clip !important;
        position: relative;
    }

    .container,
    .container-fluid {
        overflow: visible !important;
        /* MUST BE VISIBLE FOR STICKY TO WORK */
    }
}

/* Activity Cards (Faaliyetlerimiz) */
.activity-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed) cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Strict dimensions to prevent overlap */
    height: 400px;
    width: 100%;
    margin-bottom: 30px;
    cursor: pointer;
}

.activity-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--card-hover-shadow);
    z-index: 2;
}

.activity-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures images fill the card without distortion */
    transition: transform 0.6s ease;
}

.activity-card:hover .activity-img {
    transform: scale(1.1);
}

.activity-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0) 100%);
    padding: 30px 20px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
}

.activity-card:hover .activity-overlay {
    transform: translateY(0);
    opacity: 1;
}

.activity-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 5px;
    width: fit-content;
}

.activity-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.btn-activity {
    align-self: flex-start;
    background: var(--primary-color);
    color: #000;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-activity:hover {
    background: #fff;
    color: #000;
}

/* Mobile Adjustments for Activity Cards */
@media (max-width: 991px) {
    .activity-card {
        height: 300px;
        /* Smaller fixed height for mobile */
    }

    .activity-overlay {
        transform: translateY(0);
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.5) 100%);
    }

    .activity-title {
        font-size: 1.2rem;
        margin-bottom: 5px;
        border-bottom-width: 2px;
    }

    .activity-desc {
        font-size: 0.85rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 10px;
    }
}