/* Reset Básico */
body, html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    font-size: 15px; 
    line-height: 1.6;
    
    height: 100%; 
}

/* Estrutura Flex para o Sticky Footer */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Garante que o body ocupa pelo menos a altura do ecrã */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- Cabeçalho e Navegação (Inspirado no Ciccopn) --- */
.site-header {
    background: url('imagens/banner.jpg') no-repeat center center;
    background-size: cover;
    background-color: #004a99; /* Cor de fallback */
    padding: 20px 0;
    border-bottom: 5px solid #f39c12; /* Laranja do Ciccopn */
}


/* ######################################################## */
/* ##      ESTILOS ATUALIZADOS PARA O MENU RESPONSIVO      ## */
/* ######################################################## */

/* Remove o fundo do navbar para mostrar o banner */
.navbar {
    background-color: transparent !important;
    padding-top: 0;
    padding-bottom: 0;
}

/* Estilos do Logo (agora .navbar-brand) */
.navbar-brand {
    display: flex; 
    align-items: center; 
    text-decoration: none;
    padding-top: 0;
    padding-bottom: 0;
}
.navbar-brand img {
    height: 50px; 
    width: auto;
    margin-right: 15px; 
}
.navbar-brand span {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Estilos para Links do Header com Ícones */
.navbar-nav .nav-link {
    color: #ffffff;
    font-weight: bold;
    padding: 10px 15px !important; /* !important para sobrepor Bootstrap */
    border-radius: 5px;
    transition: background-color 0.3s ease;
    
    display: flex;
    align-items: center;
    gap: 8px; 
}
.navbar-nav .nav-link svg {
    width: 20px;
    height: 20px;
    fill: #ffffff;
}
/* Ícone de link externo (mais pequeno) */
.navbar-nav .nav-link svg.icon-external {
    width: 16px;
    height: 16px;
    opacity: 0.8;
    gap: 0;
    margin-left: -5px; 
}

.navbar-nav .nav-link:hover {
    background-color: rgba(243, 156, 18, 0.9); /* Laranja com transparência */
}

/* Estilos para o menu "hamburger" em mobile */
@media (max-width: 991.98px) { /* breakpoint 'lg' do Bootstrap */
    .navbar-collapse {
        /* Adiciona um fundo escuro ao menu expandido em mobile */
        background-color: #004a99;
        border-radius: 8px;
        padding: 15px;
        margin-top: 15px;
        border: 1px solid #f39c12;
    }
    .navbar-nav .nav-item {
        margin-bottom: 5px;
    }
}
/* ######################################################## */


/* --- Conteúdo Principal --- */
main {
    flex-grow: 1; /* Para o "Sticky Footer" */
    background-color: #f8f9fa; 
    padding-top: 20px;
    padding-bottom: 20px;
}

/* --- Estilos do Formulário de Pesquisa (de _courseaction-listing) --- */
.search-form .form-label {
    font-weight: bold;
    font-size: 0.9em;
    color: #555;
}

/* --- Estilos da Tabela (de _courseaction-listing) --- */
.table {
    border-radius: 10px;
    overflow: hidden; /* Para o border-radius funcionar no thead */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.table th, .table td {
    font-size: 0.9em; 
    vertical-align: middle;
}
.table-dark th {
    background-color: #343a40; /* Cor escura do Ciccopn */
}

/* O Estilo Laranja do Botão */
.btn-details {
    background-color: #f39c12 !important; /* Laranja */
    border-color: #f39c12 !important;
    color: white !important;
    font-weight: bold;
}
.btn-details:hover {
    background-color: #e67e22 !important; /* Laranja mais escuro */
    border-color: #e67e22 !important;
}

/* --- Paginação --- */
.pagination .page-item.active .page-link {
    background-color: #f39c12;
    border-color: #f39c12;
    color: white;
}
.pagination .page-link {
    color: #004a99; /* Azul escuro */
}
.pagination .page-link:hover {
    color: #f39c12;
}

/* --- Página de Detalhe (Estilos Antigos para #content) --- */
#content h1.title {
    color: #004a99;
    border-bottom: 3px solid #f39c12;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
#content h2 {
    color: #333;
    font-size: 1.5em;
    margin-top: 25px;
    margin-bottom: 10px;
    border-left: 5px solid #f39c12;
    padding-left: 10px;
}
#content .text p, #content .text ul {
    line-height: 1.6;
}
.btn-orange {
    background-color: #f39c12;
    color: white;
    font-weight: bold;
    padding: 10px 20px;
    font-size: 1.1em;
    border: none;
    border-radius: 5px;
    margin-bottom: 20px;
}
.btn-orange:hover {
    background-color: #e67e22;
    color: white;
}

/* --- Popup (de show.html.php) --- */
.popup {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}
.popup-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    position: relative;
}
.popup-content .close {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
}
.popup-content .close:hover,
.popup-content .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
.form-group.small {
    font-size: 0.9em;
    display: flex;
    align-items: center;
}
.form-group.small label {
    margin: 0;
    margin-left: 10px;
}

/* --- Rodapé --- */
.site-footer-bottom {
    background-color: #343a40; /* Cor escura */
    color: #ccc;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9em;
    margin-top: 30px;
}

/* --- Adições para a Página de Contactos --- */
.map-card {
    padding: 25px;
    background: #ffffff; /* Fundo branco */
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column; /* Faz o mapa crescer */
}
.map-card h2 {
    border-left: 0;
    padding-left: 0;
    margin-top: 0;
    color: #004a99;
    font-size: 1.7em;
    font-weight: bold;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}
/* Torna o Google Maps responsivo e flexível */
.map-responsive {
    position: relative;
    overflow: hidden;
    width: 100%;
    flex-grow: 1; /* Faz o mapa ocupar o espaço vertical */
    min-height: 400px; /* Garante uma altura mínima */
    border-radius: 8px;
}
.map-responsive iframe {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    border: 0;
}

/* Caixa de informações de contacto */
.contact-info {
    padding: 25px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    /* height: 100% é definido pelo 'h-100' no HTML */
}
.contact-info h2 {
    border-left: 0; 
    padding-left: 0;
    margin-top: 0;
    color: #004a99;
    font-size: 1.7em;
    font-weight: bold;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}
.contact-info p {
    margin-bottom: 18px;
    font-size: 1.05em;
    line-height: 1.6;
}
.contact-info p strong {
    color: #333;
    margin-right: 5px;
    display: block; 
}

/* Novo "Cartão" para o Formulário */
.contact-form-container {
    padding: 30px 35px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.contact-form-container h2 {
    color: #004a99;
    font-size: 1.7em;
    font-weight: bold;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}


/* --- Estilos "Cozy" para a Página de Detalhe --- */

/* O cartão branco principal onde fica o conteúdo */
.course-detail-page {
    background-color: #ffffff;
    padding: 30px 35px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Cabeçalho do Curso */
.course-header {
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}
.course-header h1.title {
    color: #004a99; /* Azul do site */
    font-weight: bold;
    margin-bottom: 5px;
}
.course-header .area {
    color: #f39c12; /* Laranja do site */
    font-size: 1.3em;
    font-weight: normal;
    margin-bottom: 15px;
}
.course-header .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}
.course-header .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}


/* Barra Lateral (Cartão de Resumo) */
.sidebar-area {
    position: relative;
}
.summary-card {
    background-color: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 25px;
    position: sticky; /* Faz o cartão "flutuar" ao fazer scroll */
    top: 20px;
}
.summary-card h3 {
    font-size: 1.4em;
    color: #333;
    font-weight: bold;
    border-bottom: 2px solid #f39c12;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.summary-card .info-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 25px;
}
.summary-card .info-list li {
    font-size: 1em;
    color: #555;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start; /* Alinha ao topo para texto com várias linhas */
    line-height: 1.5;
}

.summary-card .info-list li svg {
    width: 20px !important;       /* Força a largura */
    height: 20px !important;      /* Força a altura */
    min-width: 20px;              /* Define a largura mínima */
    max-width: 20px;              /* Define a largura máxima */
    margin-right: 12px;
    fill: #004a99; 
    flex-shrink: 0;
    margin-top: 3px;
}

.summary-card .btn-orange {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    font-weight: bold;
}


/* Conteúdo Principal (Esquerda) */
.main-content-area h2 {
    font-size: 1.7em;
    font-weight: bold;
    color: #004a99;
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    /* Remove o estilo antigo que estava em #content h2 */
    border-left: none; 
    padding-left: 0;
}
.main-content-area h2:first-child {
    margin-top: 0;
}
.main-content-area .text-content {
    line-height: 1.7;
    color: #444;
    font-size: 1.05em;
}
.main-content-area .text-content p,
.main-content-area .text-content ul {
    margin-bottom: 1.2rem;
}
.main-content-area .text-content ul {
    padding-left: 20px;
}


/* Caixa de "Condições de Acesso" */
.access-conditions {
    background-color: #fffaf0; /* Amarelo/Laranja muito claro */
    border: 1px solid #fdeec9;
    border-left: 5px solid #f39c12; /* Laranja do site */
    padding: 20px 25px;
    border-radius: 5px;
    margin-top: 30px;
}
.access-conditions h2 {
    border-bottom: none;
    margin-top: 0;
    padding-bottom: 0;
    margin-bottom: 10px;
    color: #e67e22; /* Laranja mais escuro */
}
.access-conditions ul {
    margin-bottom: 0;
    padding-left: 25px;
    color: #555;
    font-size: 1em;
    line-height: 1.6;
}

/* --- Títulos para "Sobre Nós" e "Acesso Rápido" --- */
/* (Agrupados para consistência) */
.about-section h2,
.quick-access-section h2 {
    font-size: 1.7em;
    font-weight: bold;
    color: #004a99;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    /* Remove o estilo antigo que estava em #content h2 */
    border-left: none; 
    padding-left: 0;
    
    /* Novo: alinhar ícone e texto */
    display: flex;
    align-items: center;
    gap: 12px;
}
.about-section h2 svg,
.quick-access-section h2 svg {
    width: 30px;
    height: 30px;
    fill: #004a99;
    flex-shrink: 0;
}


/* --- Adições para a secção "Sobre Nós" (index.php) --- */
.about-section {
    background-color: #ffffff;
    padding: 30px 35px;
    margin: 20px 0; /* Adiciona espaço acima e abaixo */
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Formatação do texto */
.about-section p {
    line-height: 1.7;
    color: #444;
    margin-bottom: 1.2rem;
}
.about-section .lead {
    font-size: 1.2em;
    color: #333;
    font-weight: 500;
}

/* Lista (Academias) */
.about-section ul {
    list-style-type: none; /* Remove os bullets padrão */
    padding-left: 0;
    margin-bottom: 1.2rem;
}
.about-section ul li {
    position: relative;
    padding-left: 30px; /* Espaço para o ícone */
    margin-bottom: 10px;
    font-size: 1.05em;
    line-height: 1.6;
}
/* Adiciona um ícone laranja 'play' antes de cada item da lista */
.about-section ul li::before {
    content: '►'; 
    position: absolute;
    left: 0;
    top: 3px;
    color: #f39c12; /* Laranja do site */
    font-size: 0.9em;
}

/* Citação da Missão */
.about-section .blockquote {
    background-color: #f8f9fa;
    border-left: 5px solid #f39c12;
    padding: 20px 25px;
    font-size: 1.1em;
    color: #555;
    margin-top: 20px;
}

/* --- Estilos do Carrossel (index.php) --- */
#heroCarousel .carousel-item {
    height: 450px; /* Defina uma altura fixa para o carrossel */
    background-color: #555; /* Cor de fallback */
}
#heroCarousel .carousel-item img {
    height: 100%;
    object-fit: cover; /* Faz a imagem cobrir o espaço sem distorcer */
    filter: brightness(0.6); /* Escurece a imagem para o texto ser legível */
}
#heroCarousel .hero-caption-content {
    /* Remove o posicionamento "bottom" padrão do Bootstrap */
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center; /* Centra o conteúdo verticalmente */
    justify-content: center;
    text-align: left; /* Alinha o texto à esquerda */
    padding-bottom: 0; /* Remove padding padrão */
    padding-top: 0; /* Remove padding padrão */
}

/* Alterações de Letra e Link */
#heroCarousel .hero-caption-content h1 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 600; /* Um pouco mais fino que "bold" */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}
#heroCarousel .hero-caption-content p {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Otimização para telemóveis */
@media (max-width: 768px) {
    #heroCarousel .carousel-item {
        height: 500px; /* Mais altura em telemóveis */
    }
    #heroCarousel .hero-caption-content .container-fluid {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    #heroCarousel .hero-caption-content h1 {
        font-size: 1.8rem; /* Título mais pequeno */
    }
    #heroCarousel .hero-caption-content p {
        font-size: 1rem; /* Parágrafo mais pequeno */
    }
}

/* Link "CICCOPN" - remove sublinhado */
#heroCarousel .hero-caption-content a {
    color: #fff;
    text-decoration: none; /* <-- REMOVE O SUBLINHADO */
    font-weight: bold; /* Adiciona peso para o destacar */
}
/* Adiciona cor laranja no hover */
#heroCarousel .hero-caption-content a:hover {
    color: #f39c12;
}

/* Estilos para o botão "Cozy" e Centrado */
#heroCarousel .hero-button-container {
    text-align: center;
    padding-top: 20px; /* Espaço entre o texto e o botão */
}
#heroCarousel .btn-details {
    font-size: 1.1rem; /* Tamanho da fonte */
    padding: 12px 28px; /* Mais padding */
    border-radius: 30px; /* Cantos arredondados */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); /* Sombra */
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}
#heroCarousel .btn-details:hover {
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    transform: translateY(-2px); /* Efeito "lift" */
}


/* Estilos para Acesso Rápido (index.php) */

.quick-access-section {
    margin-top: 0; /* Já não precisa de margem, está no topo */
    margin-bottom: 20px;
}

.quick-access-card {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    text-decoration: none;
    transition: all 0.3s ease;
    height: 100%; /* Garante que os cartões têm a mesma altura */
    position: relative; /* Para o ícone de link externo */
}
.quick-access-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    text-decoration: none;
}
.quick-access-card .card-icon {
    margin-right: 20px;
    flex-shrink: 0;
}
.quick-access-card .card-icon svg {
    width: 40px;
    height: 40px;
    fill: #f39c12; /* Laranja do site */
}
.quick-access-card .card-content h3 {
    color: #004a99; /* Azul do site */
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 5px;
}
.quick-access-card .card-content p {
    color: #555;
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 0;
}
/* Ícone de link externo para os cartões */
.quick-access-card svg.icon-external-card {
    width: 18px;
    height: 18px;
    fill: #aaa;
    position: absolute;
    top: 15px;
    right: 15px;
    transition: fill 0.3s ease;
}
.quick-access-card:hover svg.icon-external-card {
    fill: #f39c12;
}

/* Estilo para "Scroll to Top" */
#scrollToTopBtn {
    display: none; /* Escondido por defeito */
    position: fixed; 
    bottom: 25px;
    right: 25px;
    z-index: 99; 
    border: none; 
    outline: none; 
    background-color: #f39c12; /* Laranja do site */
    color: white; 
    cursor: pointer; 
    padding: 0; /* Reset padding */
    border-radius: 50%; /* Botão redondo */
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
}
#scrollToTopBtn:hover {
    background-color: #e67e22; /* Laranja mais escuro */
    transform: translateY(-2px); /* Efeito "lift" */
}
#scrollToTopBtn svg {
    width: 30px; /* Tamanho do ícone (seta) */
    height: 30px;
    fill: #ffffff;
}