:root {
    --primary-color: #00aaff;
    --dark-bg: #121212;
    --secondary-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --text-muted-color: #a0a0a0;
    --card-bg: #2a2a2a;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-color);
    overflow-x: hidden;
}

/* --- Mobile First Styles --- */

.navbar {
    background-color: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(10px);
    transition: background-color 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 400;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1rem;
    background: linear-gradient(rgba(18, 18, 18, 0.8), rgba(18, 18, 18, 1)), url('https://images.unsplash.com/photo-1550439062-609e1531270e?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
}

.hero h1 {
    font-size: 2.5rem; /* Mobile font size */
    font-weight: 700;
}

.hero .typed-text {
    color: var(--primary-color);
    font-weight: 600;
}

.hero p {
    font-size: 1.1rem; /* Mobile font size */
    color: var(--text-muted-color);
}

/* Section Styling */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-weight: 700;
    font-size: 2rem; /* Mobile font size */
    position: relative;
}

.section-title::after {
    content: '';
    width: 70px;
    height: 4px;
    background-color: var(--primary-color);
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* About Section */
#about img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border: 5px solid var(--primary-color);
}

.bg-secondary-bg {
    background-color: var(--secondary-bg);
}

/* Skills Section */
.skill-item {
    margin-bottom: 1.5rem;
}

.skill-name {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.skill-percentage {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.skill-logo {
    font-size: 1.75rem;
    margin-right: 10px;
    line-height: 1;
}

.progress {
    height: 8px;
    background-color: var(--secondary-bg);
    border-radius: 4px;
    overflow: hidden;
    padding: 0;
}

.progress-bar {
    background-color: var(--primary-color);
    width: 0;
    transition: width 1.2s ease-in-out;
}

/* Projects Section */
.project-card {
    background-color: var(--card-bg);
    border: 1px solid #333;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 170, 255, 0.1);
}

.project-card .card-body {
    padding: 1.5rem;
}

.project-card .card-title {
    color: var(--primary-color);
    font-weight: 600;
}

.project-card .btn-primary {
    background-color: var(--primary-color);
    border: none;
    font-weight: 600;
}
.project-card .btn-primary:hover {
    opacity: 0.9;
}

/* Clients Carousel Section */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-220px * 5)); } /* (slide width) * (number of original slides) */
}

.slider {
    margin: auto;
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 2rem 0;
}

.slider::before,
.slider::after {
    background: linear-gradient(to right, var(--dark-bg) 0%, rgba(18,18,18,0) 100%);
    content: "";
    height: 100%;
    position: absolute;
    width: 20%;
    z-index: 2;
    top: 0;
}

.slider::before { left: 0; }
.slider::after { right: 0; transform: rotateZ(180deg); }

.slider .slide-track {
    animation: scroll 30s linear infinite;
    display: flex;
    width: calc(220px * 10); /* (slide width) * (number of slides * 2) */
}

.slider:hover .slide-track {
    animation-play-state: paused;
}

.slider .slide {
    width: 220px; /* Largura do slide */
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 100px;
}

.slider .client-item-container {
    width: 180px; /* Largura fixa do contêiner do item */
    height: 90px; /* Altura fixa do contêiner do item */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background-color: var(--card-bg);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.slider .slide:hover .client-item-container {
     transform: translateZ(10px) scale(1.05);
     box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.slider .client-logo {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Garante que a logo caiba sem distorcer */
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.4s ease-in-out;
}

.slider .slide:hover .client-logo {
    filter: grayscale(0%);
    opacity: 1;
}

.slider .client-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted-color);
    text-align: center;
    transition: color 0.3s ease;
}

.slider .slide:hover .client-name {
    color: var(--primary-color);
}

/* Contact Section */
#contact .social-icon {
    font-size: 1.8rem;
    color: var(--text-muted-color);
    margin: 0 10px;
    transition: color 0.3s ease, transform 0.3s ease;
}

#contact .social-icon:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

/* Footer */
footer {
    background-color: var(--secondary-bg);
    padding: 20px 0;
    text-align: center;
    color: var(--text-muted-color);
}

/* Animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Tablet and Desktop Styles (min-width: 768px) --- */
@media (min-width: 768px) {
    .hero h1 {
        font-size: 3.5rem; /* Desktop font size */
    }

    .hero p {
        font-size: 1.25rem; /* Desktop font size */
    }

    .section {
        padding: 80px 0;
    }

    .section-title {
        font-size: 2.5rem; /* Desktop font size */
        margin-bottom: 60px;
    }

    .project-card .card-body {
        padding: 2rem;
    }

    #contact .social-icon {
        font-size: 2rem;
        margin: 0 15px;
    }
}

/* --- Estilos para Seções de Viewport Completo em Desktop --- */
@media (min-width: 992px) { /* Aplica-se a telas grandes (desktops) */
    .section {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Ajuste para a descrição dos projetos caber na tela */
    #projects .project-card .card-text {
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 4; /* Limita a descrição a 4 linhas */
        -webkit-box-orient: vertical;
    }
}