/* ==========================================
   1. VARIÁVEIS E CONFIGURAÇÕES GLOBAIS
   ========================================== */
:root {
    --primary-color: #1a4f76;
    --secondary-color: #2b7aae;
    --accent-color: #e6f0fa;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f0f4f8; /* Fundo acinzentado para destacar seções como o 'Sobre' */
    --white: #ffffff;
    --font-primary: 'Poppins', sans-serif;
    --font-heading: 'Playfair Display', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
    padding-top: 116px; /* Compensa a barra superior + o header fixo */
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   2. BARRA SUPERIOR FIXA
   ========================================== */
.convenio-bar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    font-size: 0.85rem;
    padding: 8px 0;
    text-align: center;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 1002 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.convenio-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.convenio-content .divider {
    opacity: 0.6;
}

.badge-highlight {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.badge-24h {
    color: #ffdd57;
    font-weight: 600;
}

/* ==========================================
   3. CABEÇALHO E MENU (COM DROPDOWN)
   ========================================== */
header, #main-header {
    background: var(--white);
    position: fixed !important;
    top: 36px !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 1001 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo img {
    max-height: 50px;
    width: auto;
    display: block;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 260px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 10px 0;
    z-index: 1003;
}

.dropdown-content a {
    color: var(--text-dark);
    padding: 10px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.dropdown-content a:hover {
    background-color: var(--bg-light);
    color: var(--secondary-color);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: 0.3s;
}

/* ==========================================
   4. SEÇÃO HERO (PRINCIPAL)
   ========================================== */
.hero {
    background: linear-gradient(rgba(26, 79, 118, 0.8), rgba(26, 79, 118, 0.8)), url('https://images.unsplash.com/photo-1629909613654-28e377c37b09?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    height: 85vh;
    min-height: 550px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
    margin-top: 0 !important;
}

.hero-badge-24h {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #2ecc71;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    box-shadow: 0 0 0 rgba(46, 204, 113, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 2.3rem;
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.hero p {
    font-size: 1.15rem;
    max-width: 700px;
    margin: 0 auto 30px auto;
    opacity: 0.95;
}

.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.btn:hover {
    background-color: #1e5f8a;
    transform: translateY(-2px);
}

/* ==========================================
   5. CARROSSEL DE SERVIÇOS (BLINDADO E FLUIDO)
   ========================================== */

/* ==========================================
   CARROSSEL DE SERVIÇOS (ARRASTÁVEL E FLUIDO EM CSS)
   ========================================== */
.services-section, .services {
    padding: 90px 0;
    background-color: var(--white); 
}

.section-title {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 2.3rem;
    color: var(--primary-color);
    margin-bottom: 40px;
}

.services-grid-wrapper {
    width: 100%;
    position: relative;
    padding: 10px 0;
}

.services-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 30px;
    overflow-x: auto !important; /* Ativa a rolagem horizontal nativa */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth; /* Torna a rolagem suave ao puxar com o rato ou dedo */
    padding-bottom: 20px;
    width: 100%;
    
    /* Esconde a barra de scroll feia, mantendo a funcionalidade */
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    
    /* Muda o cursor para indicar que é possível clicar e arrastar */
    cursor: grab;
}

.services-grid:active {
    cursor: grabbing;
}

.services-grid::-webkit-scrollbar {
    display: none !important;
}

.service-card {
    flex: 0 0 320px !important; 
    width: 320px !important;
    min-width: 320px !important;
    max-width: 320px !important;
	height: 420px !important; /* Define uma altura fixa para todos os cards não esticarem */
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.service-card img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
    pointer-events: none; /* Evita que o navegador tente arrastar a imagem como ficheiro, permitindo puxar o carrossel */
}

.service-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
	height: calc(420px - 180px); /* Garante que o conteúdo ocupa exatamente o espaço restante abaixo da imagem */
}

.service-content h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.service-content p {
    color: var(--text-light);
    font-size: 0.92rem;
    margin-bottom: 15px;
}

.saiba-mais {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.saiba-mais:hover {
    color: var(--primary-color);
}

/* ==========================================
   6. SEÇÃO SOBRE
   ========================================== */
.about {
    padding: 90px 0;
    background-color: var(--bg-light); /* Fundo acinzentado preservado */
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 1rem;
}

.internal-page-content {
    padding: 60px 0;
    background-color: var(--white);
}

/* ==========================================
   7. SEÇÃO DE CONTATO E LOCALIZAÇÃO (LADO A LADO)
   ========================================== */
.contact {
    padding: 90px 0;
    background-color: var(--white); 
}

.contact-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important; /* Força rigorosamente as duas colunas */
    gap: 50px;
    align-items: start;
    width: 100%;
}

.contact-info h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.contact-item {
    margin-bottom: 12px;
}

.contact-item a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--secondary-color);
}

.contact-item i {
    width: 22px;
    color: var(--secondary-color);
    margin-right: 8px;
    text-align: center;
}

.contact-right-wrapper {
    width: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
    margin-top: -11px;
}

.contact-address-box {
    padding: 15px 20px;
    background-color: var(--white);
    border-bottom: 1px solid #edf2f7;
}

.contact-map iframe {
    display: block;
    width: 100%;
    height: 315px;
    border: 0;
}

/* ==========================================
   8. RODAPÉ
   ========================================== */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 30px 0;
    font-size: 0.9rem;
}

/* ==========================================
   9. RESPONSIVIDADE
   ========================================== */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    
    .contact-grid {
        grid-template-columns: 1fr !important; /* Empilha apenas em ecrãs menores que 992px */
    }
    
    .hero h1 {
        font-size: 1.9rem;
    }
    
    .contact-right-wrapper {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        padding: 20px 0;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }
    
    .dropdown-content {
        position: static;
        box-shadow: none;
        display: none;
    }
}

/* ==========================================
   ESTILOS DO DESTAQUE 24H NO HERO
   ========================================== */
.hero-highlight-box {
    display: inline-block;
    background-color: #1E30A4 !important; /* Fundo azul em destaque */
    color: var(--white);
    font-family: var(--font-heading); /* Usa a mesma fonte elegante (Playfair Display) */
    font-size: 2.2rem;
    font-weight: 700;
    padding: 6px 24px;
    margin: 10px 0 15px 0;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

/* Ajustes finos nos títulos do Hero para acompanhar a proporção da imagem */
.hero h1 {
    font-family: var(--font-heading);
    font-size: 2.3rem;
    margin-bottom: 5px;
    font-weight: 500;
}

.hero h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 500;
    color: var(--white);
}

.hero p {
    font-size: 1.05rem;
    max-width: 750px;
    margin: 0 auto 30px auto;
    opacity: 0.95;
}

/* Responsividade para ecrãs menores / telemóveis */
@media (max-width: 768px) {
    .hero-highlight-box {
        font-size: 1.6rem;
        padding: 4px 15px;
    }
    
    .hero h1 {
        font-size: 1.7rem;
    }
    
    .hero h2 {
        font-size: 1.4rem;
    }
}

/* ==========================================
   DESTAQUE SEDAÇÃO CONSCIENTE (AMARELO)
   ========================================== */
.hero-sedacao-box {
    display: inline-block;
    background-color: #FFF610 !important; /* Fundo amarelo elegante */
    color: #1a4f76 !important; /* Texto em tom escuro para contraste perfeito */
    font-family: var(--font-heading); 
    font-size: 2rem;
    font-weight: 700;
    padding: 6px 24px;
    margin: 5px 0 15px 0;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

/* Responsividade para telemóveis */
@media (max-width: 768px) {
    .hero-sedacao-box {
        font-size: 1.4rem;
        padding: 4px 15px;
    }
}