/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #ffffff;
    color: #333333;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 1.2em;
    margin-bottom: 0.5em;
    line-height: 1.3;
}

h1 {
    font-size: 2.5em;
    border-bottom: 3px solid #007bff;
    padding-bottom: 0.3em;
}

h2 {
    font-size: 1.8em;
    color: #0056b3;
}

h3 {
    font-size: 1.4em;
}

p {
    margin-bottom: 1em;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Header */
.site-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

.site-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.site-nav a {
    color: #333;
    font-size: 1em;
}

.site-nav a:hover {
    color: #007bff;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Page Content */
.page-content {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 4px;
}

.page-content .description {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 1.5em;
    padding-left: 1em;
    border-left: 4px solid #007bff;
}

.content {
    line-height: 1.8;
}

.content ul, .content ol {
    margin-left: 2rem;
    margin-bottom: 1em;
}

.content li {
    margin-bottom: 0.5em;
}

/* Home Page */
.home {
    text-align: center;
}

.home > p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 3rem;
}

.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 2rem;
    text-align: left;
    transition: transform 0.3s, box-shadow 0.3s;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-card h2 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.category-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.category-card .btn {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 0.7em 1.4em;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.category-card .btn:hover {
    background-color: #0056b3;
    text-decoration: none;
}

/* Footer */
.site-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    color: #666;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-note {
    font-size: 0.9em;
    color: #999;
    margin-top: 0.5rem;
}

.newsletter-block {
    padding: 1.5rem 0;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 1.5rem;
}

.newsletter-label {
    font-size: 0.95em;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.8rem;
}

.footer-bottom p {
    margin: 0.3rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .site-nav ul {
        gap: 1rem;
        flex-direction: column;
    }

    .container {
        padding: 0 1rem;
    }

    .page-content {
        padding: 1.5rem;
    }

    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.4em;
    }
}

/* Recent Articles (Home) */
.recent-articles {
    margin-top: 3rem;
    text-align: left;
}

.recent-title {
    font-size: 1.4em;
    color: #333;
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #dee2e6;
}

/* Article List */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.article-card {
    display: block;
    padding: 1.2rem 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: #f8f9fa;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.article-card:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
    text-decoration: none;
}

.article-card-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #007bff;
}

.article-card-desc {
    font-size: 0.9em;
    color: #666;
    margin-top: 0.3rem;
}

.article-card-date {
    font-size: 0.8em;
    color: #aaa;
    margin-top: 0.4rem;
}

/* Contact Form */
.contact-wrapper {
    max-width: 600px;
    margin-top: 2.5rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 2.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.95em;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.required {
    font-size: 0.75em;
    font-weight: 600;
    color: #fff;
    background-color: #dc3545;
    padding: 0.1em 0.5em;
    border-radius: 3px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75em 1em;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
    background-color: #fff;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.form-group textarea {
    resize: vertical;
    line-height: 1.6;
}

.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 0.5rem;
    border-top: 1px solid #dee2e6;
}

.form-note {
    font-size: 0.85em;
    color: #888;
    margin: 0;
}

.btn-submit {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 0.75em 2em;
    font-size: 1em;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.btn-submit:hover {
    background-color: #0056b3;
}

@media (max-width: 768px) {
    .contact-wrapper {
        padding: 1.5rem;
    }

    .form-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}
