/* =========================================
   1. VARIÁVEIS E BASE
   ========================================= */

 :root {
    --cor-primaria: #1e293b;
    --cor-secundaria: #3b82f6;
    --cor-destaque: #f97316;
    --cor-texto: #475569;
    --cor-titulo: #0f172a;
    --cor-fundo: #FFFFFF;
    --cor-fundo-alt: #F5F7FA;
    --font-principal: 'Poppins', sans-serif;
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Removed transition for simplicity */
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    /* Adjusted for simpler header */
}

body {
    font-family: var(--font-principal);
    line-height: 1.6;
    color: var(--cor-texto);
    background: var(--cor-fundo);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    color: var(--cor-titulo);
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}


/* ========================================= 
   CORREÇÃO HERO & SERVIÇOS 
   ========================================= */

.hero-full {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat;
}

.hero-content {
    max-width: 900px;
    padding: 0 20px;
    z-index: 2;
}

.hero-eyebrow {
    display: block;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
    color: var(--cor-destaque);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

.hero-full h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    color: #fff;
    margin-bottom: 1.5rem;
    text-align: center;
}

.text-highlight {
    color: var(--cor-destaque);
    position: relative;
    display: inline-block;
}

.hero-full p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-trust-badges {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.trust-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 10px 20px;
    border-radius: 50px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
}


/* ========================================= 2. SECÇÕES GERAIS ========================================= */

section {
    padding: 100px 5%;
    text-align: center;
    position: relative;
    /* Essencial para o overlay não fugir */
    background-color: var(--cor-fundo);
    /* Simplified section display */
}


/* Ajuste específico para Heroes de páginas internas (Serviços, Contacto, etc) */

section.hero-section-inner {
    padding: 120px 5% 60px;
    min-height: auto;
    background-color: var(--cor-primaria);
}


/* Sobre Nós (página): não ficar alinhado ao centro por causa do h1/h2 regra global */

.sobre-content-section,
.sobre-content-section * {
    text-align: left;
}


/* Secções de ecrã inteiro (apenas para a Home se necessário) */

section.full-height {
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.cta-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 15px 35px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    background: var(--cor-destaque);
    color: #fff;
    border: none;
    /* Removed transition and shadow for simplicity */
}


/* Grelha de Serviços: 3 por linha */

.servicos-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.servico-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease;
    text-align: left;
}

.servico-card:hover {
    transform: translateY(-10px);
}

.servico-img-container {
    height: 200px;
    overflow: hidden;
}

.servico-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 992px) {
    .servicos-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .servicos-container {
        grid-template-columns: 1fr;
    }
}

.no-requests p {
    font-size: 1.1rem;
    color: #777;
    margin-bottom: 25px;
}


/* ========================================= 
   DESIGN PREMIUM: ÁREA DE CLIENTE
   ========================================= */

.profile-edit-section,
.historico-section {
    padding: 80px 5%;
    background-color: var(--cor-fundo-alt);
    min-height: 85vh;
}

.profile-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    align-items: start;
}

.profile-card {
    background: #fff;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid #edf2f7;
}


/* Estilo Refinado da Foto de Perfil */

.avatar-upload {
    position: relative;
    max-width: 160px;
    margin: 0 auto 20px;
}

.avatar-preview {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.avatar-edit {
    position: absolute;
    right: 5px;
    bottom: 5px;
    z-index: 2;
}

.avatar-edit label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cor-destaque);
    color: #fff;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.sidebar-btn {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--cor-texto);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: var(--cor-fundo-alt);
}

.sidebar-btn:hover {
    background: #edf2f7;
    color: var(--cor-secundaria);
}

.sidebar-btn.logout {
    color: #ef4444;
    background: #fef2f2;
}

.sidebar-btn.logout:hover {
    background: #fee2e2;
}


/* Histórico de Agendamentos (Tabela em Cards) */

.historico-container {
    max-width: 1100px;
    margin: 0 auto;
}

.historico-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 15px;
    /* Espaço entre as linhas para parecerem cards */
}

.historico-table thead th {
    background: transparent;
    color: #94a3b8;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding: 10px 25px;
    text-align: left;
}

.historico-table tbody tr {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border-radius: 16px;
    transition: transform 0.2s ease;
}

.historico-table tbody tr:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.historico-table td {
    padding: 25px;
    border: none;
    color: var(--cor-titulo);
    font-weight: 500;
}

.historico-table td:first-child {
    border-radius: 16px 0 0 16px;
}

.historico-table td:last-child {
    border-radius: 0 16px 16px 0;
}

.estado-badge,
.badge {
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.estado-badge.Pendente,
.badge.Recebido,
.badge.Pendente {
    background: #fff7ed;
    color: #f97316;
}

.estado-badge.Confirmado,
.estado-badge.Concluído,
.badge.Concluído,
.badge.Aprovado {
    background: #f0fdf4;
    color: #16a34a;
}

.estado-badge.Em-análise,
.badge.Em-análise,
.badge.Processado {
    background: #eff6ff;
    color: #3b82f6;
}

.estado-badge.Cancelado,
.estado-badge.Recusado,
.badge.Cancelado,
.badge.Recusado {
    background: #fef2f2;
    color: #dc2626;
}

.badge.Sem-Tratamento {
    background: #f1f5f9;
    color: #475569;
}

@media (max-width: 992px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
    .historico-table thead {
        display: none;
    }
    .historico-table td {
        display: block;
        text-align: right;
        padding: 15px 25px;
        border-bottom: 1px solid #f1f5f9;
    }
    .historico-table td:last-child {
        border-bottom: none;
    }
    .historico-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: 700;
        color: #94a3b8;
    }
}


/* --- ESTILOS MOVIDOS DE header.php --- */


/* Melhora a legibilidade e consistência dos subtítulos das secções */

.subtitle {
    max-width: 700px;
    /* Limita a largura para melhor leitura */
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 4rem;
    /* Aumenta o espaçamento inferior */
    font-size: 1.1rem;
    color: #555;
    text-align: center;
}


/* NOTA: As regras que injetavam conteúdo (::before, ::after, content:url) foram removidas. */


/* Melhora o alinhamento do formulário de contacto e do mapa */

.contacto-wrapper {
    gap: 3rem;
    /* Aumenta o espaçamento entre o formulário e o mapa */
}


/* Media Query para ajustar o layout em ecrãs menores */


/* Sobre Nós (imagem pequena ao lado do texto) */

.sobre-container {
    display: flex;
    align-items: center;
    gap: 40px;
    justify-content: space-between;
    text-align: left;
}

.sobre-img-box {
    flex: 0 0 400px;
    max-width: 400px;
    display: flex;
    justify-content: center;
}

.sobre-img-box img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    object-position: center;
    border-radius: 26px;
    box-shadow: var(--shadow-soft);
    display: block;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.sobre-texto {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sobre-texto .hero-eyebrow {
    text-align: left !important;
    margin-bottom: 10px;
}

.sobre-texto h2 {
    text-align: left;
    margin-bottom: 14px;
}

.sobre-texto p {
    text-align: left;
    margin-bottom: 16px;
    font-size: 1.05rem;
    color: var(--cor-texto);
}

.sobre-cta {
    text-align: left;
}

.valores-grid {
    margin-top: 55px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}


/* CTA cards on Index testemunhos/contacto */

.opinions-cta .cta-button {
    border-radius: 14px;
    padding: 14px 26px;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.18);
}

.valor-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    padding: 26px 22px;
    text-align: left;
}

.valor-card i {
    color: var(--cor-secundaria);
    font-size: 1.6rem;
    margin-bottom: 12px;
    display: block;
}

.valor-card h3 {
    text-align: left;
    margin-bottom: 10px;
}

.valor-card p {
    text-align: left;
    color: var(--cor-texto);
}

@media (max-width: 992px) {
    .sobre-img-box {
        flex: 0 0 320px;
        max-width: 320px;
    }
    .sobre-img-box img {
        height: 240px;
    }
    .valores-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sobre-container {
        flex-direction: column;
        /* Coloca a imagem em cima do texto */
        gap: 25px;
    }
    .sobre-img-box {
        flex: none;
        max-width: 100%;
        width: 100%;
    }
    .sobre-img-box img {
        height: auto;
        max-height: 260px;
    }
    .sobre-container img {
        max-width: 100%;
    }
    .back-to-top-btn {
        bottom: 20px;
        right: 95px;
        width: 45px;
        height: 45px;
    }
}


/* --- ESTILO UNIFICADO PARA BOTÕES DE ÍCONES SOCIAIS --- */

.social-icon-btn {
    display: inline-flex;
    /* Usa flex para alinhar o ícone perfeitamente */
    justify-content: center;
    /* Alinha horizontalmente ao centro */
    align-items: center;
    /* Alinha verticalmente ao centro */
    width: 45px;
    /* Largura fixa */
    height: 45px;
    /* Altura fixa */
    border-radius: 50%;
    /* Torna o botão circular */
    text-decoration: none;
    font-size: 1.2rem;
    /* Tamanho do ícone */
    line-height: 1.5;
    /* Espaçamento de linha pedido */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.social-icon-btn:hover {
    transform: translateY(-3px) scale(1.1);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}


/* Agrupamento da direita (User + Toggle) */

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}


/* =========================================
   NAVBAR PREMIUM STYLES (Adicionado)
   ========================================= */

header {
    background-color: rgba(255, 255, 255, 0.98);
    /* Ligeira transparência */
    position: sticky;
    top: 0;
    z-index: 99999 !important; /* Valor extremo para garantir que fica no topo */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    /* Efeito de vidro */
    transition: all 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 15px 50px;
    /* Espaçamento inicial */
    transition: padding 0.3s ease;
}

.logo,
.nav-right {
    flex: 0 0 auto;
}


/* Links da Navegação */

.main-nav-links {
    flex: 1;
    justify-content: center;
    display: flex;
    list-style: none;
    align-items: center;
    gap: 45px;
    /* Nomes mais separados entre si */
    margin: 0;
    padding: 0;
}

.main-nav-links li a {
    text-decoration: none;
    color: #4a5568;
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    color: #4a5568 !important;
    /* Força cor cinza escuro */
    transition: color 0.3s ease, background-color 0.3s ease;
}

.main-nav-links li a:visited {
    color: #4a5568 !important;
    /* Impede que fiquem roxos após clicar */
}

.main-nav-links li a:not(.nav-cta):not(.nav-icon):hover {
    color: var(--cor-secundaria);
    background-color: #f1f5f9;
}


/* Botão CTA na Navbar */

.nav-cta {
    background-color: var(--cor-destaque);
    color: #fff !important;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-cta:hover {
    color: #fff !important;
    /* Manter cor do texto */
    background-color: #ea580c;
}


/* Ajustes Mobile */

.menu-toggle {
    display: none;
}


/* Esconder em desktop */

@media (max-width: 992px) {
    .main-nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        height: auto;
        /* Garante altura automática */
        background: #fff;
        flex-direction: column;
        padding: 30px 0;
        gap: 20px;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
        z-index: 999;
        /* Estado oculto */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }
    .main-nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    /* Botão do menu visível em mobile */
    .menu-toggle {
        display: block;
        font-size: 1.8rem;
        color: #1a202c;
        background: none;
        border: none;
        cursor: pointer;
        margin-left: 10px;
        /* Espaço entre user icon e menu */
    }
}


/* --- USER DROPDOWN MENU --- */

.user-menu {
    position: relative;
}

.user-menu-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #4a5568;
    transition: color 0.3s ease;
    text-decoration: none;
    border: none;
}

.user-menu-toggle:hover {
    color: var(--cor-secundaria);
}

.user-menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    overflow: hidden;
    min-width: 220px;
    list-style: none;
    padding: 8px 0;
    border: 1px solid #f0f0f0;
    z-index: 100000 !important; /* Sempre acima de tudo, inclusive do header */
    pointer-events: auto;
    /* Garante que fica acima de tudo */
}


/* Ponte invisível para evitar que o menu feche ao passar o rato */

.user-menu-dropdown::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}


.user-menu-dropdown.active {
    display: block !important;
    animation: fadeIn 0.2s ease-out;
}

.user-menu-dropdown li a,
.user-menu-dropdown li span {
    display: flex;
    /* Garante que o ícone e o texto fiquem na mesma linha */
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    white-space: nowrap;
}

.user-menu-dropdown li a:hover {
    background-color: #f5f5f5;
    color: var(--cor-secundaria);
}


/* Tamanho dos ícones dentro do dropdown */

.user-menu-dropdown li a i {
    font-size: 1.1rem;
    /* Aumentado para melhor visibilidade */
}

.user-menu-dropdown .dropdown-divider,
.dropdown-divider {
    height: 1px;
    background-color: #eee;
    margin: 8px 0;
    display: block;
    width: 100%;
}

.user-menu-dropdown .welcome-user {
    font-weight: bold;
    color: #1a202c;
}

.user-menu-dropdown i.fa-fw {
    color: #888;
    /* Mantido para ícones */
}

.user-menu-dropdown li a:hover i.fa-fw {
    color: var(--cor-secundaria);
}


/* --- HEADER SCROLLED STATE --- */

header.scrolled nav {
    padding-top: 10px;
    padding-bottom: 10px;
}


/* =========================================
   FOOTER PREMIUM STYLES
   ========================================= */

footer {
    background-color: #111827;
    /* Fundo escuro profissional */
    color: #9ca3af;
    padding: 25px 0;
    font-size: 0.95rem;
    margin-top: auto;
    text-align: center;
    /* Garante alinhamento central */
}

footer p {
    color: #9ca3af;
    /* Garante cor legível */
    /* Garante que fica no fundo */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 25px;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 3px;
    background-color: var(--cor-secundaria);
    /* Azul da marca */
    border-radius: 2px;
}

.footer-col p {
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
    padding-left: 8px;
    /* Efeito de deslize */
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    text-align: center;
}


/* Ajuste para mobile no footer */

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        /* Uma coluna em mobile */
        gap: 30px;
    }
}

.footer-social-links {
    justify-content: center;
    gap: 10px;
}

.footer-col-contact {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-contact-list {
    padding: 0;
}

.footer-contact-list li i {
    margin-right: 10px;
}

.footer-admin-link {
    font-size: 0.8rem;
    margin-top: 10px;
    opacity: 0.8;
    /* Aumentar visibilidade */
}

.footer-admin-link a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
    /* Adicionar transição suave */
}

.footer-admin-link a:hover {
    color: #fff;
    /* Cor mais clara ao passar o rato */
    text-decoration: underline;
}


/* Lista da Home (Quem Somos) */

.sobre-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: justify;
}

.sobre-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sobre-list li i {
    color: var(--cor-secundaria);
}


/* Estilos simplificados para o Quem Somos */

.sobre-texto h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.sobre-texto p {
    font-size: 1.1rem;
    color: var(--cor-texto);
    line-height: 1.8;
    margin-bottom: 20px;
}

.team-card:hover {
    transform: translateY(-10px);
}

.team-img-wrapper {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--cor-fundo-alt);
}

.team-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-role {
    color: var(--cor-destaque);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    display: block;
}


/* Lista da Home (Quem Somos) */

.sobre-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: justify;
}

.sobre-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sobre-list li i {
    color: var(--cor-secundaria);
}


/* =========================================
   QUEM SOMOS (HOME) - LAYOUT LADO A LADO
   ========================================= */

.sobre-stats-mini {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    margin: 30px 0;
    border-top: 1px solid #e2e8f0;
    padding-top: 25px;
}

.sobre-stats-cards {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.sobre-stat-item {
    flex: 1 1 220px;
    min-width: 220px;
    max-width: 260px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px 18px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.sobre-stat-item strong {
    font-size: 2.2rem;
    color: var(--cor-primaria);
    display: block;
    line-height: 1;
    margin-bottom: 8px;
    text-align: center;
}

.sobre-stat-item span {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    text-align: center;
}

.sobre-stat-item .stat-icon-wrapper {
    margin-bottom: 10px;
    color: var(--cor-secundaria);
    font-size: 1.2rem;
}

.floating-badge {
    position: absolute;
    bottom: -20px;
    left: -10px;
    /* Ajuste para não cortar fora do ecrã */
    background: #fff;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 240px;
    animation: floatBadge 4s ease-in-out infinite;
    z-index: 2;
    border-left: 4px solid var(--cor-destaque);
}

@keyframes floatBadge {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.badge-icon {
    font-size: 2rem;
    color: var(--cor-destaque);
}

.badge-text strong {
    display: block;
    color: var(--cor-titulo);
    font-size: 1rem;
    line-height: 1.2;
}

.badge-text span {
    font-size: 0.8rem;
    color: #64748b;
}

@media (max-width: 992px) {
    .sobre-simple-wrapper {
        flex-direction: column;
    }
    .sobre-simple-img {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        /* Centrar imagem em mobile */
    }
    .about-split-section {
        flex-direction: column;
    }
    .about-image {
        order: -1;
        margin-bottom: 30px;
    }
    .floating-badge {
        position: relative;
        bottom: auto;
        left: auto;
        margin: -30px auto 20px auto;
        width: fit-content;
    }
    .sobre-stats-mini {
        justify-content: center;
    }
}

.about-home-narrative {}

.about-home-narrative .founder-img {}

.about-home-narrative .section-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.about-home-narrative .subtitle {}

.about-home-narrative .founder-role-text {
    font-size: 1rem;
    margin-bottom: 10px;
}

.about-home-narrative .founder-bio-text {}

.about-home-narrative .quote-text {
    font-size: 1rem;
}

.about-home-narrative .sobre-stats-mini {
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}


/* Melhoria Visual na Secção Sobre Técnica */

.tech-item {
    border-radius: 12px;
    border-left: 5px solid var(--cor-secundaria);
    background: linear-gradient(to right, #ffffff, #f8fafc);
}

.tech-item:hover {
    border-left-color: var(--cor-destaque);
    background: #fff;
}


/* ========================================= 
   USER ICONS (NAVBAR) 
   ========================================= */

.user-menu-toggle i.user-icon-header {
    color: var(--cor-primaria);
    background-color: #fff;
}

.user-icon-header {
    width: 45px !important;
    height: 45px !important;
    font-size: 1.5rem !important;
    border: 2px solid var(--cor-secundaria);
    width: 42px !important;
    height: 42px !important;
    font-size: 1.2rem !important;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #fff;
    color: var(--cor-primaria);
    color: #475569;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.user-icon-header:hover {
    background-color: var(--cor-secundaria);
    color: #fff;
    border-color: var(--cor-destaque);
    transform: translateY(-2px) scale(1.05);
}

.login-icons-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

.user-menu-toggle img {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cor-secundaria);
    transition: all 0.3s ease;
}

.user-menu-toggle:hover img {
    border-color: var(--cor-destaque);
}


/* Notificações Admin (Toast) */

.admin-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--cor-primaria);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 5px solid var(--cor-destaque);
    font-weight: 600;
}

.admin-toast.show {
    transform: translateX(0);
}

.admin-toast-sucesso {
    background-color: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.admin-toast-erro {
    background-color: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.admin-toast-orcamento {
    background-color: #e0f2fe;
    color: #0ea5e9;
    border-left-color: #0ea5e9;
}

.admin-toast-mensagem {
    background-color: #ffedd5;
    color: #f97316;
    border-left-color: #f97316;
    font-weight: 600;
}

.admin-toast.show {
    transform: translateX(0);
}

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Utilitário para tabelas dinâmicas */

.admin-table .unread {
    background-color: #f0f7ff;
    font-weight: 600;
}

.user-menu-toggle:hover img {
    border-color: var(--cor-destaque);
}


/* Correção para a imagem do fundador que estava enorme */

.about-home-narrative img,
.sobre-centered-container img,
.about-home-narrative .founder-img,
.sobre-container .founder-image-about {
    /* Adicionado .sobre-container .founder-image-about */
    /* Adicionado para ser mais específico na imagem do fundador */
    max-width: 350px !important;
    /* Reduzido para um tamanho mais adequado na página principal */
    height: auto !important;
    margin: 0 auto 30px;
    display: block;
}

.about-home-narrative .subtitle {}

.about-home-narrative .founder-role-text {
    font-size: 1rem;
    margin-bottom: 10px;
}

.about-home-narrative .founder-bio-text {}

.about-home-narrative .quote-text {
    font-size: 1rem;
}

.about-home-narrative .sobre-stats-mini {
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}


/* Reorganização "Porque a Voltrix" */

.why-voltrix-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 40px;
}

.why-box {
    background: #fff;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    border-top: 5px solid var(--cor-secundaria);
    transition: transform 0.3s ease;
    text-align: center;
}

.why-box:hover {
    transform: translateY(-10px);
}

.why-box i {
    font-size: 3rem;
    color: var(--cor-destaque);
    margin-bottom: 20px;
}


/* Layout Opiniões + Contacto */

.opinions-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    align-items: center;
}

@media (max-width: 992px) {
    .why-voltrix-grid {
        grid-template-columns: 1fr;
    }
    .opinions-layout {
        grid-template-columns: 1fr;
    }
}


/* Melhoria Visual na Secção Sobre Técnica */

.tech-item {
    border-radius: 12px;
    border-left: 5px solid var(--cor-secundaria);
    background: linear-gradient(to right, #ffffff, #f8fafc);
}

.tech-item:hover {
    border-left-color: var(--cor-destaque);
    background: #fff;
}


/* Avatar da Navbar (Imagem Pequena) */

.user-menu-toggle img,
.user-menu-toggle i {
    width: 45px !important;
    height: 45px !important;
    /* Mantido para o avatar */
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cor-secundaria);
    margin-right: 8px;
    vertical-align: middle;
    font-size: 1.8rem;
    /* Tamanho normal */
}


/* Aumentar ícone após Login */

.user-menu .user-menu-toggle i.user-icon-header {
    font-size: 2.8rem !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: scale(1.05);
}


/* Fix definitivo: garantir tamanho do ícone mesmo que existam outras regras */

.user-menu .user-menu-toggle i.user-icon-header {
    font-size: 1.15rem !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: scale(1.05);
}

.user-menu-toggle i.user-icon-header {
    font-size: 1.15rem !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: scale(1.05);
}


/* Admin Navigation */

.admin-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.admin-nav-item {
    padding: 10px 20px;
    background: #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
}

.admin-nav-item.active {
    background: var(--cor-secundaria);
    color: #fff;
}


/* Calendário no Dashboard */

#admin-dashboard-calendar {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
    margin-top: 30px;
}


/* =========================================
   PERFIL DE UTILIZADOR (DESIGN MODERNO)
   ========================================= */

.profile-edit-section {
    padding: 60px 5%;
    background-color: var(--cor-fundo-alt);
    min-height: 80vh;
}

.profile-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    align-items: start;
}

.profile-card {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}


/* Estilo da Foto Circular (A "Bolinha") */

.avatar-upload {
    position: relative;
    max-width: 150px;
    margin: 0 auto 25px;
}

.avatar-edit {
    position: absolute;
    right: 5px;
    z-index: 1;
    top: 5px;
}

.avatar-edit input {
    display: none;
}

.avatar-edit label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--cor-secundaria);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.avatar-preview {
    width: 150px;
    height: 150px;
    position: relative;
    border-radius: 50%;
    border: 5px solid #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.avatar-preview>div {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.profile-sidebar h3 {
    margin: 15px 0 5px;
    font-size: 1.5rem;
}

.user-role {
    color: var(--cor-secundaria);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 25px;
    display: block;
}

.profile-nav-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.profile-main h2 {
    margin-bottom: 10px;
    font-size: 2rem;
}


/* Ícones nos labels do formulário de perfil */

.profile-main .form-group label i {
    font-size: 1.1rem;
    /* Aumentado para melhor visibilidade */
    margin-right: 5px;
}

.subtitle-small {
    margin-bottom: 35px;
    color: #777;
}

@media (max-width: 992px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
    .profile-sidebar {
        text-align: center;
    }
}


/* --- Botões de Visibilidade no Admin --- */

.btn-vis-option {
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid;
    background: transparent;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.btn-vis-option.visivel {
    border-color: #28a745;
    color: #28a745;
}

.btn-vis-option.visivel.active {
    background-color: #28a745;
    color: #fff;
}

.btn-vis-option.oculto {
    border-color: #dc3545;
    color: #dc3545;
}

.btn-vis-option.oculto.active {
    background-color: #dc3545;
    color: #fff;
}


/* Ajuste do Botão de Guardar no Perfil */

.btn-wrapper {
    border-top: 1px solid #eee;
    padding-top: 30px;
    text-align: center;
}

.btn-save-profile {
    width: 100%;
    max-width: 400px;
    padding: 16px 30px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--cor-secundaria) 0%, var(--cor-primaria) 100%);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-save-profile:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.form-grid {
    display: grid;
}


/* --- Testemunhos Form (Estrelas) --- */

.star-rating-wrapper {
    background: #f8fafc;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    text-align: center;
    margin-bottom: 25px;
    transition: border-color 0.3s ease;
}

.star-rating-wrapper:hover {
    border-color: var(--cor-secundaria);
}

.star-rating {
    display: flex;
    gap: 15px;
    justify-content: center;
    font-size: 2.8rem;
    color: #cbd5e1;
    cursor: pointer;
}

.star-rating i {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s ease;
}

.star-rating i:hover {
    transform: scale(1.2);
}

.rating-text {
    display: block;
    margin-top: 12px;
    font-weight: 700;
    color: var(--cor-primaria);
    font-size: 0.95rem;
    text-transform: uppercase;
}


/* Estilo da Foto Circular (A "Bolinha") */

.avatar-upload {
    position: relative;
    max-width: 150px;
    margin: 0 auto 25px;
}

.avatar-edit {
    position: absolute;
    right: 5px;
    z-index: 1;
    top: 5px;
}

.avatar-edit input {
    display: none;
}

.avatar-edit label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--cor-secundaria);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.avatar-preview {
    width: 150px;
    height: 150px;
    position: relative;
    border-radius: 50%;
    border: 5px solid #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.avatar-preview>div {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.profile-sidebar h3 {
    margin: 15px 0 5px;
    font-size: 1.5rem;
}

.user-role {
    color: var(--cor-secundaria);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 25px;
    display: block;
}

.profile-nav-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.profile-main h2 {
    margin-bottom: 10px;
    font-size: 2rem;
}

.subtitle-small {
    margin-bottom: 35px;
    color: #777;
}

@media (max-width: 992px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
    .profile-sidebar {
        text-align: center;
    }
}

.form-grid {
    display: grid;
}


/* --- Testemunhos Form (Estrelas) --- */

.star-rating-wrapper {
    background: #f8fafc;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    text-align: center;
    margin-bottom: 25px;
    transition: border-color 0.3s ease;
}

.star-rating-wrapper:hover {
    border-color: var(--cor-secundaria);
}

.star-rating {
    display: flex;
    gap: 15px;
    justify-content: center;
    font-size: 2.8rem;
    color: #cbd5e1;
    cursor: pointer;
}

.star-rating i {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s ease;
}

.star-rating i:hover {
    transform: scale(1.2);
}

.rating-text {
    display: block;
    margin-top: 12px;
    font-weight: 700;
    color: var(--cor-primaria);
    font-size: 0.95rem;
    text-transform: uppercase;
}


/* =========================================
   MODERN ADMIN HUB STYLES (CORRIGIDO)
   ========================================= */

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
}

.stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: var(--cor-secundaria);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-box.blue .stat-icon {
    background: #e0f2fe;
    color: #0ea5e9;
}

.stat-box.orange .stat-icon {
    background: #ffedd5;
    color: #f97316;
}

.stat-box.green .stat-icon {
    background: #dcfce7;
    color: #22c55e;
}

.stat-box.purple .stat-icon {
    background: #f3e8ff;
    color: #a855f7;
}

.stat-info .stat-label {
    display: block;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.stat-info .stat-value {
    font-size: 1.6rem !important;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.1;
}

.admin-main-layout {
    display: flex;
    flex-direction: column;
    gap: 60px; /* Aumenta consideravelmente o espaçamento entre as secções verticais */
}

.admin-row {
    display: grid; /* Mantém o layout de grelha */
    grid-template-columns: 0.8fr 1.2fr; /* Reduz a largura da coluna do gráfico para dar mais espaço */
    gap: 60px; /* Aumenta o espaçamento lateral entre os cartões */
    margin-bottom: 20px; /* Espaço extra de segurança para os elementos seguintes */
}

/* Ajuste específico para o gráfico de distribuição para controlar a sua altura */
#chartEstados {
    max-height: 240px; /* Reduz a altura para que o cartão não se estenda demasiado para baixo */
    margin: 0 auto; /* Centraliza o gráfico dentro do seu contentor */
    display: block; /* Garante que o margin auto funciona */
}

@media (max-width: 1024px) {
    .admin-row {
        grid-template-columns: 1fr;
    }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 15px;
}

.card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cor-primaria);
}

.admin-input,
.search-box input {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.85rem;
    outline: none;
    width: 100%;
    transition: border-color 0.2s;
}

.user-badge {
    background: var(--cor-primaria);
    color: #fff;
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
}

.upload-inline-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.upload-inline-form select,
.upload-inline-form input {
    flex: 1;
    min-width: 150px;
}

.btn-small {
    padding: 5px 10px;
    background: #f1f5f9;
    border-radius: 4px;
    text-decoration: none;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
}


/* =========================================
   ESTRUTURA DO NOVO PAINEL ADMIN
   ========================================= */

.admin-wrapper {
    display: flex;
    min-height: 100vh;
    margin-top: 0;
    background-color: var(--cor-fundo-alt);
    text-align: left;
    /* Reset do alinhamento global */
}


/* Sidebar Fixa */

.admin-sidebar {
    width: 260px;
    background: var(--cor-primaria);
    color: #fff;
    padding-top: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    position: fixed; /* Sidebar fixa lateralmente */
    top: 80px; /* Deslocada para baixo do header principal */
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar-header {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--cor-destaque);
    text-align: center;
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar ul {
    list-style: none;
    padding: 0;
}

.admin-sidebar ul li a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.admin-sidebar ul li a i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

.admin-sidebar ul li a:hover,
.admin-sidebar ul li a.active {
    background-color: #334155;
    color: #fff;
    border-left-color: var(--cor-secundaria);
}

.admin-sidebar .logout-link {
    color: #f87171 !important;
    margin-top: 20px;
}


/* Área de Conteúdo Principal */

.admin-main-content {
    flex-grow: 1;
    padding: 30px;
    /* Garante que o conteúdo não transborda e mantém o alinhamento */
    margin-left: 260px; /* Compensa a sidebar fixa */
    margin-top: 80px;  /* Compensa o header sticky do site */
    width: calc(100% - 260px);
    overflow-x: hidden;
    background-color: var(--cor-fundo-alt);
    position: relative;
    z-index: 1;
}

.admin-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    z-index: 2; /* Abaixo do menu dropdown do site */
}

.header-title-wrapper {
    flex: 1;
    min-width: 0; /* Previne que o título empurre a info do user */
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    background: #fff;
    padding: 8px 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* --- Estilos para Formulários dentro do Modal (Admin) --- */
.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 10px;
}

.admin-form-span-2 {
    grid-column: span 2;
}

.admin-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.admin-form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--cor-primaria);
}

.admin-form-control, 
.admin-form-select, 
.admin-form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.admin-form-control:focus, 
.admin-form-select:focus, 
.admin-form-textarea:focus {
    border-color: var(--cor-secundaria);
}

.admin-form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Pré-visualização de imagem nos formulários do Admin */
.admin-form-img-preview {
    width: 100%;
    max-width: 250px;
    height: 150px;
    object-fit: scale-down; /* Garante que a imagem inteira apareça sem distorção ou cortes agressivos */
    background-color: #f8fafc; /* Fundo neutro para imagens com proporções diferentes */
    border-radius: 12px;
    margin-bottom: 10px;
    border: 2px dashed #cbd5e1;
    display: none; /* Escondido por defeito */
}

/* Garante que as tabelas não cortem colunas (como o Estado) em ecrãs pequenos */
.admin-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 10px;
}

.badge.Visível { background: #f0fdf4; color: #16a34a; }
.badge.Inativo, .badge.Oculto { background: #f1f5f9; color: #475569; }

/* --- Ajuste para o Modal de Detalhes (Admin) permitir Scroll e não achatar --- */
#detailModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.8);
    z-index: 10001;
    display: none;
    justify-content: center;
    align-items: flex-start; /* Garante que o conteúdo começa no topo */
    overflow-y: hidden;      /* O scroll será no #modalBody */
    padding: 30px 15px;      
    backdrop-filter: blur(5px);
    scroll-behavior: smooth;
}

/* Previne que o conteúdo do modal "achate" na horizontal e garante largura correta */
#detailModal > div {
    background: #fff;
    width: 95%;
    max-width: 850px;        /* Largura ideal para formulários de edição */
    min-width: 300px;        /* Segurança para ecrãs muito pequenos */
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    margin: 0 auto 40px;     
    flex-shrink: 0;          /* Impede o achatamento: o div mantém a sua altura natural */
    display: block;          /* Garante que o conteúdo flui verticalmente */
    height: auto;            /* Garante que a altura cresce conforme o conteúdo */
    animation: modalEntry 0.3s ease-out;
}

.admin-card h3 i {
    color: var(--cor-secundaria);
}

/* Admin Navigation (para o menu superior da dashboard) */
.admin-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
}

@keyframes modalEntry {
    from { opacity: 0; transform: translateY(-20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.admin-header-top h1 {
    text-align: left;
    margin: 0;
    font-size: 1.8rem;
    color: var(--cor-primaria);
}

.admin-content-area {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    min-height: 80vh;
}


/* Reset de títulos dentro do admin para não ficarem centrados */

.admin-content-area h1,
.admin-content-area h2,
.admin-content-area h3 {
    text-align: left;
}

/* Estilo para as estrelas no resumo do dashboard */
.stars-summary {
    color: #fbbf24;
    font-size: 0.8rem;
    white-space: nowrap;
    margin-top: 4px;
}

/* Media Query para ajustar o layout em ecrãs menores */
@media (max-width: 768px) {
    .admin-main-content {
        padding: 15px;
    }

    .admin-header-top {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .admin-user-info {
        width: 100%;
        justify-content: center;
    }
}

.admin-content-area .form-grid {
    display: grid;
    gap: 20px;
}


/* ========================================= 
   PORTFOLIO CAROUSEL (SWIPER)
   ========================================= */

.portfolio-carousel-main {
    padding: 20px 10px 60px !important;
    /* Espaço para as setas e pontos */
}

.portfolio-carousel-main .galeria-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 350px;
    /* Altura uniforme para todos os slides */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: var(--cor-primaria);
    cursor: pointer;
}

.portfolio-carousel-main .galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-carousel-main .galeria-item:hover img {
    transform: scale(1.1);
    filter: brightness(0.6);
}

.galeria-item-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 25px 25px;
    /* Gradiente premium para legibilidade */
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.4) 50%, transparent 100%);
    color: #fff;
    text-align: left;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

.portfolio-carousel-main .galeria-item:hover .galeria-item-title {
    transform: translateY(0);
}

.galeria-item-title h3 {
    color: #fff !important;
    margin-bottom: 8px;
    font-size: 1.3rem;
    text-align: left;
    font-weight: 700;
}

.galeria-item-title p {
    font-size: 0.95rem;
    color: var(--cor-destaque);
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.galeria-item-title p::before {
    content: '\f3c5';
    /* Ícone de mapa FontAwesome */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

@media (max-width: 768px) {
    .portfolio-carousel-main .galeria-item {
        height: 320px;
        /* Ajuste para telemóveis */
    }
    .swiper-button-next,
    .swiper-button-prev {
        display: none !important; /* Esconde setas em mobile para dar foco aos dots */
    }
}


/* Swiper Navigation (Arrows) */

.swiper-button-next,
.swiper-button-prev {
    color: var(--cor-secundaria);
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: var(--cor-secundaria);
    color: #fff;
}


/* Swiper Pagination (Dots) */

.swiper-pagination-bullet {
    background: var(--cor-primaria);
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    background: var(--cor-secundaria);
    opacity: 1;
}


/* ========================================= 
   SEÇÃO LEGADO / SOBRE (HOME) 
   ========================================= */

.legado-section {
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
    padding: 100px 5%;
}

.legado-wrapper {
    display: flex;
    align-items: center;
    gap: 56px;
    text-align: left;
    max-width: 1180px;
    margin: 0 auto;
    padding: 10px 0;
}

.legado-img-box {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 0;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #dbeafe;
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.legado-img-box img {
    width: 100%;
    max-width: 320px !important;
    height: auto !important;
    border-radius: 18px;
    position: relative;
    z-index: 1;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
    display: block;
    margin: 0 !important;
    border: 2px solid #ffffff;
}

.legado-text {
    flex: 1.2;
}

.legado-text h2 {
    text-align: left;
    margin-top: 8px;
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    line-height: 1.2;
    color: var(--cor-primaria);
}

.legado-text .quote {
    font-size: 1.08rem;
    color: var(--cor-primaria);
    font-weight: 600;
    margin: 22px 0;
    line-height: 1.6;
    border-left: 4px solid var(--cor-destaque);
    padding-left: 16px;
    font-style: italic;
    background: rgba(249, 115, 22, 0.05);
    border-radius: 0 8px 8px 0;
    padding-top: 10px;
    padding-bottom: 10px;
}

.mt-20 {
    margin-top: 20px;
}

@media (max-width: 992px) {
    .legado-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 50px;
    }
    .legado-text h2 {
        text-align: center;
    }
    .legado-img-box::before {
        display: none;
    }
    .legado-img-box img {
        margin: 0 auto !important;
        max-width: 400px !important;
    }
    .legado-text .quote {
        border-left: none;
        border-top: 3px solid var(--cor-destaque);
        padding: 20px 0 0;
    }
}


/* ========================================= 
   SECÇÃO TESTEMUNHOS & CONFIANÇA
   ========================================= */

.testemunho-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid #f1f5f9;
    position: relative;
    transition: transform 0.3s ease;
}

.testemunho-card:hover {
    transform: translateY(-5px);
}

.testemunho-card .fa-quote-left {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    color: var(--cor-destaque);
    opacity: 0.15;
}

.testemunho-card .star-rating {
    color: #fbbf24;
    /* Cor dourada para estrelas */
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.testemunho-card p {
    font-style: italic;
    font-size: 1.05rem;
    color: var(--cor-texto);
    margin-bottom: 25px;
}

.testemunho-card strong {
    color: var(--cor-primaria);
    font-size: 1rem;
    display: block;
    font-weight: 700;
}


/* Cartão de Ação Dark */

.action-card-dark {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.action-card-dark::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
}


/* ========================================= 
   LAYOUT ZIGUEZAGUE (SERVIÇOS) 
   ========================================= */

.zigzag-section {
    padding: 100px 5%;
    background-color: var(--cor-fundo);
}

.zigzag-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.zigzag-item {
    display: flex;
    align-items: center;
    gap: 80px;
    margin-bottom: 100px;
    /* Primeiro item (ímpar): Texto à Esquerda, Imagem à Direita */
    flex-direction: row-reverse;
}

.zigzag-item:nth-child(even) {
    /* Segundo item (par): Imagem à Esquerda, Texto à Direita */
    flex-direction: row;
}

.zigzag-image,
.zigzag-content {
    flex: 1;
    text-align: center;
}

@media (max-width: 992px) {
    .zigzag-item,
    .zigzag-item:nth-child(even) {
        flex-direction: column !important;
        /* Em telemóveis, empilha verticalmente */
        text-align: center !important;
        gap: 40px;
    }
}


/* Refinamento das imagens da Galeria */

.project-img-refined {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease;
}

.zigzag-item:hover .project-img-refined {
    transform: scale(1.02);
}



/* ========================================= 
   DESIGN PÁGINA CONTACTOS
   ========================================= */

.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: start;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--cor-fundo-alt);
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateX(10px);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.info-card i {
    font-size: 1.5rem;
    color: var(--cor-destaque);
    background: #fff;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.info-card h4 {
    margin: 0;
    font-size: 0.9rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
}

.info-card p {
    margin: 0;
    font-weight: 700;
    color: var(--cor-primaria);
    font-size: 1.1rem;
}

.contacto-form-wrapper {
    background: #fff;
    padding: 50px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9;
}

.contacto-section .container {
    text-align: left;
}

.contacto-hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.12), rgba(59, 130, 246, 0.12));
    border: 1px solid rgba(59, 130, 246, 0.18);
    color: var(--cor-primaria);
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 16px;
}


/* --- Efeito Moderno de Floating Labels --- */

.modern-form .form-group {
    position: relative;
    margin-bottom: 25px;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.modern-form input,
.modern-form textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.modern-form label {
    display: block !important;
    position: static !important;
    order: -1 !important;
    margin-bottom: 8px !important;
    color: var(--cor-primaria) !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    text-align: left !important;
    pointer-events: auto !important;
    background: transparent !important;
    padding: 0 !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.modern-form input:focus,
.modern-form textarea:focus {
    border-color: var(--cor-secundaria);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.sucesso-msg {
    color: #16a34a;
    font-weight: 600;
}

.erro-msg {
    color: #dc2626;
    font-weight: 600;
}

@media (max-width: 768px) {
    .contacto-form-wrapper {
        padding: 30px 20px;
    }
}


/* ========================================= 
   DESIGN PREMIUM: PÁGINAS DE LOGIN (AUTH)
   ========================================= */

.auth-section {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 40px 20px;
}

.auth-card {
    background: #fff;
    width: 100%;
    max-width: 450px;
    padding: 50px 40px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border-top: 6px solid var(--cor-destaque);
    text-align: center;
}

.auth-card .logo {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--cor-titulo);
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.auth-card h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--cor-primaria);
}

.auth-card p {
    color: #64748b;
    margin-bottom: 35px;
    font-size: 0.95rem;
}

.auth-form .form-group {
    margin-bottom: 20px;
    text-align: left;
    position: relative;
}

.auth-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--cor-primaria);
}

.auth-form .input-icon-wrapper {
    position: relative;
}

.auth-form .input-icon-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    display: none !important;
}

.auth-form input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.auth-form input:focus {
    border-color: var(--cor-secundaria);
    outline: none;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.auth-alert.error {
    background-color: #fef2f2;
    color: #dc2626;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #fecaca;
    margin-bottom: 25px;
    font-size: 0.9rem;
    font-weight: 500;
}


/* Ajustes para o formulário de orçamento em Mobile */

@media (max-width: 768px) {
    .orcamento-section .form-grid {
        grid-template-columns: 1fr !important;
    }
    .orcamento-section h3 {
        grid-column: span 1 !important;
    }
}

.google-map-container {
    margin-top: 30px;
    box-shadow: var(--shadow-soft);
    border-radius: 15px;
    overflow: hidden;
}

@media (max-width: 992px) {
    .contacto-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}