:root {
    --primary-color: #003366;
    --secondary-color: #00509e;
    --accent-color: #f4a261;
    --text-color: #333333;
    --light-text: #666666;
    --background-color: #ffffff;
    --light-bg: #f5f7fa;
    --border-color: #e0e0e0;
    --white: #ffffff;
    --max-width: 1200px;
    --header-height: 70px;
    --font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Layout */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Navigation */
.nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    font-size: 1rem;
}

.nav-link:hover, .nav-link:focus {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 51, 102, 0.9), rgba(0, 51, 102, 0.8)), url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Main Content */
main {
    flex: 1;
    padding: 40px 0;
}

.section-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 15px auto 0;
}

/* Cards Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.article-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.card-img {
    height: 200px;
    background-color: var(--light-bg);
    object-fit: cover;
    width: 100%;
}

.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.card-title a {
    text-decoration: none;
    color: inherit;
}

.card-excerpt {
    color: var(--light-text);
    margin-bottom: 20px;
    flex: 1;
}

.card-meta {
    font-size: 0.9rem;
    color: var(--light-text);
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

/* About Section on Home */
.about-preview {
    background-color: var(--light-bg);
    padding: 60px 0;
    border-radius: 8px;
    margin-top: 40px;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Article Page */
.article-container {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 40px;
    text-align: center;
}

.article-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.article-meta {
    color: var(--light-text);
    font-style: italic;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content h2 {
    color: var(--primary-color);
    margin: 40px 0 20px;
    font-size: 1.8rem;
}

.article-content h3 {
    color: var(--secondary-color);
    margin: 30px 0 15px;
    font-size: 1.4rem;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content ul, .article-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.article-content th, .article-content td {
    border: 1px solid var(--border-color);
    padding: 12px;
    text-align: left;
}

.article-content th {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.article-content a {
    color: var(--secondary-color);
    text-decoration: underline;
}

.related-articles {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.related-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.related-list {
    list-style: none;
}

.related-list li {
    margin-bottom: 10px;
}

.related-list a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

.related-list a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0 20px;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
}
