/* --- Variáveis Globais de Cores --- */
:root {
    --bg-color: #000101;
    /* Fundo preto puro */
    --text-primary: #F5F5F5;
    --text-secondary: #AAAAAA;

    /* Azul ESBM */
    --accent-blue: #1E90FF;
    --accent-blue-hover: #00BFFF;
    --accent-blue-transparent: rgba(30, 144, 255, 0.35);

    --transition-fast: 0.3s ease;
    --transition-slow: 0.6s ease-out;
}

/* --- Canvas de Fundo Techy / Animado --- */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    /* Mantém as partículas e a rede por trás de todo o conteúdo */
    pointer-events: none;
    /* Não interfere com os cliques do rato */
}

/* Ajustes de transparência das seções para destacar a animação do fundo */
body.dark-theme {
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

.hero-section,
.about-section,
.works-section,
.services-section,
.skills-section,
.testimonials-section,
.contact-section {
    background-color: transparent !important;
    /* Garante visibilidade do fundo animado */
}

/* --- Reset Básico e Fontes --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

body.dark-theme {
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

/* --- Cursor Customizado --- */
.custom-cursor {
    width: 25px;
    height: 25px;
    border: 2px solid var(--accent-blue);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    background-color: rgba(30, 144, 255, 0.15);
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: width var(--transition-fast), height var(--transition-fast);
}

.custom-cursor.hovering {
    width: 50px;
    height: 50px;
}

/* --- Header Estilizado --- */
.main-header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(0, 1, 1, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    opacity: 0;
    animation: fadeInDown var(--transition-slow) forwards;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link .logo-text {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.logo-link:hover .logo-text {
    color: var(--accent-blue);
}

.nav-links ul {
    display: flex;
    gap: 30px;
    font-size: 15px;
}

.nav-links a.active {
    color: var(--accent-blue);
    font-weight: 600;
}

.nav-links a:hover {
    color: var(--accent-blue-hover);
}

/* --- Botões e UI --- */
.btn {
    padding: 10px 25px;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 600;
}

.btn-primary {
    background-color: var(--accent-blue);
    color: #fff;
    border: none;
}

.btn-primary:hover {
    background-color: var(--accent-blue-hover);
    transform: translateY(-2px);
}

/* --- Secção Hero --- */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

/* Glows Azuis de Fundo */
.hero-section::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-blue-transparent) 0%, rgba(30, 144, 255, 0) 70%);
    border-radius: 50%;
    left: -200px;
    bottom: -100px;
    pointer-events: none;
    z-index: -1;
}

.hero-section::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-blue-transparent) 0%, rgba(30, 144, 255, 0) 70%);
    border-radius: 50%;
    right: -150px;
    top: 100px;
    pointer-events: none;
    z-index: -1;
}

.hero-container::before {
    content: '';
    position: absolute;
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, rgba(30, 144, 255, 0.15) 0%, rgba(30, 144, 255, 0) 60%);
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -2;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
}

.hero-content {
    max-width: 600px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp var(--transition-slow) forwards;
    animation-delay: 0.2s;
}

.hero-greeting {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.hero-title {
    font-size: 52px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 25px;
}

.typing-text {
    color: var(--accent-blue);
}

.typed-cursor {
    color: var(--accent-blue);
    font-weight: 700;
    animation: blink 0.7s infinite;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Stack de Cards (Hero Visual) --- */
.hero-visual {
    opacity: 0;
    transform: scale(0.9);
    animation: fadeIn var(--transition-slow) forwards;
    animation-delay: 0.4s;
    position: relative;
}

.hero-card-stack {
    position: relative;
    width: 320px;
    height: 420px;
    z-index: 10;
}

.card {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    transition: var(--transition-fast);
}

/* 1. Card de Trás: Escuro Translúcido */
.card-back {
    background-color: rgba(255, 255, 255, 0.05);
    z-index: 1;
    transform: rotate(7deg) translate(20px, -20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

/* 2. Card do Meio: BRANCO PURO */
.card-middle {
    background-color: #ffffff;
    z-index: 2;
    transform: rotate(-4deg) translate(-12px, -8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

/* 3. Card da Frente: Contentor Transparente com Overflow Visível */
.card-front {
    z-index: 3;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: visible !important;
    /* PERMITE A CABEÇA SAIR FORA DO QUADRADO */
}

/* Retângulo Azul de Fundo */
.card-blue-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(155deg, #06101e 0%, #0b3c75 45%, #1E90FF 80%, #00BFFF 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Imagem com Efeito Pop-Out */
.profile-img-popout {
    position: absolute;
    bottom: 0;
    left: 50%;
    /* AJUSTA O TAMANHO AQUI: Aumenta o valor de scale(1.25) para a imagem sobressair mais no topo */
    transform: translateX(-50%) scale(1.5);
    transform-origin: bottom center;
    width: 100%;
    height: auto;
    object-fit: contain;
    z-index: 2;
    /* Fica por cima da caixa azul */
    pointer-events: none;
    transition: transform var(--transition-fast);
}

/* --- Responsividade --- */
@media (max-width: 992px) {
    .header-container {
        padding: 0 30px;
    }

    .hero-title {
        font-size: 42px;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 20px;
    }

    .nav-links {
        display: none;
    }

    .hero-container {
        flex-direction: column-reverse;
        gap: 40px;
    }

    .hero-content {
        max-width: 100%;
        text-align: center;
        align-items: center;
    }

    .hero-title {
        font-size: 34px;
    }

    .hero-card-stack {
        width: 260px;
        height: 340px;
    }
}

/* --- Keyframes (Animações) --- */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* --- Secção Sobre Mim (About Section) --- */
.about-section {
    padding: 100px 0;
    position: relative;
    background-color: var(--bg-color);
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 60px;
    align-items: center;
}

/* Lado Esquerdo */
.about-title {
    font-size: 38px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

.about-title .highlight {
    color: var(--accent-blue);
    font-weight: 700;
}

/* Lado Direito */
.about-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
}

.about-description {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Botão Personalizado com Seta Animada */
.btn-animated {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: var(--accent-blue);
    color: #ffffff;
    padding: 14px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 15px rgba(30, 144, 255, 0.3);
}

.btn-animated .arrow-icon {
    font-size: 22px;
    transition: transform var(--transition-fast);
}

/* Animação da Seta no Hover */
.btn-animated:hover {
    background-color: var(--accent-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 191, 255, 0.4);
}

.btn-animated:hover .arrow-icon {
    transform: translateX(8px);
    /* Move a seta suavemente para a direita */
}

/* --- ANIMAÇÃO DE ENTRADA AO FAZER SCROLL --- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsividade */
@media (max-width: 992px) {
    .about-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-title {
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    .about-title {
        font-size: 24px;
    }

    .about-description {
        font-size: 16px;
    }
}

/* --- Secção de Trabalhos (Works Section) --- */
.works-section {
    padding: 100px 0;
    background-color: transparent !important;
    position: relative;
}

.works-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.works-header {
    text-align: center;
    margin-bottom: 60px;
}

.works-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.works-title .highlight {
    color: var(--accent-blue);
}

.works-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Grelha Responsiva de Cards */
.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Card Individual com Gradiente */
.work-card {
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(6, 16, 30, 0.85) 0%, rgba(11, 60, 117, 0.4) 60%, rgba(30, 144, 255, 0.15) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    backdrop-filter: blur(5px);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.work-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
}

/* Efeito Hover no Card */
.work-card:hover {
    transform: translateY(-8px);
    border-color: rgba(30, 144, 255, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(30, 144, 255, 0.25);
}

/* Imagem do Card */
.work-img-box {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.3);
}

.work-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.work-card:hover .work-img {
    transform: scale(1.08);
}

/* Badges de Categoria (Estilização Dinâmica) */
.category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--accent-blue);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 14px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

/* Cor alternativa para cartões de Branding */
.work-card:has(.category-badge:contains("Branding")) .category-badge,
.work-card-link[href*="piramide"],
.work-card-link[href*="hatihati-fogos"],
.work-card-link[href*="avesdamachava.html"] .category-badge {
    background: linear-gradient(135deg, #00bfff, #1e90ff);
}

/* Informações do Projeto */
.work-info {
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.work-number {
    font-size: 26px;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.work-project-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.work-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Tags de Tecnologias / Soluções */
.work-tags {
    font-size: 12px;
    color: var(--accent-blue-hover);
    font-weight: 500;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.work-tags span {
    background-color: rgba(30, 144, 255, 0.1);
    border: 1px solid rgba(30, 144, 255, 0.2);
    padding: 3px 8px;
    border-radius: 6px;
    transition: background-color var(--transition-fast);
}

.work-card:hover .work-tags span {
    background-color: rgba(30, 144, 255, 0.2);
    color: #ffffff;
}

/* --- Responsividade --- */
@media (max-width: 992px) {
    .works-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .works-grid {
        grid-template-columns: 1fr;
    }

    .works-title {
        font-size: 32px;
    }

    .works-container {
        padding: 0 20px;
    }
}

/* --- Responsividade --- */
@media (max-width: 992px) {
    .works-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .works-grid {
        grid-template-columns: 1fr;
    }

    .works-title {
        font-size: 32px;
    }

    .works-container {
        padding: 0 20px;
    }
}

/* --- Secção Meus Serviços (Accordion Style) --- */
.services-section {
    padding: 100px 0;
    background-color: var(--bg-color);
}

.services-container {
    max-width: 900px;
    /* Mais estreito para garantir excelente leitura do acordeão */
    margin: 0 auto;
    padding: 0 40px;
}

.services-header {
    text-align: center;
    margin-bottom: 50px;
}

.services-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.services-title .highlight {
    color: var(--accent-blue);
}

.services-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
}

/* Contentor do Acordeão */
.services-accordion {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Item de Acordeão Individual */
.accordion-item {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.accordion-item:hover {
    border-color: rgba(30, 144, 255, 0.3);
}

/* Quando o item está aberto/ativo */
.accordion-item.active {
    background-color: rgba(6, 16, 30, 0.5);
    border-color: rgba(30, 144, 255, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Cabeçalho Clicável */
.accordion-header {
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.accordion-title-box {
    display: flex;
    align-items: center;
    gap: 16px;
}

.service-icon {
    font-size: 26px;
    color: var(--accent-blue);
}

.accordion-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Ícone da Seta */
.toggle-icon {
    font-size: 24px;
    color: var(--text-secondary);
    transition: transform var(--transition-fast), color var(--transition-fast);
}

.accordion-item.active .toggle-icon {
    transform: rotate(180deg);
    color: var(--accent-blue);
}

/* Conteúdo Expansível */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 30px;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1), padding 0.3s ease, opacity 0.3s ease;
}

.accordion-item.active .accordion-content {
    max-height: 500px;
    /* Permite abrir o conteúdo */
    padding: 0 30px 28px 30px;
    opacity: 1;
    transition: max-height 0.4s ease-in-out, padding 0.3s ease, opacity 0.4s ease-in;
}

.service-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Contentor de Etiquetas / Chips */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Estilo dos Chips de Serviço (Igual à foto de referência) */
.service-chip {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(30, 144, 255, 0.4);
    padding: 7px 16px;
    border-radius: 30px;
    transition: all var(--transition-fast);
}

.service-chip:hover {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Responsividade */
@media (max-width: 640px) {
    .services-container {
        padding: 0 20px;
    }

    .accordion-header {
        padding: 20px;
    }

    .accordion-header h3 {
        font-size: 17px;
    }

    .services-title {
        font-size: 32px;
    }
}

/* --- Secção de Habilidades (Skills Section) --- */
.skills-section {
    padding: 100px 0;
    background-color: var(--bg-color);
}

.skills-container {
    max-width: 1050px;
    margin: 0 auto;
    padding: 0 40px;
}

.skills-header {
    text-align: center;
    margin-bottom: 50px;
}

.skills-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.skills-title .highlight {
    color: var(--accent-blue);
}

.skills-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
}

/* Contentor dos Cards de Categorias */
.skills-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Card Principal da Categoria (Semelhante ao Layout de Referência) */
.skill-category {
    display: grid;
    grid-template-columns: 240px 1fr;
    align-items: center;
    background: linear-gradient(145deg, rgba(6, 16, 30, 0.6) 0%, rgba(11, 60, 117, 0.2) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 28px 32px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.skill-category:hover {
    border-color: rgba(30, 144, 255, 0.35);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Título e Ícone do Lado Esquerdo */
.category-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.category-icon {
    font-size: 32px;
    color: var(--accent-blue);
}

.category-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

/* Lista de Ícones / Chips do Lado Direito */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

/* Item de Skill Individual (Efeito Hover Ativado) */
.skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 18px;
    border-radius: 12px;
    cursor: default;
    transition: all var(--transition-fast);
}

.skill-item img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: transform var(--transition-fast);
}

.skill-item span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

/* --- EFEITOS DE HOVER NAS SKILLS --- */
.skill-item:hover {
    background-color: rgba(30, 144, 255, 0.15);
    border-color: var(--accent-blue);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 0 15px rgba(30, 144, 255, 0.4);
}

.skill-item:hover img {
    transform: scale(1.15);
    /* Ícone cresce ligeiramente */
}

.skill-item:hover span {
    color: #ffffff;
    /* Texto passa a branco puro ao passar o rato */
}

/* --- Responsividade --- */
@media (max-width: 850px) {
    .skill-category {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 24px;
    }

    .category-header {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .skills-container {
        padding: 0 20px;
    }

    .skills-title {
        font-size: 32px;
    }

    .skill-item {
        padding: 8px 14px;
    }

    .skill-item span {
        font-size: 13px;
    }
}

/* --- Secção de Testemunhos (What They Say) --- */
.testimonials-section {
    padding: 100px 0;
    background-color: var(--bg-color);
    overflow: hidden;
}

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

.testimonials-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 0 20px;
}

.testimonials-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.testimonials-title .highlight {
    color: var(--accent-blue);
}

.testimonials-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
}

/* --- CARROSSEL INFINITO (SLIDER) --- */
.testimonials-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
    /* Máscara em gradiente nas pontas para esconder os cards suavemente */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
}

.testimonials-track {
    display: flex;
    gap: 24px;
    width: max-content;
    animation: infiniteScroll 40s linear infinite;
}

/* Pausa o carrossel quando o utilizador passa o rato por cima para conseguir ler */
.testimonials-slider:hover .testimonials-track {
    animation-play-state: paused;
}

/* Keyframes da Animação de Scroll Contínuo para a Esquerda */
@keyframes infiniteScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 12px));
        /* Desloca exatamente metade da largura total da pista */
    }
}

/* --- CARD DE TESTEMUNHO --- */
.testimonial-card {
    width: 340px;
    flex-shrink: 0;
    background: linear-gradient(145deg, rgba(6, 16, 30, 0.7) 0%, rgba(11, 60, 117, 0.25) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.testimonial-card:hover {
    transform: translateY(-6px);
    border-color: rgba(30, 144, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(30, 144, 255, 0.2);
}

/* Avaliação / Estrelas */
.rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.rating .score {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-blue);
}

.rating .stars {
    display: flex;
    gap: 3px;
    color: #ffca28;
    /* Cor amarela dourada para as estrelas */
    font-size: 16px;
}

/* Texto do Testemunho */
.review-text {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 25px;
    font-style: italic;
}

/* Dados do Cliente */
.client-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.client-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-blue);
}

.client-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Responsividade */
@media (max-width: 640px) {
    .testimonial-card {
        width: 280px;
        padding: 22px 18px;
    }

    .testimonials-title {
        font-size: 32px;
    }
}

/* --- Secção de Contacto (Contact Me) --- */
.contact-section {
    padding: 100px 0;
    background-color: var(--bg-color);
}

.contact-container {
    max-width: 1050px;
    margin: 0 auto;
    padding: 0 40px;
}

.contact-header {
    text-align: center;
    margin-bottom: 50px;
}

.contact-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
}

.contact-title .highlight {
    color: var(--accent-blue);
}

/* Grelha de Contacto */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Formulário */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px 20px;
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: var(--text-secondary);
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 12px rgba(30, 144, 255, 0.3);
}

.input-group textarea {
    resize: none;
}

/* Botão Send Message */
.btn-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #1e90ff, #00bfff);
    color: #ffffff;
    border: none;
    padding: 16px 32px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-send i {
    font-size: 20px;
    transition: transform var(--transition-fast);
}

.btn-send:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(30, 144, 255, 0.4);
}

.btn-send:hover i {
    transform: translateX(5px);
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.form-feedback {
    min-height: 1.25rem;
    font-size: 0.9rem;
    color: #a0a0a0;
    margin: 0;
}

.form-feedback.error {
    color: #ff6b6b;
}

.form-feedback.success {
    color: #28a745;
}

.btn-send:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Cards de Informação (Lado Direito) */
.contact-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 20px 24px;
    text-decoration: none;
    transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.contact-card:hover {
    border-color: rgba(30, 144, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.card-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.card-icon {
    font-size: 24px;
    color: var(--accent-blue);
}

.card-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.card-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    transition: transform var(--transition-fast);
}

.contact-card:hover .card-arrow {
    transform: rotate(45deg);
}

/* Responsividade */
@media (max-width: 850px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .contact-container {
        padding: 0 20px;
    }

    .contact-title {
        font-size: 32px;
    }
}

/* --- Rodapé (Footer) --- */
.footer-section {
    background-color: var(--bg-color, #0a0d14);
    position: relative;
    padding: 80px 0 30px 0;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Efeito de Luz / Gradiente de Fundo */
.footer-section::before {
    content: '';
    position: absolute;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(circle, rgba(30, 144, 255, 0.18) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
    filter: blur(50px);
}

.footer-container {
    max-width: 1050px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 1;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-cta {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    max-width: 520px;
    color: var(--text-primary, #ffffff);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 25px;
}

.footer-nav {
    display: flex;
    gap: 25px;
}

.footer-nav a {
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--accent-blue, #1e90ff);
}

.footer-socials {
    display: flex;
    gap: 14px;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue, #1e90ff);
    font-size: 20px;
    background-color: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-socials a:hover {
    border-color: var(--accent-blue, #1e90ff);
    background-color: rgba(30, 144, 255, 0.15);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

/* Responsividade */
@media (max-width: 768px) {
    .footer-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 35px;
    }

    .footer-right {
        align-items: flex-start;
    }

    .footer-cta {
        font-size: 22px;
    }
}

/* --- Páginas de Case Study (Branding) --- */
.case-study-hero {
    padding: 140px 0 60px 0;
}

.case-study-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 30px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-blue);
    font-weight: 500;
    margin-bottom: 25px;
    transition: transform var(--transition-fast);
}

.back-link:hover {
    transform: translateX(-5px);
}

.case-title {
    font-size: 44px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 15px 0 25px 0;
}

.case-intro {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
}

.case-intro strong {
    color: var(--text-primary);
}

.case-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.meta-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--accent-blue);
    margin-bottom: 5px;
}

.meta-value,
.meta-link {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
}

.meta-link {
    color: var(--accent-blue);
    text-decoration: underline;
}

/* Galeria de Branding */
.case-gallery-section {
    padding: 60px 0 100px 0;
}

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

.gallery-title {
    font-size: 32px;
    color: var(--text-primary);
    margin-bottom: 40px;
    text-align: center;
}

.brand-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.gallery-item {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    background: rgba(0, 0, 0, 0.3);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

.case-cta-box {
    margin-top: 80px;
    padding: 50px;
    text-align: center;
    background: linear-gradient(145deg, rgba(6, 16, 30, 0.85) 0%, rgba(11, 60, 117, 0.4) 100%);
    border: 1px solid rgba(30, 144, 255, 0.3);
    border-radius: 20px;
}

.case-cta-box h3 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.case-cta-box p {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .brand-gallery-grid {
        grid-template-columns: 1fr;
    }

    .case-title {
        font-size: 32px;
    }
}