/* Garante scroll adequado no body e html */
html, body {
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.planos-page {
    padding: 20px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: calc(100vh - 120px); /* Altura menos o header */
    margin-top: 185px; /* Espaço para o header customizado */
    overflow-y: auto; /* Garante scroll vertical */
    overflow-x: hidden; /* Evita scroll horizontal desnecessário */
    width: 100vw;
}

.plans-container {
    width: 90% !important;
}

.plan-card {
    height: 100%;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.plan-card.popular {
    border: 3px solid #ff9800;
    transform: scale(1.05);
}

.plan-card.premium {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.plan-card.current-plan {
    border: 3px solid #4caf50;
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff9800;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 1;
}

/* Plan Description */
.plan-description {
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.plan-description p {
    margin: 0;
    font-style: italic;
    color: #546e7a;
    font-size: 0.9rem;
    line-height: 1.4;
}

.plan-card.premium .plan-description {
    background: rgba(255,255,255,0.1);
    border-left-color: rgba(255,255,255,0.8);
}

.plan-card.premium .plan-description p {
    color: rgba(255,255,255,0.9);
}

/* Billing Toggle - Materialize Style */
.billing-toggle {
    margin: 15px 0;
    background: rgba(255,255,255,0.9);
    border-radius: 15px;
    padding: 10px;
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
}

.billing-toggle p {
    margin: 5px 0;
}

.billing-toggle label {
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.billing-toggle label span {
    padding-left: 25px;
    padding-right: 10px;
}

/* Premium card billing toggle */
.plan-card.premium .billing-toggle {
    background: rgba(255,255,255,0.2);
}

.plan-card.premium .billing-toggle input[type="radio"]:checked + span {
    background: rgba(255,255,255,0.9);
    color: #764ba2;
    border-radius: 7px;
}

/* Yearly savings indicator */
.yearly-savings {
    margin-top: 8px;
    padding: 4px 8px;
    background: rgba(216, 231, 217, 0.767);
    border-radius: 15px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.yearly-savings small {
    font-weight: 600;
}

.plan-header {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.plan-card.premium .plan-header {
    border-bottom-color: rgba(255,255,255,0.3);
}

.plan-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.plan-price {
    font-size: 1.2rem;
}

.plan-price .price {
    font-size: 2.5rem;
    font-weight: bold;
}

.plan-price .period {
    color: #666;
}

.plan-card.premium .plan-price .period {
    color: rgba(255,255,255,0.8);
}

.plan-features h6 {
    font-weight: bold;
    margin: 20px 0 10px 0;
    color: #424242;
}

.plan-card.premium .plan-features h6 {
    color: white;
}

.features-list, .limitations-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.features-list li, .limitations-list li {
    padding: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.limitations-list {
    margin-top: 15px;
}

.navigation-actions {
    margin-top: 40px;
}

/* Modal customizations */
.modal {
    max-width: 500px;
}

.modal .modal-content h4 {
    color: #424242;
    margin-bottom: 20px;
}

.modal .card-panel {
    margin: 20px 0;
}

.modal .card-panel ul {
    margin: 10px 0;
}

.modal .card-panel li {
    margin: 5px 0;
    color: #424242;
}

/* Responsive design */
@media only screen and (max-width: 992px) {
    .plan-card.popular {
        transform: none;
        margin-bottom: 20px;
    }
    
    .plans-container .col {
        margin-bottom: 20px;
    }
    
    .planos-page {
        margin-top: 100px; /* Ajustado para header customizado no tablet */
    }
}

@media only screen and (max-width: 600px) {
    .planos-page {
        padding: 10px 0;
        margin-top: 80px; /* Ajustado para header customizado no mobile */
    }
    
    .plan-title {
        font-size: 1.5rem;
    }
    
    .plan-price .price {
        font-size: 2rem;
    }
    
    .plan-card.popular {
        transform: none;
    }
    
    .popular-badge {
        font-size: 0.7rem;
        padding: 6px 15px;
    }
    
    .plan-features h6 {
        font-size: 0.9rem;
    }
    
    .features-list li, .limitations-list li {
        font-size: 0.9rem;
        padding: 3px 0;
    }
    
    .navigation-actions {
        margin-top: 30px;
    }
}

/* Animation enhancements */
.plan-card {
    animation: fadeInUp 0.6s ease-out;
}

.plan-card:nth-child(1) {
    animation-delay: 0.1s;
}

.plan-card:nth-child(2) {
    animation-delay: 0.2s;
}

.plan-card:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced hover effects */
.plan-card .btn {
    transition: all 0.3s ease;
}

.plan-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Current plan indicator enhancement */
.plan-card.current-plan::before {
    content: "✓ Plano Atual";
    position: absolute;
    top: -10px;
    right: -10px;
    background: #4caf50;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 2;
}

/* Loading states */
.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
