/**
 * Knowmad Short Film Festival
 * Additional CSS Styles
 */

/* ============================================================================
   Utility Classes
   ========================================================================== */

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================================
   Animations
   ========================================================================== */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ============================================================================
   Film Cards
   ========================================================================== */

.film-card {
    will-change: transform;
}

.film-card .aspect-\[2\/3\] {
    aspect-ratio: 2/3;
}

/* ============================================================================
   Video Embeds
   ========================================================================== */

.video-embed-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
}

.video-embed-container iframe,
.video-embed-container object,
.video-embed-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================================================================
   Star Rating System
   ========================================================================== */

.star-rating {
    display: inline-flex;
    gap: 4px;
    user-select: none;
}

.star-rating .star {
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.5rem;
    color: #d1d5db; /* gray-300 */
}

.star-rating .star:hover,
.star-rating .star.active {
    color: #f1c40f;
    transform: scale(1.2);
}

.star-rating .star i {
    pointer-events: none;
}

.star-rating.voting-disabled .star {
    cursor: default;
    opacity: 0.7;
}

/* ============================================================================
   Award Badges
   ========================================================================== */

.award-badge-winner {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

.award-badge-mention {
    background: linear-gradient(135deg, #4ecca3, #45b393);
    box-shadow: 0 4px 15px rgba(78, 204, 163, 0.4);
}

.award-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
}

/* ============================================================================
   Loading Spinner
   ========================================================================== */

.voting-spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #e74c3c;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================================
   Timeline Block
   ========================================================================== */

.timeline-item {
    position: relative;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #e74c3c, #f39c12);
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -6px;
    top: 0.5rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e74c3c;
    border: 3px solid white;
}

/* ============================================================================
   SDG Icons
   ========================================================================== */

.sdg-icon {
    width: 80px;
    height: 80px;
    transition: transform 0.3s ease;
    will-change: transform;
}

.sdg-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

/* ============================================================================
   Gradient Backgrounds
   ========================================================================== */

.festival-gradient {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.festival-gradient-dark {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.festival-gradient-accent {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

/* ============================================================================
   Responsive Tables
   ========================================================================== */

@media (max-width: 768px) {
    .responsive-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ============================================================================
   Filters Sticky Header
   ========================================================================== */

.sticky-filters {
    position: sticky;
    top: 0;
    z-index: 40;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ============================================================================
   Hover Effects
   ========================================================================== */

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* ============================================================================
   Print Styles
   ========================================================================== */

@media print {
    .no-print {
        display: none !important;
    }

    .film-card {
        page-break-inside: avoid;
    }
}

/* ============================================================================
   Dark Mode Support
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* ============================================================================
   Accessibility
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible for better keyboard navigation */
*:focus-visible {
    outline: 2px solid #e74c3c;
    outline-offset: 2px;
}

/* ============================================================================
   Custom Scrollbar
   ========================================================================== */

.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e74c3c;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #c0392b;
}
