/*
 * Estilos principais para o site de Gestão Patrimonial
 * A paleta de cores utiliza tons de azul e cinza com detalhes em verde,
 * alinhando‑se a uma imagem profissional e moderna. O layout é fluido
 * para que as páginas funcionem bem em dispositivos desktop e móveis.
 */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

:root {
    --primary-color: #014f86;
    --secondary-color: #0a81ab;
    --accent-color: #00a86b; /* verde suave para destaque */
    --dark-color: #0d1b2a;
    --light-color: #f5f7fa;
    --text-color: #333;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light-color);
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Navegação */
header {
    background: var(--dark-color);
    color: white;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Hide the default nav toggle checkbox */
.nav-toggle {
    display: none;
}

/* Hamburger icon styles */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}
.hamburger span {
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 4px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

@media (max-width: 768px) {
    /* Stack the nav items vertically off‑canvas by default */
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--dark-color);
        width: 100%;
        padding: 1rem 0;
        margin: 0;
        gap: 0;
    }
    nav ul li {
        text-align: center;
        margin: 0.5rem 0;
    }
    /* Do not reveal the menu on toggle in mobile view. The navigation items remain hidden, leaving only the hamburger icon visible. */
    .nav-toggle:checked + .hamburger + ul {
        display: none;
    }
    /* Show the hamburger icon */
    .hamburger {
        display: flex;
    }
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}

nav a {
    color: white;
    font-weight: 600;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 0.8;
}

/* Logo styling: display image and text side by side */
.logo a {
    display: flex;
    align-items: center;
    /* inherit the colour from its container */
    color: inherit;
}

/* Remove the coloured background behind the logo so it blends into the dark header.
   We adjust the image brightness instead for contrast. */
.logo {
    /* no background or border so the logo sits flush with the header */
    padding: 0;
    border-radius: 0;
}

.logo img {
    height: 40px;
    margin-right: 0.5rem;
    /* increase brightness so the logo stands out against the dark header */
    filter: brightness(1.6);
}

.logo span {
    font-weight: 700;
    font-size: 1.2rem;
    /* use a light colour for the text to contrast with the dark header */
    color: #fff;
}

/* Hero section */
.hero {
    /* the background images will be cycled via CSS animation rather than a single static image */
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    /* reduce vertical padding and set a minimum height so that the content can be truly centered */
    padding: 2rem;
    min-height: 60vh;
    position: relative;
    /* animate background images to illustrate inventário, avaliação e conciliação */
    animation: heroSlide 18s infinite;
    /* center the content within the hero section both horizontally and vertically */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero .content {
    position: relative;
    z-index: 2;
    /* allow the hero content to occupy more width so long titles are not cut off */
    max-width: 90%;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn:hover {
    background: darken(var(--accent-color), 10%);
}

/* Seções gerais */
/* Reduce vertical padding between sections to make the pages feel more compact */
section {
    padding: 2.5rem 1.5rem;
}

.section-title {
    text-align: center;
    /* Slightly reduce spacing below section headings */
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: var(--primary-color);
}

/* Serviços na página inicial */
.services {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.service-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    flex: 1 1 280px;
    max-width: 300px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.service-card h3 {
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.service-card p {
    font-size: 0.95rem;
    color: #555;
}

/* Porque nos escolher */
.features {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.feature {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    flex: 1 1 220px;
    max-width: 250px;
    text-align: center;
}

.feature i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.feature h4 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.feature p {
    font-size: 0.9rem;
    color: #555;
}

/* Testemunhos */
.testimonials {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.testimonial {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    padding: 2rem;
    max-width: 350px;
    text-align: left;
}

.testimonial p {
    font-style: italic;
    margin-bottom: 1rem;
}

.testimonial .author {
    font-weight: 600;
    color: var(--primary-color);
}

/* Formulário de contato */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
}

.contact-form button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.contact-form button:hover {
    background: #008b57;
}

/* Footer */
footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 1rem 2rem;
    font-size: 0.9rem;
}

/* Footer contact info */
.footer-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
.footer-info a {
    color: white;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.footer-info a:hover {
    text-decoration: underline;
}

/* Ensure icons in the footer are visible and appropriately sized */
.footer-info i {
    font-size: 1rem;
    /* Ensure icons inherit the text color */
    color: inherit;
}

/* Custom social icons (WhatsApp, Instagram, Facebook) in the footer */
.footer-info img.social-icon {
    width: 1.2rem;
    height: 1.2rem;
    object-fit: contain;
}

/* Size the logo inside the floating WhatsApp button */
.whatsapp-button img {
    width: 65%;
    height: 65%;
    object-fit: contain;
}

/* Floating WhatsApp button */
.whatsapp-button {
    position: fixed;
    /* Position on the left to avoid overlapping with the chat bubble */
    /* Position the WhatsApp button near the chat bubble but offset to the left */
    right: 80px;
    bottom: 20px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    z-index: 3000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: background 0.3s;
}
.whatsapp-button:hover {
    background: #1ebc4a;
}

/* Página de Serviços */
.service-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
    /* Reduce the gap below each service section */
    margin-bottom: 1.5rem;
}

.service-section:nth-child(even) {
    flex-direction: row-reverse;
}

.service-section img {
    /* Limit the size of service images to keep sections compact */
    flex: 0 0 200px;
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.service-text {
    flex: 1 1 55%;
}

.service-text h2 {
    color: var(--primary-color);
    margin-top: 0;
}

.service-text p {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #555;
}

.service-text ul {
    list-style: disc inside;
    padding-left: 1rem;
}

.service-text li {
    margin-bottom: 0.5rem;
}

/* Blog index */
.blog-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
}

.blog-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.blog-card .content {
    padding: 1.5rem;
}

.blog-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.blog-card p {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    color: #555;
}

.blog-card a {
    color: var(--accent-color);
    font-weight: 600;
}

/* Estilos do chatbot */
#chat-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 2000;
}

#chat-container {
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: 300px;
    max-height: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 2000;
}

#chat-header {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem;
    font-weight: 600;
}

#chat-messages {
    flex: 1;
    padding: 0.75rem;
    overflow-y: auto;
    background: #f0f4f8;
}

#chat-input-area {
    display: flex;
    border-top: 1px solid #eee;
}

#chat-input-area input {
    flex: 1;
    border: none;
    padding: 0.75rem;
    font-size: 0.9rem;
}

#chat-input-area button {
    background: var(--accent-color);
    border: none;
    color: white;
    padding: 0 1rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    .hero p {
        font-size: 1rem;
    }
    nav ul {
        gap: 0.5rem;
    }
    .service-section {
        flex-direction: column;
    }
    .service-section:nth-child(even) {
        flex-direction: column;
    }
}

/* Allow the hero title to wrap naturally while remaining centered on large screens */
@media (min-width: 1200px) {
    .hero h1 {
        white-space: normal;
    }
}

/* Animation for the hero background to cycle through images representing inventário, avaliação e conciliação */
@keyframes heroSlide {
    0%   { background-image: url('../images/inventario_real.png'); }
    33%  { background-image: url('../images/avaliacao_real.png'); }
    66%  { background-image: url('../images/conciliacao_real.png'); }
    100% { background-image: url('../images/inventario_real.png'); }
}