/* Общие стили для страницы тарифов */
body {
    background-color: #fafafa;
    font-family: 'SF Pro Display Regular', sans-serif;
    color: #1a1a1a;
    margin: 0;
    padding: 0;
    position: relative;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Фоновая сетка */
.pricing-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    pointer-events: none;
}

.grid-pattern {
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, #e5e5e5 1px, transparent 1px),
        linear-gradient(to bottom, #e5e5e5 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.4;
    mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 70%, transparent 110%);
    -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 70%, transparent 110%);
}

/* Шапка */
.header {
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 20px;
    margin-bottom: 40px;
    background: rgba(250, 250, 250, 0.8);
    backdrop-filter: blur(10px);
}

.logo_and_header_menu {
    width: 100%;
}

/* Секция тарифов */
.pricing-section {
    padding: 40px 0 80px;
    position: relative;
}

.pricing-header {
    text-align: center;
    margin-bottom: 50px;
}

.pricing-header .plans_font {
    font-size: 42px;
    margin-bottom: 16px;
    color: #1a1a1a;
    font-weight: 600;
    letter-spacing: -1px;
    line-height: 1.1;
}

.pricing-subtitle {
    font-size: 18px;
    color: #6B6B6B;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 400;
}

/* Сетка тарифов */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin: 0 auto;
    max-width: 1200px;
}

/* Карточки тарифов */
.pricing-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 24px;
    position: relative;
    border: 1px solid #f0f0f0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    min-height: 480px;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: #e0e0e0;
}

/* Популярная карточка - стиль как в референсе */
.pricing-card.popular {
    border: 2px solid #1a1a1a;
    z-index: 2;
}

.pricing-card.popular:hover {
    transform: translateY(-4px);
}

.title-with-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.popular-badge {
    background: #1a1a1a;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.popular-background {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 80% at 50% -20%, rgba(26, 26, 26, 0.03), rgba(255, 255, 255, 0));
    pointer-events: none;
}

/* Enterprise карточка с геометрическим паттерном */
.pricing-card.enterprise {
    background: #1a1a1a;
    color: white;
    border: 2px solid #1a1a1a;
}

.pricing-card.enterprise .plan-title {
    color: white;
}

.pricing-card.enterprise .plan-description {
    color: #b0b0b0;
}

.pricing-card.enterprise .price-amount {
    color: white;
}

.pricing-card.enterprise .price-period {
    color: #b0b0b0;
}

.pricing-card.enterprise .feature-item span {
    color: #e0e0e0;
}

.pricing-card.enterprise .feature-check {
    color: #ffffff;
}

.enterprise-background {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, #4f4f4f2e 1px, transparent 1px),
        linear-gradient(to bottom, #4f4f4f2e 1px, transparent 1px);
    background-size: 35px 35px;
    opacity: 0.3;
    mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 70%, transparent 110%);
    -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 70%, transparent 110%);
    pointer-events: none;
}

/* Заголовок карточки */
.card-header {
    margin-bottom: 24px;
    margin-top: 20px;
}

.plan-title {
    font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 24px;
    margin-bottom: 0;
    letter-spacing: -0.3px;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.plan-description {
    font-size: 14px;
    color: #6B6B6B;
    line-height: 1.4;
    margin: 0;
    font-weight: 400;
}

/* Секция цены */
.price-section {
    margin-bottom: 28px;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 6px;
}

.price-amount {
    font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 36px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -1px;
}

.price-currency {
    font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #6B6B6B;
}

.plan-price.custom .price-amount {
    font-size: 28px;
    font-weight: 700;
}

.price-period {
    font-size: 14px;
    color: #6B6B6B;
    margin: 0;
    font-weight: 500;
}

/* Секция функций */
.features-section {
    flex: 1;
    margin-bottom: 28px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.4;
}

.feature-item:last-child {
    margin-bottom: 0;
}

.feature-check {
    color: #1a1a1a;
    flex-shrink: 0;
    margin-top: 1px;
    width: 16px;
    height: 16px;
}

.feature-item span {
    color: #1a1a1a;
    font-weight: 500;
}

/* Кнопки */
.plan-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    color: #ffffff;
    background: #1a1a1a;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-sizing: border-box;
    border: 2px solid #1a1a1a;
    margin-top: auto;
}

.plan-button:hover {
    background: transparent;
    color: #1a1a1a;
    transform: translateY(-1px);
}

.enterprise-button {
    background: #ffffff;
    color: #1a1a1a;
    border: 2px solid #ffffff;
}

.enterprise-button:hover {
    background: transparent;
    color: #ffffff;
    border-color: #ffffff;
}

.button-arrow {
    transition: transform 0.3s ease;
    width: 14px;
    height: 14px;
}

.plan-button:hover .button-arrow {
    transform: translateX(3px);
}

/* Подвал */
.section_8_footer {
    border-top: 1px solid #e5e5e5;
    padding-top: 30px;
    margin-top: 60px;
    background: rgba(250, 250, 250, 0.8);
    backdrop-filter: blur(10px);
}

/* Адаптивность */
@media (max-width: 1200px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        max-width: 800px;
    }
}

@media (max-width: 959px) {
    .container {
        padding: 0 20px;
    }
    
    .pricing-header .plans_font {
        font-size: 36px;
    }
    
    .pricing-subtitle {
        font-size: 16px;
    }
    
    .pricing-card {
        padding: 24px 20px;
        min-height: 420px;
    }
    
    .plan-title {
        font-size: 20px;
    }
    
    .price-amount {
        font-size: 32px;
    }
}

@media (max-width: 767px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: 400px;
    }
    
    .pricing-section {
        padding: 30px 0 60px;
    }
    
    .pricing-header {
        margin-bottom: 40px;
    }
    
    .pricing-header .plans_font {
        font-size: 28px;
        padding: 0 16px;
    }
    
    .pricing-subtitle {
        padding: 0 16px;
        font-size: 15px;
    }
    
    .pricing-card {
        padding: 24px 18px;
        min-height: auto;
    }
    
    .plan-title {
        font-size: 18px;
    }
    
    .price-amount {
        font-size: 28px;
    }
    
    .plan-button {
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .feature-item {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .grid-pattern {
        background-size: 30px 30px;
    }
}

@media (max-width: 480px) {
    .pricing-card {
        padding: 20px 16px;
    }
    
    .pricing-header .plans_font {
        font-size: 24px;
    }
    
    .price-amount {
        font-size: 24px;
    }
    
    .plan-price.custom .price-amount {
        font-size: 20px;
    }
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pricing-card {
    animation: fadeInUp 0.6s ease-out;
}

.pricing-card:nth-child(1) { animation-delay: 0.1s; }
.pricing-card:nth-child(2) { animation-delay: 0.2s; }
.pricing-card:nth-child(3) { animation-delay: 0.3s; }
.pricing-card:nth-child(4) { animation-delay: 0.4s; }

/* Улучшения для доступности */
@media (prefers-reduced-motion: reduce) {
    .pricing-card,
    .plan-button,
    .button-arrow {
        animation: none;
        transition: none;
    }
    
    .pricing-card:hover {
        transform: none;
    }
}

/* Тоггл для переключения периода оплаты */
.billing-toggle {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.toggle-container {
    position: relative;
    background-color: #f0f0f0;
    border-radius: 12px;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #e0e0e0;
}

.toggle-option {
    position: relative;
    background: transparent;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #6B6B6B;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.toggle-option.active {
    color: #1a1a1a;
}

.toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    background-color: #ffffff;
    border-radius: 8px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.discount-badge {
    background-color: #1a1a1a;
    color: #ffffff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    margin-left: 4px;
}

/* Анимации для цен */
.price-amount, .price-period, .yearly-total {
    transition: all 0.3s ease;
}

.yearly-total {
    font-size: 12px;
    color: #6B6B6B;
    margin: 4px 0 0 0;
    font-weight: 500;
}
