/* ==========================================================================
   TRANS F. SILVA, LDA - Estilos Globais
   ========================================================================== */

:root {
    --brand-blue: #00a8e8;   /* Azul Turquesa do Logótipo */
    --brand-red: #e50914;    /* Vermelho do Logótipo */
    --brand-dark: #1A232A;   /* Antracite / Grafite */
    --bg-light: #f8fafc;
    --white: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ==========================================================================
   Marca d'água (D. Afonso Henriques / marca.svg) no Lado Direito
   ========================================================================== */
body::after {
    content: '';
    position: fixed;
    top: 80px; /* Alinhado logo abaixo do cabeçalho */
    right: 0;
    bottom: 0;
    width: 380px; /* Largura proporcional da marca d'água */
    background-image: url('marca.svg');
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;
    opacity: 0.2; /* Transparência suave para efeito marca d'água */
    pointer-events: none; /* Não interfere com cliques no site */
    z-index: 1; /* Posicionado por trás do conteúdo principal */
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    position: relative;
    z-index: 2; /* Garante que o conteúdo fique por cima da marca d'água */
}

/* Aplica apenas aos links dentro do container */
.container a {
    color: inherit;
    text-decoration: none;
}

/* ==========================================================================
   Top Header Bar
   ========================================================================== */
.top-bar {
    background-color: var(--brand-dark);
    color: #cbd5e1;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 3px solid var(--brand-red);
    position: relative;
    z-index: 1001;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* ==========================================================================
   Header & Navegação
   ========================================================================== */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    padding-bottom: 12px;
    position: relative;
}

/* Imagem e Texto Fallback do Logótipo */
.brand-logo-img {
    height: 48px;
    width: auto;
    max-width: 100%;
    display: block;
}

.logo-fallback {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 900;
    color: var(--brand-dark);
    text-transform: uppercase;
    letter-spacing: -0.5px;
    margin: 0;
    display: inline-block;
    transition: color 0.3s ease;
}

.logo-fallback span {
    color: var(--brand-blue);
}

/* Botão do Menu Hambúrguer (Oculto em Desktop) */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 26px;
    color: var(--brand-dark);
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.3s ease;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}
nav ul li a {
    text-decoration: none;
    color: var(--brand-dark);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    transition: color 0.3s;
}
nav ul li a:hover {
    color: var(--brand-blue);
}

/* Estilos do Header após Scroll (pós-Hero) */
header.scrolled {
    background-color: var(--brand-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

header.scrolled .mobile-menu-btn {
    color: var(--brand-blue);
}

header.scrolled nav ul li a {
    color: var(--white);
}

header.scrolled nav ul li a:hover {
    color: var(--brand-blue);
}

header.scrolled .logo-fallback {
    color: var(--white);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    background: linear-gradient(rgba(26, 35, 42, 0.75), rgba(26, 35, 42, 0.75)), 
                url('frota1.jpeg') center/cover no-repeat;
    color: var(--white);
    padding: 120px 0;
    text-align: center;
    position: relative;
    z-index: 2;
}
.hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 40px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.hero p {
    font-size: 18px;
    max-width: 750px;
    margin: 0 auto 30px auto;
    color: #f1f5f9;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.btn-action {
    display: inline-block;
    background-color: var(--brand-red);
    color: var(--white);
    padding: 14px 32px;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 0.3s;
}
.btn-action:hover {
    background-color: #b91c1c;
}

/* ==========================================================================
   Secções Gerais
   ========================================================================== */
section { 
    padding: 70px 0; 
    position: relative;
    z-index: 2;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    color: var(--brand-dark);
    margin-bottom: 10px;
}
.section-title span { color: var(--brand-blue); }

.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 45px;
}

/* ==========================================================================
   Sobre a Empresa & Frota
   ========================================================================== */
.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
}

.origin-banner {
    background-color: var(--white);
    border-left: 6px solid var(--brand-red);
    padding: 35px;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.origin-banner-header {
    margin-bottom: 15px;
}

.origin-banner-img {
    height: 38px;
    width: auto;
    max-width: 100%;
}

.about-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-main);
    margin-bottom: 20px;
}

.info-frota {
    display: flex;
    width: 100%;
    height: 100%;
}

.about-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-bottom: 4px solid var(--brand-blue);
}

/* Informações Empresariais / CAE */
.info-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-card {
    background: #edf2f7;
    padding: 14px 18px;
    border-radius: 6px;
    border-left: 4px solid var(--brand-blue);
}

.info-card strong {
    display: block;
    color: var(--brand-dark);
    margin-bottom: 3px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
}

/* ==========================================================================
   Grelha de Serviços
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}
.service-card {
    background: var(--white);
    padding: 30px;
    border-radius: 6px;
    border-top: 5px solid var(--brand-blue);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.service-card h3 {
    font-family: 'Montserrat', sans-serif;
    color: var(--brand-dark);
    margin-bottom: 12px;
    text-transform: uppercase;
    font-size: 18px;
}

/* ==========================================================================
   Contacto
   ========================================================================== */
.contact-box {
    background: var(--white);
    padding: 40px;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.contact-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.contact-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 5px solid var(--brand-blue);
    padding: 24px;
    border-radius: 6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.contact-card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.contact-card-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--brand-dark);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
}

.contact-card-value:hover {
    color: var(--brand-blue);
}

.phone-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Ícones de Bandeiras SVG */
.flag-icon {
    width: 22px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

/* ==========================================================================
   Rodapé (Footer)
   ========================================================================== */
footer {
    background-color: var(--brand-dark);
    color: #94a3b8;
    text-align: center;
    padding: 25px 0;
    font-size: 14px;
    border-top: 1px solid rgba(255,255,255,0.05);
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   Regras Responsivas (Mobile & Tablet)
   ========================================================================== */
@media (max-width: 992px) {
    .about-wrapper {
        grid-template-columns: 1fr;
    }
    .info-frota {
        height: 350px;
    }
}

@media (max-width: 768px) {
    /* Ocultar marca d'água no mobile para não sobrepor textos */
    body::after {
        display: none;
    }

    .top-bar .container {
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }

    /* Ativar o botão Hambúrguer */
    .mobile-menu-btn {
        display: block;
    }

    /* Menu suspenso em mobile */
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: color-mix(in srgb, var(--white) 90%, transparent);
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        padding: 15px 0;
        border-top: 1px solid #e2e8f0;
    }

    header.scrolled nav {
        background-color: color-mix(in srgb, var(--brand-dark) 90%, transparent);
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        text-align: center;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li a {
        display: block;
        padding: 12px 20px;
        border-bottom: 1px solid #f1f5f9;
    }

    header.scrolled nav ul li a {
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    nav ul li:last-child a {
        border-bottom: none;
    }

    .hero {
        padding: 70px 20px;
    }

    .hero h1 {
        font-size: 26px;
    }

    .hero p {
        font-size: 15px;
    }

    section {
        padding: 45px 0;
    }

    .section-title {
        font-size: 24px;
    }

    .contact-box {
        padding: 20px;
    }

    .origin-banner {
        padding: 22px;
    }

    .info-frota {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .btn-action {
        width: 100%;
        padding: 14px 15px;
    }

    .contact-card-value {
        font-size: 14px;
    }
}