/* Movie Drama Calendar Block Styles */
.wegreen-movie-drama-calendar {
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Header Styles */
.movie-drama-calendar-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.movie-drama-calendar-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Filter Controls */
.movie-drama-filter-controls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: #ffffff;
    border: 2px solid #e9ecef;
    color: #495057;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.filter-btn:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

.filter-btn.active {
    background: #28a745;
    border-color: #28a745;
    color: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.filter-btn:focus {
    outline: 2px solid #28a745;
    outline-offset: 2px;
}

/* Year Navigation Slider */
.year-navigation-slider {
    margin-bottom: 1rem;
    position: relative;
}

/* Add scroll indicators */
.year-navigation-slider::before,
.year-navigation-slider::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 100%;
    background: linear-gradient(to right, rgba(248, 249, 250, 0.8), transparent);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.year-navigation-slider::before {
    left: 0;
    background: linear-gradient(to right, rgba(248, 249, 250, 0.9), transparent);
}

.year-navigation-slider::after {
    right: 0;
    background: linear-gradient(to left, rgba(248, 249, 250, 0.9), transparent);
}

.year-navigation-slider.show-left-indicator::before {
    opacity: 1;
}

.year-navigation-slider.show-right-indicator::after {
    opacity: 1;
}

.year-slider-container {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0.5rem 0;
    cursor: grab;
    user-select: none;
    /* Hide scrollbar but keep scrolling functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.year-slider-container:active {
    cursor: grabbing;
}

/* Hide scrollbar for WebKit browsers (Chrome, Safari, Opera) */
.year-slider-container::-webkit-scrollbar {
    display: none;
}

.year-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 60px;
}

.year-nav-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
    text-decoration: none;
}

.year-nav-btn.active {
    background: #217346;
    border-color: #217346;
    color: white;
}

.year-nav-btn.active:hover {
    background: #1a5c37;
    border-color: #1a5c37;
    color: white;
}

/* Current Year Styling */
.year-nav-btn.current-year {
    position: relative;
    font-weight: 700;
}

.year-nav-btn.current-year:not(.active) {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.year-nav-btn.current-year:not(.active):hover {
    background: #ffeaa7;
    border-color: #fdcb6e;
    color: #6c5ce7;
}

.year-nav-btn.current-year::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #217346;
    border-radius: 50%;
}

.year-nav-btn.current-year.active::after {
    background: white;
}

/* Empty Year Message */
.empty-year {
    text-align: center;
    padding: 2rem 1rem;
    color: #6b7280;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 1rem 0;
}

.empty-year p {
    font-size: 1.125rem;
    margin: 0;
    font-style: italic;
}

/* Month Navigation */
.month-navigation {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.month-nav-btn {
    background: #ffffff;
    border: 1px solid #dee2e6;
    color: #6c757d;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

/* Month navigation styling */
.month-nav-btn.has-items {
    background-color: #217346;
    color: white;
    font-weight: 600;
}

.month-nav-btn.no-items {
    background-color: #f0f0f0;
    color: #666;
    opacity: 0.7;
}

.month-nav-btn.has-items:hover {
    background-color: #1a5c37;
    text-decoration: none;
}

.month-nav-btn.no-items:hover {
    background-color: #e0e0e0;
    text-decoration: none;
}

.month-nav-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.month-nav-btn.active {
    background: #217346;
    border-color: #217346;
    color: white;
}

/* Content Styles */
.movie-drama-calendar-content {
    margin-top: 2rem;
}

.year-section {
    margin-bottom: 3rem;
}

.month-section {
    margin-bottom: 2rem;
    background: #ffffff;
    overflow: hidden;
}

.month-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #495057;
    margin: 0;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

/* Items Grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
}

@media (min-width: 640px) {
    .items-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .items-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Movie Drama Cards */
.movie-drama-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.movie-drama-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: #d1d5db;
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.card-link:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Card Poster */
.card-poster {
    position: relative;
    aspect-ratio: 2/3;
    width: 100%;
    overflow: hidden;
    background: #f3f4f6;
}

.item-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.movie-drama-card:hover .item-poster {
    transform: scale(1.05);
}

.item-poster-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #9ca3af;
    font-size: 2rem;
}

/* Type Badge */
.type-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(31, 41, 55, 0.9);
    color: #ffffff;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Card Content */
.card-content {
    padding: 1rem;
}

.card-title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.5rem;
    color: #1f2937;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-release-date {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.2;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.empty-state p {
    font-size: 1.125rem;
    margin: 0;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    
    .movie-drama-calendar-title {
        font-size: 1.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        min-width: 70px;
    }
    
    .items-grid {
        gap: 1rem;
        padding: 1rem;
    }
    
    .card-content {
        padding: 0.75rem;
    }
}

/* Animation for filtering */
.type-section {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Focus and accessibility improvements */
.filter-btn:focus-visible,
.card-link:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .movie-drama-filter-controls {
        display: none;
    }
    
    .movie-drama-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Empty Month Styling */
.empty-month {
    text-align: center;
    padding: 2rem 1.5rem;
    color: #6b7280;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 1rem 0;
    font-style: italic;
}