/* --- General Setup & Variables --- */
:root {
    --primary-color: #005a9c; /* A classic, trustworthy blue */
    --secondary-color: #e3a800; /* A vibrant gold/yellow for accents */
    --dark-text: #222222;
    --light-text: #f8f9fa;
    --body-text: #495057;
    --background-color: #ffffff;
    --card-background: #f8f9fa;
    --border-color: #dee2e6;
    --font-heading: 'Lora', serif;
    --font-body: 'Roboto', sans-serif;
}

body {
    font-family: var(--font-body);
    margin: 0;
    background-color: var(--background-color);
    color: var(--body-text);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--secondary-color);
}

/* --- Header & Navigation --- */
.main-header {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 1rem 0;
    border-bottom: 4px solid var(--secondary-color);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--light-text);
}

.logo:hover {
    color: var(--light-text);
}

.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--light-text);
    font-weight: 500;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
    border-bottom-color: var(--secondary-color);
}

/* --- Main Content & Articles --- */
main {
    padding: 2rem 0;
}

.category {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--dark-text);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Featured Article */
.featured-article {
    margin-bottom: 3rem;
    background-color: var(--card-background);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.featured-content {
    padding: 2rem;
}

.featured-content h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin: 0 0 1rem 0;
    color: var(--dark-text);
}

.featured-content h1 a {
    color: var(--dark-text);
}

.author {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Latest Articles Grid */
.latest-articles h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}
.latest-articles h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

/* Top Stories Grid Layout */
.top-stories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}
.main-featured {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}
.main-featured h3 {
    font-size: 2.2rem !important;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.card-content h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin: 0 0 0.5rem 0;
}

.card-content h3 a {
    color: var(--dark-text);
}

/* --- Full Article Page --- */
.full-article .article-header {
    max-width: 700px;
    margin: 2rem auto 3rem auto;
    text-align: center;
}
.full-article h1 {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    color: var(--dark-text);
    line-height: 1.2;
}
.full-article .author-date {
    font-size: 1rem;
    color: #6c757d;
    margin-top: 1rem;
}
.article-body {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}
.article-body h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-top: 2rem;
    line-height: 1.3;
}
.article-body hr {
    border: 0;
    height: 1px;
    background-color: var(--border-color);
    margin: 3rem 0;
}

/* --- Footer --- */
.main-footer {
    background-color: var(--dark-text);
    color: var(--light-text);
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

.main-footer p {
    margin: 0.25rem 0;
}

/* --- Dashboard & Forms --- */
.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}
.dashboard-header h1 {
    font-family: var(--font-heading);
    color: var(--dark-text);
}

/* --- Contact Page --- */
.contact-form-container {
    max-width: 700px;
    margin: 0 auto;
}

.dashboard-section {
    margin-bottom: 3rem;
}
.dashboard-section h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.dashboard-form {
    background-color: var(--card-background);
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}
.form-hint {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}
.button {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}
.button:hover {
    background-color: #004175; /* A darker blue */
}
.primary-btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}
.button-secondary {
    background-color: #6c757d;
    color: var(--light-text);
}
.button-secondary:hover {
    background-color: #5a6268;
}
.hidden {
    display: none;
}
.article-item-actions {
    display: flex;
    gap: 0.5rem;
}
.button-danger {
    background-color: #d9534f;
    color: var(--light-text);
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}
.button-danger:hover {
    background-color: #c9302c;
}
.article-item {
    background-color: var(--card-background);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.article-item h3 {
    font-family: var(--font-heading);
    margin: 0 0 0.5rem 0;
}
.error {
    color: #d9534f;
    margin-top: 1rem;
}

/* Auth Page */
.auth-container {
    max-width: 500px;
    margin: 4rem auto;
    text-align: center;
}
.auth-container h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
}
.auth-switch {
    margin-top: 1.5rem;
}

/* --- Tabs --- */
.tabs {
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
.tab-button {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border: none;
    background-color: transparent;
    font-size: 1rem;
    font-weight: 500;
    color: var(--body-text);
    border-bottom: 3px solid transparent;
    transform: translateY(1px);
}
.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}
.tab-button:hover {
    color: var(--primary-color);
}

/* --- About Page --- */
.page-header {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}
.page-header h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--dark-text);
}
.about-section, .team-section {
    max-width: 800px;
    margin: 0 auto 3rem auto;
}
.about-section h2, .team-section h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}
.team-member img {
    border-radius: 50%;
    width: 150px;
    height: 150px;
    object-fit: cover;
    margin-bottom: 1rem;
}
.team-member h3 {
    margin: 0.5rem 0;
    font-family: var(--font-heading);
    color: var(--dark-text);
}

/* --- Login Prompt Section --- */
.login-prompt-section {
    text-align: center;
    padding: 4rem 0;
}
.login-prompt-actions {
    margin-top: 2rem;
    padding: 2rem;
    background-color: var(--card-background);
    border-radius: 8px;
}

.about-snippet {
    max-width: 700px;
    margin: 2.5rem auto;
    padding: 2rem;
    background-color: var(--background-color);
    border-left: 4px solid var(--primary-color);
}

.about-snippet h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-top: 0;
    color: var(--dark-text);
}

/* --- Error Pages --- */
.error-page-container {
    text-align: center;
    padding: 4rem 0;
}
.error-page-container h1 {
    font-size: 6rem;
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin: 0;
    line-height: 1;
}

/* --- Podcast Page --- */
.podcast-list {
    max-width: 800px;
    margin: 0 auto;
}

.podcast-item {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.podcast-item h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin: 0 0 0.5rem 0;
    color: var(--dark-text);
}

.podcast-item audio {
    width: 100%;
    margin-top: 1rem;
}