/* ===== SEÇÃO APRESENTAÇÃO ===== */
.apresentacao {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.apresentacao > img {
    width: 100%;
    height: auto;
    min-height: 150px;
    max-height: 300px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base);
}

.apresentacao > img:hover {
    transform: scale(1.01);
}

/* ===== TEXT-APRESENTACAO ===== */
.text-apresentacao {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: clamp(var(--space-lg), 4vw, var(--space-2xl));
    align-items: center;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: clamp(var(--space-lg), 4vw, var(--space-xl));
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(218, 161, 57, 0.1);
    transition: all var(--transition-base);
}

.text-apresentacao:hover {
    box-shadow: var(--shadow-xl);
    border-color: rgba(218, 161, 57, 0.2);
}

/* ===== VÍDEO ===== */
.text-apresentacao video {
    width: 100%;
    height: 460px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    object-fit: cover;
    transition: transform var(--transition-base) var(--ease-bounce);
    border: 3px solid transparent;
    max-width: 100%;
}

.text-apresentacao video:hover {
    transform: scale(1.02) rotate(1deg);
    border-color: var(--accent);
}

.img-texto {
    display: flex;
    flex-direction: column;
    gap: clamp(var(--space-md), 3vw, var(--space-lg));
}

.img-texto p {
    font-size: clamp(0.9rem, 2.5vw, var(--font-size-base));
    line-height: 1.8;
    text-align: left;
    color: var(--text-secondary);
    margin: 0;
    position: relative;
    padding-left: clamp(var(--space-md), 3vw, var(--space-lg));
    border-left: 3px solid var(--accent);
    transition: all var(--transition-base);
}

.img-texto p:hover {
    transform: translateX(var(--space-sm));
    color: var(--text-primary);
    border-left-color: var(--primary);
}

/* ===== SEÇÃO COLEGIADO ===== */
.colegiado {
    width: 100%;
}

.integrantes-grid {
    display: flex;
    flex-direction: column;
    margin-top: var(--space-xl);
    gap: clamp(var(--space-lg), 4vw, var(--space-xl));
}

.integrante {
    display: flex;
    align-items: center;
    gap: clamp(var(--space-lg), 4vw, var(--space-2xl));
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: clamp(var(--space-lg), 4vw, var(--space-xl));
    transition: all var(--transition-base);
    border: 1px solid rgba(218, 161, 57, 0.08);
    box-shadow: var(--shadow-sm);
}

.integrante.reverse {
    flex-direction: row-reverse;
}

.integrante:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(218, 161, 57, 0.2);
    background: linear-gradient(135deg, var(--bg-card), rgba(218, 161, 57, 0.02));
}

.integrante img {
    width: clamp(120px, 20vw, 180px);
    height: clamp(120px, 20vw, 180px);
    object-fit: cover;
    border-radius: var(--radius-circle);
    box-shadow: var(--shadow-primary);
    transition: all var(--transition-base) var(--ease-bounce);
    border: 3px solid transparent;
}

.integrante:hover img {
    transform: scale(1.05) rotate(2deg);
    border-color: var(--accent);
    box-shadow: var(--shadow-accent);
}

.integrante-info {
    flex: 1;
}

.integrante-info h2 {
    font-size: clamp(1.2rem, 4vw, var(--font-size-2xl));
    margin-bottom: var(--space-md);
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.integrante-info h2 span {
    font-size: clamp(1rem, 3vw, var(--font-size-lg));
    color: var(--accent);
    font-weight: var(--font-regular);
    background: rgba(218, 161, 57, 0.08);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    letter-spacing: 0.5px;
}

.integrante-info p {
    font-size: clamp(0.85rem, 2.2vw, var(--font-size-sm));
    line-height: 1.8;
    text-align: left;
    color: var(--text-secondary);
    margin: 0;
}

/* ===== BOTÃO VER MURAL - SEM GRADIENTE ===== */
.btn-ver-mural {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 32px;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 2px solid var(--accent);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.btn-ver-mural:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    background: var(--primary-dark);
}

/* ===== BOTOES DE ORDENACAO ADMIN ===== */
.integrante-actions {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.integrante:hover .integrante-actions {
    opacity: 1;
}

.integrante-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid white;
    color: white;
}

.integrante-btn.mover-cima,
.integrante-btn.mover-baixo {
    background: #3498db;
}

.integrante-btn.mover-cima:hover,
.integrante-btn.mover-baixo:hover {
    transform: scale(1.1);
    background: #2980b9;
}

.integrante-btn.editar {
    background: #f39c12;
}

.integrante-btn.editar:hover {
    transform: scale(1.1);
    background: #e67e22;
}

.integrante-btn.excluir {
    background: #e74c3c;
}

.integrante-btn.excluir:hover {
    transform: scale(1.1) rotate(90deg);
    background: #c0392b;
}

/* ===== LAYOUT ESPECÍFICO DO INDEX (DESKTOP) ===== */
@media (min-width: 1024px) {
    /* Por padrão, sidebar right é oculto no index para visitantes/usuários */
    .sidebar-right {
        display: none !important;
    }
    
    /* Quando o usuário é admin, mostrar sidebar right */
    body.admin-mode .sidebar-right {
        display: block !important;
    }
    
    /* Ajustar grid quando sidebar right estiver visível (admin) */
    body.admin-mode #container {
        grid-template-columns: 280px 1fr 280px !important;
        grid-template-areas: "header header header" "left main right" "footer footer footer" !important;
    }
    
    /* Ajustar sidebar left quando sidebar right estiver visível */
    body.admin-mode .sidebar-left {
        position: sticky;
        top: calc(var(--header-height) + 20px);
        height: calc(100vh - var(--header-height) - 40px);
    }
    
    /* Grid padrão (sem sidebar right - visitante/user) */
    #container {
        grid-template-columns: 600px 1fr !important;
        grid-template-areas: 
            "header header"
            "left main"
            "footer footer" !important;
    }
    
    .sidebar-left {
        position: sticky;
        top: calc(var(--header-height) + 20px);
        height: calc(100vh - var(--header-height) - 40px);
        width: 100%;
    }
    
    #main-content,
    #main {
        max-width: 100%;
        overflow-x: hidden;
    }
}

/* ===== RESPONSIVIDADE MOBILE ===== */
@media (max-width: 768px) {
    body {
        padding-top: var(--header-height-mobile);
    }
    
    /* Tipografia - texto justificado */
    p, 
    .integrante-info p,
    .img-texto p,
    .aviso-conteudo p,
    .postagem-info p,
    .favorito-descricao,
    .modal-text-content,
    .busca-item-descricao,
    .resultado-descricao {
        text-align: justify !important;
    }
    
    h1, h2, h3, h4, .section-title, .favoritos-titulo {
        text-align: center;
    }
    
    /* Apresentação */
    .text-apresentacao {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        padding: var(--space-lg);
    }
    
    /* Vídeo mobile - altura 300px para não ficar gigante */
    .text-apresentacao video {
        width: 100%;
        height: 300px;
        object-fit: cover;
        max-width: 100%;
    }
    
    .img-texto p {
        text-align: justify;
        border-left: none;
        border-top: 3px solid var(--accent);
        padding-left: 0;
        padding-top: var(--space-lg);
    }
    
    .img-texto p:hover {
        transform: translateY(var(--space-xs)) translateX(0);
    }
    
    /* Integrantes */
    .integrante,
    .integrante.reverse {
        flex-direction: column;
        text-align: center;
        gap: var(--space-lg);
        padding: var(--space-xl);
    }
    
    .integrante-info h2 {
        justify-content: center;
        flex-direction: column;
    }
    
    .integrante-info p {
        text-align: justify;
    }
    
    .integrante img {
        width: 140px;
        height: 140px;
    }
    
    /* Botão ver mural */
    .btn-ver-mural {
        padding: 12px 28px;
        font-size: 14px;
    }
    
    /* Botões admin */
    .integrante-actions {
        top: 10px;
        right: 10px;
        gap: 6px;
    }
    
    .integrante-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

@media (max-width: 600px) {
    .text-apresentacao video {
        height: 250px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: var(--header-height-mobile-small);
    }
    
    .apresentacao > img {
        min-height: 100px;
        max-height: 180px;
    }
    
    .text-apresentacao {
        padding: var(--space-md);
    }
    
    .text-apresentacao video {
        height: 220px;
    }
    
    .integrante img {
        width: 120px;
        height: 120px;
    }
    
    .integrante-info h2 {
        font-size: 1.3rem;
    }
    
    .integrante-info h2 span {
        font-size: 1rem;
    }
    
    .integrante-info p {
        font-size: 0.85rem;
    }
    
    .btn-ver-mural {
        padding: 10px 24px;
        font-size: 13px;
        gap: 8px;
    }
}

@media (max-width: 375px) {
    .integrante img {
        width: 100px;
        height: 100px;
    }
    
    .text-apresentacao video {
        height: 200px;
    }
    
    .integrante-info h2 {
        font-size: 1.1rem;
    }
    
    .integrante-info h2 span {
        font-size: 0.9rem;
    }
    
    .btn-ver-mural {
        padding: 8px 20px;
        font-size: 12px;
    }
}

/* ===== TEMA ESCURO ===== */
[data-theme="dark"] .btn-ver-mural {
    background: var(--primary);
}

[data-theme="dark"] .btn-ver-mural:hover {
    background: var(--primary-light);
}