/* Professional News Portal - Main Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    line-height: 1.6;
    color: #333;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo span {
    color: #ffd700;
}

/* Navigation */
.navbar {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar nav {
    display: flex;
    gap: 5px;
}

.navbar a {
    display: inline-block;
    color: #333;
    text-decoration: none;
    padding: 15px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.navbar a:hover,
.navbar a.active {
    color: #2a5298;
    border-bottom-color: #2a5298;
}

/* Search Box */
.search-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 8px 35px 8px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    width: 200px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #2a5298;
    width: 250px;
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #2a5298;
    cursor: pointer;
    font-size: 16px;
    padding: 5px 10px;
}

.search-box button:hover {
    color: #1e3c72;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

h1 {
    color: #1e3c72;
    font-size: 2.5em;
    margin-bottom: 10px;
    line-height: 1.2;
}

.page-header p {
    color: #666;
    font-size: 1.1em;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.news-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.news-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

/* Fallback for missing images */
.news-card-image[src=""],
.news-card-image:not([src]) {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.news-card-content {
    padding: 25px;
}

.news-category {
    display: inline-block;
    background: #2a5298;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.news-card h2 {
    color: #1e3c72;
    font-size: 1.4em;
    margin-bottom: 10px;
    line-height: 1.3;
}

.news-meta {
    color: #999;
    font-size: 14px;
    margin-bottom: 15px;
}

.news-description {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    color: #2a5298;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #1e3c72;
    text-decoration: underline;
}

/* Article Page */
.article-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.article-header {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.article-meta {
    color: #999;
    font-size: 14px;
    margin-bottom: 20px;
}

.category-badge {
    display: inline-block;
    background: #2a5298;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.article-content {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

h2 {
    color: #1e3c72;
    font-size: 1.8em;
    margin: 30px 0 15px;
}

h2:first-child {
    margin-top: 0;
}

h3 {
    color: #2a5298;
    font-size: 1.3em;
    margin: 25px 0 12px;
}

p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #666;
}

ul, ol {
    margin: 15px 0 15px 25px;
    line-height: 2;
    color: #666;
}

strong {
    color: #333;
}

/* Internal Links */
.internal-links {
    background: #f5f7fa;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
}

.internal-links h3 {
    margin-top: 0;
    color: #1e3c72;
}

.internal-links ul {
    margin: 15px 0 0 20px;
}

.internal-links a {
    color: #2a5298;
    text-decoration: none;
    font-weight: 500;
}

.internal-links a:hover {
    text-decoration: underline;
}

/* Conclusion Box */
.conclusion {
    background: #e8f4f8;
    padding: 25px;
    border-left: 4px solid #2a5298;
    border-radius: 5px;
    margin: 30px 0;
}

.conclusion h2 {
    margin-top: 0;
}

/* Info Box */
.how-to-box {
    background: #fff9e6;
    border-left: 4px solid #ffd700;
    padding: 30px;
    border-radius: 10px;
    margin-top: 50px;
}

.how-to-box h2 {
    color: #1e3c72;
    margin-bottom: 15px;
}

.how-to-box p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.how-to-box ul {
    margin-left: 20px;
    line-height: 2;
    color: #666;
}

.how-to-box code {
    background: #f5f7fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

/* Back Link */
.back-link {
    text-align: center;
    margin: 40px 0;
}

.back-link a {
    color: #2a5298;
    font-weight: 600;
    text-decoration: none;
    font-size: 18px;
}

.back-link a:hover {
    text-decoration: underline;
}

/* Search Results */
.search-results {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.search-results h2 {
    color: #1e3c72;
    margin-bottom: 10px;
}

.clear-search {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 15px;
}

.clear-search:hover {
    background: #5a6268;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Footer */
footer {
    background: #1e3c72;
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
}

footer a {
    color: #ffd700;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .navbar .container {
        flex-direction: column;
        gap: 10px;
    }

    .navbar nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .search-box input {
        width: 180px;
    }

    .search-box input:focus {
        width: 200px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2em;
    }

    .article-header,
    .article-content {
        padding: 20px;
    }

    .how-to-box {
        padding: 20px;
    }
}
