/* ---------- Material Cards ---------- */
.material-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    background: white;
    border: 1px solid #eee;
    margin: 0;
}

.tab-pane .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.material-img-container {
    position: relative;
    padding-top: 80%; /* 1:1 Aspect Ratio */
    overflow: hidden;
}

.material-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.material-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 8px;
    border-radius: 15px;
    font-size: 0.7rem;
}

.material-content {
    padding: 10px;
}

.material-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.material-description {
    font-size: 0.8rem;
    margin-bottom: 1rem;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.4rem;
}


.btn-view-more {
    width: 100%;
    background: var(--gold-accent);
    color: black;
    border: 1px solid #ddd;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
}

.btn-view-more:hover {
    background: rgb(20, 120, 112);
    color: white;
    transform: translateY(-2px);
}

.material-card:hover .btn-view-more {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


/* ---------- Category Tabs ---------- */
.categories-scroll {
    display: flex;
    justify-content: center;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    gap: 10px; /* промежутки между кнопками */
}

.categories-scroll::-webkit-scrollbar {
    height: 5px;
}

.categories-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.categories-scroll::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.categories-scroll::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.btn-category {
    display: flex;
    align-items: center;
    justify-content: center;
    /*gap: 2px;*/
    text-align: center;
    /*width: 180px; !* фиксированная ширина *!/*/
    height: 50px; /* одинаковая высота */
    border-radius: 8px;
    font-size: 0.85rem;
    background-color: var(--emerald-dark) !important;
    /*border: 1px solid #dee2e6;*/
    color: #495057;
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.btn-category:hover {
    background-color: var(--emerald-dark) !important;

    color: #fff;
}

.btn-category.active {
    /*background-color: var(--emerald-medium) !important;*/
    color: #fff !important;
    border-color: #fff !important;
}

.category-icon {
    width: 18px;
    height: 18px;
    object-fit: cover;
    border-radius: 50%;
}

/* ---------- Modal styles ---------- */
.additional-images img {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.additional-images img:hover {
    transform: scale(1.05);
}

/* ---------- Modal styles ---------- */
.modal-xl {
    max-width: 1200px;
}

.bg-emerald-gradient {
    background: var(--emerald-gradient);
}

.text-emerald-dark {
    color: var(--emerald-dark);
}

.text-emerald-medium {
    color: var(--emerald-medium);
}

.btn-outline-emerald {
    color: var(--emerald-dark);
    border-color: var(--emerald-dark);
}

.btn-outline-emerald:hover {
    background: var(--emerald-dark);
    color: white;
}

.main-image-container {
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.main-image-container img {
    object-fit: contain;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.gallery-thumbnails {
    overflow-x: auto;
    padding-bottom: 10px;
}

.gallery-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-thumbnail:hover {
    transform: scale(1.05);
    border-color: var(--gold-accent) !important;
}

.thumbnail-container {
    position: relative;
}

.thumbnail-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.thumbnail-container:hover::after {
    opacity: 1;
}

.partner-logos-wrapper {
    backdrop-filter: blur(6px);
    padding: 10px 0;
    border-radius: 12px;
}

.partner-logos {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 10px 16px;
}

.partner-logos::-webkit-scrollbar {
    height: 6px;
}

.partner-logos::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

/* Стили логотипа */
.partner-logo {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: white;
    padding: 8px 12px;
    transition: all 0.3s ease;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-logo img {
    max-height: 40px;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.partner-logo:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    transform: scale(1.15);
}

.partner-logo:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    transform: scale(1.15);
}


@media (max-width: 767.98px) {
    #materials .row.justify-content-center {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin: 0 8px;
    }

    .material-card {
        height: auto;
        max-width: 100% !important;
        margin: 0 auto;
    }

    .material-text-content p {
        display: none;
    }

    .material-text-content h5 {
        font-size: 0.95rem;
        margin-bottom: 5px;
    }

    .partner-logos-wrapper {
        overflow-x: auto;
        white-space: nowrap;
        padding: 10px 0;
        -webkit-overflow-scrolling: touch;
    }

    .partner-logos {
        display: inline-flex;
        flex-wrap: nowrap;
        gap: 10px;
        padding: 0 12px;
    }

    .partner-logo {
        flex: 0 0 auto;
        height: 40px;
        width: auto;
        padding: 0 8px;
    }

    .partner-logo img {
        max-height: 30px;
        max-width: 100px;
    }

    .categories-scroll ul {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }

    .categories-scroll .nav-item {
        width: 50%;
        padding: 0 2px;
        margin-bottom: 10px;
    }

    .categories-scroll .btn-category {
        width: 100%;
        padding: 0.5rem;
        font-size: 0.9rem;
        white-space: normal;
        text-align: center;
        margin-right: 15px;
    }

    .material-card {
        margin-bottom: 15px;
    }
}




