.tutorials-hero {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 2rem 0 2.5rem;
    padding: 1.75rem 1.5rem;
    background: #fff;
    border-radius: 14px;
    color: #222;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 12px 28px -18px rgba(0, 0, 0, 0.12);
}

.tutorials-hero__text {
    flex: 1 1 420px;
}

.tutorials-hero__title {
    margin: 0 0 0.35rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.tutorials-hero__subtitle {
    margin: 0;
    font-size: 1.05rem;
    color: #5a6570;
    line-height: 1.5;
}

.tutorials-hero__cta {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    color: #fff !important;
    text-decoration: none !important;
    transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.tutorials-hero__cta:hover {
    background: var(--primary-color-hover);
    border-color: var(--primary-color-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px -8px rgba(26, 149, 222, 0.55);
}

.tutorials-hero__cta strong {
    font-size: 0.95rem;
}

.tutorials-hero__cta small {
    font-size: 0.78rem;
    opacity: 0.9;
    margin-top: 0.1rem;
}

.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.tutorial-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 20px -14px rgba(0, 0, 0, 0.18);
    transition: transform 180ms ease, box-shadow 180ms ease;
    opacity: 0;
    transform: translateY(8px);
    animation: tutorialCardIn 360ms ease-out forwards;
}

.tutorial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08), 0 20px 36px -18px rgba(0, 0, 0, 0.26);
    color: inherit;
}

.tutorial-card:hover .tutorial-card__title {
    color: var(--primary-color);
}

@keyframes tutorialCardIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tutorials-grid > :nth-child(1)  { animation-delay: 0ms;   }
.tutorials-grid > :nth-child(2)  { animation-delay: 40ms;  }
.tutorials-grid > :nth-child(3)  { animation-delay: 80ms;  }
.tutorials-grid > :nth-child(4)  { animation-delay: 120ms; }
.tutorials-grid > :nth-child(5)  { animation-delay: 160ms; }
.tutorials-grid > :nth-child(6)  { animation-delay: 200ms; }
.tutorials-grid > :nth-child(7)  { animation-delay: 240ms; }
.tutorials-grid > :nth-child(8)  { animation-delay: 280ms; }
.tutorials-grid > :nth-child(9)  { animation-delay: 320ms; }
.tutorials-grid > :nth-child(n+10) { animation-delay: 360ms; }

.tutorial-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background-color: #e9ecef;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.tutorial-card__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,0.35) 100%);
    pointer-events: none;
}

.tutorial-card__badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 1;
    padding: 0.3rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 6px;
    background: rgba(53, 59, 65, 0.92);
    color: #fff;
    backdrop-filter: blur(2px);
}

.tutorial-card__badge + .tutorial-card__badge {
    left: auto;
    right: 0.75rem;
}

.tutorial-card__badge--credits    { background: var(--info-color); }
.tutorial-card__badge--exclusive  { background: var(--exclusive-color); color: #3a2d00; }
.tutorial-card__badge--subscribers{ background: var(--success-color); }
.tutorial-card__badge--updated    { background: var(--primary-color); }

.tutorial-card__body {
    padding: 1rem 1.15rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.tutorial-card__kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary-color);
}

.tutorial-card__title {
    font-family: Raleway, sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    line-height: 1.25;
    margin: 0;
    color: #222;
    transition: color 160ms ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tutorial-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    font-size: 0.82rem;
    color: #6c757d;
}

.tutorial-card__meta i {
    margin-right: 0.35rem;
    opacity: 0.75;
}

.tutorial-card__desc {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tutorials-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 4rem 1rem;
    color: #6c757d;
    background: #fafafa;
    border-radius: 12px;
    text-align: center;
}

.tutorials-empty i {
    font-size: 2.5rem;
    opacity: 0.5;
}

@media (max-width: 576px) {
    .tutorials-hero {
        padding: 1.25rem 1.1rem;
        margin: 1.25rem 0 1.75rem;
    }
    .tutorials-hero__cta {
        width: 100%;
        justify-content: center;
    }
    .tutorials-grid {
        grid-template-columns: 1fr;
        gap: 1.1rem;
    }
    .tutorial-card__title {
        font-size: 1.15rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tutorial-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
