/* assets/css/updates.css */

/* --- Infinite Marquee --- */
.updates-marquee-container {
    width: 100%;
    overflow: hidden;
    background-color: #111111; /* Dark automotive theme */
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    white-space: nowrap;
    position: relative;
    z-index: 10;
}

.updates-marquee-track {
    display: flex;
    animation: marqueeScroll 40s linear infinite;
}

.updates-marquee-track:hover {
    animation-play-state: paused;
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.marquee-item img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.marquee-item-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.marquee-title {
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.marquee-meta {
    color: #ff3333; /* Brand red accent */
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Assuming we duplicate content for seamless loop */
}

/* --- Floating Activity Popup --- */
.updates-popup {
    position: fixed;
    bottom: -100px; /* Hidden initially */
    right: 24px;
    width: 320px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #f0f0f0;
    z-index: 9999;
    padding: 16px;
    display: flex;
    gap: 16px;
    transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s;
    opacity: 0;
    pointer-events: none;
}

.updates-popup.show {
    bottom: 24px;
    opacity: 1;
    pointer-events: auto;
}

.popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s;
    z-index: 10;
}

.popup-close:hover {
    color: #333;
}

.popup-img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.popup-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.popup-badge {
    font-size: 0.6rem;
    font-weight: 900;
    color: #ff3333;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.popup-badge i {
    animation: pulse 2s infinite;
}

.popup-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: #111;
    line-height: 1.2;
    margin-bottom: 6px;
}

.popup-time {
    font-size: 0.65rem;
    color: #666;
    font-weight: 600;
}

.popup-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

@media (max-width: 768px) {
    .updates-popup {
        bottom: -120px;
        left: 16px;
        right: 16px;
        width: auto;
    }
    .updates-popup.show {
        bottom: 16px;
    }
}

/* --- Recent Works Cards --- */
.recent-works-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .recent-works-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .recent-works-container {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 24px;
        margin-right: -24px; /* Pull to edge */
        padding-right: 24px;
    }
    
    .recent-works-container::-webkit-scrollbar {
        display: none; /* Hide scrollbar for clean swipe */
    }
    
    .recent-work-card {
        min-width: 85vw;
        scroll-snap-align: center;
    }
}

.recent-work-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.recent-work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.rwc-img-wrap {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.rwc-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.recent-work-card:hover .rwc-img {
    transform: scale(1.05);
}

.rwc-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.rwc-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.rwc-cat {
    font-size: 0.65rem;
    font-weight: 900;
    color: #ff3333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rwc-time {
    font-size: 0.65rem;
    color: #999;
    font-weight: 600;
}

.rwc-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #111;
    line-height: 1.3;
    margin-bottom: 12px;
}

.rwc-desc {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rwc-btn {
    margin-top: auto;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #111;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.recent-work-card:hover .rwc-btn {
    color: #ff3333;
}

.rwc-btn i {
    transition: transform 0.3s;
}

.recent-work-card:hover .rwc-btn i {
    transform: translateX(4px);
}

.rwc-link {
    position: absolute;
    inset: 0;
    z-index: 10;
}
