:root {
    --bg-color: #FFFFFF;
    --text-color: #064278;
    --primary-color: #00ad51; /* Green */
    --accent-color: #ffb909; /* Gold */
    --header-bg: #f8f9fa; /* Light gray for header */
    --hero-overlay: rgba(6, 66, 120, 0.7); /* Semi-transparent overlay based on text color */
}

body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--header-bg);
    padding: 1rem 0;
    /* border-bottom: 3px solid var(--accent-color); /* Keep header border */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo img {
    max-height: 70px; /* Adjust height as needed */
    width: auto; /* Maintain aspect ratio */
    display: block; /* Remove extra space below image */
}

header .logo h1 { /* Keep h1 styling for fallback/reference if needed, but it's now replaced */
    margin: 0;
    font-size: 1.8em;
    color: var(--text-color);
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

header nav ul li {
    margin-left: 20px;
}

header nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    transition: color 0.3s ease;
}

header nav ul li a:hover {
    color: var(--primary-color);
}

/* Hero Section */
#hero {
    /* Background image - Replace with your actual image URL here */
    background-image: url('https://jpscientifica.com.br/img/house.jpg'); /* Replace this placeholder URL */
    background-size: cover; /* Changed from 'contain' to 'cover' */
    background-position: center;
    background-repeat: no-repeat;
    color: var(--bg-color); /* Text color should be light on a dark background */
    text-align: center;
    padding: 6rem 0; /* Increased padding for more space */
    position: relative; /* Needed for pseudo-element positioning */
    overflow: hidden; /* Hide any potential overflow */
    border: 3px solid var(--accent-color); /* Add border around the entire section */
    box-sizing: border-box; /* Include border in the element's total size */
}

/* Overlay to make text readable */
/* #hero::before { Removed blue overlay */
/*     content: ''; */
/*     position: absolute; */
/*     top: 0; */
/*     left: 0; */
/*     right: 0; */
/*     bottom: 0; */
/*     z-index: 1; /* Place overlay above background image */
    /* background-color: var(--hero-overlay); /* Apply the overlay color */
/* } */

/* Ensure content is above the overlay */
#hero .container {
    position: relative;
    z-index: 2;
}

/* Style for the new logo image */
#hero .hero-logo {
    max-width: 90%; /* Limit the maximum width of the image */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Center the image */
    margin: 0 auto 3.5rem auto; /* Center and add space below, matching old p margin */
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5)); /* Add shadow for readability on background */
}

#hero h2 { 
    display: none; 
}

#hero p { 
    display: none; 
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--bg-color);
    padding: 15px 30px; /* Increased padding to make button larger */
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background-color: #008a41; /* Darker green */
    transform: translateY(-2px);
}

/* Sections */
section {
    padding: 4rem 0;
}

section h2 {
    text-align: center;
    font-size: 2.2em;
    margin-bottom: 2rem;
    color: var(--text-color);
    position: relative;
    padding-bottom: 10px;
}

/* Gold underline effect for section titles */
section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 10px auto 0;
}

/* Services Section - Carrossel */
#services .service-grid {
    display: flex;
    overflow-x: hidden;
    gap: 1.5rem;
    padding: 1rem 0;
    margin-top: 2rem;
    width: 100%;
    position: relative;
}

#services .service-item {
    flex: 0 0 calc(33.333% - 1rem); /* 3 cards visíveis considerando o gap */
    background-color: #f8f9fa;
    padding: 2rem 1.5rem;
    border-radius: 8px;
    border-left: 5px solid var(--primary-color);
    transition: box-shadow 0.3s ease;
    box-sizing: border-box;
    height: auto;
    scroll-snap-align: start;
}

/* Responsividade */
@media (max-width: 1024px) {
    #services .service-item {
        flex: 0 0 calc(50% - 0.75rem); /* 2 cards em tablets */
    }
}

@media (max-width: 768px) {
    #services .service-item {
        flex: 0 0 100%; /* 1 card em mobile */
    }
}

/* About Section */
#about {
    background-color: var(--bg-color); /* Ensure it's white */
}

#about p {
    color: #555; /* Use a slightly lighter color for body text */
    margin-bottom: 0; /* Ensure paragraph inside card doesn't add extra margin */
}

#about h3 {
    margin-top: 0; /* Ensure h3 inside card has no top margin */
    margin-bottom: 0.8rem; /* Adjusted margin bottom */
    color: var(--text-color);
    font-size: 1.25em; /* Adjusted font size to match report items */
}

#about h3::after {
    content: none; /* Removed */
}

#about .about-grid {
    display: grid;
    grid-template-columns: 1fr; /* Ensure items are stacked */
    gap: 1.5rem; /* Match reports-list gap */
    margin-top: 2rem; /* Keep grid margin */
}

#about .about-item {
    background-color: #f8f9fa; /* Light background for list items */
    border-left: 5px solid var(--primary-color); /* Changed from accent-color to primary-color */
    padding: 15px 20px; /* Increased padding */
    border-radius: 8px; /* Rounded corners */
    line-height: 1.6;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* Subtle shadow */
    transition: box-shadow 0.3s ease;
    display: flex; /* Use flex to align content */
    flex-direction: column; /* Stack h3 and p vertically */
    justify-content: flex-start; /* Align content to the top */
    height: auto; /* Allow height to adjust to content */
    box-sizing: border-box; /* Include padding and border in element's total size */
}

#about .about-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#about .value-item strong {
    color: var(--text-color);
}

#about ul {
    display: none; /* Hide the old list */
}

#about ul li {
   display: none; /* Hide the old list items */
}

/* Testimonials Section */
#testimonials {
    background-color: #eef7ff; /* Changed from #f8f9fa to match #reports */
}

#testimonials .testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.testimonial-item {
    background-color: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 5px solid var(--accent-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
}

.testimonial-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.testimonial-item .quote {
    font-style: italic;
    color: #333;
    margin-bottom: 1rem;
    flex-grow: 1;
    position: relative;
    padding-left: 25px;
}

.testimonial-item .quote::before {
    content: '“';
    position: absolute;
    left: 0;
    top: -5px;
    font-size: 2.5em;
    color: var(--accent-color);
    font-family: serif;
    line-height: 1;
}

.testimonial-item .attribution {
    font-weight: bold;
    color: var(--text-color);
    text-align: right;
    margin-top: auto;
    font-size: 0.95em;
}

/* Blog Section */
#blog {
    background-color: #f8f9fa;
    padding: 4rem 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

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

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

.post-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.post-content {
    padding: 1.5rem;
}

.post-date {
    color: var(--primary-color);
    font-size: 0.9em;
    margin-bottom: 0.5rem;
}

.post-title {
    color: var(--text-color);
    margin: 0.5rem 0;
}

.post-excerpt {
    color: #555;
    margin-bottom: 1rem;
}

.read-more {
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
}

/* Clients Section - Atualizado */
#clients {
    padding: 3rem 0;
    background-color: #eef7ff;
    overflow: hidden;
    position: relative;
}

#clients .container {
    overflow: hidden; /* Adicionado para conter o carrossel */
    position: relative;
}

.client-list {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
    width: max-content;
    animation: scroll 30s linear infinite;
    padding: 10px 0; /* Adiciona um pouco de espaço vertical */
}

.client-item {
    flex: 0 0 180px;
    box-sizing: border-box;
}

.client-card {
    min-width: 180px;
    width: 100%;
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: box-shadow 0.3s ease;
    box-sizing: border-box;
    font-weight: bold;
    color: #6c757d;
    text-align: center;
    height: 100%;
}

.client-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Animação de rolagem ajustada */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-180px * 8 - 1.5rem * 7)); /* Ajuste no cálculo */
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .client-item {
        flex: 0 0 150px; /* Reduz um pouco em telas menores */
    }
    
    .client-card {
        min-width: 150px;
        padding: 1rem;
    }
    
    @keyframes scroll {
        100% {
            transform: translateX(calc(-150px * 8 - 1.5rem * 7));
        }
    }
}

/* Contact Section */
#contact {
    background-color: #f8f9fa;
}

#contact .contact-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    max-width: 800px;
    margin: 2rem auto 0 auto;
}

#contact .contact-details {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

#contact-form {
    width: 100%;
    max-width: 600px;
    display: grid;
    gap: 1rem;
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 173, 81, 0.3);
}

#contact-form button {
    justify-self: center;
    width: auto;
}

#contact p {
    text-align: center;
    margin-bottom: 1rem;
}

.contact-info {
    text-align: center;
    margin: 0;
    font-size: 1.1em;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    vertical-align: middle;
}

.contact-info a:hover {
    text-decoration: underline;
}

#form-message {
    margin-top: 1rem;
    padding: 0.5rem;
    text-align: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

/* Estilo para o botão durante o envio */
.btn[disabled] {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none !important;
}

.whatsapp-button {
    display: inline-block;
    background-color: #25D366;
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin: 0;
    white-space: nowrap;
    vertical-align: middle;
}

.whatsapp-button:hover {
    background-color: #1DA851;
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    #contact .contact-details {
        flex-direction: column;
        gap: 0.5rem;
    }
    .contact-info, .whatsapp-button {
        white-space: normal;
    }
    .contact-info {
        text-align: center;
    }
    .whatsapp-button {
        text-align: center;
    }
}

/* Reports Section */
#reports {
    background-color: #eef7ff;
}

#reports .reports-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

#reports .report-item {
    background-color: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 5px solid var(--accent-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
}

#reports .report-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#reports .report-item h3 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    font-size: 1.25em;
}

#reports .report-item p {
    font-size: 0.95em;
    color: #555;
    flex-grow: 1;
    margin-bottom: 0;
}

/* Scroll to Top Button */
#scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--bg-color); /* Color for the arrow */
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    opacity: 0; /* Initially hidden */
    visibility: hidden; /* Initially hidden */
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

#scroll-to-top:hover {
    background-color: #008a41; /* Darker green */
    transform: translateY(-3px);
}

#scroll-to-top svg {
    width: 24px;
    height: 24px;
    fill: currentColor; /* Use the color of the parent (var(--bg-color)) */
}
/* Página do Blog */
#blog-page .blog-header {
    background-color: var(--primary-color);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

#blog-page .blog-header h1 {
    font-size: 2.5em;
    margin-bottom: 1rem;
}

#blog-page .blog-content {
    padding: 4rem 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
}

.pagination button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover {
    background-color: #008a41;
}

.pagination button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#blog-page .blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 3rem;
}
/* Página de Post Individual */
#single-post .post-header {
    text-align: center;
    margin-bottom: 2rem;
}

#single-post .post-category {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--text-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    margin-bottom: 1rem;
}

#single-post h1 {
    font-size: 2.5em;
    margin: 1rem 0;
}

.post-meta {
    color: #666;
    margin-bottom: 2rem;
}

.post-image-full {
    margin: 2rem 0;
}

.post-image-full img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#single-post .post-content {
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

#single-post .post-content p {
    margin-bottom: 1.5rem;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.social-share {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-icon {
    background-color: #f0f0f0;
    padding: 8px 12px;
    border-radius: 5px;
    color: var(--text-color);
    text-decoration: none;
}
/* Mensagens de erro */
.error-message {
    text-align: center;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 2rem 0;
}

.error-message h2 {
    color: var(--primary-color);
}

/* Melhorias para imagens nos posts */
.post-image-full img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}