/* Variáveis e Reset */
:root {
    --bg-color: #fcfbf9;
    --header-bg: rgba(252, 251, 249, 0.85);
    --surface-color: #f3efe9;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --border-color: #e5e0d8;
    --card-text: #ffffff;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

/* Variáveis para o Modo Escuro */
body.dark-mode {
    --bg-color: #121212;
    --header-bg: rgba(18, 18, 18, 0.85);
    --surface-color: #1e1e1e;
    --text-primary: #f5f5f5;
    --text-secondary: #aaaaaa;
    --border-color: #333333;
}

html {
    scroll-padding-top: 10rem; 
    scroll-behavior: smooth; 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
}

/* Header */
header {
    position: sticky;
    top: 1rem;
    z-index: 800;
    padding: 0 1%;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    background-color: var(--header-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    width: 1000px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.2rem;
}

.logo-icon {
    background: var(--text-primary);
    color: var(--bg-color);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

#theme-toggle:hover {
    transform: scale(1.1);
}

.btn-primary {
    background: #1a1a1a;
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
}

body.dark-mode .btn-primary {
    background: #f5f5f5;
    color: #121212;
}

.btn-primary.dark {
    background: #222;
    color: #fff;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 5%;
}

/* Hero Section */
.hero-container {
    background-color: var(--surface-color);
    border-radius: 2rem;
    padding: 3rem;
    margin-bottom: 4rem;
    margin-top: 3rem;
}

.hero-content {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.hero-image {
    flex: 1;
}

.hero-image-button {
    display: block;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    padding: 0;
    border: 0;
    border-radius: 1.5rem;
    background: transparent;
    cursor: zoom-in;
    overflow: hidden;
}

.hero-image-button:focus-visible {
    outline: 3px solid var(--text-primary);
    outline-offset: 4px;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: center top; 
    border-radius: 1.5rem;
    transform: scale(1.2); 
    transform-origin: center top;
    transition: transform 0.5s ease; 
}

.hero-image-button:hover img {
    transform: scale(1.3);
}

.image-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.82);
}

.image-modal[open] {
    display: flex;
}

.image-modal-content {
    position: relative;
    max-width: min(900px, 100%);
    max-height: 100%;
}

.image-modal-content img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 4rem);
    border-radius: 1rem;
    object-fit: contain;
}

.image-modal-close {
    position: absolute;
    top: -1rem;
    right: -1rem;
    z-index: 1;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: #111111;
    cursor: pointer;
    font-size: 1.8rem;
    line-height: 1;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-text p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-direction: column-reverse; 
    align-items: center;
    width: 100%;
    gap: 1.5rem;
}

.hero-actions .btn-primary {
    display: block; 
    width: 100%;
    text-align: center;
    padding: 0.8rem 1.5rem;
    font-size: 1.05rem;
}

.hero-actions .social-links {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 0.5rem; 
}

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

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: var(--text-primary); 
    font-size: 1.2rem;
    border: 1px solid transparent;
    transition: border-color 0.3s ease, transform 0.2s ease;
}

.social-links a:hover {
    border-color: var(--text-primary); 
    transform: scale(1.05);
}

/* Intro Section */
.intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 5rem auto;
}

.intro h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.intro p {
    color: var(--text-secondary);
}

/* Container para agrupar as habilidades e o carrossel */
.skills-section {
    width: 100%;
    margin-bottom: 7rem; 
}

.testimonials {
    margin-bottom: 5rem;
}

.testimonials-header {
    text-align: left;
    margin-bottom: 3rem;
}

.featured-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.featured-header h2 {
    font-size: 2rem;
}

.testimonials-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.testimonials-header p {
    color: var(--text-secondary);
}

/* Grade de Serviços ajustada para Flexbox */
.testimonials-grid {
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 2rem;
}

.testimonial-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease;
    
    flex: 1 1 300px; 
    max-width: calc(33.333% - 1.34rem); 
}

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

.testimonial-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    flex-grow: 1;
    line-height: 1.6;
}

.client-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}

/* Featured Articles */
.view-all {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

/* Cards */
.card {
    position: relative;
    height: 350px;
    border-radius: 1.5rem;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    color: var(--card-text);
}


.card-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 45%;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0) 100%
    );
    z-index: 1;
}

.card-top, .card-bottom {
    position: relative;
    z-index: 2;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tag {
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.tag-orange { background: rgba(255, 150, 100, 0.9); }

.date {
    font-size: 0.8rem;
    opacity: 0.9;
}

.number {
    font-weight: 600;
    font-size: 0.8rem;
    opacity: 0.7;
    display: block;
    margin-bottom: 0.5rem;
}

.title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
}

.title-row h3 {
    font-size: 1.3rem;
    line-height: 1.2;
}

.icon-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    cursor: pointer;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Contact Section */
.contact-content {
    background-color: var(--surface-color);
    border-radius: 2rem;
    padding: 4rem 2rem;
    text-align: center;
}

.contact-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-form button {
    margin-top: 1rem;
    padding: 1rem;
    font-size: 1rem;
    border-radius: 2rem;
    width: 55%;
}

/* FOOTER (Rodapé) */

footer {
    border-top: 1px solid var(--border-color);
    padding: 5rem 5% 2rem; 
    max-width: 1400px; 
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr; 
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-family: var(--font-heading); 
    font-size: 1.2rem;
    color: var(--text-primary);
}

.footer-col p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    transition: color 0.3s ease, transform 0.2s ease;
}

.footer-col a:hover {
    color: var(--text-primary);
    transform: translateX(5px); 
}

.brand-col .logo {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.footer-info {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 1.5rem;
    font-weight: 500;
}

.footer-bottom {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    line-height: 1.8; 
}

/* carousel */
.carousel-container {
    width: 100%;
    max-width: 100%;
    margin: 0; 
    overflow: hidden; 
    position: relative;
    padding: 1rem 0; 
}

.carousel-container::before,
.carousel-container::after {
    content: "";
    position: absolute;
    top: 0;
    width: 80px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.carousel-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-color) 0%, transparent 100%);
}

.carousel-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-color) 0%, transparent 100%);
}

.carousel-track {
    display: flex;
    width: max-content;
}

.carousel-container:hover .carousel-items {
    animation-play-state: paused;
}

.carousel-items {
    display: flex;
    gap: 3.5rem; 
    padding-right: 3.5rem;
    animation: scroll-left 30s linear infinite; 
}

.carousel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-primary); 
    filter: grayscale(100%); 
    opacity: 0.65; 
    transition: all 0.3s ease;
    cursor: default;
}

.carousel-item i {
    font-size: 3.5rem; 
}

.carousel-item span {
    font-size: 0.9rem;
    font-family: var(--font-body);
    font-weight: 500;
}

.carousel-item:hover {
    color: var(--text-primary); 
    opacity: 1;
    transform: scale(1.1); 
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}


/* ÍCONES SOCIAIS NO FOOTER */

.whatsapp-btn {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.6rem;
    width: 100%;
    max-width: 500px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    background-color: #1a1a1a;
    color: #ffffff;
    border-radius: 3rem;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.whatsapp-btn:hover {
    transform: scale(1.02);
    background-color: #333333;
}
.footer-col .social-links {
    margin-top: 1rem;
}

.footer-col .social-links a {
    display: inline-flex; 
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
    color: var(--text-secondary);
    border: 1px solid transparent; 
}

.footer-col .social-links a:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
    transform: scale(1.1); 
}


/* Configuração do menu hambúrguer */
.mobile-btn {
    display: none; /* Escondido no PC */
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* RESPONSIVIDADE (Mobile) */

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .header-container {
        flex-direction: row; 
        flex-wrap: wrap;
        justify-content: space-between; 
        align-items: center;
        width: 100%;
        padding: 1rem 1.5rem;
    }

    .mobile-btn {
        display: block; 
    }

    .nav-wrapper {
        display: none; 
        flex-direction: column;
        width: 100%;
        order: 3;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
        gap: 1.5rem;
    }

    .nav-wrapper.active {
        display: flex; 
    }

    nav {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        width: 100%;
    }

    .header-actions {
        flex-direction: row; 
        width: auto;
        gap: 1rem;
        align-items: center;
    }

    .header-actions .btn-primary {
        display: none; 
    }

    .hero-content { flex-direction: column; }
    .hero-text h1 { font-size: 2.5rem; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    
    .testimonial-card {
        max-width: 100%; 
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-col a:hover {
        transform: none; 
    }
    .brand-col .logo {
        justify-content: center;
    }
}