:root {
    --primary-color: #00A8E8;
    --primary-dark: #007EA7;
    --bg-dark: #1A1A2E;
    --bg-light: #F0F4F8;
    --surface-color: #FFFFFF;
    --text-dark: #16213E;
    --text-light: #F0F0F0;
    --text-muted: #5A6B8C;
    --border-color: #DDE4EE;
    --font-family: 'Poppins', sans-serif;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    --gradient: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
}

/* --- Global Reset & Base Styles --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 16px;
}

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

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; margin-bottom: 2.5rem; text-align: center; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; font-weight: 600; }

p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

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

ul {
    list-style: none;
}

/* --- Header & Navigation --- */
.site-header {
    background-color: var(--surface-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
}
.site-logo span {
    color: var(--primary-color);
    font-weight: 400;
}
.site-logo:hover {
    color: var(--text-dark);
}

.main-navigation ul {
    display: flex;
    gap: 2.5rem;
}

.main-navigation a {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    padding-bottom: 8px;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

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

/* --- Hero Section (Homepage) --- */
.hero {
    text-align: center;
    padding: 6rem 1.5rem;
    background: var(--gradient);
    color: var(--text-light);
}

.hero h1 {
    color: var(--text-light);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}
.subtitle a {
    color: var(--text-light);
    font-weight: 600;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.7);
    transition: border-bottom 0.2s ease;
}
.subtitle a:hover {
    border-bottom: 1px solid #fff;
}

/* --- Main Layout --- */
.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin: 4rem auto;
}

@media (min-width: 992px) {
    .main-layout {
        grid-template-columns: 3fr 1fr;
    }
}

/* --- Article Grid --- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--primary-color);
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.article-card h3 {
    margin-bottom: 0.75rem;
}

.article-card p {
    flex-grow: 1;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    align-self: flex-start;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: #fff;
    transform: scale(1.05);
}

/* --- Sidebar --- */
.sidebar .widget {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}
.widget h4 {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.widget-list li {
    margin-bottom: 1rem;
}
.widget-list li:last-child {
    margin-bottom: 0;
}
.widget-list a {
    display: block;
    font-weight: 600;
    color: var(--text-muted);
}
.widget-list a:hover {
    color: var(--primary-color);
}

/* --- Footer --- */
.site-footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    text-align: center;
    padding: 3rem 1.5rem;
    margin-top: 4rem;
}
.footer-nav {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.footer-nav a {
    color: #fff;
    opacity: 0.8;
}
.footer-nav a:hover {
    opacity: 1;
    color: var(--primary-color);
}
.site-footer p {
    font-size: 0.9rem;
    margin-bottom: 0;
    color: var(--text-light);
    opacity: 0.6;
}

/* --- Single Article & Static Pages --- */
.page-header, .article-header {
    padding: 4rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
    background: var(--surface-color);
}
.article-meta {
    color: var(--text-muted);
    font-weight: 600;
    margin-top: -0.5rem;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.article-content {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.article-content h2, .article-content h3 {
    text-align: left;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}
.article-content ul, .article-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
}
.article-content ul li {
    list-style-type: disc;
    margin-bottom: 0.75rem;
}
.article-content ol li {
    list-style-type: decimal;
    margin-bottom: 0.75rem;
}

.cta-box {
    background: var(--bg-light);
    border-left: 5px solid var(--primary-color);
    padding: 2rem;
    margin: 3rem 0;
    border-radius: 8px;
    text-align: center;
}

/* --- Contact Form Styles --- */
.contact-form {
    margin-top: 3rem;
    background-color: var(--surface-color);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-dark);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.2);
}
.btn-submit {
    display: inline-block;
    background: var(--gradient);
    color: #fff;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 126, 167, 0.4);
}
.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* --- Responsive Design --- */
@media (max-width: 991px) {
    .main-layout { margin: 2rem auto; }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.75rem; }
    .container { padding: 0 1rem; }

    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    .main-navigation ul {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1.5rem;
    }
    .hero { padding: 4rem 1rem; }
    .articles-grid { grid-template-columns: 1fr; }
    .page-header, .article-header { padding: 3rem 1rem; }
}