/**
 * Experience Grid Styles
 * Responsive grid with max 3 columns, falls back to 2 or 1 on smaller screens
 */

/* Wrapper */
.experience-grid-wrapper {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Filter Buttons */
.experience-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.experience-filter-btn {
    padding: 10px 20px;
    border: 2px solid #333;
    background-color: transparent;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.experience-filter-btn:hover {
    background-color: #333;
    color: #fff;
}

.experience-filter-btn.active {
    background-color: #333;
    color: #fff;
}

/* Grid Layout */
.experience-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Responsive: 2 columns for tablets */
@media (max-width: 1024px) {
    .experience-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Responsive: 1 column for mobile */
@media (max-width: 768px) {
    .experience-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .experience-filters {
        justify-content: center;
    }
}

/* Grid Item */
.experience-item {
    height: 423px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.experience-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Top Part - Image with overlay */
.experience-item-top {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    text-decoration: none;
    color: #fff;
}

.experience-item-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    pointer-events: none;
}

.experience-item-top > * {
    position: relative;
    z-index: 1;
}

/* Category Badge */
.experience-category {
    align-self: flex-end;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Title - positioned at bottom left */
.experience-title {
    margin: 0;
    margin-top: auto;
    align-self: flex-start;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Bottom Part - White block */
.experience-item-bottom {
    background-color: #fff;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Detail rows */
.experience-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #555;
}

.experience-detail span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Icons */
.experience-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #666;
}

/* More Info Button */
.experience-button {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.experience-button:hover {
    background-color: #555;
    color: #fff;
    text-decoration: none;
}

/* Animation for filtered items */
.experience-item[style*="display: none"] {
    display: none !important;
}

/* Smooth transitions for filtering */
.experience-item {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
