/* Variáveis CSS alinhadas com o design existente */
:root {
    --primary-color: #87C04F; /* Verde do seu site existente */
    --primary-hover: #75a843; /* Verde mais escuro para hover */
    --secondary-color: #FFC107; /* Amarelo para destaques */
    --text-color: #333;
    --text-secondary: #666;
    --bg-color: #fff;
    --bg-secondary: #f5f5f5;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --success-color: #87C04F; /* Verde para feedback positivo */
    --error-color: #F44336; /* Vermelho para feedback negativo */
}

/* Tema escuro ajustado */
body.dark-theme {
    --primary-color: #9ed368; /* Verde mais claro para tema escuro */
    --primary-hover: #b7e085;
    --secondary-color: #FFD54F;
    --text-color: #E0E0E0;
    --text-secondary: #BDBDBD;
    --bg-color: #263238;
    --bg-secondary: #37474F;
    --border-color: #455A64;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --success-color: #9ed368;
    --error-color: #E57373;
}

/* Alinhamento com o design existente */
.faq-section {
    background-image: url(images/conf12.jpg); /* Mesmo fundo do #box principal */
    background-size: cover;
    background-position: top;
    color: #fff; /* Texto branco para contrastar com o fundo */
    margin-top: 40px;
    padding: 30px 20px;
}

.faq-section header {
    text-align: center;
    margin-bottom: 30px;
}

.faq-section header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.faq-section header p {
    font-size: 16px;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}
/* Container do FAQ */
.faq-container {
    max-width: inherit;
    width: 90%;
    background-color: rgba(255, 255, 255, 0.95); /* Fundo branco semi-transparente */
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    padding: 20px;
}

/* Ajustes para o tema escuro */
body.dark-theme .faq-container {
    background-color: rgba(38, 50, 56, 0.95); /* Fundo escuro semi-transparente */
}

/* Ajustes para o sistema de busca */
.search-container {
    max-width: 800px;
    margin: 0 auto 20px;
}

#faq-search {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

body.dark-theme #faq-search {
    background-color: rgba(38, 50, 56, 0.8);
    border: 1px solid rgba(69, 90, 100, 0.5);
}

/* Ajustes para fontes consistentes */
.faq-container, 
.search-container,
.lightbox-content {
    font-family: 'Open Sans', sans-serif; /* Mesma fonte do seu site */
}

/* Ajustes para o acordeão */
.accordion-header {
    background-color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1px;
    border-radius: 4px;
}

.accordion-item.active .accordion-header {
    background-color: var(--primary-color);
    color: white;
}

.accordion-item.active .accordion-header h3 {
    color: white;
}

.accordion-content {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 0 0 4px 4px;
}

body.dark-theme .accordion-header {
    background-color: rgba(55, 71, 79, 0.9);
}

body.dark-theme .accordion-item.active .accordion-header {
    background-color: var(--primary-color);
}

body.dark-theme .accordion-content {
    background-color: rgba(38, 50, 56, 0.95);
}

/* Ajustes para o header do acordeão */
.header-icon {
    background-color: var(--primary-color);
    color: white;
}

.accordion-item.active .header-icon {
    background-color: white;
    color: var(--primary-color);
}

/* Ajustes para perguntas e respostas */
.faq-question {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 12px 15px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.5);
    margin-bottom: 5px;
}

.faq-item.active .faq-question {
    background-color: rgba(135, 192, 79, 0.1); /* Verde muito claro */
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}

.faq-answer {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 0 0 4px 4px;
    margin-bottom: 10px;
}

body.dark-theme .faq-question {
    background-color: rgba(55, 71, 79, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark-theme .faq-item.active .faq-question {
    background-color: rgba(158, 211, 104, 0.1); /* Verde claro semi-transparente */
}

body.dark-theme .faq-answer {
    background-color: rgba(38, 50, 56, 0.8);
}

/* Ajustes para botões */
.video-btn, 
.share-btn {
    color: var(--primary-color);
}

.video-btn:hover, 
.share-btn:hover {
    color: var(--primary-hover);
}

/* Ajustes para o botão de tema */
.theme-toggle {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.theme-toggle:hover {
    background-color: var(--primary-hover);
}

/* Estilos do acordeão principal */
.accordion-item {
    border-bottom: 1px solid var(--border-color);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    display: flex;
    align-items: center;
    padding: 15px 0; /* Ajustado para padding interno do container */
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: relative; /* Necessário para o pseudo-elemento da seta */
    overflow: hidden;
}

.accordion-header:hover {
    background-color: var(--bg-secondary);
}

.header-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--primary-color); /* Cor do ícone */
}

.accordion-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    flex-grow: 1; /* Permite que o título ocupe espaço */
}

/* Seta do acordeão principal */
.accordion-header::after {
    content: '\f078'; /* Ícone de seta para baixo */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 10px;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.accordion-item.active .accordion-header::after {
    transform: rotate(180deg);
}


.accordion-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease; /* Animação de altura e padding */
}

.accordion-item.active .accordion-content {
    max-height: 1000px; /* Valor grande o suficiente para a maioria dos conteúdos */
    padding: 0 0 20px 0; /* Ajustado para padding interno do container */
}

.section-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 14px;
}

/* Estilo das perguntas e respostas internas */
.faq-item {
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.faq-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 10px 0;
    font-weight: 500;
    color: var(--text-color);
    position: relative; /* Para posicionar o botão de vídeo */
}

.faq-question span:first-child {
    flex: 1;
    padding-right: 40px; /* Espaço para o botão de vídeo */
}

/* Seta da pergunta interna */
.faq-question::after {
    content: '\f107'; /* Ícone de seta para baixo */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 10px;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.faq-item.active .faq-question::after {
    transform: rotate(180deg);
}


.badge {
    background-color: var(--secondary-color);
    color: var(--text-color);
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
    margin: 0 10px;
    font-weight: normal;
    white-space: nowrap; /* Evita quebra de linha */
}

.video-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    transition: color 0.3s ease, transform 0.2s ease;
    position: absolute; /* Posiciona o botão */
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2; /* Garante que esteja acima do texto */
}

.video-btn:hover {
    color: var(--primary-hover);
    transform: translateY(-50%) scale(1.1); /* Efeito de zoom no hover */
}

/* Efeito de ripple para botões (opcional, pode ser removido se preferir) */
.video-btn {
    position: relative;
    overflow: hidden;
}

.video-btn .ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(33, 150, 243, 0.3); /* Cor do ripple */
    transform: scale(0);
    animation: ripple 0.6s linear;
}

@keyframes ripple {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}


.faq-answer {
    display: none;
    padding: 10px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.faq-item.active .faq-answer {
    display: block;
}

/* Lightbox para vídeos */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000; /* Z-index alto para sobrepor tudo */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px); /* Efeito de blur no fundo */
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    width: 90%; /* Ajuste para telas menores */
    max-width: 800px;
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    transform: scale(0.9); /* Animação de entrada */
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
    opacity: 1;
}

.lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.lightbox-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--text-color);
}

.close-lightbox {
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.close-lightbox:hover {
    color: var(--text-color);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background-color: #000; /* Fundo preto para o player */
}

.video-container iframe,
.video-container #youtube-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.quality-selector button,
.fullscreen-btn {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-color);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.quality-selector button.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.quality-selector button:hover,
.fullscreen-btn:hover {
    background-color: var(--border-color);
}

/* Estilos para o sistema de busca */
.search-container {
    margin-bottom: 20px;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-secondary);
}

#faq-search {
    width: 100%;
    padding: 12px 40px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 16px;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
}

#faq-search:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-color);
    border-color: var(--primary-color);
}

.clear-search {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: none;
    padding: 5px; /* Área de clique maior */
}

.clear-search.visible {
    display: block;
}

.search-results {
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: none;
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
}

.search-results.visible {
    display: block;
}

.search-result-item {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: var(--text-color);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: var(--bg-secondary);
}

.search-result-item .highlight {
    background-color: rgba(255, 193, 7, 0.3); /* Amarelo semi-transparente */
    padding: 0 2px;
    border-radius: 2px;
}

.no-results {
    padding: 15px;
    text-align: center;
    color: var(--text-secondary);
}

/* Estilo para destacar o item encontrado na busca */
.faq-item.highlight-item {
    background-color: rgba(255, 193, 7, 0.1); /* Fundo levemente amarelo */
    transition: background-color 0.5s ease;
}


/* Estilos para miniaturas de vídeo */
.video-btn {
    position: relative;
    width: 30px; /* Ajuste o tamanho conforme necessário */
    height: 30px; /* Ajuste o tamanho conforme necessário */
}

.video-thumbnail {
    position: absolute;
    width: 160px; /* Tamanho da miniatura */
    height: 90px; /* Tamanho da miniatura (aspect ratio 16:9) */
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    top: -100px; /* Posição acima do botão */
    right: -65px; /* Posição à direita do botão */
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none; /* Não interfere com cliques */
    z-index: 10;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-color);
}

.video-btn:hover .video-thumbnail {
    opacity: 1;
    transform: translateY(0);
}

.video-thumbnail::after {
    content: '\f144'; /* Ícone de play */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 24px;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Estilos para o botão de compartilhamento */
.share-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    margin-left: 10px;
    transition: color 0.2s ease;
    padding: 5px; /* Área de clique maior */
}

.share-btn:hover {
    color: var(--primary-color);
}

/* Estilos para o tooltip de link copiado */
.tooltip {
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    bottom: 100%; /* Acima do botão */
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 11;
    margin-bottom: 5px;
    opacity: 0;
    animation: fadeInOut 2s ease-in-out forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}


/* Estilos para o sistema de feedback */
.feedback-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
}

.feedback-container p {
    margin-bottom: 10px;
}

.feedback-buttons {
    display: flex;
    gap: 10px;
}

.feedback-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.feedback-btn:hover:not(.disabled) {
    background-color: var(--bg-secondary);
    border-color: var(--text-secondary);
}

.feedback-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.feedback-btn[data-value="yes"]:hover:not(.disabled) {
    color: var(--success-color);
    border-color: var(--success-color);
}

.feedback-btn[data-value="no"]:hover:not(.disabled) {
    color: var(--error-color);
    border-color: var(--error-color);
}

.feedback-form {
    margin-top: 15px;
    display: none; /* Inicialmente oculto */
}

.feedback-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    resize: vertical;
    font-size: 14px;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.feedback-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.submit-feedback {
    display: block;
    margin-top: 10px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.submit-feedback:hover {
    background-color: var(--primary-hover);
}

.feedback-thanks {
    margin-top: 15px;
    color: var(--success-color);
    font-weight: bold;
}

/* Estilos para o botão de alternar tema */
.theme-toggle {
    position: fixed;
    bottom: 20px; /* Posição no canto inferior */
    right: 20px;
    z-index: 1000;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 45px; /* Tamanho maior */
    height: 45px; /* Tamanho maior */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    font-size: 20px; /* Tamanho do ícone */
    color: var(--text-color);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
    background-color: var(--bg-secondary);
}

/* Media Queries para responsividade */
@media (max-width: 768px) {
    .faq-section header h2 {
        font-size: 24px;
    }

    .faq-section header p {
        font-size: 14px;
    }

    .faq-container {
        margin: 0 auto;
        padding: 15px;
    }

    .accordion-header {
        padding: 12px 0;
    }

    .accordion-header h3 {
        font-size: 16px;
    }

    .accordion-item.active .accordion-content {
         padding: 0 0 15px 0;
    }

    .faq-question {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px 0;
    }

    .faq-question span:first-child {
        padding-right: 0; /* Remove padding extra em mobile */
        margin-bottom: 5px; /* Espaço entre texto e botões */
    }

    .badge {
        margin: 5px 0;
        font-size: 10px;
    }

    .video-btn {
        position: static; /* Posiciona o botão inline em mobile */
        transform: none;
        margin-left: auto; /* Alinha à direita */
        font-size: 20px; /* Tamanho do ícone maior em mobile */
    }

     .video-btn:hover {
        transform: none; /* Remove zoom no hover em mobile */
    }

    .video-thumbnail {
        display: none; /* Oculta miniatura em mobile */
    }

    .lightbox-content {
        width: 95%;
        padding: 15px;
    }

    .lightbox-header h3 {
        font-size: 18px;
    }

    .close-lightbox {
        font-size: 24px;
    }

    .video-controls {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .quality-selector {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .quality-selector button,
    .fullscreen-btn {
        flex-grow: 1; /* Botões ocupam largura total */
        text-align: center;
    }

    .search-wrapper {
        flex-direction: row; /* Mantém busca em linha */
    }

    #faq-search {
        padding: 10px 40px;
        font-size: 14px;
    }

    .search-icon, .clear-search {
        font-size: 14px;
    }

    .search-result-item {
        font-size: 14px;
    }

    .feedback-container {
        font-size: 12px;
    }

    .feedback-buttons {
        flex-direction: column;
        gap: 5px;
    }

    .feedback-btn {
        width: 100%;
        text-align: center;
    }

    .feedback-form textarea {
        font-size: 12px;
    }

    .submit-feedback {
        width: 100%;
        text-align: center;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}
