/* === GOOGLE FONTS & ROOT VARIABLES === */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Roboto:wght@400;500&display=swap');

:root {
    --hue: 207;
    --primary-bg: hsl(var(--hue), 15%, 12%);
    --secondary-bg: hsl(var(--hue), 15%, 16%);
    --card-bg: hsl(var(--hue), 15%, 14%);
    --border-color: hsl(var(--hue), 10%, 25%);
    --primary-accent: hsl(190, 81%, 59%);
    --primary-accent-hover: hsl(190, 95%, 65%);
    --secondary-accent: hsl(260, 80%, 75%);
    --headings-text: hsl(0, 0%, 98%);
    --primary-text: hsl(var(--hue), 10%, 75%);
    --subtle-text: hsl(var(--hue), 10%, 50%);
    --font-headings: 'Poppins', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --header-height: 4.5rem;
    --section-padding: 6rem 0;
    --container-width: 1140px;
    --container-padding: 1.5rem;
    --border-radius: 8px;
    --transition-smooth: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --box-shadow: 0 8px 24px hsla(var(--hue), 15%, 5%, 0.2);
}

/* === BASE & RESET === */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); overflow-x: hidden; }
body { font-family: var(--font-body); font-size: 1rem; line-height: 1.6; background-color: var(--primary-bg); color: var(--primary-text); overflow-x: hidden; }
h1, h2, h3, h4 { font-family: var(--font-headings); color: var(--headings-text); font-weight: 600; }
ul { list-style: none; }
a { text-decoration: none; color: var(--primary-accent); transition: var(--transition-smooth); }
a:hover { color: var(--primary-accent-hover); }
img { max-width: 100%; height: auto; display: block; }

/* === LAYOUT & UTILITIES === */
.container { max-width: var(--container-width); margin-left: auto; margin-right: auto; padding-left: var(--container-padding); padding-right: var(--container-padding); }
.text-center { text-align: center; }
.section { padding: var(--section-padding); }
.section-alt-bg { background-color: var(--secondary-bg); }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-subtitle { display: block; font-size: 0.9rem; font-weight: 500; color: var(--primary-accent); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.5rem; }
.section-title { font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 700; }
.section-title::after { content: ''; display: block; width: 50px; height: 3px; background-color: var(--primary-accent); margin: 1rem auto 0; }
.about-content .section-title::after { margin-left: 0; } 

/* === ANIMATIONS === */
.animated-item { opacity: 0; transform: translateY(40px); transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo); }
.animated-item.is-visible { opacity: 1; transform: translateY(0); }
.services-grid .animated-item:nth-child(2), .portfolio-grid .animated-item:nth-child(2) { transition-delay: 0.15s; }
.services-grid .animated-item:nth-child(3), .portfolio-grid .animated-item:nth-child(3) { transition-delay: 0.3s; }
.services-grid .animated-item:nth-child(4) { transition-delay: 0.45s; }
@keyframes slideDown { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-20px); } 100% { transform: translateY(0px); } }

/* === HEADER & NAVIGATION === */
.header { position: fixed; top: 0; left: 0; width: 100%; z-index: 100; background-color: transparent; border-bottom: 1px solid transparent; transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease; animation: slideDown 1s var(--ease-out-expo) forwards; }
.header.scrolled { background-color: var(--primary-bg); border-bottom: 1px solid var(--border-color); box-shadow: 0 4px 15px hsla(var(--hue), 15%, 5%, 0.1); }
.header nav.container { height: var(--header-height); display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-headings); font-size: 1.75rem; font-weight: 700; color: var(--headings-text); opacity: 0; animation: fadeInUp 0.8s 0.3s var(--ease-out-expo) forwards; }
.nav-menu { display: flex; gap: 2.5rem; }
.nav-menu li { opacity: 0; animation: fadeInUp 0.8s var(--ease-out-expo) forwards; }
.nav-menu li:nth-child(1) { animation-delay: 0.4s; }
.nav-menu li:nth-child(2) { animation-delay: 0.45s; }
.nav-menu li:nth-child(3) { animation-delay: 0.5s; }
.nav-menu li:nth-child(4) { animation-delay: 0.55s; }
.nav-link { font-family: var(--font-body); font-weight: 500; color: var(--headings-text); padding: 0.5rem 0; position: relative; }
.nav-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: var(--primary-accent); transition: width var(--transition-smooth); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link:hover, .nav-link.active { color: var(--primary-accent); }
.nav-toggle { display: none; position: relative; width: 40px; height: 40px; background: transparent; border: none; cursor: pointer; z-index: 101; }
.hamburger-box { position: relative; display: inline-block; width: 30px; height: 24px; }
.hamburger-inner, .hamburger-inner::before, .hamburger-inner::after { position: absolute; width: 30px; height: 3px; background-color: var(--headings-text); border-radius: 2px; transition: transform 0.22s 0.12s cubic-bezier(0.55, 0.055, 0.675, 0.19); }
.hamburger-inner { top: 50%; transform: translateY(-50%); transition-property: background-color; transition-delay: 0s; }
.hamburger-inner::before { content: ''; top: -10px; }
.hamburger-inner::after { content: ''; bottom: -10px; }
.nav-toggle[aria-expanded="true"] .hamburger-inner { background-color: transparent; }
.nav-toggle[aria-expanded="true"] .hamburger-inner::before { transform: rotate(45deg) translate(7px, 7px); transition-delay: 0s; transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); }
.nav-toggle[aria-expanded="true"] .hamburger-inner::after { transform: rotate(-45deg) translate(7px, -7px); transition-delay: 0s; transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); }

/* === HERO SECTION === */
.hero { min-height: 100vh; display: flex; align-items: center; background: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.1)), url('assets/background3.png') center/cover no-repeat; }
.hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 3rem; }
.hero-content { flex: 1 1 55%; max-width: 650px; }
.hero-content h1 { font-size: clamp(2.5rem, 6vw, 4rem); line-height: 1.2; margin-bottom: 1.5rem; font-weight: 700; }
.hero-content p { font-size: 1.15rem; margin-bottom: 2.5rem; max-width: 550px; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-image { flex: 1 1 40%; max-width: 450px; }
.hero-image img { animation: float 6s ease-in-out infinite; }
.reveal-up { opacity: 0; animation: fadeInUp 1s var(--ease-out-expo) forwards; }
.hero-content .section-subtitle { animation-delay: 0.5s; }
.hero-content h1 { animation-delay: 0.6s; }
.hero-content p { animation-delay: 0.7s; }
.hero-buttons { animation-delay: 0.8s; }
.hero-image.reveal-up { animation-delay: 0.7s; }

/* === BUTTONS === */
.btn { display: inline-block; padding: 0.9rem 2.2rem; border-radius: var(--border-radius); font-family: var(--font-headings); font-weight: 600; text-align: center; transition: var(--transition-smooth); border: 2px solid transparent; }
.btn-primary { background-color: var(--primary-accent); color: var(--primary-bg); }
.btn-primary:hover { background-color: var(--primary-accent-hover); transform: translateY(-3px); box-shadow: 0 4px 15px hsla(190, 81%, 59%, 0.2); }
.btn-secondary { background-color: transparent; color: var(--headings-text); border: 2px solid var(--border-color); }
.btn-secondary:hover { background-color: var(--border-color); color: var(--headings-text); }
.btn.cta-large { padding: 1.1rem 2.8rem; font-size: 1rem; }

/* === SERVICES SECTION === */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.service-item { background-color: var(--card-bg); padding: 2.5rem; border-radius: var(--border-radius); border: 1px solid var(--border-color); transition: var(--transition-smooth); box-shadow: var(--box-shadow); }
.service-item:hover { transform: translateY(-8px); border-color: var(--primary-accent); }
.service-icon { font-size: 2.5rem; color: var(--primary-accent); margin-bottom: 1.5rem; display: block; }
.service-item h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }

/* === PORTFOLIO SECTION === */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.portfolio-item { background-color: var(--card-bg); border-radius: var(--border-radius); overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--border-color); box-shadow: var(--box-shadow); transition: var(--transition-smooth); }
.portfolio-item:hover { transform: translateY(-8px); box-shadow: 0 12px 30px hsla(var(--hue), 15%, 5%, 0.25); border-color: var(--primary-accent); }
.portfolio-item img { height: 240px; object-fit: cover; transition: transform var(--transition-smooth); }
.portfolio-item:hover img { transform: scale(1.05); }
.portfolio-info { padding: 1.75rem; flex-grow: 1; display: flex; flex-direction: column; }
.portfolio-info h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.portfolio-info p { margin-bottom: 1.5rem; flex-grow: 1; }
.portfolio-link { font-weight: 500; color: var(--primary-accent); display: inline-flex; align-items: center; gap: 0.5rem; margin-top: auto; }
.portfolio-link i { transition: transform var(--transition-smooth); }
.portfolio-link:hover i { transform: translateX(5px); }
/* CORREÇÃO DO BUG: Mantém a cor do ícone no clique */
.portfolio-link:active i, .portfolio-link:focus i { color: var(--primary-accent-hover); }

/* === ABOUT SECTION === */
.about-content { display: flex; align-items: center; gap: 4rem; }
.about-text { flex: 1 1 55%; }
.about-text p { margin-bottom: 1.25rem; }
.about-text strong { color: var(--headings-text); }
.about-image { flex: 1 1 25%; max-width: 450px; }
.about-image img { border-radius: var(--border-radius); }

/* === Retire o box shadow acima box-shadow: var(--box-shadow) === */

/* === CONTACT SECTION THEMED (MELHORADA) === */
.themed-section { background-color: var(--secondary-accent); padding: var(--section-padding); position: relative; overflow: hidden; }
.themed-section::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-image: linear-gradient(45deg, rgba(0,0,0,0.04) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.04) 75%), linear-gradient(45deg, rgba(0,0,0,0.04) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.04) 75%); background-size: 30px 30px; background-position: 0 0, 15px 15px; opacity: 0.8; z-index: 0; }
.themed-section .container { position: relative; z-index: 1; }
.themed-section .section-kicker,
.themed-section .section-title { color: var(--primary-bg); }
.themed-section .section-title::after { background-color: hsla(0, 0%, 0%, 0.3); }
.themed-section-caption { color: hsla(var(--hue), 15%, 12%, 0.85); max-width: 700px; margin: 0 auto 2.5rem; font-size: 1.1rem; line-height: 1.7; }
.themed-section .btn.primary-cta { background-color: var(--primary-bg); color: var(--secondary-accent); border: 2px solid transparent; }
.themed-section .btn.primary-cta:hover { background-color: var(--headings-text); color: var(--primary-bg); transform: translateY(-3px) scale(1.02); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }

/* === FOOTER === */
.footer { background-color: var(--secondary-bg); padding: 5rem var(--container-padding) 2rem;  border-top: 1px solid var(--border-color); text-align: left; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 3rem; margin-bottom: 3rem; }
.footer-column .footer-title { font-family: var(--font-headings); font-size: 1.2rem; font-weight: 600; color: var(--headings-text); margin-bottom: 1.5rem; position: relative; }
.footer-column .footer-title::after { content: ''; position: absolute; left: 0; bottom: -8px; width: 30px; height: 2px; background-color: var(--primary-accent); }
.footer-tagline { font-size: 0.9rem; line-height: 1.7; color: var(--primary-text); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.8rem; }
.footer-links a { color: var(--primary-text); text-decoration: none; transition: var(--transition-smooth); }
.footer-links a:hover { color: var(--primary-accent); padding-left: 5px; }
.footer .social-links { display: flex; gap: 1.5rem; }
.footer .social-links a { color: var(--primary-text); font-size: 1.5rem; transition: var(--transition-smooth); }
.footer .social-links a:hover { color: var(--primary-accent); transform: translateY(-3px); }
/* CORREÇÃO DO BUG: Mantém a cor do ícone no clique */
.footer .social-links a:active, .footer .social-links a:focus { color: var(--primary-accent); }
.footer-bottom { border-top: 1px solid var(--border-color); padding-top: 2rem; margin-top: 3rem; text-align: center; }
.footer-bottom p { color: var(--subtle-text); font-size: 0.9rem; }

/* === BOTÃO VOLTAR AO TOPO === */
.back-to-top { position: fixed; bottom: 20px; right: 20px; display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; background-color: var(--primary-accent); color: var(--primary-bg); border-radius: 50%; font-size: 1.5rem; z-index: 50; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.4s ease; }
.back-to-top:hover { background-color: var(--primary-accent-hover); transform: translateY(-2px); }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
/* CORREÇÃO DO BUG: Mantém a cor do ícone no clique */
.back-to-top:active, .back-to-top:focus {
    color: var(--primary-bg);
}

/* === MEDIA QUERIES === */
@media (max-width: 768px) {
    :root { --header-height: 4rem; --section-padding: 4rem 0; --container-padding: 1rem; }
    .header, .logo, .nav-menu li { animation: none; opacity: 1; }
    .reveal-up { animation-name: fadeInUp; }
    .hero-content .section-subtitle { animation-delay: 0.3s; }
    .hero-content h1 { animation-delay: 0.4s; }
    .hero-content p { animation-delay: 0.5s; }
    .hero-buttons { animation-delay: 0.6s; }
    .section-title { font-size: clamp(1.8rem, 7vw, 2.2rem); margin-bottom: 3rem; }
  .nav-toggle {
        display: flex;         /* Em vez de 'block' */
        align-items: center;   /* Alinha o ícone verticalmente */
        justify-content: center; /* Alinha o ícone horizontalmente */
    }    
    .nav-menu { position: fixed; top: 0; right: -100%; width: min(75%, 350px); height: 100vh; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0; padding: 6rem 2rem; background-color: var(--secondary-bg); transition: right 0.4s var(--ease-out-expo); box-shadow: -5px 0 15px rgba(0,0,0,0.1); }
    .nav-menu[data-visible="true"] { right: 0; }
    .nav-menu .nav-link { opacity: 0; transform: translateX(20px); transition: opacity 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo); }
    .nav-menu[data-visible="true"] .nav-link { opacity: 1; transform: translateX(0); }
    .nav-menu[data-visible="true"] li:nth-child(1) .nav-link { transition-delay: 0.15s; }
    .nav-menu[data-visible="true"] li:nth-child(2) .nav-link { transition-delay: 0.2s; }
    .nav-menu[data-visible="true"] li:nth-child(3) .nav-link { transition-delay: 0.25s; }
    .nav-menu[data-visible="true"] li:nth-child(4) .nav-link { transition-delay: 0.3s; }
    .nav-link { display: block; width: 100%; padding: 1rem 0; font-size: 1.1rem; }
    .nav-link.active { color: var(--primary-accent); background-color: hsla(var(--hue), 15%, 12%, 0.5); }
    .nav-link::after { display: none; }
    body.nav-open { overflow: hidden; }
    .hero { text-align: center; padding-top: var(--header-height); padding-bottom: 0; min-height: 100dvh; }
    .hero-inner { flex-direction: column; justify-content: center; }
    .hero-content { order: 1; }
    .hero-image { display: none; }
    .hero-buttons { justify-content: center; flex-direction: column; align-items: center; gap: 1rem; }
    .hero-buttons .btn { width: 100%; max-width: 320px; }
    .hero-content h1 { font-size: clamp(2.2rem, 8vw, 3rem); }
    .about-content { flex-direction: column; text-align: center; gap: 2.5rem; }
    .about-text { text-align: left; }
    
    .footer-grid { text-align: center; }
    .footer .social-links { justify-content: center; }
    .footer-column .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }


      
    /* === AJUSTES PARA A IMAGEM NA SEÇÃO SOBRE === */
    .about-image {
        order: 2; /* Garante que a imagem venha depois do texto */
        margin: 0 auto; /* Centraliza a imagem horizontalmente */
        max-width: 320px; /* Define uma largura máxima para a imagem não ficar muito grande */
        width: 50%; /* Faz a imagem ocupar 80% do espaço disponível */
    }

    .about-image img {
        /* Adiciona uma sombra para destacar a imagem do fundo */
        box-shadow: 0 8px 24px hsla(var(--hue), 15%, 5%, 0.2); 
    }
    
}