/* ===================================
   ToksycznyZwiazek.pl - Główne style
   =================================== */

/* Reset i podstawy */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #6B5B95;
    --primary-dark: #4A3F6B;
    --primary-light: #8B7BB5;
    --secondary-color: #88B04B;
    --accent-color: #F7CAC9;
    --text-color: #2D3436;
    --text-light: #636E72;
    --bg-color: #FFFFFF;
    --bg-light: #F8F9FA;
    --bg-sidebar: #F5F4F8;
    --border-color: #E9ECEF;
    --warning-color: #E74C3C;
    --success-color: #27AE60;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --max-width: 1400px;
    --sidebar-width: 300px;
    --header-height: 70px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 17px;
    line-height: 1.75;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Typografia */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-color);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

h3 {
    font-size: 1.35rem;
    margin-top: 2rem;
    color: var(--primary-dark);
}

h4 {
    font-size: 1.15rem;
    margin-top: 1.5rem;
}

p {
    margin-bottom: 1.25rem;
    text-align: justify;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

ul, ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background-color: var(--bg-light);
    font-style: italic;
    color: var(--text-light);
}

strong {
    font-weight: 600;
    color: var(--primary-dark);
}

/* Layout */
.page-wrapper {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
    color: var(--primary-dark);
}

.logo-icon {
    font-size: 1.75rem;
}

.nav-main {
    display: flex;
    gap: 2rem;
}

.nav-main a {
    font-weight: 500;
    color: var(--text-color);
    padding: 0.5rem 0;
    position: relative;
}

.nav-main a:hover,
.nav-main a.active {
    color: var(--primary-color);
    text-decoration: none;
}

.nav-main a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-main a:hover::after,
.nav-main a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* Main content area */
.main-container {
    display: flex;
    max-width: var(--max-width);
    margin: var(--header-height) auto 0;
    min-height: calc(100vh - var(--header-height));
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 2rem 0;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    background-color: rgba(107, 91, 149, 0.1);
    margin-bottom: 0.5rem;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav a {
    display: block;
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
    color: var(--text-color);
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.sidebar-nav a:hover {
    background-color: rgba(107, 91, 149, 0.08);
    color: var(--primary-color);
    text-decoration: none;
    border-left-color: var(--primary-light);
}

.sidebar-nav a.active {
    background-color: rgba(107, 91, 149, 0.15);
    color: var(--primary-color);
    font-weight: 600;
    border-left-color: var(--primary-color);
}

/* Content area */
.content {
    flex: 1;
    padding: 3rem 4rem;
    max-width: calc(100% - var(--sidebar-width));
}

.content-inner {
    max-width: 800px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: var(--text-light);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    color: var(--border-color);
}

/* Article styles */
.article-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-light);
}

.article-intro {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

/* Warning box */
.warning-box {
    background-color: #FFF5F5;
    border: 1px solid #FED7D7;
    border-left: 4px solid var(--warning-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.warning-box-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--warning-color);
    margin-bottom: 0.75rem;
}

.warning-box p {
    margin-bottom: 0;
    color: #742A2A;
}

/* Info box */
.info-box {
    background-color: #EBF8FF;
    border: 1px solid #BEE3F8;
    border-left: 4px solid #3182CE;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.info-box-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #2B6CB0;
    margin-bottom: 0.75rem;
}

.info-box p {
    margin-bottom: 0;
    color: #2A4365;
}

/* Success box */
.success-box {
    background-color: #F0FFF4;
    border: 1px solid #C6F6D5;
    border-left: 4px solid var(--success-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.success-box-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--success-color);
    margin-bottom: 0.75rem;
}

.success-box p {
    margin-bottom: 0;
    color: #22543D;
}

/* Download button */
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.75rem;
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
    margin: 1.5rem 0;
}

.download-btn:hover {
    background-color: var(--primary-dark);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.download-btn-icon {
    font-size: 1.25rem;
}

/* FAQ Section */
.faq-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.faq-section h2 {
    border-bottom: none;
    margin-bottom: 2rem;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--primary-light);
}

.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background-color: var(--bg-light);
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background-color: rgba(107, 91, 149, 0.1);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-item.active .faq-question::after {
    content: '−';
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 1.25rem 1.5rem;
    max-height: 500px;
}

.faq-answer p {
    margin-bottom: 0;
    color: var(--text-light);
}

/* Navigation between pages */
.page-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.page-nav-link {
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.5rem;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
    max-width: 48%;
}

.page-nav-link:hover {
    border-color: var(--primary-color);
    text-decoration: none;
    box-shadow: var(--shadow);
}

.page-nav-link.prev {
    align-items: flex-start;
}

.page-nav-link.next {
    align-items: flex-end;
    margin-left: auto;
}

.page-nav-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.page-nav-title {
    font-weight: 600;
    color: var(--primary-color);
}

/* Footer */
.footer {
    background-color: var(--primary-dark);
    color: white;
    padding: 3rem 2rem;
    margin-top: auto;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-emergency {
    background-color: var(--warning-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
}

.footer-emergency-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-emergency-numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.emergency-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.emergency-number {
    font-size: 1.5rem;
    font-weight: 700;
}

.emergency-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    text-align: left;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-disclaimer {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Homepage specific */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--bg-light) 0%, rgba(107, 91, 149, 0.1) 100%);
    border-radius: 12px;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.75rem;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 8px;
    transition: var(--transition);
}

.hero-cta:hover {
    background-color: var(--primary-dark);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.module-card {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: var(--transition);
}

.module-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
}

.module-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: var(--primary-color);
    color: white;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.module-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.module-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    text-align: left;
}

.module-lessons {
    list-style: none;
    padding: 0;
    margin: 0;
}

.module-lessons li {
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
}

.module-lessons a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 0.95rem;
}

.module-lessons a:hover {
    color: var(--primary-color);
}

.module-lessons a::before {
    content: '→';
    color: var(--primary-light);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 260px;
    }
    
    .content {
        padding: 2rem 3rem;
        max-width: calc(100% - 260px);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }
    
    .nav-main {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        display: none;
    }
    
    .sidebar.active {
        display: block;
    }
    
    .content {
        max-width: 100%;
        padding: 2rem 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .page-navigation {
        flex-direction: column;
    }
    
    .page-nav-link {
        max-width: 100%;
    }
    
    .page-nav-link.next {
        align-items: flex-start;
    }
    
    .footer-emergency-numbers {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 16px;
    }
    
    .content {
        padding: 1.5rem 1rem;
    }
    
    .header-inner {
        padding: 0 1rem;
    }
    
    .logo {
        font-size: 1.25rem;
    }
}

/* Print styles */
@media print {
    .header,
    .sidebar,
    .footer,
    .page-navigation,
    .download-btn {
        display: none;
    }
    
    .content {
        max-width: 100%;
        padding: 0;
    }
    
    .main-container {
        display: block;
    }
}


/* Downloads section */
.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
}

.download-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
}

.download-card:hover {
    background: var(--bg-sidebar);
    border-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    text-decoration: none;
}

.download-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.download-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.download-desc {
    font-size: 0.9rem;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .downloads-grid {
        grid-template-columns: 1fr;
    }
}
