/* Resources Page Styles */

.resources-container {
    padding: 30px 0;
    min-height: calc(100vh - 80px);
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

/* Filters Section */
.filters-section {
    margin-bottom: 40px;
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.filters-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.filter-select,
.filter-input {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f8fafc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #4073c0;
    background: white;
    box-shadow: 0 0 0 4px rgba(64, 115, 192, 0.15), 0 4px 12px rgba(64, 115, 192, 0.1);
    transform: translateY(-1px);
}

.search-group {
    position: relative;
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
    margin-top: 14px;
}

.clear-filters-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.clear-filters-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Resources Grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Resource Card */
.resource-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    height: fit-content;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.resource-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    border-color: rgba(64, 115, 192, 0.3);
}

.resource-card h3 {
    padding: 20px 10px 5px;
    color: #fed7aa;
    font-size: 16px;
}

.resource-card p {
    color: #ffffffea;
    padding: 0 10px;
}
.resource-type-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #4073c0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mood-tag {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid rgba(64, 115, 192, 0.2);
}

.mood-tag.angry { 
    background: linear-gradient(135deg, #ffe9e9 0%, #fee2e2 100%);
    color: #ff0000; 
    border-color: rgb(255, 0, 0); 
}
.mood-tag.disgust { 
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); 
    color: #16a34a; 
    border-color: rgb(9, 255, 99); 
}
.mood-tag.fear { 
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%); 
    color: #9333ea; 
    border-color: rgb(132, 0, 255); 
}
.mood-tag.happy { 
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); 
    color: #d97706; 
    border-color: rgb(255, 136, 0); 
}
.mood-tag.neutral { 
    background: linear-gradient(135deg, #f4fff4 0%, #d4ffd2 100%); 
    color: #009d22; 
    border-color: rgb(0, 234, 27); 
}
.mood-tag.sad { 
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); 
    color: #2563eb; 
    border-color: rgb(37, 100, 235); 
}
.mood-tag.surprise { 
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%); 
    color: #ea580c; 
    border-color: rgb(234, 90, 12); 
}



/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-content {
    max-width: 400px;
    margin: 0 auto;
}

.no-results i {
    font-size: 48px;
    color: #9ca3af;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 24px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 10px;
}

.no-results p {
    color: #6b7280;
    font-size: 16px;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #4073c0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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



/* New Resource Container Styles */
.resource-container {
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
}

/* Video Container Styles */
.video-container {
    height: 100%;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    border-radius: 16px;
    background: #000;
}

.resource-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #4073c0, #60a5fa);
    border-radius: 0 2px 2px 0;
    transition: width 0.3s ease;
    z-index: 1;
}



/* Audio Container Styles */
.audio-container {
    height: 100%;
}

.audio-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: 16px;
}

.audio-thumbnail {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.3s ease;
}

.audio-wrapper:hover .audio-thumbnail {
    transform: scale(1.02);
}

.audio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.audio-container:hover .audio-overlay {
    opacity: 1;
}

.audio-wave-container {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 60px;
}

.audio-wave-bar {
    width: 4px;
    height: 20px;
    background: white;
    border-radius: 2px;
    animation: none;
    transition: all 0.3s ease;
}

.audio-wave-bar.animated {
    animation: wave 1.5s ease-in-out infinite;
}

.audio-wave-bar:nth-child(1) { animation-delay: 0s; }
.audio-wave-bar:nth-child(2) { animation-delay: 0.1s; }
.audio-wave-bar:nth-child(3) { animation-delay: 0.2s; }
.audio-wave-bar:nth-child(4) { animation-delay: 0.3s; }
.audio-wave-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 100% {
        height: 20px;
    }
    50% {
        height: 50px;
    }
}

.resource-audio {
    display: none;
}

/* Poster Container Styles */
.poster-container {
    height: 100%;
}

.poster-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* 1:1 Square Aspect Ratio */
    overflow: hidden;
    border-radius: 16px;
}

.poster-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.poster-wrapper:hover .content-overlay {
    transform: translateY(100%);
}

.poster-wrapper:hover .poster-image {
    transform: scale(1.05);
}

/* PDF Container Styles */
.pdf-container {
    height: 100%;
}

.pdf-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* Reduced size for guides and books */
    overflow: hidden;
    border-radius: 16px;
    background: #f8fafc;
}

.pdf-viewer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    transition: transform 0.3s ease;
}

/* Content Overlay Styles for Video, Audio, PDF and Poster */
.content-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.3), transparent);
    color: white;
    padding: 30px 20px 20px;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.video-wrapper:hover .content-overlay,
.audio-wrapper:hover .content-overlay,
.pdf-wrapper:hover .content-overlay,
.quotes-wrapper:hover .content-overlay {
    transform: translateY(100%);
}

.overlay-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgb(0, 0, 0);
}

.overlay-description {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.overlay-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.overlay-tags .mood-tag {
    backdrop-filter: blur(10px);
    font-size: 10px;
    padding: 3px 8px;
}

/* Quotes Container Styles */
.quotes-container {
    height: 100%;
}

.quotes-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, rgb(255, 0, 0) 0%, rgb(188, 0, 255) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.quotes-display {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quote-item {
    position: absolute;
    width: 100%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    text-align: center;
}

.quote-item.active {
    opacity: 1;
}

.quote-content {
    max-width: 90%;
}

.quote-icon {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
}

.quote-text {
    font-size: 16px;
    line-height: 1.5;
    color: white;
    font-weight: 500;
    margin: 0;
}

.quotes-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.quote-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background 0.3s ease;
}

.quote-dot.active {
    background: white;
}

.quotes-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.3), transparent);
    color: white;
    padding: 30px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.quotes-wrapper:hover .quotes-info {
    transform: translateY(0);
}

.quotes-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.quotes-description {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.quotes-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.quotes-wrapper:hover .quotes-tags {
    opacity: 0;
}

.quotes-tags .mood-tag {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 10px;
    padding: 3px 8px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .resources-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
    
    .filters-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .filter-group {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .resources-container {
        padding: 20px 0;
    }
    
    .filters-section {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .resource-card {
        max-width: none;
    }
    
    .quote-text {
        font-size: 14px;
    }
    
    .content-overlay {
        padding: 20px 15px 15px;
    }
}

@media (max-width: 480px) {
    .filters-section {
        padding: 15px;
    }
}