
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f4f4f4;
}

.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

header {
    background: #2a4177;
    color: #fff;
    padding: 20px 40px;
    border-bottom: 4px solid #7191a5;
}

header .site-title {
    font-size: 28px;
    font-weight: normal;
    font-style: italic;
    margin: 0;
}

nav {
    background: #fff;
    border-bottom: 2px solid #7191a5;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
}

nav ul li {
    flex: 1;
    min-width: 150px;
}

nav ul li a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    text-align: center;
    border-right: 1px solid #e0e0e0;
    transition: background 0.3s;
}

nav ul li:last-child a {
    border-right: none;
}

nav ul li a:hover {
    background: #f0f0f0;
}

main {
    padding: 40px;
}

h1 {
    font-size: 36px;
    color: #2a4177;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #7191a5;
}

article {
    margin-bottom: 40px;
}

article h2 {
    font-size: 28px;
    color: #2a4177;
    margin-top: 30px;
    margin-bottom: 15px;
}

article h3 {
    font-size: 22px;
    color: #473831;
    margin-top: 25px;
    margin-bottom: 12px;
}

article p {
    margin-bottom: 20px;
    text-align: justify;
    line-height: 1.8;
}

.transition-section {
    background: #f9f9f9;
    padding: 30px;
    margin: 40px 0;
    border-left: 4px solid #7191a5;
}

.transition-section p {
    margin-bottom: 15px;
}

{% if links %}
.links-section {
    background: #fff;
    padding: 40px;
    margin-top: 40px;
    border-top: 3px solid #7191a5;
}

.links-section h3 {
    font-size: 24px;
    color: #2a4177;
    margin-top: 30px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #7191a5;
}

.links-section h3:first-child {
    margin-top: 0;
}

.links-section ul {
    list-style: none;
    columns: 2;
    column-gap: 40px;
    margin-bottom: 30px;
}

.links-section ul li {
    break-inside: avoid;
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
}

.links-section ul li:before {
    content: "▪";
    color: #7191a5;
    position: absolute;
    left: 0;
    font-size: 18px;
}

.links-section ul li a {
    color: #2a4177;
    text-decoration: none;
    transition: color 0.3s;
}

.links-section ul li a:hover {
    color: #7191a5;
    text-decoration: underline;
}
{% endif %}

footer {
    background: #473831;
    color: #fff;
    padding: 40px;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-column {
    flex: 1;
    min-width: 250px;
}

.footer-column h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 2px solid #7191a5;
    padding-bottom: 8px;
}

.footer-column p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #5a4a42;
    font-size: 14px;
}

@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }
    
    header .site-title {
        font-size: 22px;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        min-width: 100%;
    }
    
    nav ul li a {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    main {
        padding: 20px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    article h2 {
        font-size: 24px;
    }
    
    article h3 {
        font-size: 20px;
    }
    
    .transition-section {
        padding: 20px;
    }
    
    {% if links %}
    .links-section {
        padding: 20px;
    }
    
    .links-section ul {
        columns: 1;
    }
    {% endif %}
    
    footer {
        padding: 20px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 25px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 24px;
    }
    
    article h2 {
        font-size: 20px;
    }
    
    article h3 {
        font-size: 18px;
    }
}
