/* Reset & Base Styles */
:root {
    --primary: #FF6600;
    --primary-dark: #E55A00;
    --primary-light: rgba(255, 102, 0, 0.1);
    --secondary: #000000;
    --secondary-light: #1A1A1A;
    --text: #333333;
    --text-light: #666666;
    --text-lighter: #999999;
    --background: #FFFFFF;
    --background-alt: #F8F9FA;
    --border: #E5E7EB;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    background-color: var(--background);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 600;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.text-accent {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

/* Botão WhatsApp específico */
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #25D366;
    color: white;
    border-radius: var(--radius);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 12px;
    border: none;
    cursor: pointer;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo .logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary);
}

.logo-accent {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-list {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text);
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

/* Hero Section */
.hero {
    padding-top: 160px;
    padding-bottom: 120px;
    background-color: var(--background);
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-badge {
    margin-bottom: 24px;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    background-color: var(--background-alt);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.hero-highlight {
    color: var(--primary);
    position: relative;
}

.hero-highlight::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: rgba(255, 102, 0, 0.2);
    z-index: -1;
}

.typewriter-container {
    display: inline-block;
    position: relative;
    margin-top: 12px;
    min-height: 60px;
}

.typewriter-text {
    color: var(--primary);
    font-weight: 600;
    font-size: 56px;
    line-height: 1.1;
}

.cursor {
    color: var(--primary);
    animation: blink 1s infinite;
    font-size: 56px;
    font-weight: 600;
    line-height: 1.1;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-description {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 500px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Hero Visual */
.hero-visual {
    position: relative;
}

.code-window {
    background-color: var(--secondary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background-color: var(--secondary-light);
    border-bottom: 1px solid #333;
}

.window-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background-color: #FF5F56;
}

.dot.yellow {
    background-color: #FFBD2E;
}

.dot.green {
    background-color: #27C93F;
}

.window-title {
    font-size: 12px;
    color: var(--text-lighter);
    font-family: var(--font-mono);
}

.window-content {
    padding: 32px;
    overflow: hidden;
}

.code-snippet {
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.8;
    color: #E5E7EB;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.code-line {
    display: block;
    margin-bottom: 8px;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.code-prompt {
    color: var(--primary);
}

.floating-element {
    position: absolute;
    width: 60px;
    height: 60px;
    background-color: white;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary);
    box-shadow: var(--shadow);
    animation: float 6s ease-in-out infinite;
}

.floating-element.element-1 {
    top: -30px;
    right: 80px;
    animation-delay: 0s;
}

.floating-element.element-2 {
    bottom: 40px;
    right: -20px;
    animation-delay: 2s;
}

.floating-element.element-3 {
    bottom: -20px;
    left: 100px;
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Section Common */
.section-header {
    margin-bottom: 60px;
}

.section-subtitle {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.section-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Sobre Section */
.sobre-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.sobre-text {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.6;
}

.skills {
    margin-top: 40px;
}

.skill-category {
    margin-bottom: 32px;
}

.skill-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--secondary);
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tag {
    padding: 8px 16px;
    background-color: var(--background-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.experience-timeline {
    position: relative;
    padding-left: 32px;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -39px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary);
    border: 4px solid white;
    box-shadow: 0 0 0 2px var(--primary);
}

.timeline-year {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.timeline-content h4 {
    font-size: 18px;
    margin-bottom: 4px;
    color: var(--secondary);
}

.timeline-content p {
    font-size: 14px;
    color: var(--text-light);
}

/* Serviços Section */
.servicos {
    background-color: var(--background-alt);
}

.servicos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.servico-card {
    background-color: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.servico-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.servico-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 102, 0, 0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 24px;
}

.servico-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--secondary);
}

.servico-description {
    color: var(--text-light);
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.6;
}

.servico-features {
    list-style: none;
}

.servico-features li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text);
}

.servico-features li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* Portfólio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.portfolio-card {
    background-color: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.portfolio-image {
    height: 200px;
    background-color: var(--secondary);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.portfolio-image i {
    font-size: 64px;
    color: rgba(255, 255, 255, 0.2);
}

.image-overlay {
    position: absolute;
    top: 16px;
    left: 16px;
}

.portfolio-category {
    padding: 4px 12px;
    background-color: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.portfolio-content {
    padding: 32px;
}

.portfolio-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--secondary);
}

.portfolio-description {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.6;
}

.portfolio-tech {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.portfolio-tech span {
    padding: 4px 12px;
    background-color: var(--background-alt);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
}

/* Contato Section */
.contato-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.contato-description {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 40px;
    line-height: 1.6;
}

.contact-details {
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background-color: var(--background-alt);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
}

.contact-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--secondary);
}

.contact-content p {
    color: var(--text-light);
    font-size: 14px;
}

/* Contato Info específico */
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #999;
    font-size: 14px;
    margin: 0;
}

.footer-contact i {
    color: var(--primary);
    width: 20px;
}

.social-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: var(--background-alt);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-4px);
}

/* Form Styles */
/* Form Styles - CORREÇÃO DO DROPDOWN */
.form-group {
    position: relative;
    margin-bottom: 24px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 16px;
    background-color: var(--background-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--text);
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

/* CORREÇÃO CRÍTICA: Remove o background branco no foco do select */
.form-group select:focus {
    background-color: var(--background-alt) !important;
    /* Mantém o fundo cinza claro */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23FF6600' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
}

/* Ajusta a cor da seta quando em foco */
.form-group select:focus {
    border-color: var(--primary);
    outline: none;
}

/* Mantém a seta visível */
.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Estiliza as opções do dropdown */
.form-group select option {
    background-color: white;
    color: var(--text);
    padding: 12px;
    font-size: 14px;
}

/* Hover nas opções */
.form-group select option:hover,
.form-group select option:focus {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* Para navegadores Webkit (Chrome, Safari) */
.form-group select::-webkit-listbox,
.form-group select::-webkit-scrollbar {
    background-color: white;
}

.form-group select option:checked {
    background-color: var(--primary);
    color: white;
}

/* Para Firefox */
@-moz-document url-prefix() {
    .form-group select {
        background-color: var(--background-alt);
    }

    .form-group select option {
        background-color: white;
    }

    .form-group select:focus option:checked {
        background-color: var(--primary);
        color: white;
    }
}

/* Para Internet Explorer/Edge */
@media all and (-ms-high-contrast: none),
(-ms-high-contrast: active) {
    .form-group select {
        background-color: var(--background-alt);
        padding-right: 16px;
    }

    .form-group select:focus {
        background-color: var(--background-alt);
    }
}

/* Corrige o problema no modo escuro também */
@media (prefers-color-scheme: dark) {
    .form-group select {
        background-color: var(--background-alt);
        color: var(--text);
    }

    .form-group select:focus {
        background-color: var(--background-alt) !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23FF6600' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
    }

    .form-group select option {
        background-color: #1A1A1A;
        color: var(--text);
    }

    .form-group select option:checked {
        background-color: var(--primary);
        color: white;
    }
}

/* Para o label quando o select tem valor */
.form-group select:valid+label {
    opacity: 1;
}

/* Remover a regra problemática que está causando o fundo branco */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    /* REMOVER: background-color: white; */
}

/* Correção para o placeholder */
.form-group select option[value=""] {
    color: var(--text-lighter);
}

/* Para dispositivos móveis */
@media (max-width: 768px) {
    .form-group select {
        font-size: 16px;
        /* Previne zoom no iOS */
        background-size: 14px;
        padding-right: 36px;
    }
}

/* Estilo quando há erro */
.form-group select.error {
    border-color: var(--error) !important;
}

.form-group select.error:focus {
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

/* Footer */
.footer {
    background-color: var(--secondary-light);
    color: white;
    padding: 80px 0 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-logo .logo-text {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.footer-tagline {
    color: #999;
    font-size: 14px;
    line-height: 1.6;
}

.footer-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

.footer-list {
    list-style: none;
}

.footer-list li {
    margin-bottom: 12px;
}

.footer-list a {
    color: #999;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-list a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid #333;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.footer-bottom i {
    color: var(--primary);
    margin: 0 4px;
}

/* =========================================== */
/* RESPONSIVE DESIGN - CORREÇÕES PARA MOBILE */
/* =========================================== */

/* Telas grandes (desktop) - mantém o layout original */
@media (max-width: 1024px) {

    .hero-container,
    .sobre-grid,
    .contato-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .hero-title {
        font-size: 48px;
    }

    .typewriter-text,
    .cursor {
        font-size: 48px;
    }

    .section-title {
        font-size: 40px;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-stats {
        justify-content: flex-start;
    }
}

/* Tablets e telas médias */
@media (max-width: 768px) {
    .section {
        padding: 80px 0;
    }

    .container {
        padding: 0 20px;
    }

    /* Header Mobile - Correção */
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: white;
        flex-direction: column;
        padding: 100px 30px 30px;
        box-shadow: var(--shadow-lg);
        transition: left 0.3s ease;
        z-index: 999;
        align-items: flex-start;
        gap: 30px;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        margin: 0;
        padding: 0;
        width: 100%;
    }

    .nav-link {
        font-size: 16px;
        padding: 10px 0;
        display: block;
        width: 100%;
    }

    .nav-actions {
        margin-top: 20px;
        width: 100%;
    }

    .nav-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        z-index: 1000;
        position: relative;
    }

    .nav-toggle i {
        font-size: 20px;
        transition: transform 0.3s ease;
    }

    /* Overlay para mobile menu */
    .nav-menu.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 998;
        display: none;
    }

    .nav-menu.active {
        position: fixed;
    }

    /* Hero Mobile - Correção CRÍTICA */
    .hero {
        padding-top: 120px;
        padding-bottom: 60px;
        overflow: hidden;
    }

    .hero-title {
        font-size: 36px;
        line-height: 1.2;
        margin-bottom: 16px;
    }

    .typewriter-container {
        display: block;
        margin-top: 8px;
        min-height: 50px;
    }

    .typewriter-text,
    .cursor {
        font-size: 36px;
        line-height: 1.2;
        display: inline;
    }

    .hero-description {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 30px;
        max-width: 100%;
    }

    .hero-actions {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 40px;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        font-size: 16px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .stat {
        min-width: auto;
    }

    .stat-number {
        font-size: 28px;
    }

    /* Hero Visual Mobile - Correção */
    .hero-visual {
        order: -1;
        margin-bottom: 40px;
    }

    .code-window {
        margin-top: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .window-content {
        padding: 20px;
        max-width: 100%;
        overflow-x: auto;
    }

    .code-snippet {
        font-size: 12px;
        min-width: min-content;
    }

    .code-line {
        white-space: pre-wrap;
        word-break: break-word;
    }

    .floating-element {
        display: none;
        /* Remove elementos flutuantes no mobile */
    }

    /* Sobre Mobile */
    .sobre-grid {
        gap: 40px;
    }

    .section-title {
        font-size: 32px;
        line-height: 1.2;
    }

    .sobre-text {
        font-size: 16px;
    }

    .skill-list {
        gap: 8px;
    }

    .skill-tag {
        padding: 6px 12px;
        font-size: 13px;
    }

    .experience-timeline {
        padding-left: 24px;
    }

    .timeline-item::before {
        left: -32px;
        width: 14px;
        height: 14px;
    }

    /* Serviços Mobile */
    .servicos-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .servico-card {
        padding: 30px;
    }

    .servico-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    /* Portfólio Mobile */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .portfolio-image {
        height: 180px;
    }

    .portfolio-image i {
        font-size: 48px;
    }

    .portfolio-content {
        padding: 24px;
    }

    /* Contato Mobile */
    .contato-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    /* Footer Mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-contact {
        align-items: center;
    }

    .footer-list {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .social-links {
        justify-content: center;
    }

    /* Form Mobile */
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 14px;
        font-size: 16px;
    }

    /* Prevenir overflow horizontal */
    * {
        max-width: 100%;
    }

    img,
    video,
    iframe {
        max-width: 100%;
        height: auto;
    }
}

/* Telas muito pequenas (mobile pequeno) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 30px;
    }

    .typewriter-text,
    .cursor {
        font-size: 30px;
    }

    .section-title {
        font-size: 28px;
    }

    .hero-description {
        font-size: 15px;
    }

    .sobre-text {
        font-size: 15px;
    }

    .servico-card {
        padding: 24px;
    }

    .portfolio-image {
        height: 160px;
    }

    .window-header {
        padding: 12px 16px;
    }

    .window-content {
        padding: 16px;
    }

    .code-snippet {
        font-size: 11px;
    }

    .container {
        padding: 0 16px;
    }
}

/* Tablets em modo retrato */
@media (min-width: 481px) and (max-width: 768px) {
    .hero-title {
        font-size: 40px;
    }

    .typewriter-text,
    .cursor {
        font-size: 40px;
    }

    .section-title {
        font-size: 36px;
    }

    .hero-container,
    .sobre-grid,
    .contato-grid {
        gap: 50px;
    }

    .servicos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-menu {
        width: 60%;
    }
}

/* Correções específicas para problemas comuns em mobile */
@media (max-width: 768px) {

    /* Forçar quebra de texto longos */
    .hero-title,
    .section-title,
    h1,
    h2,
    h3,
    h4,
    .typewriter-text {
        overflow-wrap: break-word;
        word-wrap: break-word;
        hyphens: auto;
    }

    /* Remover animações complexas no mobile para performance */
    .floating-element,
    .servico-card:hover,
    .portfolio-card:hover {
        animation: none;
        transform: none;
    }

    /* Melhorar área de toque para mobile */
    .btn,
    .nav-link,
    .social-link,
    .filter-btn,
    .nav-toggle,
    .portfolio-category {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-link {
        min-height: auto;
        min-width: auto;
        padding: 12px 0;
    }

    /* Ajustar espaçamento */
    .hero-actions .btn,
    .nav-list li,
    .social-links a {
        margin-bottom: 8px;
    }

    /* Prevenir zoom em inputs no iOS */
    @media screen and (max-width: 768px) {

        input,
        select,
        textarea {
            font-size: 16px !important;
        }
    }

    /* Suporte a safe areas do iPhone X+ */
    @supports (padding: max(0px)) {

        .header,
        .footer {
            padding-left: max(20px, env(safe-area-inset-left));
            padding-right: max(20px, env(safe-area-inset-right));
        }

        .hero {
            padding-top: max(120px, calc(80px + env(safe-area-inset-top)));
        }
    }
}

/* Modo escuro do sistema */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #0A0A0A;
        --background-alt: #1A1A1A;
        --text: #FFFFFF;
        --text-light: #CCCCCC;
        --text-lighter: #999999;
        --border: #333333;
        --secondary: #FFFFFF;
        --secondary-light: #2A2A2A;
    }

    .header {
        background-color: rgba(10, 10, 10, 0.95);
        border-bottom-color: #333;
    }

    .servico-card,
    .portfolio-card,
    .form-group input,
    .form-group textarea,
    .form-group select {
        background-color: var(--background-alt);
        border-color: var(--border);
    }

    .code-window {
        background-color: #1E1E1E;
    }

    .window-header {
        background-color: #2D2D2D;
    }

    .skill-tag,
    .badge {
        background-color: var(--background);
        border-color: var(--border);
        color: var(--text-light);
    }

    .btn-secondary {
        background-color: transparent;
        border-color: var(--border);
        color: var(--text);
    }

    .form-group label {
        background-color: var(--background);
    }
}

/* Classes auxiliares para JavaScript */
.loaded .section {
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: var(--shadow);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Error states */
.form-group input.error,
.form-group textarea.error,
.form-group select.error {
    border-color: var(--error) !important;
}

.form-group input.error:focus,
.form-group textarea.error:focus,
.form-group select.error:focus {
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

.error-message {
    color: var(--error);
    font-size: 12px;
    margin-top: 4px;
}

/* Loading animation */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Touch feedback */
.touch-active {
    transform: scale(0.98) !important;
    opacity: 0.9 !important;
}

/* Garantir que nada ultrapasse a largura da tela */
* {
    max-width: 100vw;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Floating animation específica para os elementos flutuantes */
@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(5deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

/* WhatsApp button no footer */
.footer-contact .btn-whatsapp {
    margin-top: 20px;
    background-color: #25D366;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-contact .btn-whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
}

/* Ajustes para o botão secundário no hero */
.btn-secondary {
    border: 2px solid var(--border);
    background: transparent;
}

.btn-secondary:hover {
    background-color: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

/* Ajuste para o select no formulário */
select {
    cursor: pointer;
}

/* Garantir que as animações funcionem bem */
.section.section-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Melhorar a responsividade dos stats */
@media (max-width: 768px) {
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat {
        text-align: center;
    }
}