/* ===== RESPONSIVO ===== */

/* Tablet */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1.3rem;
    }
    
    .about-content {
        gap: 40px;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .skills-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Large */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    /* Header */
    header {
        padding: 80px 0;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .tagline {
        font-size: 1.2rem;
        margin-bottom: 25px;
    }
    
    .sub-tagline {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 12px 28px;
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .btn-outline {
        margin-left: 0;
    }
    
    /* Sections */
    section {
        padding: 60px 0;
    }
    
    h2 {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .profile-img-placeholder {
        height: 250px;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .about-text h3 {
        font-size: 1.6rem;
    }
    
    .about-features {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .feature {
        padding: 12px;
    }
    
    /* Skills */
    .skills-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .skill-card {
        padding: 25px;
    }
    
    /* Portfolio */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .portfolio-content {
        padding: 15px;
    }
    
    .project-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .project-link {
        padding: 10px 16px;
        font-size: 0.95rem;
    }
    
    /* Contact */
    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-info {
        text-align: center;
    }
    
    .contact-item {
        justify-content: center;
        gap: 12px;
    }
    
    .social-icons {
        justify-content: center;
        gap: 12px;
    }
    
    .social-link {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    /* Formulário */
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 14px 12px;
        font-size: 16px; /* Evita zoom automático no iOS */
    }
    
    .form-group label {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    button[type="submit"] {
        padding: 14px;
        font-size: 1rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 25px;
    }
    
    .footer-social {
        justify-content: center;
        gap: 12px;
    }
    
    .footer-social a {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
    
    .footer-links a {
        font-size: 1rem;
        padding: 8px 0;
    }
    
    /* ===== MENU MOBILE CORRIGIDO - TOUCH FRIENDLY ===== */
    .mobile-menu-btn {
        display: flex !important;
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--text);
        z-index: 1001;
        padding: 12px;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        right: 16px;
        left: auto;
        width: auto;
        min-width: 240px;
        max-width: 300px;
        height: auto;
        background: var(--card-bg);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 8px 0;
        transition: all 0.3s ease;
        z-index: 1000;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
        border-radius: 16px;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(0, 0, 0, 0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
    }
    
    .dark-mode .nav-links {
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav-links li {
        margin: 0;
        width: 100%;
        opacity: 0;
        transform: translateX(-10px);
        transition: all 0.2s ease;
    }
    
    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
    }
    
    /* Animação em sequência mais rápida */
    .nav-links.active li:nth-child(1) { transition-delay: 0.05s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.15s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.25s; }
    
    .nav-links a {
        font-size: 1.1rem;
        padding: 14px 20px;
        display: flex;
        align-items: center;
        gap: 14px;
        text-align: left;
        border-radius: 0;
        transition: all 0.2s ease;
        background: transparent;
        color: var(--text);
        text-decoration: none;
        font-weight: 500;
        margin: 0;
        border: none;
        width: 100%;
        min-height: 52px; /* Altura mínima para toque */
    }
    
    .nav-links a i {
        width: 24px;
        font-size: 1.2rem;
        text-align: center;
    }
    
    .nav-links a span {
        font-size: 1rem;
    }
    
    .nav-links a:hover {
        background: var(--primary);
        color: white;
        padding-left: 24px;
    }
    
    .nav-links a:hover i {
        color: white;
    }
    
    /* Remove os pseudo-elementos que estavam causando problemas */
    .nav-links li a::before {
        display: none;
    }
    
    /* Overlay mais sutil */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(2px);
        z-index: 999;
        display: none;
    }
    
    .menu-overlay.active {
        display: block;
    }
    
    body.menu-open {
        overflow: hidden;
    }
    
    /* Ajuste no container da nav */
    .nav-container {
        padding: 12px 15px;
    }
    
    .nav-controls {
        gap: 12px;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    /* Header */
    header {
        padding: 60px 0;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .sub-tagline {
        font-size: 0.9rem;
    }
    
    .hero-actions .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
        padding: 12px 20px;
    }
    
    /* Sections */
    section {
        padding: 50px 0;
    }
    
    h2 {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }
    
    /* About */
    .profile-img-placeholder {
        height: 200px;
        font-size: 1rem;
    }
    
    .about-text h3 {
        font-size: 1.4rem;
    }
    
    .about-text p {
        font-size: 1rem;
    }
    
    .feature {
        padding: 10px;
        gap: 10px;
    }
    
    /* Skills */
    .skill-card {
        padding: 20px;
    }
    
    .skill-icon {
        font-size: 2.5rem;
    }
    
    /* Portfolio */
    .portfolio-img {
        height: 180px;
        font-size: 1.3rem;
    }
    
    .tech-tags {
        justify-content: center;
        gap: 8px;
    }
    
    .tech-tag {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    /* Contact */
    .contact-form {
        gap: 15px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 12px 12px;
        font-size: 16px;
    }
    
    /* Technologies */
    .tech-list {
        gap: 8px;
    }
    
    .tech-item {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    /* Menu mobile pequeno - touch friendly */
    .mobile-menu-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
        font-size: 1.3rem;
    }
    
    .nav-links {
        top: 70px;
        right: 12px;
        min-width: 200px;
        max-width: 260px;
        border-radius: 14px;
    }
    
    .nav-links a {
        font-size: 1rem;
        padding: 12px 16px;
        gap: 12px;
        min-height: 48px;
    }
    
    .nav-links a i {
        width: 22px;
        font-size: 1.1rem;
    }
    
    .nav-links a span {
        font-size: 0.95rem;
    }
    
    .nav-links a:hover {
        padding-left: 20px;
    }
}

/* Mobile Extra Small */
@media (max-width: 380px) {
    h1 {
        font-size: 1.6rem;
    }
    
    .tagline {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .nav-links {
        min-width: 180px;
        right: 10px;
        top: 65px;
    }
    
    .nav-links a {
        font-size: 0.95rem;
        padding: 10px 14px;
        gap: 10px;
        min-height: 44px;
    }
    
    .nav-links a i {
        width: 20px;
        font-size: 1rem;
    }
    
    .nav-links a span {
        font-size: 0.9rem;
    }
    
    .mobile-menu-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        font-size: 1.2rem;
    }
}

/* ===== DARK MODE PARA MENU MOBILE ===== */
@media (max-width: 768px) {
    .dark-mode .nav-links {
        background: var(--card-bg);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .dark-mode .nav-links a {
        background: transparent;
        color: var(--text);
    }
    
    .dark-mode .nav-links a:hover {
        background: var(--primary);
        color: white;
    }
    
    .dark-mode .menu-overlay {
        background: rgba(0, 0, 0, 0.5);
    }
}

/* ===== ORIENTAÇÃO LANDSCAPE ===== */
@media (max-width: 768px) and (orientation: landscape) {
    .nav-links {
        top: 65px;
        max-height: calc(100vh - 85px);
        overflow-y: auto;
    }
    
    .nav-links li {
        margin: 0;
    }
    
    .nav-links a {
        padding: 10px 16px;
        font-size: 0.95rem;
        min-height: 44px;
    }
    
    header {
        padding: 60px 0;
    }
    
    .profile-img-placeholder {
        height: 180px;
    }
}

/* ===== REDUÇÃO DE MOVIMENTO ===== */
@media (prefers-reduced-motion: reduce) {
    .nav-links,
    .nav-links li,
    .mobile-menu-btn,
    .nav-links a,
    .menu-overlay {
        transition: none;
        animation: none;
    }
    
    .nav-links.active li {
        transition: none;
    }
}