.project-item {
    transition: transform 0.4s ease;
}

.project-media {
    overflow: hidden;
    border-radius: 20px;
    background: #1a1d20;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.project-media img {
    transition: transform 0.6s ease;
    width: 100%;
    height: auto;
    display: block;
}

@media (padding-top: 992px) {
    .project-item:hover {
        transform: translateY(-10px);
    }
    .project-item:hover .project-media img {
        transform: scale(1.05);
    }
}

.tag {
    background: rgba(13, 110, 253, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(13, 110, 253, 0.2);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.cta-link {
    color: white;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 8px;
    display: inline-block;
}

.cta-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
    bottom: 0;
    left: 0;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.cta-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

@media screen and (max-width: 768px) {
    .project-details h3 {
        font-size: 1.75rem;
    }
    .project-details p {
        font-size: 1rem;
    }
}

.filter-section {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3rem !important;
}

.tags-collapsible {
    /* Eliminamos transition: all para que no choque con GSAP */
    display: block;
    width: 100%;
}

#tags-panel-content {
    padding: 5px 0 15px 0; /* Añadimos un poco de margen para que no se corten los botones */
}

#toggle-tags-btn {
    transition: all 0.3s ease;
}

#toggle-tags-btn.active {
    background-color: white !important;
    color: var(--accent-color) !important;
    border-color: white !important;
}

#tags-counter:not(.d-none) {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    font-size: 0.65rem;
}

/* FILTROS */
#project-search {
    background-color: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease;
}

#project-search:focus {
    background-color: rgba(0, 0, 0, 0.5) !important;
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 15px rgba(13, 110, 253, 0.2);
}

.custom-placeholder::placeholder {
    color: rgba(255, 255, 255, 0.3) !important;
}

.filter-btn {
    border-radius: 50px !important;
    margin: 0 6px !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    transition: all 0.3s ease !important;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: white !important;
}

.filter-btn.active {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: white !important;
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
}

.tag-pill {
    display: inline-block;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.tag-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.tag-checkbox:checked + .tag-pill {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
    transform: translateY(-2px);
}

@media (max-width: 991px) {
    .filter-section {
        padding: 1.5rem !important;
    }
}
