:root {
    --accent-blue-color: #007bff;
    --accent-red-color: #d91616;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f9;
    display: flex;
    flex-direction: column;
}

/* Hero Container */
.hero-container {
    position: relative;

    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.hero-text h1 {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

/* Navigation Bar Styles */
nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 80px;
    height: 60px;
    background-color: transparent;
    transition: background-color 0.3s ease;
    z-index: 100;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

nav a {
    color: #333;
}

nav .nav-right a {
    color: var(--accent-blue-color);
}

nav:hover .nav-right a:hover {
    color: #ffffff;
}



/* Left Section: Logo and Location */
.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navlogo img {
    height: 70px; /* Adjust height as needed */
    display: block;
}

.nav-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    font-size: 16px;
    font-weight: 700;
}
nav:hover .nav-location {
    color: #333;
}

.nav-location i {
    color: var(--accent-red-color);
    font-size: 18px;
}

/* Center Section: Navigation Links */
.nav-center ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-center a {
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-center a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-red-color);
    transition: width 0.3s ease;
}

.nav-center a:hover::after {
    width: 100%;
}

/* Right Section: User Account */
.nav-right a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    font-size: 16px;
    padding: 8px 15px;
    border: 1px solid #007bff;
    border-radius: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-right a:hover {
    background-color: #007bff;
    color: #ffffff;
    border-color: #007bff;
}

/* style/news.css */

/* Main container for the news section */
.news-main {
    background-color: #f4f7f9;
    padding: 40px 0;
    flex: 1 0 auto;
    margin-top: 30px;
}

.news-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.news-header {
    text-align: center;
    margin-bottom: 40px;
}

.news-header h1 {
    font-size: 2.8rem;
    color: var(--text-color);
    padding: 10px;
}

.news-header p {
    font-size: 1.1rem;
    color: #667;
}

/* Grid layout for news cards */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    align-items: stretch; /* Makes all cards in a row the same height */
}

/* Anchor tag wrapping the card */
.news-card-anchor {
    text-decoration: none;
    color: inherit;
    display: flex; /* Use flex to make the card fill the anchor */
    flex-direction: column;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card-anchor:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Individual news card styling */
.news-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card-image {
    height: 200px;
    width: 100%;
    object-fit: cover;
    object-position: center;
}

.news-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allows content to fill the card */
}

.news-card-title {
    font-size: 1.4rem;
    line-height: 1.4;
    color: var(--text-color);
    margin: 0 0 10px 0;
    transition: color 0.3s ease;
    /* Truncate text to TWO lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-card-anchor:hover .news-card-title {
    color: var(--accent-blue-color);
}

.news-card-date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 10px;
    margin-top: auto; /* Pushes this and read-more to the bottom */
}

.news-card-read-more {
    font-weight: 600;
    color: var(--accent-blue-color);
}

.news-card-read-more i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.news-card-anchor:hover .news-card-read-more i {
    transform: translateX(4px);
}

/* Message for when no news is available */
.no-news {
    grid-column: 1 / -1; /* Span across all columns */
    text-align: center;
    font-size: 1.2rem;
    color: #777;
    padding: 50px 20px;
    background-color: #fff;
    border-radius: 8px;
}

/* Article page specific styles */
.article-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 40px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,.07);
}

.article-header .article-title {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 10px;
    /* Allow long words/titles to wrap correctly */
    overflow-wrap: break-word;
    word-break: break-word;
}

.article-meta {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 30px;
}

.article-meta span {
    margin-right: 15px;
}

.article-image-full {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 30px;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    overflow-wrap: break-word;
    text-align: justify;
}

.article-content p {
    margin-bottom: 1.5em;
}

.back-to-news-link {
    display: inline-block;
    margin-top: 30px;
    text-decoration: none;
    color: var(--accent-blue-color);
    font-weight: 600;
}

.back-to-news-link:hover {
    text-decoration: underline;
}

footer {
    background-color: #f8f9fa;
    padding: 20px 80px;
    border-top: 1px solid #e7e7e7;
    flex-shrink: 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left p,
.footer-right p {
    margin: 0;
    color: #555;
    font-size: 14px;
}

.footer-left p:first-child {
    font-weight: 700;
}

.footer-right {
    text-align: right;
}

/* === RESPONSIVE STYLES === */
@media (max-width: 1024px) {
    nav {
        padding: 10px 30px;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 10px 20px;
    }
    .nav-center, .nav-location {
        display: none;
    }
    .news-header h1 {
        font-size: 2.2rem;
    }
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .article-container {
        padding: 30px;
        margin-top: 20px;
    }
    .article-header .article-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .news-container, .article-container {
        padding: 0 15px;
    }
    .article-container {
        padding: 20px;
    }
    .news-header h1 {
        font-size: 1.8rem;
    }
    .article-header .article-title {
        font-size: 1.6rem;
    }
    .article-content {
        font-size: 1rem;
        line-height: 1.7;
    }
    .footer-content {
        flex-direction: column;
        gap: 10px;
    }
}
