/* Frosted Cards Section */
.frosted-section {
    padding: 60px 20px 80px 20px;
    min-height: 100vh;
}

.frosted-container {
    max-width: 1200px;
    margin: 0 auto;
}

.frosted-section .section-header {
    text-align: center;
    margin-bottom: 60px;
}

.frosted-section .section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(107, 70, 193, 0.08);
    border-radius: 20px;
    margin-bottom: 24px;
}

.frosted-section .section-badge i {
    font-size: 16px;
    color: #6B46C1;
}

.frosted-section .badge-text {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: #6B46C1;
    text-transform: uppercase;
}

.frosted-title {
    font-family: "Satoshi-Bold", sans-serif;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 24px 0;
    color: #1a1a1a;
}

.frosted-description {
    font-family: "Satoshi-Regular", sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #666;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Cards Grid */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
}

.previewCard {
    --gutter: 1.5rem;
    --brightness: 0.85;
    --saturation: 1.5;
    --frostRadius: 1.5rem;

    padding: var(--gutter);
    border-radius: var(--gutter);
    aspect-ratio: 4 / 3;
    width: 100%;
    display: grid !important;
    visibility: visible !important;
    justify-content: start;
    align-content: end;
    position: relative;
    background: #333;
    overflow: hidden;
    cursor: pointer;
    transition: transform 400ms ease-in-out;
    text-decoration: none;
}

.previewCard img {
    transition: transform 400ms ease-in-out;
    transform: scale(1.1);
}

.previewCard svg {
    transition: transform 250ms ease-in-out;
}

.previewCard:hover {
    transform: scale(1.05);
}

.previewCard:hover img {
    transform: scale(1);
}

.previewCard:hover svg {
    transform: scale(1.5);
}

.previewCard::after {
    content: "";
    position: absolute;
    inset: -0.5rem;
    z-index: 1;
    pointer-events: none;
    -webkit-backdrop-filter: blur(var(--frostRadius)) saturate(var(--saturation)) brightness(var(--brightness));
    backdrop-filter: blur(var(--frostRadius)) saturate(var(--saturation)) brightness(var(--brightness));
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 100%
    );
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.1) 40%,
        rgba(0, 0, 0, 0.5) 55%,
        black 75%
    );
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.1) 40%,
        rgba(0, 0, 0, 0.5) 55%,
        black 75%
    );
}

.backdrop {
    position: absolute;
    object-fit: cover;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.previewCard .content {
    position: relative;
    z-index: 2;
    display: grid;
    bottom: 0;
    justify-content: start;
    align-content: end;
    gap: 0.5rem;
    color: #fff;
}

.previewCard .title {
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}

.previewCard .category {
    font-family: "Satoshi-Medium", sans-serif;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.1rem;
    opacity: 0.7;
    color: #ffffff;
}

.previewCard .description {
    font-family: "Satoshi-Regular", sans-serif;
    font-size: 0.9rem;
    line-height: 1.4;
    display: grid;
    grid-template-columns: 1fr auto;
    place-content: start;
    gap: 0.5rem;
    opacity: 0.9;
}

.previewCard .description p {
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.previewCard .description span {
    transform: translateY(-0.1rem);
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
}

.previewCard .description svg {
    width: 100%;
    height: 100%;
}

/* Dark backdrop with light text */
.previewCard.dark-text .content {
    color: #ffffff;
}

.previewCard.dark-text .category {
    color: #ffffff;
    opacity: 0.7;
}

.previewCard.dark-text .description svg path {
    fill: #ffffff;
}

.previewCard.dark-text::after {
    -webkit-backdrop-filter: blur(var(--frostRadius)) saturate(var(--saturation)) brightness(0.5);
    backdrop-filter: blur(var(--frostRadius)) saturate(var(--saturation)) brightness(0.5);
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.4) 100%
    );
}

/* Light background cards – dark text */
.previewCard.light-bg .content {
    color: #1a1a1a;
}
.previewCard.light-bg .category {
    color: #444;
    opacity: 0.75;
}
.previewCard.light-bg .description {
    color: #1a1a1a;
}
.previewCard.light-bg .description svg path {
    fill: #1a1a1a;
}
.previewCard.light-bg::after {
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.55) 100%
    );
}

/* Tool price badge (inside .description right slot) */
.price-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    width: auto !important;
    height: auto !important;
    align-self: center;
    white-space: nowrap;
    flex-shrink: 0;
}
.price-tag--free    { background: rgba(34,197,94,0.25);   color: #bbf7d0; border: 1px solid rgba(34,197,94,0.45); }
.price-tag--iap     { background: rgba(234,179,8,0.20);   color: #fde68a; border: 1px solid rgba(234,179,8,0.45); }
.price-tag--license { background: rgba(167,139,250,0.22); color: #ddd6fe; border: 1px solid rgba(167,139,250,0.45); }

/* 2-column tools grid */
.cards.cards--tools {
    grid-template-columns: repeat(2, 1fr);
}

/* Responsive */
@media (max-width: 968px) {
    .frosted-section {
        padding: 80px 20px;
    }

    .cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 640px) {
    .frosted-title br {
        display: none;
    }

    .cards {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 400px;
        margin: 0 auto;
    }

    .previewCard {
        aspect-ratio: 16 / 10;
    }

    /* Tools: one card at a time, swipe horizontally */
    .cards.cards--tools {
        display: flex;
        grid-template-columns: none;
        gap: 14px;
        max-width: none;
        width: auto;
        margin: 0 -35px;
        padding: 6px 35px 14px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-padding: 0 35px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .cards.cards--tools::-webkit-scrollbar {
        display: none;
    }

    .cards.cards--tools .previewCard {
        flex: 0 0 86%;
        width: 86%;
        aspect-ratio: 4 / 3;
        scroll-snap-align: center;
    }

    .cards.cards--tools .previewCard:hover,
    .cards.cards--tools .previewCard:hover img {
        transform: none;
    }

    .cards.cards--tools .previewCard img {
        transform: none;
    }
}
