/*
Theme Name: SisPeC Theme
Author: Gemini
Description: Um tema customizado para o site da SisPeC Contabilidade.
Version: 1.0
*/

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInFromLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

:root {
    --primary-color: #049b8c;
    --secondary-color: #246cc3;
    --accent-color: #1484a6;
    --accent-light: #0c8c9c;
    --accent-dark: #1c7cb1;
    --light-color: #ffffff;
    --gray-light: #f8f9fa;
    --gray-medium: #e9ecef;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #fff;
    --text-gray: #6c757d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Source Sans Pro', sans-serif;
}

body {
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
}

header {
    background-color: var(--light-color);
    color: var(--text-color);
    padding: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 3px 20px rgba(0,0,0,0.15);
    height: 120px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
}

.header-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 100%;
    column-gap: 2rem; /* Add space between columns */
}
.header-action-button {
    grid-column: 3;
    justify-self: end;
}
.admin-link {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}
.admin-link:hover {
    color: var(--primary-color);
}

.logo {
    grid-column: 1;
    justify-self: start;
}

.logo img {
    height: 80px;
    width: auto; /* Fix aspect ratio */
}

nav {
    grid-column: 2;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap; /* Allow wrapping on very small screens */
}

nav ul li {
    margin: 0 0.7rem; /* Reduced margin to save space */
    position: relative;
}



nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.2rem; /* Reduced font size to save space */
    padding: 0.5rem 0.7rem; /* Reduced padding */
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;

    display: inline-block;
    white-space: nowrap; /* Prevent text wrapping */
}

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

nav ul li a.active {
    color: var(--primary-color);
    font-weight: bold;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 2px; /* Adjusted to be closer to the text */
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.4s ease-in-out;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.hero {
    background-color: var(--primary-color);
    background-image: 
        linear-gradient(rgba(4, 155, 140, 0.85), rgba(20, 132, 166, 0.85)),
        url("static/Apresentação-SisPec.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    color: white;
    padding-top: 120px; /* Changed from margin-top to padding-top */
    padding-bottom: 1rem; /* Reduced bottom spacing for home section */
    box-sizing: border-box; /* Ensure padding is included in height */
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: fadeIn 1s ease-out forwards;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin-bottom: 2rem;
    text-align: justify;
    animation: slideInFromLeft 1s ease-out 0.5s forwards;
    opacity: 0; /* Start hidden for animation */
}

.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid var(--secondary-color);
    margin: 0.5rem;
    cursor: pointer;
}

.btn:hover {
    background-color: transparent;
    color: var(--secondary-color);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid white;
}

.btn-outline:hover {
    background-color: white;
    color: var(--secondary-color);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: transparent;
    border-color: var(--secondary-color); /* Borda visível com a cor do texto */
    color: var(--secondary-color); /* A cor da fonte muda para azul */
}

section {
    padding: 6rem 0;
    position: relative;
}

section[id] {
    scroll-margin-top: 120px;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title p {
    color: var(--text-gray);
    max-width: 700px;
    margin: 0.5rem auto 0;
}

.services {
    background-color: var(--gray-light);
}

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

.service-card {
    background-color: var(--light-color);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    border: 1px solid var(--gray-medium);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(20, 132, 166, 0.2);
    border-color: var(--accent-color);
}

.service-icon {
    margin-bottom: 1.5rem;
}

.service-icon img {
    height: 60px;
    width: auto;
}

.service-card h3 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.service-card p {
    color: var(--text-gray);
}

.simuladores {
    background-color: white;
}

.about {
    background-color: var(--light-color);
    padding-top: 2rem; /* Reduced distance from Home section */
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.about-text {
    display: flex;
    flex-direction: column;
}

.about-image {
    align-self: stretch;
}

.about-image img {
    max-width: 100%;
    height: 100%;
    object-fit: cover; /* Ajusta a imagem para cobrir o container mantendo proporção */
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.about-text h2 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.about-text p {
    text-align: justify;
}

.team-members {
    margin-top: 6rem;
}

.member-cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5rem;
}

.member-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border-top: 3px solid var(--primary-color);
    transition: transform 0.3s;
}

.member-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(20, 132, 166, 0.15);
}

.member-card h4 {
    color: var(--secondary-color);
}
.member-card p {
    text-align: justify;
}

.team-members h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 2rem; /* Add some space below the title */
}

.member-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 400px; /* Limit width to allow side-by-side display */
}

.image-placeholder {
    width: 150px;
    height: 200px;
    background-color: #f0f0f0;
    border: 1px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #888;
    border-radius: 8px;
    flex-shrink: 0;
    margin-bottom: 1rem; /* Space between image and card */
}

.about-image {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Alinha ao topo para alinhar com o título */
    margin-top: 3rem; /* Adjusted for better alignment with text */
}

.about-image img {
    max-width: 100%;
    max-height: 300px; 
    object-fit: contain; /* Mantém a proporção original da imagem */
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    align-self: flex-start; /* Alinha a imagem ao topo */
}

.contact {
    background-color: var(--primary-color);
    color: white;
}

.contact .section-title h2 {
    color: white;
}

.contact .section-title p {
    color: rgba(255,255,255,0.8);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

/* Botão de envio na seção de contato */
.contact .btn {
    background-color: white; /* Fundo branco */
    border-color: white; /* Moldura branca */
    color: var(--primary-color); /* Texto verde (usando a cor primária que é verde) */
}

.contact .btn:hover {
    background-color: var(--primary-color); /* Fundo verde ao passar o mouse */
    border-color: white; /* Moldura branca */
    color: white; /* Texto branco */
}

.form-group {
    margin-bottom: 0.5rem; /* Ajuste final */
}

.form-group label {
    display: block;
    margin-bottom: 0.1rem; /* Ajuste final */
    font-weight: 500;
}

/* Regras específicas para o HTML gerado pelo Contact Form 7 */
.form-group p {
    margin: 0 !important; /* Força remoção da margem padrão do parágrafo */
    padding: 0 !important;
}

.form-group br {
    display: none !important; /* Remove a quebra de linha extra */
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-medium);
    border-radius: 5px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(4, 155, 140, 0.2);
}

.form-group textarea {
    height: 150px;
}

footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 0 1.5rem;
    text-align: center;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: var(--secondary-color);
}

.copyright {
    border-top: 1px solid #444;
    padding-top: 1.5rem;
    color: #bbb;
    font-size: 0.9rem;
}

.news-section {
    background-color: var(--gray-light);
    padding: 4rem 0;
}
.news-section::after {
    display: none;
}

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

.news-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(36, 108, 195, 0.15);
}

.news-card h3 {
    color: var(--secondary-color);
    margin-top: 0;
}

.sidebar-news {
    border-left: 1px solid var(--gray-medium); /* Linha de separação */
    padding-left: 2rem; /* Espaçamento da linha */
}
.news-source {
    margin-bottom: 2rem;
}
.news-source h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--gray-medium);
    padding-bottom: 0.5rem;
}
.news-carousel {
    position: relative;
    height: 150px; /* Altura fixa para o carrossel */
    overflow: hidden;
    background: var(--light-color);
    padding: 1rem; /* Padding geral para o container */
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    display: flex; /* Para alinhar botões e wrapper */
    align-items: center; /* Centraliza verticalmente */
    justify-content: space-between; /* Espaço entre botões e wrapper */
}

.carousel-items-wrapper {
    position: relative;
    flex-grow: 1; /* Ocupa o espaço restante */
    height: 100%;
    overflow: hidden;
    margin: 0 30px; /* Adiciona margem para evitar sobreposição das setas */
}

.carousel-control {
    background: var(--gray-medium);
    border: none;
    color: var(--text-color);
    font-size: 1rem; /* Tamanho da fonte da seta reduzido */
    padding: 0.3rem; /* Padding reduzido */
    cursor: pointer;
    border-radius: 50%;
    width: 28px; /* Tamanho fixo reduzido */
    height: 28px; /* Tamanho fixo reduzido */
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute; /* Posiciona absolutamente */
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    transition: background-color 0.3s, color 0.3s;
}

.carousel-control:hover {
    background-color: var(--primary-color);
    color: white;
}

.carousel-control.prev {
    left: 5px; /* Posição ajustada */
}

.carousel-control.next {
    right: 5px; /* Posição ajustada */
}
.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.carousel-item.active {
    opacity: 1;
}
.carousel-item h5 {
    margin: 0;
    font-size: 0.9rem; /* Reduzido */
    color: var(--secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.carousel-item small {
    color: var(--text-gray);
    margin-bottom: 0.3rem; /* Reduzido */
    display: block;
    font-size: 0.8rem; /* Reduzido */
}
.carousel-item p {
    font-size: 0.8rem; /* Reduzido */
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Limita a 4 linhas */
    -webkit-box-orient: vertical;  
    overflow: hidden;
    text-overflow: ellipsis;
}

.simulator-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    border: 1px solid var(--gray-medium);
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.simulator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(4, 155, 140, 0.15);
}

.simulator-card h3 {
    color: var(--secondary-color);
    margin-top: 0;
}

/* Corrige o alinhamento do "Em Breve" */
.simulator-card > .btn + span {
    vertical-align: middle;
    white-space: nowrap;
}

/* --- Modal Styles --- */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.6);
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 700px;
    border-radius: 10px;
    position: relative;
    animation: fadeIn 0.5s;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
}

#noticias-container ul {
    list-style: none;
    padding: 0;
}

#noticias-container li {
    background: #fff;
    margin-bottom: 1rem;
    padding: 1rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

#noticias-container li:hover {
    transform: translateX(5px);
}

#noticias-container a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: bold;
}

/* --- Estilos da Calculadora --- */
.collapsible-anexo {
    margin-bottom: 1rem;
}
.collapsible-header {
    background-color: var(--gray-medium);
    color: var(--dark-color);
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s;
}
.collapsible-header:hover {
    background-color: #ccc;
}
.collapsible-header.active {
    background-color: var(--accent-light);
    color: white;
}
.collapsible-content {
    padding: 0 18px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: var(--gray-light);
    border-radius: 0 0 5px 5px;
}
.collapsible-content p {
    margin-top: 1rem;
}
.anexo-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}
.anexo-table th, .anexo-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
.anexo-table th {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
}
.anexo-table tr:nth-child(even) {
    background-color: #f2f2f2;
}
.anexo-table tr.highlight {
    background-color: #d4edda; /* Light green */
    font-weight: bold;
    color: #155724;
}

.hamburger-menu {
    display: none; /* Escondido por padrão em desktops */
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    grid-column: 3;
    justify-self: end;
    z-index: 1100;
    padding: 0.5rem; /* Adiciona padding para melhor clique */
}
.hamburger-menu .fa-times {
    display: none;
}
.hamburger-menu.is-active .fa-bars {
    display: none;
}
.hamburger-menu.is-active .fa-times {
    display: block;
    color: var(--text-color); /* Muda para cor de texto visível */
}

body.noscroll {
    overflow: hidden;
}


@media (max-width: 768px) {
    /* Correção para o corte lateral */
    html, body {
        overflow-x: hidden;
    }

    /* Header & Nav */
    body header {
        height: 80px; /* Diminuindo um pouco mais a altura do cabeçalho */
        padding: 5px 1rem;
    }
    body .header-content {
        display: grid;
        grid-template-columns: 120px 1fr 50px; /* Espaço mais equilibrado para logo e menu */
        align-items: center;
        width: 100%;
    }
    body .logo {
        grid-column: 1;
        justify-self: start;
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }
    body .logo img {
        height: 80px; /* Reduzindo o tamanho da logo */
        width: auto;
        max-width: 100%;
        object-fit: contain;
    }
    body .hamburger-menu {
        grid-column: 3;
        justify-self: end;
        display: block;
    }
    body nav {
        display: flex;
        justify-content: center; /* Centra o conteúdo do nav verticalmente */
        position: fixed;
        top: 0;
        right: 0; /* Alinha à direita */
        width: 100%; /* Ocupa toda a largura da tela */
        max-width: 250px;
        height: 100vh;
        background-color: var(--dark-color);
        box-shadow: 5px 0 15px rgba(0,0,0,0.2);
        transition: transform 0.35s ease-in-out;
        z-index: 1050;
        padding-top: 100px;
        transform: translateX(100%); /* Escondido por padrão à direita */
        opacity: 0.95; /* Reduzido em 5% a opacidade */
    }
    body nav.nav-open {
        transform: translateX(0); /* Mostra o menu */
    }
    body nav ul {
        flex-direction: column;
        align-items: center; /* Centra os itens da lista horizontalmente */
        width: 100%;
        margin: auto; /* Garante que a UL esteja centralizada no NAV */
    }
    body nav ul li {
        margin: 1rem 0;
        width: 100%;
        text-align: center;
    }
    body nav ul li a {
        color: var(--light-color);
        font-size: 1.1rem;
        padding: 0.8rem;
        display: block;
    }
    body nav ul li a:hover, body nav ul li a.active {
        background-color: var(--primary-color);
        color: var(--light-color) !important; /* Garante que o texto não suma */
    }
    body nav ul li a::after {
        display: none;
    }

    /* Layouts Gerais */
    body .container {
        width: 100%;
        padding: 0 1.5rem;
    }
    body section {
        padding: 3rem 0;
    }
    body section[id] {
        scroll-margin-top: 80px;
    }
    body .hero {
        padding-top: 80px;
        height: auto;
        min-height: 60vh; /* Reduzido para diminuir o tamanho na home */
    }
    body .hero-content h1 {
        font-size: 2rem;
        text-align: center;
        padding: 0 1rem;
        word-wrap: break-word;
    }
    body .hero-content p {
        font-size: 1.1rem;
        text-align: justify;
        max-width: 100%;
        padding: 0 1rem;
        word-wrap: break-word;
    }
    body .hero-content {
        padding: 0 1rem;
        text-align: center;
    }

    /* Seções de duas colunas */
    body .about-content, body .blog-container {
        grid-template-columns: 1fr;
    }
    body .blog-container {
        display: flex;
        flex-direction: column;
        gap: 2rem; /* Espaçamento adequado entre artigos e notícias */
    }
    body .blog-container > div:first-child {
        order: 0; /* Garante que os artigos fiquem primeiro */
    }
    body .about-image {
        margin-top: 2rem;
        order: -1;
    }
    body .sidebar-news {
        border-left: none;
        padding-left: 0;
        margin-top: 2rem; /* Menor espaçamento no mobile */
        order: 1; /* Coloca as notícias abaixo dos artigos */
        width: 100%; /* Garante largura total no mobile */
    }

    /* Ajustes para carrossel de notícias no mobile */
    body .news-carousel {
        height: auto; /* Permite altura automática no mobile */
        min-height: 120px; /* Altura mínima suficiente para exibir conteúdo */
    }

    body .carousel-items-wrapper {
        margin: 0 15px; /* Ajusta margem para mobile */
    }

    body .carousel-control {
        width: 25px; /* Tamanho menor para mobile */
        height: 25px; /* Tamanho menor para mobile */
        padding: 0.2rem; /* Padding menor */
    }

    body .news-source {
        margin-bottom: 1.5rem; /* Menor espaçamento entre fontes de notícias */
    }

    body .member-cards-container {
        flex-direction: column;
        gap: 3rem;
    }
}

/* WhatsApp Button Styles */
.whatsapp-float-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #25D366; /* WhatsApp green */
    color: white;
    border: none;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    transition: all 0.3s ease;
    line-height: 1;
    text-decoration: none;
}

.whatsapp-float-button:hover {
    transform: scale(1.1);
    background-color: #128C7E; /* Darker green on hover */
}

.whatsapp-float-button i {
    color: white;
    margin: 0;
    padding: 0;
    line-height: 1;
    border: none;
    text-decoration: none;
}
