/* ==========================================================================
   FORMAIS.HTML - Programas Académicos Formais (Atualizado 2026)
   ========================================================================== */

:root {
    --primary: #007bff;
    --primary-light: #3b82f6;
    --primary-dark: #0056b3;
    --text-dark: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --bg-light: #f8fafc;
    --bg-credits: #e0f2fe;
    --text-credits: #0369a1;
}

/* --------------------------------------------------------------------------
   Cabeçalho Otimizado - Compacto e Consistente (Mesma Altura da Aba de Contactos)
   -------------------------------------------------------------------------- */
.page-header {
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.9)), url('../img/hero-bg.jpg') no-repeat center center;
    background-size: cover;
    padding: 20px 0 !important;       /* Redução drástica da altura para eliminar espaço morto */
    margin-bottom: 35px !important;   /* Alinhamento de espaçamento padrão do portal */
    border-bottom: 4px solid var(--primary);
}

/* Banner Alternativo (Estilo Hero do Tema Original) */
.program-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 40px 0;
    border-bottom: 5px solid var(--primary);
}

.program-title {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* --------------------------------------------------------------------------
   Estilização dos Cards de Cursos (Mestrado, Licenciatura, Diploma)
   -------------------------------------------------------------------------- */
.bg-white.shadow-sm.rounded.border {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background-color: #ffffff;
    border-color: var(--border-color) !important;
}

.bg-white.shadow-sm.rounded.border:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06) !important;
    border-color: rgba(0, 123, 255, 0.25) !important;
}

/* Ajuste fino para as imagens dos cursos */
.col-md-4 img {
    object-fit: cover;
    max-height: 250px;
    width: 100%;
    transition: transform 0.5s ease;
}

.bg-white.shadow-sm.rounded.border:hover .col-md-4 img {
    transform: scale(1.02);
}

/* Customização das listas internas dos cursos */
.col-md-8 ul {
    list-style-type: none;
}

.col-md-8 ul li {
    position: relative;
    padding-left: 5px;
}

.col-md-8 ul li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* --------------------------------------------------------------------------
   Matriz Curricular e Estrutura de Semestres (Componentes do Acordéon)
   -------------------------------------------------------------------------- */
.curriculum-semester-box {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.01);
    overflow: hidden;
}

.semester-header {
    background-color: var(--bg-light);
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Lista de Disciplinas (Cadeiras) */
.subject-item {
    padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: background-color 0.2s ease;
}

.subject-item:last-child {
    border-bottom: none;
}

.subject-item:hover {
    background-color: var(--bg-light);
}

.subject-credits {
    font-size: 0.8rem;
    background-color: var(--bg-credits);
    color: var(--text-credits);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* --------------------------------------------------------------------------
   Painel Lateral (Requisitos de Admissão)
   -------------------------------------------------------------------------- */
.requirements-sidebar {
    background-color: #ffffff;
    border-left: 4px solid var(--primary);
    padding: 25px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

/* --------------------------------------------------------------------------
   Ajustes de Responsividade
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .page-header {
        padding: 15px 0 !important;
    }
    .page-header h3 {
        font-size: 1.6rem !important;
    }
    .program-title {
        font-size: 1.8rem;
    }
    .subject-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .subject-credits {
        align-self: flex-start;
    }
}