/* Reset e Configurações Gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4CAF50;
    --primary-dark: #388E3C;
    --secondary-color: #2E7D32;
    --text-color: #333;
    --text-light: #666;
    --bg-light: #f5f5f5;
    --white: #ffffff;
    --border-color: #ddd;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Fixo */
.header-sticky {
    position: sticky;
    top: 0;
    background-color: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 1rem 0;
}

.header-sticky .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px; /* Espaço entre logo e texto */
}

.logo img {
    height: 50px;
    margin-right: 10px;
    display: block;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--border-color);
    margin-top: -4px;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
    background-color: rgba(76, 175, 80, 0.1);
}

.mobile-menu-toggle {
    display: none; /* Escondido por padrão no desktop */
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    order: 2;
    margin-left: auto; /* Empurra para a direita */
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
}


.menu-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 700;
    margin: 0; 
    line-height: 1; 
    align-self: center; 
}


/* Main Content */
main {
    min-height: calc(100vh - 200px);
}

section {
    padding: 4rem 0;
}

section h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Seção Quem Somos */
.quem-somos {
    background-color: var(--bg-light);
}

.quem-somos p {
    text-align: justify;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Galeria */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.galeria-item {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.galeria-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.galeria-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.galeria-item .legenda {
    padding: 1rem;
    text-align: center;
    font-weight: 500;
    color: var(--text-color);
}

/* Formulário de Dúvidas */
.formulario-duvidas {
    background-color: var(--bg-light);
}

.formulario-duvidas p {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.form-contato {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.checkbox-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.mensagem-feedback {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
}

.mensagem-feedback.sucesso {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mensagem-feedback.erro {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Página Institucional - Equipe */
.equipe {
    background-color: var(--bg-light);
}

.intro-equipe {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

.equipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.membro-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.membro-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.membro-foto img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 4px solid var(--primary-color);
}

.membro-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.membro-info .funcao {
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.membro-info .descricao {
    color: var(--text-color);
    text-align: justify;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Página de Login */
.login-section {
    min-height: calc(100vh - 300px);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-light);
    padding: 2rem 0;
}

.login-box {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    max-width: 450px;
    width: 100%;
}

.login-box h2 {
    margin-bottom: 0.5rem;
}

.login-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.form-login .form-group {
    margin-bottom: 1.5rem;
}

.login-info {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-light);
}

.login-info p {
    margin-bottom: 0.5rem;
}

/* Dashboard */
.dashboard-body {
    display: flex;
    background-color: var(--bg-light);
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 2rem 0;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 0 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-header h2 {
    color: var(--white);
    text-align: left;
    margin: 0;
}

.user-info {
    padding: 1rem 1.5rem;
    background-color: rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
}

.user-info p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

#usuario-email {
    font-weight: 600;
    word-break: break-word;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav .nav-link {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: var(--white);
}

.sidebar-nav .nav-link.logout {
    color: #ffcdd2;
    margin-top: 2rem;
}

.sidebar-nav .nav-link.logout:hover {
    background-color: rgba(244, 67, 54, 0.2);
    border-left-color: #ffcdd2;
}

.dashboard-main {
    margin-left: 280px;
    flex: 1;
    min-height: 100vh;
}

.dashboard-header {
    background-color: var(--white);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.mobile-sidebar-toggle {
    display: none;
}

.dashboard-content {
    padding: 2rem;
}

.dashboard-section {
    display: none;
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.dashboard-section.active {
    display: block;
}

.dashboard-section h2 {
    text-align: left;
    margin-bottom: 1rem;
}

.dashboard-section > p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.stat-card h3 {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.info-box {
    background-color: #e3f2fd;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
}

.info-box h3 {
    color: #1976D2;
    margin-bottom: 1rem;
}

.info-box p {
    color: var(--text-color);
    line-height: 1.6;
}

/* Planilha */
.planilha-container {
    margin-top: 2rem;
}

.iframe-wrapper {
    width: 100%;
    height: 600px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.iframe-wrapper iframe {
    width: 100%;
    height: 100%;
}

.planilha-actions {
    text-align: center;
}

.btn-action {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-action:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.info-text {
    margin-top: 1rem;
    color: var(--text-light);
}

/* Arquivos */
.arquivos-lista {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.arquivo-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    transition: var(--transition);
}

.arquivo-item:hover {
    box-shadow: var(--shadow);
}

.arquivo-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.arquivo-info {
    flex: 1;
}

.arquivo-info h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.arquivo-info p {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.arquivo-meta {
    color: var(--text-light);
    font-size: 0.85rem;
}

.btn-download {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-download:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 2rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    margin-bottom: 1.5rem;
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-section p {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsividade */
@media (max-width: 768px) {

    .header {
        padding: 0.5rem 0;
        justify-content: space-between;
    }

    .header-sticky .container {
        flex-wrap: nowrap; /* Impede quebra de linha */
        justify-content: space-between; /* Logo esquerda, menu direita */
        align-items: center;
        padding: 0.5rem 20px;
    }

    .logo-container {
        order: 1; /* Logo fica à esquerda */
        flex: 1; /* Ocupa espaço disponível */
        justify-content: flex-start; /* Alinha logo à esquerda */
    }

    .mobile-menu-toggle {
        display: flex !important; /* FORÇA a exibição no mobile */
        order: 2; /* Hamburguer fica à direita */
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        box-shadow: var(--shadow-hover);
        z-index: 1000;
        order: 3; /* Menu dropdown abaixo */
    }

    .nav-menu.active {
        display: block;
    }

    .menu-title {
        display: none !important; /* Esconde o título no mobile */
    }

    /* Garante que o hamburguer fique sempre à direita */
    .logo {
        display: flex;
        align-items: center;
        flex-shrink: 0; /* Impede que a logo encolha */
    }

    .logo img {
        height: 40px; /* Levemente menor no mobile */
        margin-right: 0;
    }



    .nav-menu ul {
        flex-direction: column;
        gap: 0;
        padding-top: 1rem;
    }

    .nav-menu a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    section {
        padding: 2rem 0;
    }

    section h2 {
        font-size: 1.5rem;
    }

    .galeria-grid,
    .equipe-grid {
        grid-template-columns: 1fr;
    }

    .login-box {
        padding: 2rem;
    }

    /* Dashboard Mobile */
    .sidebar {
        transform: translateX(-100%);
        transition: var(--transition);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .dashboard-main {
        margin-left: 0;
    }

    .mobile-sidebar-toggle {
        display: flex;
        flex-direction: column;
        gap: 4px;
        cursor: pointer;
    }

    .mobile-sidebar-toggle span {
        width: 25px;
        height: 3px;
        background-color: var(--primary-color);
    }

    .dashboard-content {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .arquivo-item {
        flex-direction: column;
        text-align: center;
    }

    .btn-download {
        width: 100%;
    }

    .menu-title {
        display: none;
    }
    
    .logo {
        justify-content: center; /* Centraliza o título quando a logo some */
    }

    
   

}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.2rem;
    }

    .form-contato {
        padding: 1.5rem;
    }

    .checkbox-group {
        flex-direction: column;
        gap: 0.75rem;
    }
}

.link-sem-estilo {
    text-decoration: none;
    color: inherit; /* Mantém a cor normal do texto */
}

.link-sem-estilo:hover {
    text-decoration: none;
    color: #007bff; /* Azul no hover - você pode ajustar o tom */
}

.link-sem-estilo:active,
.link-sem-estilo:visited {
    text-decoration: none;
    color: inherit; /* Mantém a cor padrão quando visitado/clicado */
}

/* Hero Section Dona Bia */
.hero-dona-bia {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-dona-bia::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" opacity="0.1"><polygon fill="white" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero-text .destaque {
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-text h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
    opacity: 0.9;
}

.hero-descricao {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-style: italic;
    line-height: 1.6;
    border-left: 4px solid #FFD700;
    padding-left: 1rem;
}

.btn-conheca-historia {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.btn-conheca-historia:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Foto Hero */
.hero-foto {
    display: flex;
    justify-content: center;
    align-items: center;
}

.foto-container {
    position: relative;
    width: 350px;
    height: 450px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: var(--transition);
}

.foto-container:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.05);
}

#foto-dona-bia {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.destaque-foto {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(255,215,0,0.1) 100%);
    pointer-events: none;
}

/* Timeline */
.historia-timeline {
    padding: 5rem 0;
    background: var(--bg-light);
}

.historia-timeline h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-data {
    flex: 1;
    text-align: center;
    padding: 1rem;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.timeline-content {
    flex: 2;
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    position: relative;
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.timeline-content p {
    line-height: 1.6;
    color: var(--text-color);
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translateY(-50%);
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -30px;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -30px;
}

/* Citação */
.citacao-destaque {
    max-width: 600px;
    margin: 4rem auto 0;
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    border-left: 5px solid #FFD700;
}

.citacao-texto {
    font-size: 1.3rem;
    font-style: italic;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.citacao-autor {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .foto-container {
        width: 280px;
        height: 350px;
        transform: none;
    }

    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        flex-direction: row !important;
        align-items: flex-start;
    }

    .timeline-data {
        flex: 0 0 80px;
        text-align: left;
        padding: 0;
        margin-right: 1rem;
    }

    .timeline-content {
        flex: 1;
    }

    .timeline-content::before {
        left: -30px !important;
        right: auto !important;
    }

    .mobile-sidebar-toggle {
        display: flex; /* Mostra hamburger */
    }
    
    .sidebar {
        display: block; /* Mas escondido via left: -100% */
    }
    
    /* Ajuste main para não sobrepor */
    .dashboard-main {
        margin-left: 0; /* Remove margem se tiver */
    }
}



.sidebar-nav a[href="index.html"] {
    background-color: var(--primary-color);
    color: white !important;
    font-weight: 600;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-nav a[href="index.html"]:hover {
    background-color: var(--primary-dark);
    transform: translateX(4px);
    transition: all 0.3s ease;
}

/* ======================================== */
/* RESPONSIVIDADE DA TABELA DE DÚVIDAS */
/* ======================================== */

#duvidas-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
}

#duvidas-table th, 
#duvidas-table td {
    border: 1px solid var(--border-color);
    padding: 12px 8px;
    text-align: left;
    font-size: 0.9rem;
}

#duvidas-table th {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    position: sticky;
    top: 0;
}

#duvidas-table tbody tr:nth-child(even) {
    background-color: var(--bg-light);
}

#duvidas-table tbody tr:hover {
    background-color: rgba(76, 175, 80, 0.05);
}

/* Container responsivo para a tabela */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* MOBILE - Tabela responsiva */
@media (max-width: 768px) {
    .table-container {
        margin: 0 -20px;
        padding: 0 20px;
        width: calc(100% + 40px);
    }
    
    #duvidas-table {
        min-width: 800px; /* Largura mínima para scroll horizontal */
        font-size: 0.8rem;
    }
    
    #duvidas-table th,
    #duvidas-table td {
        padding: 8px 6px;
        white-space: nowrap;
    }
    
    #duvidas-table th:nth-child(1),
    #duvidas-table td:nth-child(1) {
        width: 40px; /* Checkbox select */
        text-align: center;
    }
    
    #duvidas-table th:nth-child(8),
    #duvidas-table td:nth-child(8) {
        width: 80px; /* Checkbox respondida */
        text-align: center;
    }
    
    /* Estilização específica para colunas */
    #duvidas-table td:nth-child(2) { /* Nome */
        min-width: 120px;
    }
    
    #duvidas-table td:nth-child(3) { /* Telefone */
        min-width: 120px;
    }
    
    #duvidas-table td:nth-child(4) { /* Endereço */
        min-width: 150px;
    }
    
    #duvidas-table td:nth-child(5) { /* Financiamento */
        min-width: 120px;
        white-space: normal;
    }
    
    #duvidas-table td:nth-child(6) { /* Mensagem */
        min-width: 200px;
        white-space: normal;
        max-width: 300px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    #duvidas-table td:nth-child(7) { /* Anexos */
        min-width: 80px;
        text-align: center;
    }
}

/* MOBILE MUITO PEQUENO */
@media (max-width: 480px) {
    .table-container {
        margin: 0 -15px;
        padding: 0 15px;
        width: calc(100% + 30px);
    }
    
    #duvidas-table {
        min-width: 700px;
        font-size: 0.75rem;
    }
    
    #duvidas-table th,
    #duvidas-table td {
        padding: 6px 4px;
    }
}

/* Paginação responsiva */
.pagination {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background-color: var(--white);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.pagination button:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#page-info {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0 1rem;
}

/* Botão de apagar selecionados */
.delete-selected {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background-color: #dc3545;
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    width: 100%;
    max-width: 200px;
}

.delete-selected:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

@media (max-width: 768px) {
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination button {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    #page-info {
        font-size: 0.8rem;
        margin: 0 0.5rem;
    }
    
    .delete-selected {
        width: 100%;
        max-width: none;
    }
}

/* Estado vazio da tabela */
#duvidas-table tbody tr td[colspan] {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-style: italic;
}

/* Indicador visual para scroll horizontal no mobile */
.table-container {
    position: relative;
}

.table-container::after {
    content: '← Arraste para ver mais →';
    display: none;
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    animation: pulse 2s infinite;
}

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

@media (max-width: 768px) {
    .table-container::after {
        display: block;
    }
    
    /* Scroll suave */
    .table-container {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
}

.popup-mensagem {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -40%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.btn-ver-completo {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-right: 0.5rem;
}

.btn-ver-completo:hover {
    background: var(--primary-dark);
}

/* ========================================
   ESTILOS PARA VERSÃO MOBILE DAS DÚVIDAS
   ======================================== */

#duvidas-mobile-view {
    display: none;
}

.mobile-duvida-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

.mobile-card-info {
    flex: 1;
}

.mobile-card-info strong {
    display: block;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.mobile-card-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

.mobile-card-content {
    margin-bottom: 1rem;
}

.mobile-card-field {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.field-label {
    font-weight: 600;
    color: var(--text-color);
    margin-right: 0.5rem;
}

.mobile-card-message {
    margin-top: 0.75rem;
}

.mobile-card-message .field-label {
    display: block;
    margin-bottom: 0.25rem;
}

.mobile-card-message p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-light);
}

.mobile-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.btn-ver-completo-mobile {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    flex: 1;
}

.btn-ver-completo-mobile:hover {
    background: var(--primary-dark);
}

.mobile-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-light);
    cursor: pointer;
}

.select-duvida-mobile {
    margin-left: 0.5rem;
}

.mobile-empty-message {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-style: italic;
}

/* Ajustes para telas muito pequenas */
@media (max-width: 480px) {
    .mobile-card-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .mobile-card-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .mobile-card-field {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .field-label {
        margin-right: 0;
    }
}

/* Mostrar menu toggle no mobile */
.mobile-menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        cursor: pointer;
        z-index: 1001;
    }
    
    .mobile-menu-toggle span {
        display: block;
        height: 2px;
        width: 100%;
        background-color: var(--text-color);
        transition: all 0.3s ease;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

/* ========================================
   ESTILOS PARA GALERIA
   ======================================== */

/* Formulário de Upload */
.upload-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Preview da Imagem */
.preview-container {
    display: none;
    margin: 1rem 0;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 1rem;
    background: #f9f9f9;
}

.image-preview {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.image-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 4px;
    object-fit: cover;
}

.image-info {
    flex: 1;
}

.image-info p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.btn-remover-preview {
    display: none;
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 0.5rem;
}

/* Mensagens */
.mensagem-upload {
    display: none;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

.mensagem-upload.sucesso {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mensagem-upload.erro {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.mensagem-upload.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Galeria de Imagens */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.gallery-image {
    position: relative;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-image img {
    transform: scale(1.05);
}

.gallery-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-actions {
    opacity: 1;
}

.btn-view, .btn-delete {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.3s ease;
}

.btn-view {
    background: var(--primary-color);
    color: white;
}

.btn-view:hover {
    background: var(--primary-dark);
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

.gallery-info {
    padding: 1rem;
}

.gallery-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.gallery-caption {
    margin: 0 0 0.5rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.4;
}

.gallery-date {
    margin: 0;
    font-size: 0.8rem;
    color: #888;
}

/* Estados de carregamento e vazio */
.loading, .empty-gallery, .error {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-style: italic;
    grid-column: 1 / -1;
}

.error {
    color: #dc3545;
}

/* Responsividade */
@media (max-width: 768px) {
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .image-preview {
        flex-direction: column;
        text-align: center;
    }
    
    .image-preview img {
        max-width: 100%;
    }
    
    .gallery-actions {
        opacity: 1; /* Sempre visível no mobile */
        position: static;
        justify-content: center;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .gallery-container {
        grid-template-columns: 1fr;
    }
    
    .upload-section {
        padding: 1rem;
    }
}