/* ===================================
   RFC ENGENHARIA - MOBILE STYLES
   =================================== */

/* Tablet (max-width: 968px) */
@media (max-width: 968px) {

    /* Hero */
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content .subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        gap: var(--spacing-md);
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    /* Sobre */
    .sobre-grid {
        grid-template-columns: 1fr;
    }

    .features-list {
        grid-template-columns: 1fr;
    }

    .years-card {
        margin-top: var(--spacing-lg);
    }

    .years-highlights {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .years-divider {
        width: 60px;
        height: 1px;
    }

    /* Serviços - Individual Sections */
    .servico-section {
        grid-template-columns: 1fr;
    }

    .servico-section.reverse {
        direction: ltr;
    }

    .servico-image img {
        height: 280px;
    }

    /* Setores */
    .setores-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Diferenciais */
    .diferenciais-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Processo */
    .processo-step {
        grid-template-columns: 1fr;
    }

    .processo-step.reverse {
        direction: ltr;
    }

    .step-image img {
        height: 280px;
    }

    /* Maquinário */
    .maquinario-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (max-width: 640px) */
@media (max-width: 640px) {

    /* Navigation - Off-canvas Style */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.7);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        backdrop-filter: blur(2px);
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85vw;
        max-width: 320px;
        height: 100vh;
        background: white;
        z-index: 9999;
        display: flex !important;
        /* Force flex to override desktop styles */
        flex-direction: column;
        justify-content: flex-start;
        padding: 0;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
        transition: left 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    /* Utilities for Menu */
    .mobile-only {
        display: flex !important;
    }

    .desktop-only {
        display: none !important;
    }

    .nav-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        min-height: 70px;
    }

    .nav-logo-mobile {
        height: 38px;
        width: auto;
    }

    .menu-close {
        background: none;
        border: none;
        font-size: 1.8rem;
        color: var(--text-primary);
        cursor: pointer;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .nav-links-list {
        display: flex;
        flex-direction: column;
        padding: 10px 0;
        flex: 1;
        overflow-y: auto;
    }

    .nav-link-item {
        display: flex;
        align-items: center;
        padding: 16px 24px;
        color: var(--text-secondary);
        font-weight: 500;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
        transition: background-color 0.2s;
    }

    .nav-link-item:active {
        background-color: rgba(0, 0, 0, 0.03);
    }

    .nav-link-item i {
        margin-right: 16px;
        color: var(--green-primary);
        font-size: 1.2rem;
        width: 24px;
        text-align: center;
    }

    .nav-footer {
        padding: 20px;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        background: white;
    }

    .btn-whatsapp-full {
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #25D366;
        color: white;
        padding: 0.8rem 1rem;
        border-radius: var(--radius-md);
        font-weight: 600;
        width: 100%;
        gap: 0.5rem;
        transition: background-color 0.2s;
        box-shadow: 0 4px 6px rgba(37, 211, 102, 0.2);
    }

    .btn-whatsapp-full:hover {
        background-color: #128C7E;
    }

    /* Typography */
    .section-title {
        font-size: 1.6rem;
    }

    .section-description {
        font-size: 0.95rem;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding-top: 120px;
        padding-bottom: var(--spacing-xl);
    }

    .hero-content {
        justify-content: flex-start;
        gap: var(--spacing-lg);
    }

    .hero-bottom {
        width: 100%;
    }

    .hero-content h1 {
        font-size: 1.6rem;
        line-height: 1.3;
    }

    .hero-content h1 br,
    .hero-content .subtitle br {
        display: none;
    }

    .hero-content .subtitle {
        font-size: 0.9rem;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-md);
    }

    .stat-divider {
        display: none;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta .btn-primary,
    .hero-cta .btn-secondary,
    .hero-cta .btn-white,
    .hero-cta .btn-white-outline {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    /* Sobre */
    .sobre-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .sobre-text {
        font-size: 0.95rem;
    }

    .features-list {
        grid-template-columns: 1fr;
    }

    .years-card {
        padding: var(--spacing-lg);
        max-width: 100%;
    }

    .years-highlights {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .years-divider {
        width: 40px;
        height: 1px;
    }

    /* Serviços */
    .servico-section {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .servico-section.reverse {
        direction: ltr;
    }

    .servico-image img {
        height: 220px;
    }

    .servico-content h3 {
        font-size: 1.4rem;
    }

    .service-list li {
        font-size: 0.9rem;
    }

    /* Setores */
    .setores-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    .setor-card {
        font-size: 0.85rem;
        padding: var(--spacing-sm);
    }

    /* Diferenciais */
    .diferenciais-grid {
        grid-template-columns: 1fr;
    }

    .diferencial-card {
        text-align: center;
    }

    /* Processo */
    .processo-step {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .processo-step.reverse {
        direction: ltr;
    }

    .step-image img {
        height: 220px;
    }

    .step-content h3 {
        font-size: 1.4rem;
    }

    /* Maquinário */
    .maquinario-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-md);
    }

    .maquina-info h3 {
        font-size: 0.95rem;
    }

    .maquina-info p {
        font-size: 0.8rem;
    }

    /* Sustentabilidade */
    .sustentabilidade-card {
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-md);
    }

    .sustentabilidade-img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        border-radius: var(--radius-md);
        margin-bottom: -20px;
        display: block;
    }

    .sustentabilidade-content h2 {
        margin-top: 0;
        padding-top: var(--spacing-sm);
    }

    /* CTA Final */
    .cta-content h2 {
        font-size: 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons a {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    /* Section CTA buttons */
    .section-cta .btn-primary {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    /* Navbar */
    .nav-links {
        display: none;
    }

    .nav-cta {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }
}

/* Small mobile (max-width: 380px) */
@media (max-width: 380px) {

    .hero-content h1 {
        font-size: 1.4rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .maquinario-grid {
        grid-template-columns: 1fr;
    }

    .setores-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.mobile-paragraph-break {
    display: block;
    margin-bottom: 0.8rem;
}