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

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

#wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#nav {
    background-color: #2c3e50;
    padding: 0;
}

#nav .wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.menu li {
    margin: 0;
}

.menu a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.menu a:hover {
    background-color: #34495e;
}

#header {
    background-color: #3498db;
    padding: 40px 20px;
    text-align: center;
}

#header .wrap {
    max-width: 1200px;
    margin: 0 auto;
}

#subnav {
    background-color: #ecf0f1;
    border-bottom: 2px solid #bdc3c7;
}

#subnav .wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

#subnav .menu a {
    color: #2c3e50;
    padding: 12px 18px;
    font-size: 14px;
}

#subnav .menu a:hover {
    background-color: #d5dbdc;
}

#inner {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
}

h1 {
    color: #2c3e50;
    font-size: 32px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #3498db;
}

article {
    background-color: #fff;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

article p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.8;
}

article h2 {
    color: #2c3e50;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 24px;
}

article h3 {
    color: #34495e;
    margin-top: 20px;
    margin-bottom: 12px;
    font-size: 20px;
}

article h4 {
    color: #34495e;
    margin-top: 18px;
    margin-bottom: 10px;
    font-size: 18px;
}

.transition-section {
    background-color: #fff;
    padding: 25px 30px;
    margin-bottom: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.transition-section p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 15px;
}

{% if links %}
.links-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.links-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 26px;
}

.links-section h3 {
    color: #34495e;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 20px;
}

.links-section ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 20px;
    margin-bottom: 20px;
}

.links-section li {
    padding: 8px 0;
}

.links-section a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 15px;
}

.links-section a:hover {
    color: #2980b9;
    text-decoration: underline;
}
{% endif %}

#footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 30px 20px;
    margin-top: auto;
}

#footer .wrap {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.gototop {
    margin-bottom: 15px;
}

.gototop a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
}

.gototop a:hover {
    text-decoration: underline;
}

.creds {
    font-size: 14px;
    color: #bdc3c7;
}

@media (max-width: 768px) {
    .menu {
        flex-direction: column;
    }
    
    .menu li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    #subnav .menu li {
        border-bottom: 1px solid #d5dbdc;
    }
    
    h1 {
        font-size: 26px;
    }
    
    article {
        padding: 20px;
    }
    
    {% if links %}
    .links-section ul {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    {% endif %}
}

@media (max-width: 480px) {
    .menu a {
        padding: 12px 15px;
    }
    
    #subnav .menu a {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    h1 {
        font-size: 22px;
    }
    
    article {
        padding: 15px;
    }
    
    article p {
        font-size: 15px;
    }
}
