.calculator-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.calculator-header {
    text-align: center;
    margin-bottom: 30px;
}

.calculator-header h1 {
    color: #fc6056;
    font-size: 2rem;
    margin-bottom: 10px;
}

.calculator-header h2 {
    color: #333;
    font-size: 1.5rem;
    font-weight: 500;
}

.calculator-subtitle {
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    animation: fadeInUp 0.6s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.12);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.section-title {
    color: #fc6056;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-subtitle {
    color: #666;
    font-size: 1rem;
    margin-bottom: 20px;
}

.calculation-method {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e8e8e8;
    margin: 20px 0;
    width: 100%;
    box-sizing: border-box;
}

.calculation-method-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.calculation-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.calculation-step {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    background: #f8f9fa;
    border-radius: 8px;
    border-right: 3px solid #fc6056;
}

.step-label {
    font-weight: 600;
    color: #fc6056;
    font-size: 0.95rem;
}

.step-formula {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

.calculation-note {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 18px;
    position: relative;
}

.calculation-note::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, #fc6056, transparent);
}

.note-item {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

.note-highlight {
    color: #555;
    font-weight: 500;
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fc6056;
    margin: 30px 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section-title:first-child {
    margin-top: 0;
}

.form-section-title i {
    font-size: 1rem;
}

.form-note {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border-right: 3px solid #fc6056;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 25px;
    animation: slideIn 0.5s ease-out;
    animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.form-label i {
    font-size: 1rem;
    color: #333;
}

.form-group:focus-within .form-label {
    color: #333;
    animation: pulse 0.5s ease;
}

.form-group:focus-within .form-label i {
    color: #fc6056;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Heebo', sans-serif;
    background: linear-gradient(to bottom, #ffffff, #fafafa);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.form-input:hover {
    border-color: #fc6056;
    box-shadow: 0 4px 12px rgba(233, 78, 119, 0.15);
    transform: translateY(-1px);
}

.form-input:focus {
    outline: none;
    border-color: #fc6056;
    background: white;
    box-shadow: 0 0 0 4px rgba(233, 78, 119, 0.1), 0 4px 12px rgba(233, 78, 119, 0.2);
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: #bbb;
    transition: color 0.3s ease;
}

.form-input:focus::placeholder {
    color: #ddd;
}

.form-input[readonly] {
    background: #f5f5f5;
    cursor: not-allowed;
}

.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    font-weight: 500;
    color: #333;
}

.radio-label:hover {
    border-color: #fc6056;
    background: #fff5f7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 78, 119, 0.15);
}

.radio-label input[type="radio"] {
    margin: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #fc6056;
}

.radio-label input[type="radio"]:checked + span {
    color: #fc6056;
    font-weight: 600;
}

.radio-label:has(input[type="radio"]:checked) {
    border-color: #fc6056;
    background: #fff5f7;
    box-shadow: 0 0 0 3px rgba(233, 78, 119, 0.1);
}

.income-section {
    margin-top: 25px;
    padding: 25px;
    background: linear-gradient(135deg, #fff5f7 0%, #ffeef0 100%);
    border-radius: 16px;
    border: 2px solid #ffe0e6;
    box-shadow: 0 4px 15px rgba(233, 78, 119, 0.1);
    animation: fadeInUp 0.6s ease-out;
    transition: all 0.3s ease;
}

.income-section:hover {
    box-shadow: 0 6px 20px rgba(233, 78, 119, 0.15);
    transform: translateY(-2px);
}

.date-picker {
    cursor: pointer;
    background-color: white;
}

.flatpickr-calendar {
    direction: rtl;
    font-family: 'Heebo', sans-serif;
}

.flatpickr-months {
    direction: rtl;
}

.flatpickr-weekdays {
    direction: rtl;
}

.flatpickr-days {
    direction: rtl;
}

.flatpickr-input {
    cursor: pointer;
}

.flatpickr-calendar.arrowTop:before {
    border-bottom-color: #fc6056;
}

.flatpickr-calendar.arrowTop:after {
    border-bottom-color: #fc6056;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #fc6056;
    border-color: #fc6056;
}

.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
    background: #e8554d;
    border-color: #e8554d;
}

.flatpickr-day.today {
    border-color: #fc6056;
}

.flatpickr-day.today:hover {
    background: #fff5f7;
}

.error-message {
    color: #d32f2f;
    font-size: 0.9rem;
    margin-top: 8px;
    display: none;
    padding: 8px 12px;
    background: #ffebee;
    border-radius: 8px;
    border-right: 3px solid #d32f2f;
    animation: slideIn 0.3s ease-out;
}

.error-message.show {
    display: block;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Heebo', sans-serif;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn i {
    font-size: 0.95rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #fc6056 0%, #e8554d 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e8554d 0%, #d44a42 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(233, 78, 119, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #333;
    border: 2px solid #dee2e6;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-secondary:active {
    transform: translateY(-1px);
}

.results-section {
    background: linear-gradient(135deg, rgba(233, 78, 119, 0.08) 0%, rgba(233, 78, 119, 0.15) 100%);
    border: 2px solid rgba(233, 78, 119, 0.3);
    animation: fadeInUp 0.8s ease-out;
}

.results-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 25px;
}

.results-group {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    animation: slideIn 0.5s ease-out;
    animation-fill-mode: both;
}

.results-group:nth-child(1) { animation-delay: 0.1s; }
.results-group:nth-child(2) { animation-delay: 0.2s; }
.results-group:nth-child(3) { animation-delay: 0.3s; }

.results-group-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.results-group-title i {
    color: #fc6056;
    font-size: 1.1rem;
}

.results-group-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, #fc6056, transparent);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.result-item {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #fc6056;
}

.result-label {
    font-weight: 600;
    color: #333;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.result-icon {
    font-size: 1rem;
    color: #fc6056;
    width: 18px;
    text-align: center;
    opacity: 0.9;
}

.result-value {
    color: #333;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 600;
    margin-top: 4px;
}

.compensation-card {
    background: url('../img/red_bg.png') center center / cover no-repeat;
    color: white;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(233, 78, 119, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.compensation-card .result-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.compensation-card .result-value {
    color: white;
    font-size: 2.5rem;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
    margin-bottom: 8px;
}

.compensation-card .result-note {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    margin-top: 8px;
}

.compensation-breakdown {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.compensation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.compensation-item-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
}

.compensation-item-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
}

.result-note {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.disclaimer {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
}

.disclaimer p {
    color: #856404;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.6;
}

.disclaimer p strong i {
    color: #ff9800;
    margin-left: 5px;
}

@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
    }

    .compensation-card .result-value {
        font-size: 2rem;
    }

    .compensation-item {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .compensation-item-value {
        font-size: 1.2rem;
    }

    .results-group {
        padding: 20px;
    }

    .calculation-method {
        padding: 20px;
    }

    .calculation-step {
        padding: 12px;
    }

    .radio-group {
        flex-direction: column;
    }

    .radio-label {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .calculator-container {
        padding: 15px;
    }

    .section {
        padding: 20px;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* Print Styles - Show header and results only */
@media print {
    /* Hide navigation and social icons in header */
    .header-right,
    .service-buttons-wrapper,
    footer.footer-wrapper {
        display: none !important;
    }

    /* Show header with logo and title */
    .main-header {
        display: block !important;
        border-bottom: 2px solid #000;
        padding: 15px 20px;
        margin-bottom: 20px;
    }

    .header-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .header-left,
    .header-center {
        display: block !important;
    }

    .header-title {
        color: #000 !important;
        font-size: 1.5rem;
    }

    /* Hide instructions section (first calculation-method block) */
    .calculation-method:first-of-type {
        display: none !important;
    }

    /* Show calculation method section (second calculation-method block) */
    .calculation-method:last-of-type {
        display: block !important;
        page-break-inside: avoid;
        margin: 20px 0;
        padding: 15px;
        border: 1px solid #ddd;
        background: #f9f9f9 !important;
    }

    /* Hide input form section */
    .section:not(.results-section) {
        display: none !important;
    }

    /* Show results section */
    .results-section {
        display: block !important;
        page-break-inside: avoid;
        box-shadow: none;
        border: 2px solid #000;
        margin: 0;
        padding: 20px;
    }

    /* Optimize results for printing */
    .results-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .result-item {
        page-break-inside: avoid;
        border: 1px solid #ddd;
    }

    /* Hide buttons */
    .button-group {
        display: none !important;
    }

    /* Ensure proper page breaks */
    .section.results-section {
        margin: 0;
        padding: 20px;
    }

    /* Print-friendly colors */
    .result-value.highlight {
        color: #000 !important;
        font-weight: bold;
    }

    /* Remove animations and transitions for print */
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* LTR adjustments for Russian version */
[dir="ltr"] .calculation-step {
    border-left: 3px solid #fc6056;
    border-right: none;
}

[dir="ltr"] .error-message {
    border-left: 3px solid #d32f2f;
    border-right: none;
}

[dir="ltr"] .result-item {
    border-left: 3px solid #fc6056;
    border-right: none;
}

[dir="ltr"] .flatpickr-calendar {
    direction: ltr;
}

[dir="ltr"] .flatpickr-months {
    direction: ltr;
}

[dir="ltr"] .flatpickr-weekdays {
    direction: ltr;
}

[dir="ltr"] .flatpickr-days {
    direction: ltr;
}

/* Help Section */
.help-section {
    background: url('../img/bg_brown1.png') center center / cover no-repeat;
    padding: 50px 30px;
    margin: 30px 0 30px 0;
    border-radius: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.help-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(252, 96, 86, 0.1);
    border-radius: 50%;
    opacity: 0.3;
}

.help-section::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 150px;
    height: 150px;
    background: rgba(252, 96, 86, 0.05);
    transform: rotate(45deg);
    opacity: 0.2;
}

.help-icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #fc6056 0%, #e8554d 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 20px rgba(252, 96, 86, 0.4);
}

.help-icon-wrapper i {
    font-size: 2rem;
    color: white;
}

.help-title {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    position: relative;
    z-index: 1;
}

.help-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0 0 35px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.help-highlight {
    color: #fc6056;
    font-weight: 600;
}

.help-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.help-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.help-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(252, 96, 86, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.help-btn:hover::before {
    width: 400px;
    height: 400px;
}

.help-btn span {
    position: relative;
    z-index: 1;
}

.help-btn i {
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
    transition: transform 0.4s ease;
}

.help-btn-consultation {
    background: white;
    color: #333;
    border: 2px solid #e8e8e8;
    animation: pulse-glow 2s ease-in-out infinite;
}

.help-btn-consultation:hover {
    background: #fc6056;
    color: white;
    border-color: #fc6056;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 30px rgba(252, 96, 86, 0.4);
}

.help-btn-consultation:hover i {
    transform: rotate(15deg) scale(1.1);
    color: white;
}

.help-btn-consultation:active {
    transform: translateY(-2px) scale(0.98);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(252, 96, 86, 0.4);
    }
    50% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 20px 5px rgba(252, 96, 86, 0.2);
    }
}

@media (max-width: 768px) {
    .help-section {
        padding: 40px 20px;
        margin: 40px 0 25px 0;
    }

    .help-title {
        font-size: 1.6rem;
    }

    .help-description {
        font-size: 1rem;
    }

    .help-buttons {
        flex-direction: column;
    }

    .help-btn {
        width: 100%;
        max-width: 100%;
        padding: 16px 30px;
    }
}
