/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

a {
    text-decoration: none;
    color: #0056b3;
    transition: color 0.3s ease;
}

a:hover {
    color: #003d82;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: #0056b3;
    color: white;
}

.btn-primary:hover {
    background-color: #004085;
}

.btn-outline {
    background-color: transparent;
    color: #0056b3;
    border: 2px solid #0056b3;
}

.btn-outline:hover {
    background-color: #0056b3;
    color: white;
}

/* Header */
.header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #003366;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-list a {
    color: #333;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-list a.active,
.nav-list a:hover {
    color: #0056b3;
    border-bottom-color: #0056b3;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('imgs/banner.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 120px 20px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Main Content */
.main {
    padding: 40px 0;
}

.section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #003366;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #0056b3;
    border-radius: 2px;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-img {
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 20px;
}

.card-body h3 {
    margin-bottom: 10px;
    font-size: 1.25rem;
}

.card-body p {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.tag {
    display: inline-block;
    background-color: #e3f2fd;
    color: #0056b3;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-right: 10px;
}

time {
    color: #999;
    font-size: 0.9rem;
}

/* Card Small (for related) */
.card-sm .card-img {
    height: 100px;
}

.card-sm .card-body {
    padding: 15px;
}

/* News List */
.news-list {
    list-style: none;
    max-width: 700px;
    margin: 0 auto 40px;
}

.news-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item h3 {
    flex: 1;
}

.news-item time {
    color: #999;
    white-space: nowrap;
    margin-left: 20px;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 30px 0;
    justify-content: center;
}

.filter-bar span {
    font-weight: 600;
    margin-right: 10px;
    align-self: center;
}

.filter {
    padding: 8px 16px;
    background-color: #f0f0f0;
    border-radius: 20px;
    font-size: 0.9rem;
}

.filter.active,
.filter:hover {
    background-color: #0056b3;
    color: white;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination a {
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #555;
}

.pagination a.active,
.pagination a:hover {
    background-color: #0056b3;
    color: white;
    border-color: #0056b3;
}

/* Article Page */
.article {
    max-width: 850px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.article-header {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.article-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: #003366;
    line-height: 1.2;
}

.article-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    margin: 30px 0;
    border-radius: 12px;
}

.article-content {
    font-size: 1.1rem;
    color: #444;
}

.article-content h2 {
    font-size: 1.6rem;
    margin: 30px 0 15px;
    color: #003366;
}

.article-content p {
    margin-bottom: 1.5em;
}

/* Footer */
.footer {
    background-color: #003366;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.page-title {
    font-size: 2rem;
    color: #003366;
    margin-bottom: 10px;
    text-align: center;
}

.page-desc {
    color: #666;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    .hero p {
        font-size: 1.2rem;
    }
    .nav-list {
        display: none;
        flex-direction: column;
        background-color: white;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 20px 0;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        border-radius: 0 0 8px 8px;
    }
    .nav-list.active {
        display: flex;
    }
    .nav-list li {
        margin: 0;
    }
    .nav-list a {
        display: block;
        padding: 12px 20px;
        border-bottom: 1px solid #eee;
    }
    .menu-toggle {
        display: block;
    }
    .section-title {
        font-size: 1.7rem;
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
    .article {
        padding: 20px;
    }
    .article-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    .filter-bar {
        flex-direction: column;
        align-items: center;
    }
    .filter-bar span {
        margin-bottom: 10px;
    }
}

/* Contact Form Styles */
.contact-form {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.form-group textarea {
    resize: vertical;
}

/* Error Handling */
.error-message {
    display: block;
    color: #d32f2f;
    font-size: 0.85rem;
    margin-top: 5px;
    height: 16px; /* Prevent layout shift */
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #d32f2f;
    background-color: #fef0f0;
}

.form-group input.success,
.form-group select.success,
.form-group textarea.success {
    border-color: #388e3c;
    background-color: #f0fdf4;
}

/* Submit Button */
.btn-large {
    padding: 14px 32px;
    font-size: 1.1rem;
}

/* Form Status Message */
.form-status {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.95rem;
}

.form-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .contact-form {
        padding: 20px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .btn-large {
        width: 100%;
    }
}