/* General Page Style */
.project-detail-page {
    background-color: #f8f9fa;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Main Container */
.detail-master-container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

/* Header */
.detail-header-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem 3rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
    text-align: center !important;
}

.detail-header-card .detail-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: #1e3a8a;
    margin: 0 0 0.75rem;
    line-height: 1.2;
    overflow-wrap: break-word; /* Força quebra em títulos muito longos */
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    text-align: center !important;
}

.detail-header-card .detail-subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    color: #495057;
    margin: 0;
    overflow-wrap: break-word; /* Força quebra em subtítulos longos */
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    text-align: center !important;
}

/* Layout Grid */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    min-width: 0; /* Permite que os itens do grid encolham quando necessário */
}

.detail-main-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
    min-width: 0; /* Essencial para permitir quebra de texto */
    overflow-wrap: break-word; /* Força quebra de palavras longas */
    word-wrap: break-word;
}

.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-width: 0; /* Essencial para sidebar responsiva */
}

.detail-section {
    margin-bottom: 3rem;
}
.detail-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #fbbf24;
}

/* Sidebar Cards */
.sidebar-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
    min-width: 0; /* Essencial para permitir quebra de texto */
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.sidebar-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-info-item {
    margin-bottom: 1rem;
}
.sidebar-info-item:last-child {
    margin-bottom: 0;
}

.sidebar-info-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.sidebar-info-value {
    font-size: 1rem;
    font-weight: 600;
    color: #343a40;
    overflow-wrap: break-word; /* Força quebra em textos longos da sidebar */
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%; /* Garante que não ultrapasse o container da sidebar */
}

/* Descrição Detalhada */
.description-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #334155;
    white-space: pre-wrap; /* ESSENCIAL: Preserva quebras de linha e espaços do texto original */
    overflow-wrap: break-word; /* Garante que palavras muito longas quebrem e não ultrapassem a margem */
    word-wrap: break-word; /* Compatibilidade com navegadores antigos */
    word-break: break-word; /* Força quebra de palavras muito longas */
    hyphens: auto; /* Hifenização automática */
    max-width: 100%; /* Garante que não ultrapasse o container */
}

/* Selos */
.seals-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.seal-item {
    transition: transform 0.3s ease;
}

.seal-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
    background: #f1f3f5;
    padding: 5px;
    border: 2px solid #dee2e6;
}
.seal-item:hover {
    transform: translateY(-4px);
}

/* Vídeo */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

/* Botões */
.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    gap: 0.5rem;
}

.btn-pdf {
    background-color: #cf222e;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(207, 34, 46, 0.2);
}
.btn-pdf:hover {
    background-color: #a40e26;
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(207, 34, 46, 0.3);
}
.btn-pdf.disabled {
    background-color: #adb5bd;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-back {
    background-color: #f1f3f5;
    color: #495057;
    border: 1px solid #dee2e6;
    margin-top: 1rem;
}
.btn-back:hover {
    background-color: #e9ecef;
    transform: translateY(-3px);
}

/* Integrantes da Equipe */
.team-members-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.team-member-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.member-avatar {
    width: 40px;
    height: 40px;
    background-color: #1e3a8a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 600;
    color: #1e3a8a;
    margin: 0;
    font-size: 0.9rem;
}

.member-role {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0.25rem 0 0 0;
}

/* Responsividade */
@media (max-width: 992px) {
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .detail-sidebar {
        grid-row: 1; /* Move a sidebar para cima em telas menores */
    }
    .detail-main-content {
        min-width: 0;
        overflow-wrap: break-word;
    }
}

@media (max-width: 768px) {
    .detail-master-container {
        margin: 2rem auto;
        padding: 0 1rem;
    }
    .detail-header-card {
        padding: 2rem;
        margin-bottom: 2rem;
        text-align: center !important;
    }
    .detail-header-card .detail-title {
        text-align: center !important;
    }
    .detail-header-card .detail-subtitle {
        text-align: center !important;
    }
    .detail-title {
        font-size: 2rem;
        overflow-wrap: break-word;
        word-wrap: break-word;
        word-break: break-word;
    }
    .detail-subtitle {
        font-size: 1.1rem;
        overflow-wrap: break-word;
        word-wrap: break-word;
        word-break: break-word;
    }
    .detail-main-content, .sidebar-card {
        padding: 1.5rem;
        min-width: 0;
        overflow-wrap: break-word;
    }
    .section-title {
        font-size: 1.5rem;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    .description-text {
        font-size: 1rem;
        overflow-wrap: break-word;
        word-wrap: break-word;
        word-break: break-word;
    }
}