/* Features Section - Redesign baseado na referência */
.features {
    padding: 0;
    background: transparent;
}

/* Reduce gap between How it Works and Features */
#como-funciona {
    padding-bottom: 4rem !important;
}

.features .section-header {
    padding: 5rem 0 4rem 0 !important;
    background: #FFFFFF !important;
    width: 100%;
}

.features .section-header h2 {
    color: #1E293B !important;
    font-weight: 700;
}

.features .section-header .subtitle {
    color: #64748B !important;
}

.feature-row {
    width: 100%;
    padding: 4rem 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-row .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 4rem;
}

/* First feature - Dark background */
.feature-row:nth-child(2) {
    background-color: #000000;
}

.feature-row:nth-child(2) h3,
.feature-row:nth-child(2) .feature-label {
    color: #FFFFFF;
}

.feature-row:nth-child(2) p {
    color: #A0A0A0;
}

/* Second feature - Light background */
.feature-row:nth-child(3) {
    background-color: #F5F5F5;
}

.feature-row:nth-child(3) h3,
.feature-row:nth-child(3) .feature-label {
    color: #000000;
}

.feature-row:nth-child(3) p {
    color: #666666;
}

/* Third feature - Dark background */
.feature-row:nth-child(4) {
    background-color: #000000;
}

.feature-row:nth-child(4) h3,
.feature-row:nth-child(4) .feature-label {
    color: #FFFFFF;
}

.feature-row:nth-child(4) p {
    color: #A0A0A0;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-text .feature-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0;
}

.feature-text h3 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0;
}

.feature-text p {
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 0;
}

.feature-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-placeholder {
    width: 100%;
    max-width: 600px;
    height: 450px;
    background: #FFFFFF;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 2rem;
}

/* Dark background features get white card */
.feature-row:nth-child(2) .visual-placeholder,
.feature-row:nth-child(4) .visual-placeholder {
    background: #FFFFFF;
}

/* Light background features get subtle card */
.feature-row:nth-child(3) .visual-placeholder {
    background: #FFFFFF;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

/* Mobile Responsiveness for Features */
@media (max-width: 1024px) {
    .feature-row .container {
        gap: 4rem;
        padding: 0 3rem;
    }

    .feature-text h3 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .feature-row {
        padding: 3rem 0;
    }

    .feature-row .container,
    .feature-row.reverse .container {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto;
        gap: 2.5rem;
        padding: 0 1.5rem;
        text-align: center;
        max-width: 100%;
    }

    /* Imagem SEMPRE em cima no mobile, independente de ser reverse ou não */
    .feature-visual {
        order: 1 !important;
    }

    /* Texto SEMPRE embaixo no mobile */
    .feature-text {
        order: 2 !important;
        align-items: center;
        text-align: center;
    }

    .feature-text h3 {
        font-size: 1.75rem;
    }

    .visual-placeholder {
        max-width: 100%;
        height: 300px;
    }

    .feature-img {
        max-width: 100% !important;
        width: 100%;
        height: auto;
    }
}

/* Logo Navbar - Size Fix */
.logo {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
}

.logo-img {
    height: 32px !important;
    width: auto !important;
    max-height: 32px !important;
    object-fit: contain !important;
}

/* Gradiente no WhatsApp da Headline */
.highlight {
    background: linear-gradient(135deg, #0066FF 0%, #00C2FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: inherit;
}

/* Pricing Fixes */
.pricing-grid {
    display: flex !important;
    justify-content: center !important;
    gap: 2rem !important;
    flex-wrap: wrap !important;
}

.pricing-card {
    width: 100% !important;
    max-width: 350px !important;
    padding: 2rem !important;
    margin: 0 auto !important;
}

.toggle-btn.active {
    background: var(--primary-color) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

/* Centralizar emojis nos cards */
.icon-box {
    text-align: center;
}

/* Feature Images */
.feature-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.15));
    transition: transform 0.4s ease;
    border-radius: 24px;
    display: block;
}

/* Reset de direção para evitar bugs de alinhamento e sobreposição */
.feature-row,
.feature-row.reverse {
    direction: ltr !important;
}

/* Base do container das funcionalidades */
.feature-row .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Dividir igualmente para evitar sobreposição */
    gap: 5rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Seção Inversa (Imagem à esquerda no Desktop) */
.feature-row.reverse .feature-text {
    order: 2;
}

.feature-row.reverse .feature-visual {
    order: 1;
}

.feature-img:hover {
    transform: translateY(-15px);
}

/* Ajuste específico para a imagem de plano alimentar que é naturalmente menor */
img[src*="meal-plan.png"] {
    width: 110%;
    /* Aumenta um pouco sem quebrar o layout */
    margin-left: -5%;
    /* Centraliza o aumento */
}

.feature-visual {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-text {
    text-align: left;
}