/* ===================================
   MELHORIAS DE PERFORMANCE E DESIGN
   =================================== */

/* PERFORMANCE OPTIMIZATIONS */

/* Otimizar animações para GPU */
.fade-in,
.stat-card,
.btn,
.hero-combo-image-wrapper,
.author-image {
    will-change: auto;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Lazy loading para imagens */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ÍCONES PROFISSIONAIS - Melhorados */

/* Ícones com efeito de profundidade */
.stat-card i,
.badge-item i,
.credential-item i {
    position: relative;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card i::before {
    position: relative;
    z-index: 1;
}

.stat-card:hover i {
    transform: translateY(-4px) scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(255, 107, 53, 0.3));
}

.badge-item i {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
}

.credential-item i {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.25);
}

.credential-item:hover i {
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.35);
}

/* POPUPS/MODAIS MELHORADOS */

/* Modal Overlay Otimizado */
.modal-overlay-optimized {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    overscroll-behavior: contain;
}

.modal-overlay-optimized.show {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.modal-container-optimized {
    background: white;
    border-radius: 24px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.modal-overlay-optimized.show .modal-container-optimized {
    transform: scale(1) translateY(0);
}

/* Animação de slide up para mobile */
@media (max-width: 768px) {
    .modal-container-optimized {
        transform: translateY(100%);
    }
    
    .modal-overlay-optimized.show .modal-container-optimized {
        transform: translateY(0);
    }
}

/* Botão de Fechar Melhorado */
.modal-close-optimized {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.05);
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close-optimized:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    transform: rotate(90deg);
}

/* Header do Modal */
.modal-header-optimized {
    text-align: center;
    padding: 40px 40px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-badge-optimized {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.modal-title-optimized {
    font-size: 2rem;
    color: #0f172a;
    margin: 0;
    font-weight: 800;
}

/* Body do Modal */
.modal-body-optimized {
    padding: 32px 40px 40px;
}

/* Opções do Modal */
.modal-offer-option {
    background: #f8fafc;
    border-radius: 20px;
    padding: 32px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.modal-offer-option.highlight {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
    position: relative;
}

.modal-offer-option.highlight::before {
    content: 'MAIS POPULAR';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #f59e0b;
    color: white;
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.modal-offer-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.option-title {
    font-size: 1.5rem;
    color: #0f172a;
    margin: 0 0 24px 0;
    text-align: center;
    font-weight: 700;
}

/* Items Compactos */
.offer-items-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.item-compact {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 16px 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    min-width: 180px;
}

.item-compact i {
    font-size: 2rem;
    color: #3b82f6;
}

.item-compact div {
    display: flex;
    flex-direction: column;
}

.item-compact strong {
    font-size: 1rem;
    color: #0f172a;
    font-weight: 600;
}

.item-compact span {
    font-size: 0.85rem;
    color: #64748b;
}

.plus-compact {
    font-size: 1.5rem;
    color: #94a3b8;
    font-weight: 700;
}

/* Preço Destacado */
.price-highlight-optimized {
    text-align: center;
    margin: 24px 0;
}

.price-old-modal {
    font-size: 1.25rem;
    color: #94a3b8;
    text-decoration: line-through;
    margin-bottom: 8px;
}

.price-new-modal {
    font-size: 3rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1;
}

.savings-compact {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background: #10b981;
    color: white;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Benefícios Compactos */
.benefits-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.benefit-item-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #334155;
}

.benefit-item-compact i {
    color: #10b981;
    font-size: 1.2rem;
}

/* Botões do Modal */
.btn-modal-optimized {
    width: 100%;
    padding: 18px 32px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    margin-top: 20px;
    min-height: 56px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary-modal {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.btn-primary-modal:hover,
.btn-primary-modal:active {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.4);
}

.btn-primary-modal:active {
    transform: translateY(0);
}

.btn-secondary-modal {
    background: white;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.btn-secondary-modal:hover,
.btn-secondary-modal:active {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
}

.btn-secondary-modal:active {
    transform: translateY(0);
}

/* Indicador de scroll para mobile */
.modal-container-optimized::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, white, transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
    .modal-container-optimized.has-scroll::after {
        opacity: 1;
    }
}

/* Separador */
.modal-separator {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #94a3b8;
    margin: 32px 0;
    position: relative;
}

.modal-separator::before,
.modal-separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e2e8f0;
}

.modal-separator::before {
    left: 0;
}

.modal-separator::after {
    right: 0;
}

/* WHATSAPP POPUP MELHORADO */
.whatsapp-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
}

.whatsapp-popup.show {
    opacity: 1;
    visibility: visible;
}

.whatsapp-popup-content {
    background: white;
    border-radius: 24px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.whatsapp-popup.show .whatsapp-popup-content {
    transform: scale(1) translateY(0);
}

.popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.05);
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.popup-close:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    transform: rotate(90deg);
}

.popup-header {
    text-align: center;
    padding: 48px 40px 32px;
    border-bottom: 1px solid #e2e8f0;
}

.popup-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3);
}

.popup-icon i {
    font-size: 2.5rem;
    color: white;
}

.popup-header h3 {
    font-size: 1.75rem;
    color: #0f172a;
    margin: 0 0 12px 0;
    font-weight: 700;
}

.popup-header p {
    font-size: 1.1rem;
    color: #64748b;
    margin: 0;
}

.popup-options {
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.popup-option {
    background: #f8fafc;
    border-radius: 20px;
    padding: 28px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.popup-option.highlight {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

.popup-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.option-icon {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.option-icon i {
    font-size: 2rem;
    color: #3b82f6;
}

.option-content {
    flex: 1;
}

.option-content h4 {
    font-size: 1.25rem;
    color: #0f172a;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.option-content p {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0 0 16px 0;
}

.option-price {
    margin: 12px 0;
}

.price-value {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
}

.price-detail {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 4px;
}

.btn-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary-option {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-primary-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-secondary-option {
    background: white;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.btn-secondary-option:hover {
    background: #3b82f6;
    color: white;
}

.popup-footer {
    padding: 24px 40px 40px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.btn-whatsapp-continue {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp-continue:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.4);
}

.popup-note {
    margin-top: 16px;
    font-size: 0.9rem;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* RESPONSIVO - MOBILE OTIMIZADO */
@media (max-width: 768px) {
    .modal-overlay-optimized,
    .whatsapp-popup {
        padding: 10px;
        align-items: flex-end;
    }
    
    .modal-container-optimized,
    .whatsapp-popup-content {
        border-radius: 20px 20px 0 0;
        max-height: 92vh;
        width: 100%;
        margin: 0;
    }
    
    /* Header compacto */
    .modal-header-optimized,
    .popup-header {
        padding: 24px 16px 16px;
    }
    
    .modal-badge-optimized {
        font-size: 0.7rem;
        padding: 6px 14px;
        margin-bottom: 10px;
    }
    
    .modal-title-optimized {
        font-size: 1.3rem;
        line-height: 1.3;
    }
    
    .popup-header h3 {
        font-size: 1.4rem;
    }
    
    .popup-header p {
        font-size: 0.95rem;
    }
    
    /* Body compacto */
    .modal-body-optimized,
    .popup-options {
        padding: 16px 12px;
    }
    
    /* Opções mais compactas */
    .modal-offer-option,
    .popup-option {
        padding: 16px;
        border-radius: 16px;
    }
    
    .modal-offer-option.highlight::before {
        font-size: 0.65rem;
        padding: 3px 12px;
        top: -10px;
    }
    
    .option-title {
        font-size: 1.1rem;
        margin-bottom: 16px;
    }
    
    /* Items em coluna */
    .offer-items-compact {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 16px;
    }
    
    .item-compact {
        width: 100%;
        min-width: auto;
        padding: 12px 14px;
        gap: 10px;
    }
    
    .item-compact i {
        font-size: 1.5rem;
    }
    
    .item-compact strong {
        font-size: 0.9rem;
    }
    
    .item-compact span {
        font-size: 0.8rem;
    }
    
    .plus-compact {
        font-size: 1.2rem;
        margin: 4px 0;
    }
    
    /* Preços compactos */
    .price-highlight-optimized {
        margin: 16px 0;
    }
    
    .price-old-modal {
        font-size: 1rem;
        margin-bottom: 6px;
    }
    
    .price-new-modal {
        font-size: 2rem;
    }
    
    .savings-compact {
        font-size: 0.8rem;
        padding: 6px 12px;
        margin-top: 8px;
    }
    
    /* Benefícios em coluna */
    .benefits-compact {
        grid-template-columns: 1fr;
        gap: 8px;
        margin: 16px 0;
    }
    
    .benefit-item-compact {
        font-size: 0.85rem;
        gap: 8px;
    }
    
    .benefit-item-compact i {
        font-size: 1rem;
    }
    
    /* Botões compactos */
    .btn-modal-optimized {
        padding: 14px 24px;
        font-size: 0.95rem;
        gap: 8px;
        margin-top: 12px;
        border-radius: 12px;
    }
    
    .btn-modal-optimized i {
        font-size: 1.1rem;
    }
    
    /* Separador */
    .modal-separator {
        font-size: 1rem;
        margin: 20px 0;
    }
    
    .modal-separator::before,
    .modal-separator::after {
        width: 35%;
    }
    
    /* Popup WhatsApp */
    .popup-option {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 16px;
    }
    
    .popup-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 12px;
    }
    
    .popup-icon i {
        font-size: 2rem;
    }
    
    .option-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 8px;
    }
    
    .option-icon i {
        font-size: 1.6rem;
    }
    
    .option-content h4 {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }
    
    .option-content p {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }
    
    .price-value {
        font-size: 1.6rem;
    }
    
    .price-detail {
        font-size: 0.8rem;
    }
    
    .btn-option {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }
    
    .popup-footer {
        padding: 16px 16px 24px;
    }
    
    .btn-whatsapp-continue {
        padding: 14px 24px;
        font-size: 0.95rem;
        gap: 8px;
        width: 100%;
        justify-content: center;
    }
    
    .popup-note {
        font-size: 0.8rem;
        margin-top: 12px;
        padding: 0 8px;
    }
    
    /* Botão fechar */
    .modal-close-optimized,
    .popup-close {
        width: 36px;
        height: 36px;
        top: 12px;
        right: 12px;
        font-size: 20px;
    }
    
    /* Scroll suave no modal */
    .modal-container-optimized,
    .whatsapp-popup-content {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Mobile pequeno (até 480px) */
@media (max-width: 480px) {
    .modal-title-optimized {
        font-size: 1.15rem;
    }
    
    .option-title {
        font-size: 1rem;
    }
    
    .price-new-modal {
        font-size: 1.75rem;
    }
    
    .item-compact {
        padding: 10px 12px;
    }
    
    .btn-modal-optimized {
        font-size: 0.9rem;
        padding: 12px 20px;
    }
    
    .modal-body-optimized,
    .popup-options {
        padding: 12px 10px;
    }
    
    .modal-offer-option,
    .popup-option {
        padding: 14px;
    }
}

/* REDUÇÃO DE GRADIENTES - Versão mais sóbria */
.btn-primary {
    background: #FF6B35;
}

.btn-primary:hover {
    background: #F7931E;
}

.btn-whatsapp {
    background: #25D366;
}

.btn-whatsapp:hover {
    background: #128C7E;
}

/* Remover emoji do discount badge via CSS */
.discount-badge::before {
    content: '' !important;
}

/* Performance de scroll em mobile */
.modal-container-optimized.is-scrolling,
.whatsapp-popup-content.is-scrolling {
    pointer-events: none;
}

.modal-container-optimized.is-scrolling *,
.whatsapp-popup-content.is-scrolling * {
    pointer-events: auto;
}

/* Melhorar área de toque em mobile */
@media (max-width: 768px) {
    .btn-modal-optimized,
    .btn-option,
    .btn-whatsapp-continue {
        min-height: 48px;
        font-size: 1rem;
    }
    
    .modal-close-optimized,
    .popup-close {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Smooth scroll */
.modal-container-optimized,
.whatsapp-popup-content {
    scroll-behavior: smooth;
}

/* Esconder scrollbar mas manter funcionalidade */
.modal-container-optimized::-webkit-scrollbar,
.whatsapp-popup-content::-webkit-scrollbar {
    width: 6px;
}

.modal-container-optimized::-webkit-scrollbar-track,
.whatsapp-popup-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-container-optimized::-webkit-scrollbar-thumb,
.whatsapp-popup-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.modal-container-optimized::-webkit-scrollbar-thumb:hover,
.whatsapp-popup-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}
