:root {
    --dog-primary: #6B21A8;
    --dog-bg: #F3E8FF;
    --dog-border: #E9D5FF;
    --dog-hover: #FAE8FF;
    --dog-green: #10B981;
    --dog-blue: #3B82F6;
    --dog-yellow: #F59E0B;
    --dog-red: #EF4444;
    --text-main: #1F2937;
}

.dog-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(--dog-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(4, 1fr);
    gap: 12px;
}

.radio-card {
    cursor: pointer;
    position: relative;
}

.radio-card input {
    display: none;
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 8px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    background: #fff;
    transition: all 0.2s;
}

.radio-card input:checked + .card-content {
    border-color: var(--dog-primary);
    background: var(--dog-bg);
    box-shadow: 0 4px 12px rgba(107, 33, 168, 0.15);
    transform: translateY(-2px);
}

.card-content .icon {
    font-size: 24px;
}

.card-content .title {
    font-weight: 600;
    font-size: 13px;
    text-align: center;
}

.card-content .sub {
    font-size: 11px;
    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: repeat(2, 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(--dog-primary);
    box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.1);
    background: #fff;
}

.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(--dog-bg);
    border: 1px solid var(--dog-border);
    border-radius: 16px;
    padding: 32px;
}

.result-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px dashed var(--dog-border);
}

.result-header h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: var(--dog-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: LIFE JOURNEY TIMELINE === */
.life-journey {
    margin: 32px 0;
    padding: 24px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--dog-border);
}

.journey-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.journey-icon {
    font-size: 48px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.journey-info {
    display: flex;
    flex-direction: column;
}

.journey-label {
    font-size: 13px;
    color: #6B7280;
}

#journey-stage {
    font-size: 20px;
    font-weight: 700;
    color: var(--dog-primary);
}

/* Timeline Segments - DESKTOP */
.timeline-segments {
    display: flex;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}

.segment {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    transition: all 0.5s ease;
    position: relative;
}

.segment.puppy {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.segment.young {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
}

.segment.adult {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.segment.senior {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
}

.segment-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 4px;
}

/* Progress Bar */
.journey-progress {
    position: relative;
    height: 12px;
    background: #E5E7EB;
    border-radius: 6px;
    margin-bottom: 20px;
    overflow: visible;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--dog-green) 0%, var(--dog-yellow) 50%, var(--dog-red) 100%);
    border-radius: 6px;
    width: 0%;
    transition: width 1s ease-out;
}

.progress-marker {
    position: absolute;
    top: -8px;
    width: 4px;
    height: 28px;
    background: var(--dog-primary);
    border-radius: 2px;
    transition: left 1s ease-out;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.progress-marker::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -6px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid var(--dog-primary);
}

.journey-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.journey-stat {
    text-align: center;
    padding: 12px;
    background: var(--dog-bg);
    border-radius: 8px;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #6B7280;
    margin-bottom: 4px;
}

.journey-stat strong {
    font-size: 18px;
    color: var(--dog-primary);
    font-weight: 700;
}

/* Recommendations Box */
.recommendations-box {
    margin-top: 24px;
    padding: 20px;
    background: #F9FAFB;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
}

.rec-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #E5E7EB;
}

.rec-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.rec-item:first-child {
    padding-top: 0;
}

.rec-item i {
    font-size: 20px;
    color: var(--dog-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.rec-item div {
    display: flex;
    flex-direction: column;
}

.rec-item strong {
    font-size: 14px;
    color: #1F2937;
    margin-bottom: 4px;
}

.rec-item span {
    font-size: 13px;
    color: #6B7280;
    line-height: 1.4;
}

/* Senior Warning */
.senior-warning {
    margin-top: 20px;
    padding: 16px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #DC2626;
    font-size: 14px;
}

.senior-warning i {
    font-size: 20px;
}

/* Meta Stats */
.meta-stats {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--dog-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(--dog-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;
}

/* Meta Bar */
.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(--dog-bg);
    border-radius: 10px;
    flex-shrink: 0;
}

.meta-icon i {
    font-size: 24px;
    color: var(--dog-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(--dog-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(--dog-bg);
    border: 1px solid var(--dog-border);
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 700;
    color: var(--dog-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;
}

.yellow-icon svg {
    color: #F59E0B;
}

.green-icon svg {
    color: var(--dog-green);
}

.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(--dog-primary);
    box-shadow: 0 4px 20px rgba(107, 33, 168, 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(--dog-primary);
    background: var(--dog-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(--dog-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;
    }
    
    /* Life Journey на мобильном - ВЕРТИКАЛЬНЫЙ СТЕК */
    .life-journey {
        padding: 16px;
    }
    
    .journey-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .journey-icon {
        font-size: 40px;
    }
    
    /* ИСПРАВЛЕНО: Вертикальные сегменты на мобильном */
    .timeline-segments {
        flex-direction: column;
        height: auto;
        gap: 6px;
    }
    
    .segment {
        min-height: 44px;
        justify-content: flex-start;
        padding-left: 14px;
        width: 100%;
        border-radius: 8px;
        font-size: 13px;
    }
    
    .segment-label {
        font-size: 13px;
        font-weight: 700;
    }
    
    .journey-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .recommendations-box {
        padding: 16px;
    }
    
    .rec-item {
        flex-direction: column;
        gap: 8px;
    }
    
    .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;
    }
    
    /* 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;
    }
    
    .helper-text {
        font-size: 11px;
    }
    
    /* Product cards на мобильном */
    .card-content {
        padding: 16px 12px;
    }
    
    .card-content .icon {
        font-size: 20px;
    }
    
    .card-content .title {
        font-size: 12px;
    }
    
    /* FAQ на мобильном */
    .faq-section .faq-item {
        margin-bottom: 10px;
    }
    
    summary.faq-question {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .faq-answer {
        padding: 16px;
        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;
    }
    
    .journey-icon {
        font-size: 36px;
    }
    
    .segment {
        min-height: 40px;
        font-size: 12px;
        padding-left: 12px;
    }
    
    .segment-label {
        font-size: 12px;
    }
    
    .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;
    }
    
    .stat-row {
        font-size: 14px;
    }
    
    .senior-warning {
        font-size: 13px;
        padding: 12px;
        flex-direction: column;
        text-align: center;
    }
    
    .senior-warning i {
        font-size: 18px;
    }
    
    .journey-stats {
        gap: 10px;
    }
    
    .journey-stat strong {
        font-size: 16px;
    }
}