/* Base Styling */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #27ae60;
    --accent-color: #e74c3c;
    --text-color: #2c3e50;
    --light-gray: #f8f9fa;
    --border-color: #e9ecef;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-gray);
    color: var(--text-color);
    line-height: 1.6;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: var(--shadow);
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

header p.tagline {
    font-size: 1.25rem;
    color: var(--secondary-color);
    font-weight: 500;
    margin-top: 0.5rem;
    line-height: 1.5;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: center;
    background-color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar a {
    color: var(--primary-color);
    padding: 1rem 1.5rem;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.navbar a:hover {
    color: var(--secondary-color);
    background-color: var(--light-gray);
}

.navbar a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.navbar a:hover::after {
    width: 80%;
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* Forms */
.form-container {
    margin-bottom: 2rem;
    text-align: center;
}

.form-container input,
.input,
textarea {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    width: 100%;
    margin-bottom: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
}

.form-container input:focus,
.input:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.form-container input {
    width: 300px;
    margin-right: 1rem;
}

.form-container button,
.button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.form-container button:hover,
.button:hover {
    background-color: #219a52;
    transform: translateY(-1px);
}

/* Results Table */
.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 2rem;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.results-table th,
.results-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.results-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.results-table tr.featured {
    background-color: #fff8dc;
    border-left: 4px solid #ffd700;
    font-weight: 500;
}

.clickable-row {
    cursor: pointer;
    transition: var(--transition);
}

.clickable-row:hover {
    background-color: var(--light-gray);
}

/* Articles Section */
.articles-section {
    margin-top: 3rem;
    padding: 2rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.articles-section h2 {
    color: var(--primary-color);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.article-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.article {
    padding: 1.5rem;
    border-radius: 8px;
    background-color: white;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.article:hover {
    transform: translateY(-5px);
}

.article h3 a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    transition: var(--transition);
}

.article h3 a:hover {
    color: var(--secondary-color);
}

.article p {
    color: #666;
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background-color: var(--primary-color);
    color: white;
}

.footer p:last-of-type {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-top: 1rem;
}

.footer p:last-of-type a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.footer p:last-of-type a:hover {
    color: #219a52;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 1rem;
    }
    
    .navbar {
        flex-direction: column;
    }
    
    .navbar a {
        padding: 0.75rem;
    }
    
    .form-container input {
        width: 100%;
        margin-right: 0;
    }
    
    .article-list {
        grid-template-columns: 1fr;
    }
}

/* Error Message */
.error-message {
    color: var(--accent-color);
    text-align: center;
    font-size: 1.125rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #fde8e8;
    border-radius: 8px;
    border: 1px solid #fbd5d5;
}

/* Misc Content Styles */
h2,
.h2 {
    text-align: center;
    color: #333;
}
.label {
    font-weight: bold;
    color: #333;
}
ul {
    list-style-type: none;
    padding: 0;
}
li {
    margin-bottom: 15px;
}
li strong {
    color: #3498db;
}
