/* --- RESET E VARIÁVEIS --- */
:root {
    --primary: #0056b3; /* Azul Institucional */
    --accent: #e74c3c; /* Vermelho Destaque */
    --secondary: #2c3e50; /* Cinza Escuro */
    --light: #f4f6f8;
    --dark: #333;
    --white: #fff;
    --header-height: 70px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
img { max-width: 100%; display: block; }

/* --- HEADER --- */
.main-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo a {
    font-size: 24px;
    font-weight: 800;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: -0.5px;
}
.logo span { color: var(--primary); }

.nav-links { display: flex; list-style: none; gap: 20px; }
.nav-links a { font-size: 14px; font-weight: 600; text-transform: uppercase; color: #555; }
.nav-links a:hover { color: var(--primary); }

/* --- CONTAINER E LAYOUT --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 15px; }
.main-content { margin-top: 30px; margin-bottom: 40px; flex: 1; }

/* --- PLANTÃO FARMÁCIA (ESTILO NOVO) --- */
.duty-banner {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid #e1e1e1;
    text-align: center;
}

.duty-header {
    background: #c0392b; /* Vermelho */
    color: white;
    padding: 8px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
}

.duty-content { padding: 25px; }
.duty-content h2 { font-size: 26px; color: #2c3e50; margin-bottom: 5px; }
.duty-content p { color: #666; margin-bottom: 5px; }

.duty-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-duty {
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-duty.call { background: #eee; color: #333; }
.btn-duty.whats { background: #25d366; color: white; }
.btn-duty.map { background: var(--primary); color: white; }

/* --- GRID DE SERVIÇOS (CORRIGIDO) --- */
.section-title {
    font-size: 16px;
    color: #888;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-weight: 700;
    border-left: 4px solid var(--primary);
    padding-left: 10px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colunas no celular */
    gap: 10px;
    margin-bottom: 40px;
}

.service-card {
    background: white;
    border-radius: 8px;
    padding: 15px 5px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-top: 3px solid #ccc;
    display: flex !important; /* Força flexbox */
    flex-direction: column !important; /* Um embaixo do outro */
    align-items: center;
    justify-content: center;
    height: 100%;
}

.service-card:hover { transform: translateY(-3px); }

.icon-box {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 8px;
}

.service-card span { font-weight: 600; font-size: 12px; color: #555; }

/* --- NOTÍCIAS (ESTILO LISTA) --- */
.news-list-simple { background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.news-item-simple {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 15px;
}
.news-item-simple:last-child { border-bottom: none; }
.news-item-simple .date {
    background: #f0f0f0;
    color: #666;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
}
.news-item-simple a { font-weight: 600; color: #333; font-size: 15px; }

/* --- FOOTER E WHATSAPP --- */
.main-footer {
    background: white;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid #eee;
    margin-top: auto;
    color: #888;
    font-size: 14px;
}

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 55px;
    height: 55px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 999;
}

/* --- RESPONSIVO --- */
@media (min-width: 768px) {
    .services-grid { grid-template-columns: repeat(6, 1fr); gap: 20px; }
    .icon-box { width: 50px; height: 50px; font-size: 22px; }
    .service-card span { font-size: 14px; }
}

@media (max-width: 768px) {
    .nav-links { 
        font-size: 11px; 
        gap: 10px; 
        flex-wrap: wrap; 
        justify-content: center;
        margin-top: 10px;
    }
    .main-header .container { flex-direction: column; padding-bottom: 10px; }
}