/* CSS Variables for Clean Maintenance */
:root {
    --navy-dark: #0a192f;
    --navy-light: #112240;
    --accent-blue: #64ffda; /* Aqua accent for readability */
    --text-main: #ccd6f6;
    --text-dim: #8892b0;
    --white: #ffffff;
}

/* Global Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--navy-dark);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
}

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

/* Navbar Style */
.navbar {
    background-color: rgba(10, 25, 47, 0.95);
    height: 70px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--navy-light);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
    text-decoration: none;
}

.logo span {
    color: var(--accent-blue);
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 20px;
}

.nav-links li a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links li a:hover {
    color: var(--accent-blue);
}

/* Hero Section */
.hero {
    padding: 30px 0;
    text-align: center;
    background: linear-gradient(to bottom, var(--navy-light), var(--navy-dark));
}

.hero h1 {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 10px;
}

.hero p {
    color: var(--text-dim);
    font-size: 1.1rem;
}

/* News Grid & Cards */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: -20px; /* Slight overlap for modern look */
}

.card {
    background-color: var(--navy-light);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
}

.placeholder {
    height: 180px;
    background-color: #233554;
}

.card-content {
    padding: 20px;
}

.card-image {
  height: 180px;
  overflow: hidden;
  background-color: #233554;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-image img {
    transform: scale(1.1);
}

.category {
    color: var(--accent-blue);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: bold;
}

.card h2 {
    margin: 10px 0;
    font-size: 1.3rem;
    color: var(--white);
}

.card p {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 20px;
}

.read-more {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Footer Style */
.footer {
    padding: 40px 0;
    text-align: center;
    margin-top: 60px;
    border-top: 1px solid var(--navy-light);
}

.footer .tagline {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 10px;
}

/* About Section Styling */
.about-section {
    padding: 80px 20px;
    text-align: center; 
    border-top: 1px solid var(--navy-light);
}

.about-section h2 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 2rem;
}

.about-section p {
    color: var(--text-dim);
    max-width: 700px; 
    margin: 0 auto; 
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Contact Section Styling */
.contact-section {
    padding: 80px 20px;
    text-align: center;
    border-top: 1px solid var(--navy-light);
}

.contact-section h2 {
    color: var(--white);
    margin-bottom: 20px;
}

.contact-section p {
    color: var(--text-dim);
    margin-bottom: 30px;
}

.contact-button {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-button:hover {
    background-color: rgba(100, 255, 218, 0.1);
    transform: translateY(-3px);
}

/* =========================================
   Category Bar Looping Style
========================================= */
.category-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 12px 0;
    background-color: var(--navy-dark); 
    border-bottom: 1px solid var(--navy-light);
    position: sticky;
    top: 70px;
    z-index: 999;
    box-shadow: inset 0 -5px 15px rgba(0, 0, 0, 0.2); 
}

.category-scroll {
    display: flex;
    width: max-content;
    animation: scroll-left 20s linear infinite;
}

.category-scroll:hover {
    animation-play-state: paused;
}

.category-group {
    display: flex;
    gap: 15px;
    padding-right: 15px;
}

.cat-pill {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--text-dim);
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cat-pill:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background-color: rgba(100, 255, 218, 0.1);
    transform: translateY(-2px);
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Search Bar Style */
.search-container {
    background-color: var(--navy-dark);
    padding: 10px 0;
    border-bottom: 1px solid var(--navy-light);
    position: sticky;
    top: 70px;
    z-index: 1000;
}

.category-wrapper {
    top: 125px !important;
}

#news-search {
    width: 100%;
    padding: 12px 20px;
    background: var(--navy-light);
    border: 1px solid var(--text-dim);
    border-radius: 4px;
    color: var(--white);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

#news-search:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.1);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

#news-search {
    width: 100%;
    padding: 12px 20px 12px 20px;
    background: var(--navy-light);
    border: 1px solid var(--navy-light);
    border-radius: 8px;
    color: var(--white);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

#news-search:focus {
    border-color: var(--accent-blue);
    background: rgba(17, 34, 64, 0.8);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.share-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

.share-btn:hover {
    color: var(--accent-blue);
}

.share-btn svg {
    width: 20px;
    height: 20px;
  }
