/**
 * Mobile & Responsive Styles
 * Otimizado para tablets e smartphones
 */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .hero-content {
        flex-direction: column;
        gap: 3rem;
    }

    .hero-text,
    .hero-visual-container {
        flex: 1;
        max-width: 100%;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .pricing-cards {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }
}

/* Mobile (320px - 767px) */
@media (max-width: 767px) {
    /* Menu Mobile */
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 2rem 0;
        gap: 1.5rem;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        z-index: 1000;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-menu a {
        font-size: 1.1rem;
        padding: 0.75rem 1.5rem;
        width: 90%;
        text-align: center;
        border-radius: 8px;
        transition: background 0.2s;
    }

    .nav-menu a:hover {
        background: var(--bg);
    }

    .nav-auth {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border);
        width: 90%;
    }

    .nav-guest-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .btn-login,
    .btn-signup {
        width: 100%;
        text-align: center;
        padding: 0.875rem;
    }

    /* Typography */
    .container {
        padding: 0 20px;
    }

    h1 {
        font-size: 2rem;
        line-height: 1.3;
    }

    h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    h3 {
        font-size: 1.125rem;
    }

    p {
        font-size: 0.95rem;
    }

    /* Hero Section */
    .hero {
        padding: 100px 0 60px;
    }

    .hero-content {
        gap: 2rem;
    }

    .hero-text {
        text-align: center;
    }

    .hero-trust {
        flex-direction: column;
        gap: 0.5rem;
    }

    .chat-box {
        max-width: 100%;
    }

    /* Features Grid */
    .features {
        padding: 60px 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature {
        padding: 1.5rem;
    }

    /* Pricing Cards */
    .pricing {
        padding: 60px 0;
    }

    .pricing-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 400px;
        margin: 0 auto;
    }

    .pricing-card {
        transform: none !important;
    }

    /* CTA Section */
    .cta {
        padding: 60px 0;
    }

    .cta h2 {
        font-size: 1.75rem;
    }

    /* FAQ */
    .faq {
        padding: 60px 0;
    }

    .faq-item {
        padding: 1.25rem;
    }

    /* Footer */
    .footer {
        padding: 40px 0 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-section {
        align-items: center;
    }

    /* Buttons */
    .btn-large {
        font-size: 1rem;
        padding: 1rem 2rem;
    }

    /* Dashboard */
    .dashboard-container {
        padding: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1.25rem;
    }

    /* Forms */
    .form-group {
        margin-bottom: 1.25rem;
    }

    input[type='text'],
    input[type='email'],
    input[type='password'],
    input[type='tel'],
    textarea {
        font-size: 16px; /* Previne zoom no iOS */
    }
}

/* Small Mobile (320px - 480px) */
@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.375rem;
    }

    .btn {
        font-size: 0.9rem;
        padding: 0.875rem 1.5rem;
    }

    .hero {
        padding: 80px 0 50px;
    }

    .pricing-card {
        padding: 1.5rem;
    }

    .chat-box {
        padding: 1rem;
    }

    .chat-messages {
        max-height: 200px;
    }
}

/* Landscape Mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        padding: 60px 0 40px;
    }

    .nav-menu {
        top: 60px;
        height: calc(100vh - 60px);
        padding: 1rem 0;
        gap: 1rem;
    }

    .nav-menu a {
        padding: 0.5rem 1rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .cta,
    .btn,
    button {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    h1,
    h2,
    h3 {
        page-break-after: avoid;
    }

    img {
        max-width: 100% !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --text: #000;
        --bg: #fff;
        --border: #000;
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }

    .feature:hover {
        transform: none;
    }

    /* Aumentar área de toque */
    button,
    a,
    input,
    select,
    textarea {
        min-height: 44px;
        min-width: 44px;
    }
}
