/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;900&display=swap');

/* --- CSS Variables --- */
:root {
    --bg-color: #f9fbff; /* Fundo principal claro */
    --secondary-bg: #ffffff; /* Fundo para seções e cards */
    --text-color: #101828; /* Cor de texto principal escura */
    --text-secondary-color: #475467; /* Cor de texto secundária */
    --primary-gradient: linear-gradient(90deg, #2c77e7, #4e7fff);
    --primary-color-start: #2c77e7;
    --primary-color-end: #4e7fff;
    --border-color: #e6e8eb; /* Cor da borda sutil */
    --header-height: 80px;
}

/* --- Reset and Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--primary-color-start);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

h1, h2, h3, h4 {
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 900; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p {
    margin-bottom: 1.5rem;
    max-width: 65ch;
    color: var(--text-secondary-color);
}

/* --- Header and Navigation --- */
.site-header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0 2rem;
    height: var(--header-height);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 40px;
    width: auto;
}

.main-nav {
    display: flex;
    align-items: center;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-nav a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary-color-end);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    background: var(--primary-gradient);
    color: #ffffff;
    padding: 1rem 3rem;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(44, 119, 231, 0.4);
    color: #ffffff;
    filter: brightness(1.1);
}

.header-cta {
    margin-left: 2rem;
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: calc(var(--header-height) + 4rem) 0 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at top, #eef5ff, var(--bg-color));
}

.hero h1 {
    margin: 0 auto 1.5rem;
    max-width: 20ch;
}

.hero p {
    font-size: 1.2rem;
    max-width: 50ch;
    margin: 0 auto 2.5rem;
}

/* --- Content Sections --- */
.content-section, .page-section {
    padding: 6rem 0;
}

.page-section {
    padding-top: calc(var(--header-height) + 4rem);
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}
.section-title p {
    max-width: 60ch;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.1rem;
}


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

.card {
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-image-container {
    height: 200px;
    background-color: #f0f4f8; /* Fundo suave para as imagens */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem; /* Espaçamento para o logo não tocar as bordas */
}

.card-image-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}


.card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.card-content p {
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.6;
}

.tags-container {
    margin-top: 1.5rem;
}

.tech-tag {
    display: inline-block;
    background-color: #eef5ff;
    color: var(--primary-color-start);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* --- About & Contact Pages --- */
.about-content, .privacy-content, .contact-form, .contact-info {
    max-width: 800px;
    margin: 2rem auto;
}

/* Justify text on content-heavy pages */
.about-content p,
.privacy-content p,
.termos-content p {
    text-align: justify;
}

.values-list { list-style-position: inside; }
.values-list li { margin-bottom: 1rem; }

ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--secondary-bg);
    color: var(--text-color);
    font-size: 1rem;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color-start);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0, .2);
}

/* --- About Summary --- */
.about-summary {
    padding: 6rem 0;
    text-align: center;
    background-color: var(--secondary-bg);
}

.about-summary h2,
.about-summary p {
    margin-left: auto;
    margin-right: auto;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--secondary-bg);
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
}

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

.footer-column h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a, .social-links a {
    color: var(--text-secondary-color);
}

.footer-column a:hover, .social-links a:hover {
    color: var(--primary-color-start);
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary-color);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-start;
    margin-top: 1rem;
}

.social-links a {
    font-size: 1.5rem;
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.6, 0.2, 0.1, 1), transform 0.8s cubic-bezier(0.6, 0.2, 0.1, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Media Queries --- */
@media (max-width: 768px) {
    .main-nav ul {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-color);
        padding-top: var(--header-height);
        text-align: center;
        gap: 2.5rem;
        font-size: 1.5rem;
    }

    .main-nav.active ul {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .header-cta {
        display: none;
    }
}
