/* ===================================
   Resources Custom Styles
   =================================== */

/* Resource Cards - Index Page */
.resource-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #f0f0f0;
}

.resource-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.resource-card .box-thumb {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.resource-card .box-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.resource-card:hover .box-thumb img {
    transform: scale(1.08);
}

/* File type badge - positioned on the right */
.resource-card-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--theme-color);
    color: white;
    padding: 8px 14px;
    border-radius: 25px;
    font-size: 10px;
    font-weight: 700;
    z-index: 3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Category badge - positioned on the left */
.resource-card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.98);
    color: #333;
    padding: 8px 14px;
    border-radius: 25px;
    font-size: 10px;
    font-weight: 700;
    z-index: 3;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

/* Overlay effects */
.resource-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.7), rgba(0,0,0,0.5));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.resource-card:hover .resource-card-overlay {
    opacity: 1;
}

/* Improved content padding and spacing */
.resource-card .box-content {
    padding: 28px 24px 24px 24px;
}

.resource-card .box-title {
    margin-bottom: 16px;
    line-height: 1.4;
    font-size: 1.1rem;
    font-weight: 600;
}

.resource-card .box-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.resource-card .box-title a:hover {
    color: var(--theme-color);
}

.resource-card .resource-description {
    margin-bottom: 18px;
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

.resource-card .resource-meta {
    margin-bottom: 16px;
}

.resource-card .resource-author {
    font-size: 0.85rem;
    font-style: italic;
}

/* Resource stats styling */
.resource-stats {
    border-top: 1px solid #f5f5f5;
    padding-top: 18px;
    margin-top: 18px;
}

.resource-stats .resource-info {
    font-size: 0.85rem;
}

.resource-stats .resource-size {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Statistics section improvements */
.statistics-section {
    background: linear-gradient(135deg, var(--theme-color), #e74c3c) !important;
    border-radius: 15px !important;
    padding: 40px 20px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.statistics-section .counter-card_number,
.statistics-section .counter-card_text {
    color: #ffffff !important;
}

.statistics-section .counter-card_number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.statistics-section .counter-card_text {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 500;
}

/* Resource Detail Page - Resource Information Widget */
.resource-info-widget {
    padding: 20px;
}

.resource-info-widget .widget-title {
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.resource-details-list .detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f5f5f5;
}

.resource-details-list .detail-item:last-child {
    border-bottom: none;
}

.resource-details-list .detail-label {
    flex: 0 0 auto;
    margin-right: 20px;
    font-weight: 600;
    color: #555;
}

.resource-details-list .detail-value {
    flex: 1;
    text-align: right;
}

.resource-details-list .detail-value .badge {
    font-size: 11px;
    padding: 6px 12px;
    font-weight: 600;
    border-radius: 20px;
}

.resource-details-list .detail-value .badge.bg-primary {
    background-color: var(--theme-color) !important;
}

.resource-details-list .detail-value .badge.bg-secondary {
    background-color: #6c757d !important;
}

/* Resource filters styling */
.resource-filters {
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    background: #fafafa;
}

.resource-filters .form-control,
.resource-filters .form-select {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 0.95rem;
}

.resource-filters .form-control:focus,
.resource-filters .form-select:focus {
    border-color: var(--theme-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 82, 40, 0.1);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .resource-card .box-content {
        padding: 20px 18px 18px 18px;
    }
    
    .resource-card-category {
        max-width: 100px;
        font-size: 9px;
        padding: 6px 10px;
    }
    
    .resource-card-tag {
        font-size: 9px;
        padding: 6px 10px;
    }
    
    .statistics-section .counter-card_number {
        font-size: 2.2rem;
    }
    
    .statistics-section .counter-card_text {
        font-size: 1rem;
    }
    
    .resource-details-list .detail-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 0;
    }
    
    .resource-details-list .detail-label {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .resource-details-list .detail-value {
        text-align: left;
    }
}

/* Animation improvements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resource-card {
    animation: fadeInUp 0.6s ease-out;
}

.resource-card:nth-child(even) {
    animation-delay: 0.1s;
}

/* Hover effects for action buttons */
.resource-actions .btn {
    transition: all 0.3s ease;
}

.resource-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Improved badge styling */
.badge {
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Loading states */
.resource-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.resource-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--theme-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 