:root {
    --burgundy-accent: #8B1538;
    --burgundy-muted: #9f4257;
    --navy-primary: #2c3e50;
    --navy-deep: #1a252f;
    --slate-primary: #475569;
    --slate-light: #64748b;
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --success-green: #10b981;
    --error-red: #ef4444;
    --warning-yellow: #f59e0b;
}

body {
    background: var(--bg-primary);
}

.calculator-hero {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.85) 0%, rgba(26, 37, 47, 0.9) 100%),
                url('../img/hero/public-aid-hero.jpg') center/cover;
    padding: 3.5rem 2rem;
    border-radius: 1rem;
    margin: 2rem 0 3rem 0;
    text-align: center;
    color: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


.calculator-hero h1 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.calculator-hero p {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.form-container {
    background: var(--white);
    border-radius: 1rem;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--gray-200);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--navy-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: var(--white);
}

.form-control:disabled {
    background: var(--gray-100);
    color: var(--gray-500);
    cursor: not-allowed;
}

.form-control:focus {
    outline: none;
    border-color: var(--slate-primary);
    box-shadow: 0 0 0 3px rgba(71, 85, 105, 0.1);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

.form-check-label {
    font-size: 0.95rem;
    color: var(--gray-700);
    cursor: pointer;
}

.btn-calculate {
    background: var(--burgundy-accent);
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 1rem;
}

.btn-calculate:hover {
    background: var(--burgundy-muted);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 21, 56, 0.3);
}

.result-container {
    background: var(--white);
    border-radius: 1rem;
    padding: 2.5rem;
    margin-top: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--gray-200);
}

.result-header {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--navy-primary);
}

.result-success {
    background: #f0fdf4;
    border-left: 4px solid var(--success-green);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.result-error {
    background: #fef2f2;
    border-left: 4px solid var(--error-red);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.result-info {
    background: #fffbeb;
    border-left: 4px solid var(--warning-yellow);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-top: 1.5rem;
}

.result-warning {
    background: #fef3c7;
    border: 2px solid var(--warning-yellow);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-top: 1.5rem;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
}

.result-warning h4 {
    color: var(--warning-yellow);
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-warning p {
    color: var(--gray-700);
    margin: 0;
    line-height: 1.6;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 600;
    color: var(--gray-700);
}

.result-value {
    font-weight: 700;
    color: var(--navy-primary);
    font-size: 1.1rem;
}

.result-value-large {
    font-size: 1.5rem;
    color: var(--burgundy-accent);
}

.error-message {
    background: #fef2f2;
    border-left: 4px solid var(--error-red);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: var(--error-red);
    margin-bottom: 1.5rem;
}

/* Result success/error heading styles */
.result-success h3 {
    color: var(--success-green);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.result-success p {
    color: var(--gray-700);
    margin: 0;
}

.result-error h3 {
    color: var(--error-red);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.result-error p {
    color: var(--gray-700);
    margin: 0;
}

.result-info p {
    margin: 0;
    color: var(--gray-700);
}

@media (max-width: 768px) {
    .calculator-hero {
        padding: 2.5rem 1.5rem;
    }

    .form-container {
        padding: 1.5rem;
    }

    .result-container {
        padding: 1.5rem;
    }

    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Dodatkowe style dla kalkulatora pomocy publicznej */

.alert-info {
    background-color: #e3f2fd;
    border: 1px solid #90caf9;
    color: #1565c0;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 1rem;
}

.alert-info strong {
    font-weight: 600;
}

/* Badge dla dużego projektu */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

.badge-info {
    background-color: #2196f3;
    color: white;
}

/* Szczegóły obliczeń */
.calculation-details {
    background-color: #f5f5f5;
    border-left: 4px solid #2196f3;
    border-radius: 4px;
    margin-top: 1.5rem;
    padding: 1rem;
}

.calculation-details h5 {
    color: #1976d2;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.calculation-details ul {
    margin: 1rem 0;
    padding-left: 0;
}

.calculation-details li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.calculation-details li:before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: #2196f3;
    font-weight: bold;
}

.calculation-details p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.calculation-details strong {
    color: #1565c0;
    font-weight: 600;
}

/* Dodatkowy spacing dla wartości w EUR */
.result-value small {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.875rem;
    color: #666;
    font-weight: normal;
}

/* Poprawka dla małego tekstu pod polem wartości */
.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
}

.text-muted {
    color: #6c757d;
}

/* Ulepszona sekcja wyników dla dużych projektów */
.result-container.duzy-projekt {
    border-color: #2196f3;
    box-shadow: 0 0 0 1px #2196f3;
}

.result-container.duzy-projekt .result-header {
    background: linear-gradient(135deg, #2196f3, #1976d2);
}

/* Animacja pojawiania się szczegółów obliczeń */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculation-details {
    animation: slideDown 0.3s ease-out;
}

/* Responsywność dla urządzeń mobilnych */
@media (max-width: 768px) {
    .calculation-details {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .calculation-details h5 {
        font-size: 1rem;
    }
    
    .badge {
        font-size: 12px;
        padding: 3px 8px;
    }
}

/* Tooltip dla pomocy */
.tooltip-help {
    display: inline-block;
    margin-left: 5px;
    width: 16px;
    height: 16px;
    background-color: #2196f3;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 12px;
    cursor: help;
    position: relative;
}

.tooltip-help:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 12px;
    z-index: 1000;
    margin-bottom: 5px;
}

.tooltip-help:hover::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    margin-bottom: -5px;
}

/* Wyróżnienie sekcji z wzorem */
.formula-highlight {
    background-color: #fff3e0;
    border: 1px solid #ff9800;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
}

/* Style dla przycisku eksportu wyników (opcjonalne na przyszłość) */
.btn-export {
    background-color: #4caf50;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 1rem;
    transition: background-color 0.3s;
}

.btn-export:hover {
    background-color: #45a049;
}

/* Dodatkowe ulepszenia dla czytelności */
.result-item.large-value {
    background-color: #e8f5e9;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

.result-value-large {
    font-size: 1.5rem !important;
    color: #2e7d32;
    font-weight: 700;
}

/* Separatory dla lepszej organizacji */
.section-separator {
    border-top: 2px solid #e0e0e0;
    margin: 20px 0;
}

