/* Configurações Gerais e Cores */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    /* Cores Corporativas da Unitron */
    --cor-principal: #004b93;    /* Azul corporativo Unitron */
    --cor-secundaria: #f0f4f8;   /* Cinzento/azul muito claro para fundos */
    --cor-destaque: #0076ce;     /* Azul secundário para hover e destaques */
    --cor-texto: #2c3e50;        /* Tom escuro legível para texto */
    --cor-branca: #ffffff;
    --cor-cinza-escuro: #1e293b; /* Fundo do rodapé */
}

body {
    color: var(--cor-texto);
    line-height: 1.6;
}

/* Cabeçalho e Navegação */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--cor-principal);
}

.logo img {
    max-height: 40px;
    width: auto;
}

.nav a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: var(--cor-texto);
    font-weight: 500;
}

.nav a:hover,
.nav a.active {
    color: var(--cor-principal);
    font-weight: 600;
}

/* Secção Hero (Início) */
.hero {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--cor-branca);
    text-align: center;
    padding: 6rem 1rem;
}

section.hero {
    background-image: linear-gradient(rgba(0, 75, 147, 0.75), rgba(0, 0, 0, 0.65)), url('imagens/logo/fundoheader.png');
}

section.hero.hero-servicos {
    background-image: linear-gradient(rgba(0, 30, 60, 0.75), rgba(0, 30, 60, 0.75), url('imagens/logo/bannerservicos.png')) !important;
}

section.hero.hero-contacto {
    background-image: linear-gradient(rgba(0, 30, 60, 0.75), rgba(0, 30, 60, 0.75), url('imagens/logo/bannercontacto.png')) !important;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--cor-branca);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--cor-branca);
}

/* Botões */
.btn {
    display: inline-block;
    background-color: var(--cor-principal);
    color: var(--cor-branca);
    padding: 0.8rem 1.8rem;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
}

.btn:hover {
    opacity: 0.9;
}

/* Rodapé Completo e Responsivo */
.footer {
    background-color: var(--cor-cinza-escuro);
    color: var(--cor-branca);
    padding: 3.5rem 5% 1.5rem 5%;
    margin-top: 3.5rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
}

.footer-col h3 {
    color: var(--cor-branca);
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.footer-col h4 {
    color: var(--cor-destaque);
    font-size: 1.05rem;
    margin-bottom: 0.8rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.3rem;
}

.footer-col .titulo-legal {
    margin-top: 1.5rem;
}

.footer-col p {
    font-size: 0.9rem;
    color: #cbd5e1;
    margin-bottom: 0.6rem;
}

.footer-col a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--cor-branca);
    text-decoration: underline;
}

.footer-col p a[href*="maps"] {
    transition: color 0.2s ease;
}

.footer-col p a[href*="maps"]:hover {
    color: var(--cor-destaque);
    text-decoration: underline;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.link-destaque {
    color: #38bdf8 !important;
    font-weight: 600;
}

.link-destaque:hover {
    color: var(--cor-branca) !important;
}

.footer-whatsapp {
    margin-top: 0.8rem;
}

.footer-whatsapp a {
    display: inline-block;
    background-color: #25d366;
    color: #ffffff !important;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.85rem !important;
    text-decoration: none !important;
    transition: background-color 0.2s ease;
}

.footer-whatsapp a:hover {
    background-color: #128c7e;
}

.footer-redes {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.footer-redes a {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.footer-redes a:hover {
    background-color: var(--cor-destaque);
    text-decoration: none !important;
}

.footer-livro {
    margin-top: 1.2rem;
}

.img-livro-reclamacoes {
    max-width: 140px;
    height: auto;
    background-color: #ffffff;
    padding: 4px;
    border-radius: 4px;
    display: block;
    transition: opacity 0.2s ease;
}

.img-livro-reclamacoes:hover {
    opacity: 0.85;
}

.footer-bottom {
    max-width: 1200px;
    margin: 2.5rem auto 0 auto;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Layout da Área Principal de Conteúdo */
.conteudo-pagina {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 1.5rem;
    min-height: 60vh;
}

.conteudo-pagina h1 {
    font-size: 2rem;
    color: var(--cor-principal);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--cor-secundaria);
    padding-bottom: 0.5rem;
}

/* Estilos para a Grelha de Serviços */
.grid-servicos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background-color: var(--cor-branca);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    color: var(--cor-principal);
    margin-bottom: 0.8rem;
}

/* Estilos para o Formulário de Contacto */
.form-contacto {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    max-width: 600px;
    margin-top: 1.5rem;
}

.form-contacto input,
.form-contacto textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #cccccc;
    border-radius: 5px;
    font-size: 1rem;
}

.form-contacto input:focus,
.form-contacto textarea:focus {
    outline: none;
    border-color: var(--cor-principal);
}

/* Banner de Topo para Páginas Secundárias */
.page-banner {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
    padding: 4rem 1rem;
    text-align: center;
    margin-bottom: 2.5rem;
}

.page-banner h1 {
    color: var(--cor-principal);
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.page-banner p {
    font-size: 1.1rem;
    color: #e2e8f0;
    max-width: 650px;
    margin: 0 auto;
}

/* Secção Sobre Nós: Missão, Visão e Equipa */
.grid-mvv {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0 4rem 0;
}

.card-mvv {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--cor-principal);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.grid-equipa {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.membro-equipa {
    text-align: center;
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.foto-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #cbd5e1;
    margin: 0 auto 1rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.8rem;
}

/* Secção Contacto: Formulário + Dados + Mapa */
.grid-contacto {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.info-contacto {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.item-info strong {
    color: var(--cor-principal);
}

.mapa-container {
    width: 100%;
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1rem;
    border: 1px solid #cccccc;
}

.mapa-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Menu Responsivo (Telemóveis) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--cor-principal);
    cursor: pointer;
}

@media (max-width: 768px) {
    .conteudo-pagina h1,
    .page-banner h1, 
    .card h3,
    .card-title,
    .overview-card {
        text-align: center;
    }
    
    .header {
        position: relative;
    }

    .menu-toggle {
        display: block;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        flex-direction: column;
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
        padding: 1rem 0;
        z-index: 1000;
    }

    .nav.active {
        display: flex !important;
    }

    .nav a {
        margin: 0.8rem 0;
        text-align: center;
        width: 100%;
    }

    .grid-contacto {
        grid-template-columns: 1fr;
    }

    .page-banner {
        padding: 2.5rem 1rem;
    }

    .page-banner h1 {
        font-size: 1.75rem;
        text-align: center;
    }

    .page-banner p {
        font-size: 0.95rem;
        text-align: center;
    }
}

/* Grelhas de Cartões: Parceiros e Certificados */
.grid-parceiros {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
    margin-bottom: 3.5rem;
}

.card-parceiro {
    background-color: var(--cor-branca);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-parceiro:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.card-parceiro a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Container de substituição para certificados sem imagem */
.card-parceiro .sem-imagem {
    width: 100%;
    max-width: 200px;
    height: 220px;
    background-color: var(--cor-secundaria);
    border: 2px dashed #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Imagens Gerais / Certificados Verticais */
.card-parceiro img {
    width: 100%;
    max-width: 200px;
    height: 220px;
    object-fit: contain;
    margin-bottom: 1rem;
    display: block;
}

/* Logótipos Horizontais de Parceiros (Samsung, Haier, Hisense, Philips) */
.card-parceiro img.logo-parceiro {
    width: auto !important;
    max-width: 140px !important;
    height: 60px !important;
    object-fit: contain !important;
    margin-bottom: 0 !important;
}

.card-parceiro img[onclick],
.card-parceiro img.imagem-cert {
    cursor: pointer !important;
}

.card-parceiro h3 {
    font-size: 1.1rem;
    color: var(--cor-principal);
    margin-bottom: 0.5rem;
    margin-top: auto;
}

.card-parceiro p {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.4;
}

/* Company Overview */
.company-overview {
    background-color: var(--cor-secundaria);
    padding: 4rem 1.5rem;
    color: var(--cor-texto);
}

.overview-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.overview-header {
    text-align: center;
}

.overview-badge {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--cor-destaque);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.overview-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--cor-principal);
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.overview-intro {
    font-size: 1.125rem;
    color: var(--cor-texto);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

.overview-mission {
    background-color: var(--cor-principal);
    color: var(--cor-branca);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.mission-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: #bfdbfe;
    margin: 0 0 1rem 0;
}

.mission-quote {
    font-size: 1.25rem;
    font-style: italic;
    font-weight: 300;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

.overview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.overview-card {
    background-color: var(--cor-branca);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--cor-principal);
    margin: 0 0 0.75rem 0;
}

.card-text {
    font-size: 1rem;
    color: var(--cor-texto);
    line-height: 1.6;
    margin: 0;
}

/* Modal para Maximizar Imagens */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 40px;
    padding-bottom: 40px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-conteudo {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 1400px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    cursor: default;
}

.modal-conteudo:hover {
    transform: none;
}

#modal-legenda {
    margin: 15px auto 0 auto;
    display: block;
    width: 90%;
    max-width: 1400px;
    text-align: center;
    color: var(--cor-branca);
    padding: 10px 0;
    font-size: 1.1rem;
    font-weight: 500;
}

.modal-fechar {
    position: fixed;
    top: 20px;
    right: 35px;
    color: #ffffff;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 2001;
}

.modal-fechar:hover {
    color: var(--cor-destaque);
}

/* Melhorias na Página de Contacto */
.info-contacto a {
    color: var(--cor-principal);
    text-decoration: none;
    font-weight: 500;
}

.info-contacto a:hover {
    text-decoration: underline;
}

.nota-localizacao {
    margin-top: 0.8rem;
    font-size: 0.95rem;
    color: var(--cor-texto);
}

.campo-form {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.campo-form label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--cor-texto);
}

.campo-rgpd {
    margin: 0.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--cor-texto);
    cursor: pointer;
}

.checkbox-label input {
    width: auto;
    margin-top: 0.2rem;
}

/* Secções de Conteúdo e Galerias Especificas */
.card-assistec, .card-logistica, .card-qualidade, .card-instalacoes, .card-cobertura, .card-eventos, .card-displays, .card-solucoes-b2b {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.assistec-galeria, .logistica-imagem, .qualidade-imagem, .displays-imagem {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-items: center;
    width: 100%;
}

.assistec-galeria img, .logistica-imagem img, .qualidade-imagem img, .displays-imagem img {
    width: 100%;
    max-width: 550px;
    height: auto;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.instalacoes-galeria, .eventos-galeria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    width: 100%;
}

.instalacoes-galeria img, .eventos-galeria img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.cobertura-galeria {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.cobertura-galeria img {
    width: 48%;
    max-height: 250px;
    object-fit: contain;
    background-color: #ffffff;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.solucoes-b2b-galeria {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.imagem-destaque img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    cursor: pointer;
}

.imagens-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
}

.imagens-grid img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    cursor: pointer;
}

@media (min-width: 850px) {
    .card-assistec, .card-logistica, .card-qualidade, .card-instalacoes, .card-cobertura, .card-eventos, .card-displays, .card-solucoes-b2b {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .assistec-info, .logistica-info, .qualidade-info, .instalacoes-info, .cobertura-info, .eventos-info, .displays-info, .solucoes-b2b-info {
        flex: 1;
    }
    
    .assistec-galeria, .logistica-imagem, .qualidade-imagem, .instalacoes-galeria, .cobertura-galeria, .eventos-galeria, .displays-imagem, .solucoes-b2b-galeria {
        flex: 1;
    }
}