

/* Search */
.search-container {
    position: relative;
    margin-bottom: 2rem;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

.search-wrapper {
    position: relative;
    display: flex;
    gap: 0.75rem;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #5a7272;
}

.search-input {
    flex: 1;
    height: 3rem;
    padding-left: 2.5rem;
    padding-right: 1rem;
    border: 2px solid #d4e5e5;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
}

.search-input:focus {
    outline: none;
    border-color: #376e5c;
    box-shadow: 0 0 0 3px rgba(13, 131, 112, 0.1);
}

/* Filter Button */
.filter-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 3rem;
    padding: 0 1.25rem;
    background-color: white;
    border: 2px solid #d4e5e5;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1a3e3e;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-button:hover {
    border-color: #376e5c;
    background-color: rgba(13, 131, 112, 0.05);
}

.filter-button:focus {
    outline: none;
    border-color: #376e5c;
    box-shadow: 0 0 0 3px rgba(13, 131, 112, 0.1);
}

.filter-button svg {
    flex-shrink: 0;
}

/* Filter Dropdown */
.filter-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 280px;
    background-color: white;
    border: 2px solid #d4e5e5;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 10;
    animation: fadeIn 0.2s ease;
}

.filter-dropdown.hidden {
    display: none;
}

.filter-dropdown-header {
    padding: 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #5a7272;
    border-bottom: 2px solid #d4e5e5;
}

.category-filters {
    padding: 0.5rem;
}

.category-filter-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-filter-item:hover {
    background-color: rgba(13, 131, 112, 0.05);
}

.category-filter-item.selected {
    background-color: rgba(13, 131, 112, 0.1);
}

.category-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d4e5e5;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.category-filter-item.selected .category-checkbox {
    background-color: #376e5c;
    border-color: #376e5c;
}

.category-checkbox svg {
    width: 0.875rem;
    height: 0.875rem;
    color: white;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.category-filter-item.selected .category-checkbox svg {
    opacity: 1;
}

.category-label {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1a3e3e;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
    min-height: 400px;
}

.empty-state.hidden {
    display: none;
}

.empty-icon {
    color: #d4e5e5;
    margin-bottom: 1rem;
}

.empty-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a3e3e;
    margin-bottom: 0.5rem;
}

.empty-description {
    font-size: 1rem;
    color: #5a7272;
    max-width: 320px;
}

/* Grid Layout */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr 2fr;
    }
}

/* Video List */
.video-list-container {
    display: flex;
    flex-direction: column;
}

.video-list-container .video-card {
    height: 630px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-right: 0.5rem;
}

@media (min-width: 1024px) and (max-width: 1400px) {
    .video-player-container .video-card {
        height: auto !important;
    }
    .video-list-container .video-card {
        height: 540px;
    }
}

.video-list-container .video-card::-webkit-scrollbar {
    width: 8px;
}

.video-list-container .video-card::-webkit-scrollbar-track {
    background: #f0f5f5;
    border-radius: 4px;
}

.video-list-container .video-card::-webkit-scrollbar-thumb {
    background: #376e5c;
    border-radius: 4px;
}

.video-list-container .video-card::-webkit-scrollbar-thumb:hover {
    background: #376e5c;
}

.video-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
}

/* Video Item */
.video-item {
    padding: 0.75rem;
    background: #ffffff;
    border: 2px solid #d4e5e5;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-item:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(13, 131, 112, 0.5);
}

.video-item.active {
    border-color: #376e5c;
    background-color: rgba(13, 131, 112, 0.05);
}

.video-item-content {
    display: flex;
    gap: 0.75rem;
}

.thumbnail-container {
    position: relative;
    flex-shrink: 0;
    width: 7rem;
    height: 5rem;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: #f0f5f5;
    border: 1px solid #009688;
}

.thumbnail-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-item:hover .thumbnail-container img {
    transform: scale(1.1);
}

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

.video-item:hover .play-overlay {
    opacity: 1;
}

.play-icon {
    width: 2rem;
    height: 2rem;
    color: white;
    fill: white;
}

.video-item-info {
    flex: 1;
    min-width: 0;
}

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

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.5rem;
    text-transform: uppercase;
}

.badge-conta {
    background-color: #376e5c;
    color: white;
}

.badge-spv {
    background-color: #12715B;
    color: white;
}

.badge-efactura {
    background-color: #c2ece6;
    color: #376e5c;
}

/* Video Player */
.video-player-container {
    position: sticky;
    top: 1rem;
}

.video-player-container .video-card {
    height: 630px;
    display: flex;
    flex-direction: column;
}

.video-card {
    overflow: hidden;
    border: 2px solid #d4e5e5;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    background: white;
}

.video-iframe-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background-color: #f0f5f5;
}

.video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    padding: 1.5rem;
}

.video-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.video-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a3e3e;
}

.video-description {
    color: #5a7272;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 1023px) {
    .container {
        padding: 2rem 1rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .video-list-container {
        height: auto;
        max-height: 400px;
    }

    .video-player-container {
        position: relative;
        top: auto;
    }
}

@media (max-width: 640px) {
    .header h1 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .thumbnail-container {
        width: 6rem;
        height: 4.5rem;
    }

    .video-title {
        font-size: 1.25rem;
    }
}

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

.video-item {
    animation: fadeIn 0.3s ease;
}
