:root {
    --orange-primary: #ff8c00;
    --orange-secondary: #ffa500;
    --dark-footer: #2c3e50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}


/* Header Styles */

.header-top {
    background-color: #fff;
    padding: 10px 0;
    border-bottom: 2px solid var(--orange-primary);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-emblem {
    width: 60px;
    height: 60px;
    background: var(--orange-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.organization-title {
    flex: 1;
}

.organization-title h4 {
    margin: 0;
    color: var(--dark-footer);
    font-weight: 700;
}

.organization-title p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.lang-selector {
    display: flex;
    gap: 10px;
    align-items: center;
}

.lang-selector a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.lang-selector a:hover,
.lang-selector a.active {
    background-color: var(--orange-primary);
    color: white;
}


/* Hero Section Enhancements */

.hero-section {
    position: relative;
    padding: 100px 0;
    /* use the actual relative path to the image */
    background-image: url("../images/news/newss.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #333;
    /* fallback color while image fails to load */
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    /* White text for contrast */
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    /* Shadow for better readability */
}

.news-meta {
    font-size: 1.1rem;
    opacity: 0.9;
}


/* For Foreground Image Option */

.hero-image-wrapper {
    margin-bottom: 2rem;
}

.hero-img {
    width: 100%;
    height: auto;
    max-height: 400px;
    /* Cap height to avoid overly tall images */
    object-fit: cover;
    /* Crops to fit nicely */
}

.hero-img-placeholder {
    height: 300px;
    /* Matching placeholder height */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}


/* Responsive Adjustments */

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    .hero-section h1 {
        font-size: 2rem;
    }
}


/* News Cards Section */

.news-section {
    background: #f8f9fa;
    padding: 60px 0;
}

.news-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    border: none;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .card-img-wrapper img {
    transform: scale(1.1);
}

.news-card .card-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    height: calc(100% - 200px);
}

.news-card .card-title {
    color: var(--dark-text);
    /* Ensure --dark-text is defined in :root */
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 15px;
    display: -webkit-box;
    /* Keep for legacy support (optional, but harmless) */
    -webkit-line-clamp: 2;
    /* Legacy prefix for older browsers */
    -webkit-box-orient: vertical;
    /* Legacy */
    line-clamp: 2;
    /* Modern standard - replaces the above */
    overflow: hidden;
    /* Required for clipping */
    text-overflow: ellipsis;
    /* Adds the ... at the end */
}

.news-card .card-text {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 20px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: #888;
}

.btn-read-more {
    background: black;
    border: none;
    color: #fff;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.btn-read-more:hover {
    background: linear-gradient(135deg, #515050, #4e4e4e);
    transform: scale(1.05);
    color: #fff;
}


/* Responsive Design */

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    .logo-section {
        justify-content: center;
        margin-bottom: 15px;
    }
    .language-selector {
        justify-content: center;
    }
    .nav-pills .nav-link {
        padding: 12px 15px;
        font-size: 0.8rem;
    }
    .news-card .card-body {
        padding: 20px;
    }
}