/* ============================================
   NewsTrendings - Main Stylesheet
   RHIMS News Jacking Site
   ============================================ */

/* ============================================
   CSS RESET & BASE STYLES
   ============================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #ffffff;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #1976d2;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0d47a1;
    text-decoration: underline;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */

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

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.site-header {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo a {
    color: #ffffff;
    text-decoration: none;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.2rem;
}

.logo .tagline {
    font-size: 0.85rem;
    color: #cccccc;
    font-weight: 300;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.main-nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.main-nav a:hover {
    background-color: #333333;
    text-decoration: none;
}

/* ============================================
   BREAKING NEWS BAR (Optional)
   ============================================ */

.breaking-news-bar {
    background-color: #d32f2f;
    color: #ffffff;
    padding: 0.75rem 0;
    text-align: center;
    font-weight: 500;
    animation: slideDown 0.5s ease;
}

.breaking-label {
    background-color: #ffffff;
    color: #d32f2f;
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    font-weight: 700;
    margin-right: 1rem;
    font-size: 0.85rem;
}

.breaking-text {
    font-size: 1rem;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    padding: 2rem 0;
    min-height: 60vh;
}

/* ============================================
   FEATURED STORY
   ============================================ */

.featured-story {
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-story:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.featured-image {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

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

.featured-story:hover .featured-image img {
    transform: scale(1.05);
}

.featured-content {
    padding: 2rem;
}

.featured-headline {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    font-family: Georgia, serif;
}

.featured-headline a {
    color: #1a1a1a;
    text-decoration: none;
}

.featured-headline a:hover {
    color: #1976d2;
}

.featured-excerpt {
    font-size: 1.1rem;
    color: #4a4a4a;
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* ============================================
   CATEGORY BADGES
   ============================================ */

.category-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 3px;
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: #1976d2;
    color: #ffffff;
}

.category-badge.tech {
    background-color: #1976d2;
}

.category-badge.business {
    background-color: #388e3c;
}

.category-badge.entertainment {
    background-color: #e91e63;
}

.category-badge.breaking {
    background-color: #d32f2f;
    animation: pulse 2s infinite;
}

.category-badge.world {
    background-color: #f57c00;
}

.category-badge.sports {
    background-color: #7b1fa2;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ============================================
   ARTICLE META
   ============================================ */

.article-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #757575;
}

.publish-date::before {
    content: "📅 ";
}

.read-time::before {
    content: "⏱️ ";
}

/* ============================================
   NEWS SECTIONS
   ============================================ */

.news-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #1976d2;
    font-family: Georgia, serif;
}

/* ============================================
   NEWS GRID
   ============================================ */

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.news-card {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f5f5f5;
}

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

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

.card-content {
    padding: 1.5rem;
}

.card-headline {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    font-family: Georgia, serif;
}

.card-headline a {
    color: #1a1a1a;
    text-decoration: none;
}

.card-headline a:hover {
    color: #1976d2;
}

.card-excerpt {
    font-size: 0.95rem;
    color: #4a4a4a;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ============================================
   TRENDING SECTION
   ============================================ */

.trending-section {
    background-color: #fff3e0;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #f57c00;
    margin-bottom: 3rem;
}

.trending-list ol {
    list-style-position: inside;
    font-size: 1.1rem;
    line-height: 2;
}

.trending-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #ffe0b2;
}

.trending-list li:last-child {
    border-bottom: none;
}

.trending-list a {
    color: #1a1a1a;
    font-weight: 500;
}

.trending-list a:hover {
    color: #f57c00;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background-color: #1a1a1a;
    color: #cccccc;
    padding: 2rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #ffffff;
    text-decoration: none;
}

.social-links {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
}

.social-links a {
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #333333;
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav ul {
        justify-content: center;
    }

    .featured-headline {
        font-size: 1.75rem;
    }

    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 15px;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .main-nav ul {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .main-nav a {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .featured-image {
        height: 250px;
    }

    .featured-headline {
        font-size: 1.5rem;
    }

    .featured-excerpt {
        font-size: 1rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
    .main-nav ul {
        gap: 0.25rem;
    }

    .main-nav a {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .featured-content {
        padding: 1.5rem;
    }

    .card-content {
        padding: 1.25rem;
    }

    .breaking-news-bar {
        font-size: 0.9rem;
    }

    .breaking-label {
        display: block;
        margin-bottom: 0.5rem;
        margin-right: 0;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.hidden {
    display: none;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
    outline: 2px solid #1976d2;
    outline-offset: 2px;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .site-header,
    .main-nav,
    .breaking-news-bar,
    .site-footer {
        display: none;
    }

    .main-content {
        padding: 0;
    }

    a {
        color: #000000;
        text-decoration: underline;
    }

    .news-card {
        page-break-inside: avoid;
    }
}
