:root {
    --mat-primary: #BE185D;
    --mat-bg: #FDF2F8;
    --mat-border: #FBCFE8;
    --mat-hover: #FCE7F3;
    --mat-pink: #EC4899;
    --mat-purple: #8B5CF6;
    --mat-green: #10B981;
    --mat-gold: #F59E0B;
    --text-main: #1F2937;
}

.maternity-page {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
}

/* === HEADER & LAYOUT === */
.classic-header {
    margin-bottom: 40px;
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 24px;
}

.classic-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 12px 0;
    color: #111827;
}

.intro-lead {
    font-size: 18px;
    color: #4B5563;
    line-height: 1.6;
    max-width: 800px;
}

.back-link {
    font-size: 14px;
    color: #6B7280;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--mat-primary);
}

.classic-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 56px;
}

@media (min-width: 992px) {
    .classic-layout {
        grid-template-columns: 2fr 1fr;
    }
}

/* === CALCULATOR CARD === */
.calculator-box {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 64px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.calc-form {
    margin-bottom: 48px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.section-label {
    display: block;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 16px;
    color: #0F172A;
}

/* Radio Cards */
.radio-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.radio-card {
    cursor: pointer;
    position: relative;
}

.radio-card input {
    display: none;
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    background: #fff;
    transition: all 0.2s;
}

.radio-card input:checked + .card-content {
    border-color: var(--mat-primary);
    background: var(--mat-bg);
    box-shadow: 0 4px 12px rgba(190, 24, 93, 0.15);
    transform: translateY(-2px);
}

.card-content .icon {
    font-size: 28px;
}

.card-content .title {
    font-weight: 600;
    font-size: 15px;
}

.card-content .sub {
    font-size: 13px;
    color: #6B7280;
}

/* Input Grid */
.input-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 600px) {
    .input-grid {
        grid-template-columns: 1fr;
    }
    .radio-selector {
        grid-template-columns: 1fr;
    }
}

.input-group {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.input-wrapper {
    position: relative;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    padding-right: 50px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-size: 16px;
    transition: border 0.2s;
    box-sizing: border-box;
    background: #F8FAFC;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--mat-primary);
    box-shadow: 0 0 0 3px rgba(190, 24, 93, 0.1);
    background: #fff;
}

select.form-control {
    padding-right: 40px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}

.suffix {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 14px;
    color: #6B7280;
}

.helper-text {
    font-size: 12px;
    color: #6B7280;
    margin-top: 4px;
    display: block;
    line-height: 1.4;
}

/* === RESULT SECTION === */
.calc-result {
    background: var(--mat-bg);
    border: 1px solid var(--mat-border);
    border-radius: 16px;
    padding: 32px;
}

.result-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px dashed var(--mat-border);
}

.result-header h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: var(--mat-primary);
}

.total-amount {
    font-size: 48px;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.2;
}

.total-caption {
    font-size: 14px;
    color: #6B7280;
    margin-top: 8px;
}

/* === KILLER FEATURE: PAYMENT TIMELINE === */
.payment-timeline {
    margin: 32px 0;
}

.timeline-track {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--mat-border);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.timeline-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(190, 24, 93, 0.1);
}

.timeline-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mat-bg);
    border-radius: 12px;
    flex-shrink: 0;
}

.timeline-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timeline-stage {
    font-weight: 600;
    font-size: 15px;
    color: #1F2937;
}

.timeline-period {
    font-size: 13px;
    color: #6B7280;
}

.timeline-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--mat-primary);
}

.timeline-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--mat-pink), var(--mat-purple));
    border-radius: 0 0 0 12px;
    width: 0%;
    transition: width 0.8s ease-out;
}

/* Timeline Total Progress Bar */
.timeline-total-bar {
    margin-top: 24px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--mat-border);
}

.total-bar-fill {
    height: 8px;
    background: linear-gradient(90deg, var(--mat-pink) 0%, var(--mat-purple) 50%, var(--mat-gold) 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 1s ease-out;
    margin-bottom: 8px;
}

.total-bar-label {
    font-size: 13px;
    color: #6B7280;
    display: block;
    text-align: right;
}

/* Meta Stats */
.meta-stats {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--mat-border);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
}

.stat-row:last-child {
    margin-bottom: 0;
}

.stat-row strong {
    color: var(--mat-primary);
    font-weight: 700;
}

/* === CONTENT STYLES === */
.content-article {
    margin-top: 64px;
    line-height: 1.8;
    color: #334155;
}

.content-article h2 {
    font-size: 28px;
    font-weight: 800;
    color: #0F172A;
    margin-top: 0;
    margin-bottom: 24px;
}

.section-h3 {
    font-size: 24px;
    font-weight: 700;
    color: #0F172A;
    margin-top: 64px;
    margin-bottom: 32px;
}

.article-lead {
    font-size: 18px;
    margin-bottom: 32px;
    color: #475569;
}

/* === ОБНОВЛЁННЫЙ БЛОК МЕТА-КАРТОЧЕК === */
.content-meta-bar {
    display: flex;
    gap: 24px;
    margin-bottom: 48px;
    padding: 24px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 180px;
    min-width: 160px;
    padding: 12px 16px;
    background: #F9FAFB;
    border-radius: 12px;
    border: 1px solid #F3F4F6;
}

.meta-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mat-bg);
    border-radius: 10px;
    flex-shrink: 0;
}

.meta-icon i {
    font-size: 24px;
    color: var(--mat-primary);
}

.meta-item div {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    min-width: 0;
}

.meta-item .label {
    font-size: 12px;
    text-transform: uppercase;
    color: #6B7280;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.meta-item .val {
    font-size: 16px;
    font-weight: 700;
    color: #0F172A;
    white-space: nowrap;
}

/* === Formulas Section === */
.formulas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 48px;
}

.formula-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border-radius: 24px;
    padding: 24px;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.formula-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.formula-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.formula-card h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.badge-blue {
    background: #2563EB;
    color: #fff;
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-green {
    background: var(--mat-green);
    color: #fff;
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.formula-card p {
    font-size: 14px;
    color: #6B7280;
    margin: 0;
    line-height: 1.5;
}

.math-expression {
    background: var(--mat-bg);
    border: 1px solid var(--mat-border);
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 700;
    color: var(--mat-primary);
    text-align: center;
    margin-bottom: 16px;
    font-size: 15px;
}

/* Divider */
.soft-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #E5E7EB, transparent);
    margin: 48px 0;
}

/* Description */
.calc-description p {
    font-size: 16px;
    line-height: 1.7;
    color: #6B7280;
    margin-bottom: 24px;
}

.calc-description strong {
    color: var(--text-main);
}

/* Icon Headings */
.icon-heading {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
}

.header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
    margin-top: -4px;
}

.header-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2px;
}

.pink-icon svg {
    color: var(--mat-pink);
}

.green-icon svg {
    color: var(--mat-green);
}

.yellow-icon svg {
    color: #F59E0B;
}

.small-heading {
    margin-top: 40px;
    margin-bottom: 16px;
    font-size: 20px;
}

.small-heading .header-icon {
    width: 40px;
    height: 40px;
}

.small-heading .header-icon svg {
    width: 20px;
    height: 20px;
}

/* FAQ */
.faq-section .faq-item {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-section .faq-item[open] {
    border-color: var(--mat-primary);
    box-shadow: 0 4px 20px rgba(190, 24, 93, 0.15);
}

summary.faq-question {
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-main);
    list-style: none;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

summary.faq-question:hover {
    background-color: #F9FAFB;
}

.faq-section .faq-item[open] summary.faq-question {
    color: var(--mat-primary);
    background: var(--mat-bg);
}

.faq-question::after {
    content: '+';
    font-size: 20px;
    color: #6B7280;
    font-weight: 400;
    line-height: 1;
}

.faq-question .icon-plus {
    display: none;
}

.faq-section .faq-item[open] summary.faq-question::after {
    content: '−';
    color: var(--mat-primary);
}

.faq-answer {
    padding: 20px;
    color: #6B7280;
    line-height: 1.6;
    font-size: 15px;
}

/* === МОБИЛЬНАЯ АДАПТАЦИЯ (ОПТИМИЗИРОВАНО) === */
@media (max-width: 768px) {
    .calculator-box {
        padding: 24px;
    }
    
    .calc-result {
        padding: 24px;
    }
    
    .total-amount {
        font-size: 36px;
    }
    
    .formulas-grid {
        grid-template-columns: 1fr;
    }
    
    /* Мета-карточки на мобильном */
    .content-meta-bar {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    
    .meta-item {
        width: 100%;
        flex: 1 1 100%;
        padding: 14px 16px;
    }
    
    .meta-icon {
        width: 40px;
        height: 40px;
    }
    
    .meta-icon i {
        font-size: 20px;
    }
    
    .icon-heading {
        font-size: 20px;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .header-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }
    
    .header-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .formula-card {
        padding: 20px;
        text-align: center;
        align-items: center;
    }
    
    .formula-header {
        align-items: center;
        width: 100%;
    }
    
    .math-expression {
        width: 100%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .info-wrapper {
        margin-top: 40px;
        padding-top: 40px;
    }
    
    /* Timeline на мобильном */
    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .timeline-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    
    .timeline-bar {
        border-radius: 0 0 12px 12px;
        height: 4px;
        width: 100% !important;
    }
    
    .timeline-stage {
        font-size: 14px;
    }
    
    .timeline-amount {
        font-size: 16px;
    }
    
    /* Classic header на мобильном */
    .classic-header h1 {
        font-size: 24px;
    }
    
    .intro-lead {
        font-size: 16px;
    }
    
    /* Input grid на мобильном */
    .input-grid {
        gap: 16px;
    }
    
    .input-group label {
        font-size: 13px;
    }
    
    .form-control {
        padding: 12px 14px;
        font-size: 16px; /* 16px предотвращает зум на iOS */
    }
    
    .helper-text {
        font-size: 11px;
    }
    
    /* Radio cards на мобильном */
    .card-content {
        padding: 16px 12px;
    }
    
    .card-content .icon {
        font-size: 24px;
    }
    
    .card-content .title {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .calculator-box {
        padding: 16px;
        margin-bottom: 40px;
    }
    
    .calc-result {
        padding: 16px;
    }
    
    .total-amount {
        font-size: 32px;
    }
    
    .result-header h3 {
        font-size: 16px;
    }
    
    .timeline-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
    
    .meta-item {
        padding: 12px 14px;
    }
    
    .meta-icon {
        width: 36px;
        height: 36px;
    }
    
    .meta-icon i {
        font-size: 18px;
    }
    
    .meta-item .label {
        font-size: 11px;
    }
    
    .meta-item .val {
        font-size: 15px;
    }
}