@font-face {
    font-family: 'Gilroy';
    src: url('../fonts/Gilroy-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Gilroy';
    src: url('../fonts/Gilroy-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}


@font-face {
    font-family: 'Gilroy';
    src: url('../fonts/Gilroy-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
}

body {
    font-weight: 300;
    color: #F9F9F9;
    font-size: 16px;
    background: #0d1b2a;
    font-family: 'Gilroy', sans-serif;
    font-weight: 400;
}

h1 {
    font-family: 'Gilroy', sans-serif;
    font-weight: 700;
}

a {
    text-decoration: none;
}

.wrapper {
    width: 100%;
    overflow-x: hidden;
}

.container {
    padding: 0 20px;
}

.hero-category {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 20px;
    margin-top: 20px;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
}

.hero-category::-webkit-scrollbar {
    display: none;
}

.hero-category .item {
    flex: 0 0 auto;
    padding: 8px 16px;
    border: 1px solid #f9f9f910;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    align-content: center;
    color: #F9F9F9;
    margin-right: 8px;
    transition: all 0.3s ease;
    scroll-snap-align: start;
}

.hero-category .item.active {
    padding: 8px 16px;
    border: 1px solid #3DCBB190;
    border-radius: 12px;
    background: #1b1b1b90;
    font-size: 14px;
    margin-right: 8px;
    color: #3DCBB1;
}

.hero-category-wrapper {
    position: relative;
}

.more {
    margin-top: 20px;
}

.more h1 {
    font-size: 20px;
    font-weight: 700;
}

.more p {
    margin-top: 4px;
    color: #f9f9f980;
}

.blocks {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.blocks .block {
    display: grid;
    gap: 4px;
}

.blocks .block .image {
    padding: 8px 10px;
    display: flex;
    gap: 10px;
    border-radius: 30px;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.blocks .block h2,
.blocks .video h2 {
    font-size: 16px;
    font-weight: 700;
    margin-top: 4px;
}

.blocks .block p,
.blocks .video p {
    font-size: 14px;
    margin-top: 4px;
    color: #1B1B1B;
}

.blocks .block .autor,
.blocks .video .autor {
    display: flex;
    margin-top: 4px;
}

.blocks .video .autor img {
    height: 18px;
    width: 18px;
}

.blocks .video .autor p {
    margin-left: 4px;
    text-align: center;
    color: #3DCBB1;
    font-size: 14px;
}

.blocks .video .image {
    padding: 8px 10px;
    border-radius: 30px;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.blocks .video .image img {
    margin-left: 90%;
    padding: 4px;
    height: 16px;
    width: 16px;
    background: #FFFFFF40;
    border-radius: 16px;
}

.course-card {
    width: 100%;
    background: rgba(18, 22, 31, 0.5);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 15px rgba(27, 32, 44, 0.1);
    transition: transform 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-image {
    padding: 8px 10px;
    display: flex;
    gap: 10px;
    border-radius: 12px;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}


/* Card content uchun flex layout */
.course-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.course-title {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.course-info {
    display: grid;
    align-items: center;
    margin-bottom: 16px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-icon {
    width: 24px;
    height: 24px;
    border-radius: 24px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.author-name {
    color: #9ca3af;
    font-size: 14px;
}

.likes-info {
    display: flex;
    align-items: center;
    margin-top: 12px;
    gap: 8px;
}

.like-icon {
    width: 16px;
    height: 16px;
}

.like-count {
    color: #fbbf24;
    font-size: 14px;
}

.review-count {
    color: #6b7280;
    font-size: 12px;
}
.skeleton-card {
    width: 100%;
    background: #0f1e2e;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    border: 1px solid #152a3f;
}

.skeleton-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}
.skeleton-title-line {
    width: 85%;
    height: 20px;
    margin: 15px 0;
    border-radius: 4px;
    background-color: #132638;
}
.skeleton-title,
.skeleton-desc,
.skeleton-category-item,
.skeleton-card,
.skeleton-image,
.skeleton-title-line,
.skeleton-info,
.skeleton-author,
.skeleton-avatar,
.skeleton-name,
.skeleton-stats,
.skeleton-button {
    background: linear-gradient(
        to right,
        #132638 4%,
        #1a324a 25%,
        #132638 36%
    );
    background-size: 2000px 100%;
    animation: shimmer 2s infinite linear;
}
.skeleton-button {
    width: 100px;
    height: 35px;
    border-radius: 20px;
    margin: 15px 0;
    background-color: #132638;
}

.skeleton-stats {
    width: 80px;
    height: 16px;
    border-radius: 4px;
    background-color: #132638;
}
.skeleton-name {
    width: 100px;
    height: 16px;
    border-radius: 4px;
    background-color: #132638;
}
.skeleton-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}
.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #132638;
}
.skeleton-author {
    display: flex;
    align-items: center;
    gap: 10px;
}
.skeleton-desc {
    width: 80%;
    height: 20px;
    border-radius: 4px;
    margin-bottom: 30px;
    background-color: #132638;
}
/* Kategoriya skeleton */
.skeleton-category-item {
    width: 120px;
    height: 35px;
    border-radius: 20px;
    margin: 0 10px;
    display: inline-block;
    background-color: #132638;
}
.skeleton-desc {
    width: 80%;
    height: 20px;
    border-radius: 4px;
    margin-bottom: 30px;
}
.skeleton-title {
    width: 60%;
    height: 30px;
    border-radius: 4px;
    margin-bottom: 15px;
    background-color: #132638;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    background-color: #132638;
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}
.view-button {
    width: 100%;
    padding: 8px;
    background: #6b728020;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.view-button:hover {
    background: rgb(0, 120, 62);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.error-container {
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 300px;
    margin: 20px 0;
    text-align: center;
}

.error-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.error-title {
    color: #ff4444;
    margin-bottom: 10px;
}
.error-message button {
    padding: 8px 20px;
    background-color: #dc2626;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.error-message button:hover {
    background-color: #b91c1c;
}
/* Error message stillar */
.error-message {
    text-align: center;
    padding: 20px;
    margin: 20px 0;
    background-color: #1a1c2e;
    border-radius: 8px;
    border: 1px solid #2a2d4f;
}
.error-message p {
    color: #f87171;
    margin-bottom: 10px;
}

.links_icon {
    height: 20px;
    width: 20px;
}

.links {
    font-size: 14px;
    color: #9ca3af;
}

.website-links {
    display: flex;
    align-content: center;
    gap: 12px;
}

@media screen and (max-width: 1240px) {
    .blocks {
        display: grid;
        gap: 24px;
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 992px) {
    .course-info {
        display: grid;
    }

    .course-title {
        font-size: 14px;
    }

    .author-name {
        font-size: 12px;
    }

    .like-count {
        color: #fbbf24;
        font-size: 12px;
    }

    .review-count {
        color: #6b7280;
        font-size: 10px;
    }

    .blocks {
        display: grid;
        gap: 16px;
        grid-template-columns: repeat(3, 1fr);
    }

    .course-info .likes-info {
        margin-top: 8px;
    }
}

@media screen and (max-width: 768px) {
    .blocks {
        display: grid;
        gap: 16px;
        grid-template-columns: repeat(2, 1fr);
    }
     .skeleton-category-item {
        width: 100px;
        margin: 0 5px;
    }

    .skeleton-title {
        width: 80%;
    }

    .skeleton-desc {
        width: 90%;
    }

}

@media screen and (max-width: 480px) {
    .blocks {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
    }
.skeleton-category-item {
        width: 80px;
    }
    .hero-category-wrapper {
        margin-top: 0px;
    }

    .hero-category {
        gap: 8px;
        margin-top: 0px;
    }

    .hero-category .item.active,
    .hero-category .item {
        font-size: 10px;
    }

    .more {
        margin-top: 5px;
    }

    .course-title {
        margin-bottom: 10px;
        font-size: 14px;
    }

    .more h1 {
        font-size: 16px;
    }

    .more p {
        font-size: 14px;
    }
}