/* =================================================================== */
/* ==================== ESTILOS DA PÁGINA CONTACTOS ==================== */
/* =================================================================== */

/* --- BANNER DE TOPO (Estilo Conteúdos) --- */
/* Segue a lógica visual do teu banner, mas sem ocupar 100vh se não for necessário */
.banner-topo-contactos {
    width: 100%;
    height: 400px;
    /* Altura fixa para cabeçalho de página */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    z-index: 1;
    margin-bottom: 0;
}

/* Ajuste para ecrãs maiores para manter proporção agradável */
@media (min-width: 1600px) {
    .banner-topo-contactos {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .banner-topo-contactos {
        height: 250px;
    }
}

/* --- TÍTULO DA PÁGINA (H1) - ESTILO "QUEM SOMOS" --- */
.page-title-container {
    text-align: center;
    /* Centra o título na página */
    margin-bottom: 50px;
    border-bottom: none;
    /* Removemos a linha completa anterior */
    padding-bottom: 0;
}

.page-title-container h1 {
    color: #444;
    /* Cinza escuro (quase preto) */
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    padding-bottom: 20px;
    /* Espaço entre o texto e o traço azul */
    position: relative;
    display: inline-block;
    /* Necessário para o traço ficar centrado no texto */
}

/* O pequeno traço azul por baixo */
.page-title-container h1::after {
    content: '';
    display: block;
    width: 70px;
    /* Largura do traço azul */
    height: 4px;
    /* Espessura do traço */
    background-color: var(--primary-blue, #3a7fa8);
    /* A tua cor azul */
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    /* Truque para centrar perfeitamente o traço */
    border-radius: 2px;
}

.estabelecimento-block {
    margin-bottom: 20px;
}

.estabelecimento-titulo {
    font-size: 1.2rem;
    color: var(--azul-mais-escuro, #3a7fa8);
    font-weight: 500;
    margin-bottom: 35px;
    margin-top: 10px;
    text-transform: uppercase;
}

.hr-separador {
    margin: 30px 0;
    border-top: 1px solid #dee2e6;
}

/* --- LAYOUT GERAL --- */
.contactos-section {
    padding: 60px 0 80px 0;
    /* Ajustado padding superior */
    background-color: #fff;
}

/* --- COLUNA DA ESQUERDA: INFORMAÇÕES --- */
.info-box {
    padding-right: 30px;
}

.info-title {
    font-size: 1.5rem;
    color: var(--heavy-text, #4a4a4a);
    margin-bottom: 30px;
    font-weight: 600;
}

.info-item {
    display: flex;
    margin-bottom: 30px;
    align-items: flex-start;
}

.info-icon {
    width: 45px;
    height: 45px;
    background-color: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: var(--primary-blue, #0d6efd);
    font-size: 1.2rem;
    flex-shrink: 0;
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease;
}

.info-item:hover .info-icon {
    transform: scale(1.1);
    background-color: var(--primary-blue, #0d6efd);
    color: #fff;
}

.info-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.info-content p,
.info-content a {
    color: #666;
    line-height: 1.6;
    margin: 0;
    font-size: 1rem;
    text-decoration: none;
}

.info-content a:hover {
    color: var(--primary-blue, #0d6efd);
}

/* Lógica do Botão de E-mail */
.email-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-show-email {
    background-color: #e9ecef;
    border: none;
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    color: #555;
    transition: all 0.2s;
}

.btn-show-email:hover {
    background-color: #dee2e6;
    color: #000;
}

/* --- COLUNA DA DIREITA: FORMULÁRIO --- */
.contact-form-wrapper {
    background-color: #fcfcfc;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}

/* Inputs consistentes com formularios.css */
.contact-form-group {
    margin-bottom: 1.5rem;
}

.contact-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
}

.contact-form-group input[type="text"],
.contact-form-group input[type="email"],
.contact-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--azul-mais-escuro, #ced4da);
    /* Usando variável do formularios.css */
    border-radius: 4px;
    background-color: #f8f9fa;
    transition: border-color 0.3s;
}

.contact-form-group input:focus,
.contact-form-group textarea:focus {
    border-color: var(--primary-blue, #0d6efd);
    outline: none;
    background-color: #fff;
}

.required-star {
    color: #dc3545;
    margin-left: 4px;
    font-weight: bold;
}

/* Checkbox de privacidade */
.privacy-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #666;
}

.privacy-check input {
    margin-top: 4px;
}

/* Botão de Enviar */
.btn-submit-contact {
    background-color: var(--primary-blue, #0d6efd);
    color: white;
    padding: 12px 35px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    font-weight: 500;
    text-transform: uppercase;
}

.btn-submit-contact:hover {
    background-color: var(--azul-mais-escuro, #3a7fa8);
}

/* --- SECÇÃO DO MAPA --- */
.map-section {
    width: 100%;
    height: 450px;
    position: relative;
    margin-bottom: -6px;
}

.map-section iframe {
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(20%);
    transition: filter 0.3s;
}

.map-section iframe:hover {
    filter: grayscale(0%);
}

/* Responsividade */
@media (max-width: 991px) {
    .page-title-container h1 {
        font-size: 2rem;
    }

    .info-box {
        padding-right: 0;
        margin-bottom: 50px;
    }

    .contact-form-wrapper {
        padding: 25px;
    }
}

.section-tabela-tecnica {
    padding-bottom: 50px;
    background-color: var(--bg-white);
}

.intro-text {
    font-size: 15px;
    color: var(--dark-text);
    margin-bottom: 25px;
}

.tabela-custom-smas {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e1e8ed;
}

/* Cabeçalhos */
.tabela-custom-smas th {
    padding: 12px 20px;
    text-align: left;
    font-size: 15px;
    border: 1px solid var(--bg-white);
}

/* Header Atendimento (Azul Claro) */
.header-row-light th {
    background-color: rgba(99, 184, 240, 0.1);
    /* 10% de --azul-claro */
    color: var(--primary-blue);
    width: 33.33%;
}

/* Header Contactos (Verde Azulado) */
.header-row-dark th {
    background-color: var(--verde-azulado);
    color: var(--bg-white);
}

/* Células */
.tabela-custom-smas td {
    padding: 15px 20px;
    border: 1px solid #e1e8ed;
    color: var(--dark-text);
    font-size: 14px;
    vertical-align: middle;
}

/* Linha dos Horários (3 colunas) */
.horarios-row td {
    color: var(--light-text);
    font-weight: 400;
}

/* Etiquetas da esquerda (Contactos) */
.row-label {
    background-color: #fafafa;
    font-weight: bold;
    color: var(--heavy-text);
    width: 250px;
}

.text-bold {
    font-weight: bold;
    color: var(--heavy-text);
}

/* Ajuste do botão de e-mail na tabela para ser igual ao da esquerda */
.tabela-custom-smas .email-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tabela-custom-smas .email-container p {
    margin: 0;
    color: var(--amarelo);
    /* Destaque para o email camuflado */
    font-weight: bold;
}

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

    /* Esconde o cabeçalho azul claro pois vamos injetar os títulos nos TD */
    .header-row-light {
        display: none;
    }

    .horarios-row td {
        display: flex !important;
        /* Força ficar lado a lado */
        justify-content: space-between;
        align-items: center;
        width: 100% !important;
        text-align: right;
        border-bottom: 1px solid #eee;
        padding: 12px 15px !important;
    }

    /* Injeta o título à esquerda */
    .horarios-row td::before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--primary-blue);
        text-align: left;
        padding-right: 10px;
        font-size: 0.9rem;
    }

    /* Ajuste para a segunda parte da tabela (Contactos) */
    .contactos-body tr {
        display: flex;
        flex-direction: column;
    }

    .row-label {
        width: 100% !important;
        background-color: rgba(99, 184, 240, 0.05) !important;
        border-bottom: none !important;
    }

    .row-value {
        width: 100% !important;
        padding-top: 5px !important;
    }

    /* Botão de email no mobile */
    .tabela-custom-smas .email-container {
        flex-wrap: wrap;
        gap: 5px;
    }
}