/* home.css - Stili 1:1 con il design vecchio */

/* Bottoni Filtro in Alto */
#home-filters button {
    padding: 0.4rem 1.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: 9999px; /* Pill shape */
    background: #171719; /* Grigio molto scuro */
    color: #71717a; /* text-zinc-500 */
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#home-filters button:hover {
    color: #fff;
    background: #27272a;
}

#home-filters button.active {
    background: #00a2ff; /* Azzurro del logo */
    color: #fff;
}

/* === STILI CARD GLOBALI === */
.tool-card {
    display: flex;
    flex-direction: column;
    background-color: #111112;
    border-radius: 1rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.8);
}

.tool-card.coming-soon {
    pointer-events: none;
}

/* Area Immagine */
.card-media {
    width: 100%;
    height: 10rem;
    background-color: #000;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.5s ease;
    opacity: 0.9;
}

.card-media.has-rotator .card-rotator-image {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1);
    transition: opacity 0.55s ease, transform 0.5s ease;
    pointer-events: none;
}

.card-media.has-rotator .card-rotator-image.is-active {
    opacity: 0.92;
}

.tool-card:not(.coming-soon):hover .card-img {
    opacity: 1;
    transform: scale(1.05);
}

.tool-card:not(.coming-soon):hover .card-media.has-rotator .card-rotator-image.is-active {
    opacity: 1;
    transform: scale(1.05);
}

.tool-card.coming-soon .card-img {
    opacity: 0.2;
    filter: grayscale(100%) brightness(50%);
}

.no-img-fallback {
    color: #1f2937;
    font-size: 0.75rem;
    font-family: monospace;
}

/* Overlay Coming Soon */
.coming-soon-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.4);
}

.cs-icon {
    width: 4rem;
    height: 4rem;
    color: rgba(255, 255, 255, 0.5);
    filter: drop-shadow(0 4px 3px rgba(0,0,0,0.4));
    margin-bottom: 0.5rem;
}

.cs-text {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 700;
    letter-spacing: 0.2em;
    font-size: 1.25rem;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* Corpo Card */
.card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.card-title {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    line-height: 1.25;
}

.card-desc {
    font-size: 0.8125rem; /* 13px */
    line-height: 1.625;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-action {
    margin-top: auto;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.5rem;
    width: 100%;
}

.card-action.card-action-grid {
    flex-wrap: wrap;
}

/* Stili Bottoni Open Interno Card */
.btn-open, .btn-disabled {
    display: block;
    flex: 1;
    text-align: center;
    padding: 0.625rem 0;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
    min-width: 0; /* Previene overflow in flex */
}

.card-action.card-action-grid .btn-open,
.card-action.card-action-grid .btn-disabled {
    flex: 0 0 calc(50% - 0.25rem);
    padding: 0.55rem 0.35rem;
    font-size: 0.75rem;
    line-height: 1.2;
}

.btn-open {
    color: white;
    text-decoration: none;
}

.btn-blue {
    background-color: #00a2ff;
}
.btn-blue:hover {
    background-color: #008be6;
}

/* Per i bottoni neri (GTA e R6) */
.btn-dark {
    background-color: #27272a;
}
.btn-dark:hover {
    background-color: #3f3f46;
}

/* Per bottone disabilitato (Coming soon) */
.btn-disabled {
    background-color: #1f1f22;
    color: #52525b;
    cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
    .card-media.has-rotator .card-rotator-image {
        transition: none;
    }
}
