/* CYFROWA PORADNIA - ZOPTYMALIZOWANE STYLE CSS */

/* === ZMIENNE GLOBALNE === */
:root {
    color-scheme: light dark;
    
    /* Medical colors */
    --primary: #00b4a6;
    --primary-dark: #009688;
    --primary-light: #4dd0e1;
    --accent: #26c6da;
    --secondary: #0077be;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00b4a6 0%, #26c6da 50%, #0077be 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fdff 100%);
    
    /* Modern neutral palette */
    --bg-main: #fafcff;
    --bg-card: #ffffff;
    --bg-input: #f1f8ff;
    --bg-header: rgba(255, 255, 255, 0.85);
    
    --text-primary: #1a365d;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    
    /* Modern shadows and effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-focus: 0 0 0 3px rgba(0, 180, 166, 0.3);

    /* Semantic colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Borders */
    --border-color: rgba(0, 180, 166, 0.2);
    
    /* Inne */
    --radius: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark {
    --bg-main: #0a0e1a;
    --bg-card: #1a2332;
    --bg-input: #233044;
    --bg-header: rgba(26, 35, 50, 0.85);
    
    --text-primary: #f7fafc;
    --text-secondary: #cbd5e0;
    --text-muted: #a0aec0;
    
    --border-color: rgba(0, 180, 166, 0.3);
    --shadow-focus: 0 0 0 3px rgba(0, 180, 166, 0.4);
    --gradient-card: linear-gradient(145deg, #1a2332 0%, #1e293b 100%);
}

/* === RESET I PODSTAWOWE STYLE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-secondary);
    background-color: var(--bg-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3 { color: var(--text-primary); font-family: 'Poppins', sans-serif; font-weight: 700; line-height: 1.2; }

/* === KLASY POMOCNICZE === */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* === DEKORACJE TŁA === */
.bg-decoration {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
    background-image: radial-gradient(circle at 10% 10%, hsl(175 80% 90% / 0.5), transparent 30%),
                      radial-gradient(circle at 90% 80%, hsl(190 80% 90% / 0.5), transparent 30%);
}
.dark .bg-decoration {
    background-image: radial-gradient(circle at 10% 10%, hsl(175 100% 15% / 0.5), transparent 30%),
                      radial-gradient(circle at 90% 80%, hsl(190 100% 15% / 0.5), transparent 30%);
}

/* === NAGŁÓWEK === */
.header {
    position: sticky; top: 0; width: 100%; z-index: 50;
    background-color: var(--bg-header);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
    background-color: var(--bg-card);
}

.nav-container {
    max-width: 1280px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 1.5rem; height: 4rem;
}
.logo { display: flex; align-items: center; gap: 0.75rem; font-size: 1.25rem; font-weight: 800; color: var(--text-primary); text-decoration: none; }
.logo-icon {
    width: 48px; 
    height: 48px; 
    border-radius: var(--radius); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    animation: medical-heartbeat 2s ease-in-out infinite;
    background: none;
}

@keyframes medical-heartbeat {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(0, 180, 166, 0.4));
    }
    15% { 
        transform: scale(1.1);
        filter: drop-shadow(0 0 8px rgba(0, 180, 166, 0.6));
    }
    30% { 
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(0, 180, 166, 0.4));
    }
    45% { 
        transform: scale(1.1);
        filter: drop-shadow(0 0 8px rgba(0, 180, 166, 0.6));
    }
    60% { 
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(0, 180, 166, 0.4));
    }
}
.nav-menu { display: none; gap: 1.5rem; }
.nav-link { color: var(--text-secondary); text-decoration: none; font-weight: 500; transition: var(--transition); position: relative; padding: 0.25rem 0; }
.nav-link:hover { color: var(--primary); }
.nav-link::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background: var(--primary); transition: width 0.3s ease; }
.nav-link:hover::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 1rem; }

/* === PRZEŁĄCZNIK MOTYWU === */
.theme-switch-wrapper { display: flex; align-items: center; }
.theme-switch { display: inline-block; height: 24px; position: relative; width: 44px; }
.theme-switch input { display: none; }
.slider { background-color: #ccc; bottom: 0; cursor: pointer; left: 0; position: absolute; right: 0; top: 0; transition: .4s; border-radius: 24px; }
.slider:before { background-color: #fff; bottom: 4px; content: ""; height: 16px; left: 4px; position: absolute; transition: .4s; width: 16px; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(20px); }

/* === MENU MOBILNE === */
.mobile-menu-btn { background: none; border: none; cursor: pointer; color: var(--text-primary); padding: 0.5rem; }
.mobile-menu { display: none; flex-direction: column; padding: 1rem; border-top: 1px solid var(--border-color); background-color: var(--bg-card); }
.mobile-menu.active { display: flex; }
.mobile-menu .nav-link { padding: 0.75rem; width: 100%; text-align: center; }

/* === GŁÓWNA SEKCJA (HERO) === */
.hero-section { padding: 4rem 1.5rem; }
.hero-container {
    max-width: 1280px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr; gap: 4rem; align-items: center;
}
.hero-content { text-align: center; }
.hero-title { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; margin-bottom: 1rem; }
.hero-title strong {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle { font-size: 1.125rem; max-width: 600px; margin: 0 auto 2rem auto; }
.hero-features { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; }
.feature-item { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; color: var(--text-primary); }
.feature-icon { width: 20px; height: 20px; color: var(--primary); }

/* === ANALIZATOR OBJAWÓW === */
.analyzer-wrapper { width: 100%; }
.symptoms-section {
    background: var(--gradient-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}
.section-title { font-size: 1.75rem; font-weight: 700; text-align: center; margin-bottom: 1.5rem; }
.input-wrapper { position: relative; margin-bottom: 0.5rem; }
.symptom-textarea {
    width: 100%; min-height: 140px; padding: 1rem;
    border: 2px solid var(--border-color); border-radius: var(--radius);
    font-size: 1rem; font-family: inherit; line-height: 1.6; resize: vertical;
    background-color: var(--bg-input); color: var(--text-primary);
    transition: var(--transition);
}
.symptom-textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--shadow-focus); }
.symptom-textarea.error { border-color: var(--danger); }
.char-counter { position: absolute; bottom: 0.75rem; right: 1rem; font-size: 0.75rem; color: var(--text-muted); }
.error-message { color: var(--danger); font-size: 0.875rem; margin-top: 0.25rem; display: none; }
.error-message.show { display: block; }

/* === SZYBKIE PRZYCISKI OBJAWÓW === */
.quick-symptoms {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

@media (min-width: 600px) {
    .quick-symptoms {
        grid-template-columns: repeat(2, 1fr);
    }
}

.quick-btn {
    display: flex; align-items: center; gap: 0.75rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.75rem; border-radius: var(--radius);
    cursor: pointer; transition: var(--transition);
    text-align: left; font-family: inherit;
    box-shadow: var(--shadow-sm);
}
.quick-btn:hover, .quick-btn:focus {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    outline: none;
}
.quick-btn-icon {
    width: 36px; height: 36px; flex-shrink: 0;
    background: var(--gradient-primary);
    border-radius: 50%; display: flex;
    align-items: center; justify-content: center;
    color: white;
}
.quick-btn-text { flex: 1; }
.quick-btn-title { font-weight: 600; color: var(--text-primary); font-size: 0.9rem; }
.quick-btn-desc { font-size: 0.8rem; color: var(--text-secondary); }

.analyze-button {
    width: 100%; display: flex; align-items: center; justify-content: center;
    background: var(--gradient-primary); color: white;
    border: none; padding: 1rem; border-radius: var(--radius-full);
    font-size: 1.1rem; font-weight: 700; cursor: pointer;
    transition: var(--transition); box-shadow: var(--shadow-md);
    will-change: transform;
}
.analyze-button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.analyze-button:disabled { opacity: 0.6; cursor: not-allowed; }
.loading-spinner { display: none; align-items: center; gap: 0.5rem; }
.loading-spinner.show { display: flex; }
.spinner { 
    width: 20px; height: 20px; border: 2px solid #fff3; border-radius: 50%; 
    border-top-color: white; animation: spin 1s linear infinite; will-change: transform; 
}
@keyframes spin { to { transform: rotate(360deg); } }

.progress-bar { width: 100%; height: 4px; background: var(--border-color); border-radius: 2px; margin-top: 1rem; overflow: hidden; display: none; }
.progress-bar.show { display: block; }
.progress-fill { height: 100%; background: var(--gradient-primary); width: 0%; transition: width 0.5s ease; border-radius: 2px; will-change: width; }
.disclaimer { font-size: 0.875rem; color: var(--text-muted); text-align: center; margin-top: 1.5rem; }

/* === INTELIGENTNE PODPOWIEDZI === */
.context-hint {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background-color: var(--text-primary);
    color: var(--bg-card);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-10px) scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 10;
}
.context-hint.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* === SEKCJA WYNIKÓW === */
.results-section-wrapper { display: none; padding: 4rem 1.5rem; }
.results-section-wrapper.show { display: block; animation: fadeIn 0.5s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.results-container { max-width: 800px; margin: 0 auto; background: var(--gradient-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--border-color); overflow: hidden; }
.results-header { padding: 1.5rem; text-align: center; border-bottom: 1px solid var(--border-color); background: var(--bg-card); }
.results-title { font-size: 1.25rem; margin-bottom: 0.5rem; }
.urgency-badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: var(--radius-full); font-weight: 600; font-size: 0.875rem; }
.urgency-low { background-color: #dcfce7; color: #166534; }
.urgency-medium { background-color: #fef3c7; color: #92400e; }
.urgency-high { background-color: #fee2e2; color: #991b1b; }
.dark .urgency-low { background-color: #14532d; color: #bbf7d0; }
.dark .urgency-medium { background-color: #78350f; color: #fde68a; }
.dark .urgency-high { background-color: #7f1d1d; color: #fecaca; }

.result-content { padding: 1.5rem; line-height: 1.7; min-height: 100px; }
.result-content strong { color: var(--text-primary); font-weight: 600; }
.result-content ul { padding-left: 1.5rem; margin: 1rem 0; }
.result-content li { margin-bottom: 0.5rem; }

/* Animowane wyświetlanie wyników */
.result-content.fade-in p,
.result-content.fade-in li,
.result-content.fade-in h3 {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.result-content.fade-in p:nth-child(1) { animation-delay: 0.1s; }
.result-content.fade-in p:nth-child(2) { animation-delay: 0.2s; }
.result-content.fade-in p:nth-child(3) { animation-delay: 0.3s; }
.result-content.fade-in li:nth-child(1) { animation-delay: 0.4s; }
.result-content.fade-in li:nth-child(2) { animation-delay: 0.5s; }
.result-content.fade-in li:nth-child(3) { animation-delay: 0.6s; }
.result-content.fade-in li:nth-child(4) { animation-delay: 0.7s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-content.typing::after {
    content: '▋';
    animation: blink 1s step-end infinite;
    color: var(--primary);
}
@keyframes blink { 50% { opacity: 0; } }

/* === ALERT AWARYJNY === */
.emergency-alert { display: none; max-width: 800px; margin: 0 auto 2rem auto; background-color: #fee2e2; border: 1px solid #fca5a5; border-radius: var(--radius-lg); padding: 1.5rem; }
.dark .emergency-alert { background-color: #7f1d1d; border-color: #ef4444; }
.emergency-alert.show { display: block; }
.emergency-content { display: flex; align-items: center; gap: 1rem; }
.emergency-icon { font-size: 1.5rem; }
.emergency-title { color: #991b1b; font-size: 1.125rem; margin-bottom: 0.25rem; }
.dark .emergency-title { color: #fecaca; }
.emergency-alert p { color: #b91c1c; }
.dark .emergency-alert p { color: #fca5a5; }

/* === PRZYCISKI AKCJI WYNIKÓW === */
.action-buttons { display: flex; gap: 1rem; padding: 1.5rem; border-top: 1px solid var(--border-color); background-color: var(--bg-main); }
.action-button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem; border-radius: var(--radius); border: 1px solid var(--border-color); background-color: var(--bg-card); color: var(--text-secondary); font-weight: 500; cursor: pointer; transition: var(--transition); }
.action-button:hover { border-color: var(--primary); color: var(--primary); }
.retry-button { display: none; }
.retry-button.show { display: flex; }

/* === SEKCJE INFORMACYJNE === */
.info-section { padding: 4rem 1.5rem; }
.info-container { max-width: 1024px; margin: 0 auto; text-align: center; }
.info-title { font-size: 2rem; margin-bottom: 2.5rem; }
.info-subtitle { max-width: 600px; margin: -1.5rem auto 2.5rem auto; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.step-card { background-color: var(--bg-card); padding: 2rem; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--border-color); }
.step-number { width: 48px; height: 48px; background: var(--gradient-primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; margin: 0 auto 1.5rem auto; }
.step-title { font-size: 1.25rem; margin-bottom: 0.5rem; }

.trust-section { background-color: var(--bg-card); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; text-align: left; }
.trust-card { }
.trust-icon { width: 40px; height: 40px; color: var(--primary); margin-bottom: 1rem; }
.trust-title { font-size: 1.25rem; margin-bottom: 0.5rem; }

/* === SEKCJA OPINII === */
.testimonials-section { background-color: var(--bg-main); }
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.testimonial-card { background: var(--gradient-card); border: 1px solid var(--border-color); padding: 2rem; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.testimonial-text { font-style: italic; color: var(--text-secondary); margin-bottom: 1rem; }
.testimonial-text::before { content: '"'; font-size: 2rem; color: var(--primary); line-height: 0; margin-right: 0.25rem; }
.testimonial-author { font-weight: 600; color: var(--text-primary); text-align: right; }

/* === SEKCJA BAZY WIEDZY === */
.knowledge-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.article-card { display: block; text-decoration: none; background-color: var(--bg-card); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; transition: var(--transition); border: 1px solid var(--border-color); }
.article-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.article-image { width: 100%; height: 200px; object-fit: cover; }
.article-content { padding: 1.5rem; text-align: left; }
.article-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;

    /* Poprawka kolorów dla lepszego kontrastu */
    background-color: var(--primary-light); /* Jasne turkusowe tło */
    color: var(--primary-dark); /* Ciemniejszy, czytelny tekst */
}

/* Poprawka dla trybu ciemnego */
.dark .article-category {
    background-color: #233044;
    color: var(--primary-light);
}
.article-title { font-size: 1.25rem; margin-bottom: 0.5rem; color: var(--text-primary); }
.article-excerpt { color: var(--text-secondary); margin-bottom: 1rem; }
.article-read-more { font-weight: 600; color: var(--primary); }

/* === FAQ === */
.faq-section { background-color: var(--bg-card); }
.faq-container { max-width: 800px; }
.faq-item { border-bottom: 1px solid var(--border-color); }
.faq-question { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 0; background: none; border: none; cursor: pointer; text-align: left; font-size: 1.125rem; font-weight: 600; color: var(--text-primary); }
.faq-icon { width: 24px; height: 24px; color: var(--text-muted); transition: transform 0.2s; }
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(180deg); }
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease-out; }
.faq-answer > p { overflow: hidden; padding-bottom: 1.5rem; text-align: left; }
.faq-question[aria-expanded="true"] + .faq-answer { grid-template-rows: 1fr; }

/* === STOPKA === */
.footer { background-color: var(--text-primary); color: var(--bg-main); padding: 3rem 1.5rem; text-align: center; }
.footer-container { max-width: 1280px; margin: 0 auto; }
.footer-logo { display: flex; align-items: center; justify-content: center; gap: 0.75rem; font-size: 1.25rem; font-weight: 700; color: var(--bg-main); margin-bottom: 1.5rem; }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1.5rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-weight: 500; transition: var(--transition); }
.footer-links a:hover { color: white; }
.footer-copy { color: var(--text-muted); font-size: 0.875rem; }

/* === TOAST === */
.toast-notification { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); background: var(--text-primary); color: var(--bg-main); padding: 0.75rem 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 9999; opacity: 0; transition: var(--transition); pointer-events: none; }
.toast-notification.show { opacity: 1; transform: translate(-50%, -10px); }

/* === ANIMACJE NA SCROLL === */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.step-card.animate-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.step-card.animate-on-scroll:nth-child(3) { transition-delay: 0.4s; }
.testimonial-card.animate-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.testimonial-card.animate-on-scroll:nth-child(3) { transition-delay: 0.4s; }
.trust-card.animate-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.trust-card.animate-on-scroll:nth-child(3) { transition-delay: 0.4s; }
.article-card.animate-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.faq-item.animate-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.faq-item.animate-on-scroll:nth-child(3) { transition-delay: 0.4s; }

/* === MEDIA QUERIES === */
@media (min-width: 768px) {
    .nav-menu { display: flex; }
    .mobile-menu-btn { display: none; }
    .knowledge-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
    .hero-container { grid-template-columns: 1fr 1.1fr; gap: 5rem; }
    .hero-content { text-align: left; }
    .hero-subtitle { margin-left: 0; }
    .hero-features { justify-content: flex-start; }
}

/* === OPTYMALIZACJA ANIMACJI === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
    
    .spinner {
        animation: none;
    }
}

/* === ULEPSZONE STYLE DLA ARTYKUŁÓW WEWNĘTRZNYCH === */

/* Sekcja artykułów z naszej bazy wiedzy */
.result-content div[style*="border-left: 4px solid #007bff"] {
    background-color: var(--bg-input) !important;
    border-left: 4px solid var(--primary) !important;
    padding: 1.5rem !important;
    border-radius: var(--radius) !important;
    margin: 1rem 0 !important; /* ZMNIEJSZONE z 2rem na 1rem */
}

/* Nagłówek sekcji artykułów */
.result-content div[style*="border-left: 4px solid #007bff"] strong {
    color: var(--text-primary) !important;
    font-size: 1.1rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    /* Zmniejszony margines, aby zredukować odstęp */
    margin-bottom: 0.5rem !important; 
}

/* Linki do artykułów wewnętrznych */
.result-content div[style*="border-left: 4px solid #007bff"] a {
    color: var(--primary) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: var(--transition) !important;
    display: inline-block !important;
    padding: 0.25rem 0 !important;
}

.result-content div[style*="border-left: 4px solid #007bff"] a:hover {
    color: var(--primary-dark) !important;
    text-decoration: underline !important;
    transform: translateX(2px) !important;
}

/* Styl dla listy artykułów */
.result-content div[style*="border-left: 4px solid #007bff"] br + a {
    margin-left: 1rem !important;
}

/* Tryb ciemny */
.dark .result-content div[style*="border-left: 4px solid #007bff"] {
    background-color: #233044 !important;
    border-left-color: var(--accent) !important;
}

.dark .result-content div[style*="border-left: 4px solid #007bff"] a {
    color: var(--accent) !important;
}

.dark .result-content div[style*="border-left: 4px solid #007bff"] a:hover {
    color: var(--primary-light) !important;
}

/* === NAPRAW FORMATOWANIE OGÓLNE === */
.result-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.result-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.result-content li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.result-content h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
}

.result-content ul + div[style*="border-left: 4px solid #007bff"] {
    margin-top: 1.5rem !important; /* Trochę więcej miejsca po liście objawów */
}

/* === STYLE DLA DISCLAIMERA === */
.result-content div[style*="background-color: #fff3cd"] {
    background-color: #fff3cd !important;
    border-left: 4px solid #ffc107 !important;
    border-radius: 8px !important;
    padding: 1rem !important;
    margin: 2rem 0 !important;
}

.result-content div[style*="background-color: #fff3cd"] p {
    margin: 0 !important;
    color: #856404 !important;
    font-weight: 600 !important;
    text-align: center !important;
}

/* Tryb ciemny dla disclaimera */
.dark .result-content div[style*="background-color: #fff3cd"] {
    background-color: #7c5c00 !important;
    border-left-color: #ffc107 !important;
}

.dark .result-content div[style*="background-color: #fff3cd"] p {
    color: #fff3cd !important;
}

/* === POPRAWKA DLA WSZYSTKICH LINKÓW W RESULT-CONTENT === */
.result-content a[target="_blank"] {
    color: var(--primary) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: var(--transition) !important;
}

.result-content a[target="_blank"]:hover {
    color: var(--primary-dark) !important;
    text-decoration: underline !important;
}

/* Linki w sekcji artykułów */
.result-content div[style*="border-left: 4px solid #007bff"] a[target="_blank"] {
    color: #007bff !important;
}

.result-content div[style*="border-left: 4px solid #007bff"] a[target="_blank"]:hover {
    color: var(--primary) !important;
}

.cancel-button {
    background: none;
    color: var(--text-secondary, #64748b);
    border: none;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    transition: color 0.2s ease;
    font-family: inherit;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: transparent;
}

.cancel-button:hover {
    color: var(--danger, #ef4444);
    text-decoration-color: currentColor;
}

.cancel-button:focus {
    outline: 2px solid var(--primary, #00b4a6);
    outline-offset: 2px;
    border-radius: 4px;
}

.cancel-button svg {
    width: 16px;
    height: 16px;
}