.videos-container {
    padding: 2rem 0;
    background-color: #f9f9f9;
}

/* Filtros */
.videos-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-button {
    padding: 0.5rem 1.5rem;
    border: 2px solid #7ab555;
    border-radius: 25px;
    background: transparent;
    color: #7ab555;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-button:hover,
.filter-button.active {
    background: #7ab555;
    color: white;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.video-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.video-card:hover .video-info {
    background: #f8f8f8;
}

.video-thumbnail {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}

.video-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.video-card:hover .video-thumbnail::before {
    opacity: 1;
}

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

.video-info {
    padding: 1rem;
    transition: background-color 0.3s ease;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.video-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.page-title {
    text-align: center;
    padding: 2rem 0;
    background: #fff;
    margin-bottom: 0;
    margin-top: 80px;
}

.page-title h1 {
    font-size: 2.5rem;
    color: #7ab555;
    margin: 0;
    font-weight: 700;
}

/* Botão Voltar ao Topo */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #7ab555;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    border: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #689c47;
    transform: translateY(-3px);
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-card {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Responsividade */
@media (max-width: 1200px) {
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .videos-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .page-title {
        margin-top: 60px;
    }

    .page-title h1 {
        font-size: 2rem;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .video-info {
        padding: 0.8rem;
    }

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

    .video-description {
        font-size: 0.8rem;
    }

    .page-title {
        margin-top: 50px;
    }

    .filter-button {
        padding: 0.4rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Modal de Vídeo */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.video-modal.active .modal-content {
    transform: scale(1);
}

.modal-video {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: black;
}

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

.modal-info {
    /*padding: 1.5rem;*/
    background-color: #343434;
    margin-left: 5px;
}

.modal-info h2 {
    color: rgb(255, 255, 255);
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.modal-info p {
    color: rgb(255, 255, 255);
    margin: 0;
    font-size: 1rem;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.close-modal:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
    }

    .modal-info {
        padding: 1rem;
    }

    .modal-info h2 {
        font-size: 1.2rem;
    }

    .modal-info p {
        font-size: 0.9rem;
    }
}

/* Erro de carregamento do vídeo */
.video-error {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f8f8f8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    text-align: center;
    padding: 1rem;
}

.video-error i {
    font-size: 2rem;
    color: #dc3545;
    margin-bottom: 0.5rem;
}

.video-error p {
    margin: 0;
    font-size: 0.9rem;
}

/* Estilos para o pop-up de legendas */
.legendas-popup {
    position: fixed;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    bottom: 2rem;
    right: 2rem;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(.4,0,.2,1);
    transform: translateY(30px) scale(0.98);
}

@media (min-width: 769px) {
    .legendas-popup {
        bottom: 11rem; /* Ajustado para 11rem */
    }
}

.legendas-popup.show {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(0) scale(1);
}

.legendas-popup-content {
    background: #23272f;
    color: #fff;
    padding: 20px;
    border-radius: 12px;
    font-size: 1rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    position: relative;
    min-width: 280px;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: popup-bounce 0.5s;
    border: 2px solid #7ab555;
}

@keyframes popup-bounce {
    0% { transform: scale(0.95); opacity: 0; }
    60% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); }
}

.legendas-popup-content .popup-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legendas-popup-content .popup-icon {
    font-size: 1.5rem;
    color: #7ab555;
    animation: pulse 2s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.legendas-popup-content .popup-icon i {
    font-size: 1.8rem;
    color: #fff;
}

.legendas-popup-content .icon-subtitles {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 4px;
    animation: highlight 1.5s infinite;
    vertical-align: middle;
}

.legendas-popup-content .icon-subtitles i {
    display: inline-block;
    color: #fff;
}

/* Ajustes específicos para o ícone do Phosphor */
.legendas-popup-content .ph {
    font-weight: normal;
    font-style: normal;
    font-size: inherit;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "liga";
}

.legendas-popup-content .popup-title {
    font-weight: bold;
    font-size: 1.2rem;
    color: #7ab555;
}

.legendas-popup-content .popup-message {
    font-size: 1rem;
    line-height: 1.4;
    color: #fff;
}

.legendas-popup-content .popup-steps {
    background: rgba(122, 181, 85, 0.1);
    padding: 12px;
    border-radius: 8px;
    margin-top: 8px;
}

.legendas-popup-content .popup-steps ol {
    margin: 0;
    padding-left: 20px;
}

.legendas-popup-content .popup-steps li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.legendas-popup-content .popup-steps li:last-child {
    margin-bottom: 0;
}

.legendas-popup-content .close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent !important;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    opacity: 1;
    transition: none;
    box-shadow: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.legendas-popup-content .close-popup:hover {
    opacity: 0.8;
    background: transparent !important;
    box-shadow: none !important;
}

.legendas-popup-content .close-popup:focus {
    background: transparent !important;
    box-shadow: none !important;
    outline: none;
}

.legendas-popup-content .close-popup:active {
    background: transparent !important;
    box-shadow: none !important;
}

.legendas-popup-content .icon-cc,
.legendas-popup-content .icon-subtitles-yt {
    display: inline-block;
    background: #fff;
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    margin: 0 4px;
    animation: highlight 1.5s infinite;
}

@keyframes highlight {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@media (max-width: 768px) {
    .legendas-popup {
        right: 1rem;
        bottom: 1rem;
    }
    
    .legendas-popup-content {
        min-width: 220px;
        padding: 12px;
    }
    
    .legendas-popup-content .popup-title {
        font-size: 1rem;
    }
    
    .legendas-popup-content .popup-message {
        font-size: 0.9rem;
    }
    
    .legendas-popup-content .popup-steps {
        padding: 8px;
    }
    
    .legendas-popup-content .popup-steps li {
        font-size: 0.85rem;
    }

    .legendas-popup-content .popup-icon {
        font-size: 1.2rem;
        color: #7ab555;
    }
    
    .legendas-popup-content .icon-cc {
        font-size: 0.9rem;
        padding: 1px 4px;
        color: #000;
    }
}

/* Ícone de legendas para desktop (estilo YouTube) */
.icon-subtitles-yt {
    display: inline-block;
    position: relative;
    width: 24px;
    height: 18px;
    background-color: white;
    border-radius: 2px;
    margin-left: 5px;
    vertical-align: middle;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* As três linhas do ícone são criadas usando pseudo-elementos */
.icon-subtitles-yt:before,
.icon-subtitles-yt:after,
.icon-subtitles-yt span {
    content: '';
    position: absolute;
    height: 2px;
    background: black;
    left: 4px;
    right: 4px;
}

/* Linha superior */
.icon-subtitles-yt:before {
    top: 5px;
    width: 60%;
}

/* Linha inferior */
.icon-subtitles-yt:after {
    bottom: 5px;
    width: 70%;
}

/* Linha do meio */
.icon-subtitles-yt span {
    top: 50%;
    transform: translateY(-50%);
    width: 50%;
}

.legendas-popup-content.mobile,
.legendas-popup-content.desktop {
    display: block;
}

@media (max-width: 768px) {
    .legendas-popup-content.desktop {
        display: none;
    }
    
    .legendas-popup-content.mobile {
        display: block;
    }
} 