/* Home Page Styles */
.home-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

/* Floating Particles */
.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    background: rgba(155, 175, 135, 0.5);
    border-radius: 50%;
    animation: floatParticle 20s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(155, 175, 135, 0.6);
}

.particle-1 { width: 8px; height: 8px; top: 20%; left: 10%; animation-duration: 25s; animation-delay: -5s; }
.particle-2 { width: 10px; height: 10px; top: 60%; left: 80%; animation-duration: 30s; animation-delay: -10s; }
.particle-3 { width: 6px; height: 6px; top: 40%; left: 60%; animation-duration: 35s; animation-delay: -15s; }
.particle-4 { width: 9px; height: 9px; top: 80%; left: 30%; animation-duration: 28s; animation-delay: -8s; }
.particle-5 { width: 8px; height: 8px; top: 30%; left: 90%; animation-duration: 32s; animation-delay: -12s; }
.particle-6 { width: 7px; height: 7px; top: 15%; left: 25%; animation-duration: 27s; animation-delay: -3s; }
.particle-7 { width: 9px; height: 9px; top: 45%; left: 15%; animation-duration: 33s; animation-delay: -7s; }
.particle-8 { width: 5px; height: 5px; top: 70%; left: 45%; animation-duration: 29s; animation-delay: -11s; }
.particle-9 { width: 8px; height: 8px; top: 25%; left: 65%; animation-duration: 31s; animation-delay: -4s; }
.particle-10 { width: 6px; height: 6px; top: 55%; left: 85%; animation-duration: 26s; animation-delay: -9s; }
.particle-11 { width: 7px; height: 7px; top: 35%; left: 5%; animation-duration: 34s; animation-delay: -6s; }
.particle-12 { width: 9px; height: 9px; top: 75%; left: 55%; animation-duration: 28s; animation-delay: -13s; }
.particle-13 { width: 5px; height: 5px; top: 10%; left: 40%; animation-duration: 32s; animation-delay: -2s; }
.particle-14 { width: 8px; height: 8px; top: 50%; left: 75%; animation-duration: 30s; animation-delay: -8s; }
.particle-15 { width: 6px; height: 6px; top: 85%; left: 20%; animation-duration: 35s; animation-delay: -14s; }
.particle-16 { width: 7px; height: 7px; top: 5%; left: 70%; animation-duration: 27s; animation-delay: -1s; }
.particle-17 { width: 9px; height: 9px; top: 65%; left: 35%; animation-duration: 29s; animation-delay: -10s; }
.particle-18 { width: 5px; height: 5px; top: 30%; left: 50%; animation-duration: 33s; animation-delay: -5s; }
.particle-19 { width: 8px; height: 8px; top: 90%; left: 60%; animation-duration: 31s; animation-delay: -12s; }
.particle-20 { width: 6px; height: 6px; top: 12%; left: 85%; animation-duration: 26s; animation-delay: -3s; }
.particle-21 { width: 7px; height: 7px; top: 48%; left: 8%; animation-duration: 34s; animation-delay: -7s; }
.particle-22 { width: 9px; height: 9px; top: 78%; left: 42%; animation-duration: 28s; animation-delay: -11s; }
.particle-23 { width: 5px; height: 5px; top: 22%; left: 28%; animation-duration: 32s; animation-delay: -4s; }
.particle-24 { width: 8px; height: 8px; top: 58%; left: 68%; animation-duration: 30s; animation-delay: -9s; }
.particle-25 { width: 6px; height: 6px; top: 38%; left: 95%; animation-duration: 35s; animation-delay: -6s; }

@keyframes floatParticle {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    25% { transform: translate(20px, -30px) scale(1.2); opacity: 0.8; }
    50% { transform: translate(-15px, -60px) scale(0.8); opacity: 0.6; }
    75% { transform: translate(30px, -90px) scale(1.1); opacity: 0.9; }
}

/* Cross gradient effect - ONLY for home page */
.home-container::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, transparent 48%, rgba(155, 175, 135, 0.03) 50%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(111, 138, 109, 0.025) 50%, transparent 52%);
    animation: subtleShift 40s ease-in-out infinite reverse;
    pointer-events: none;
    z-index: -1;
}

/* Giant Logo Section */
.logo-section {
    text-align: center;
    padding: 4rem 2rem 3rem;
    border-bottom: 3px solid var(--border-color);
    background: linear-gradient(135deg, rgba(155, 175, 135, 0.03), rgba(111, 138, 109, 0.02));
}

.giant-logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 4.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    letter-spacing: 0.1em;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, var(--text-primary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.therefore-line {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    margin-bottom: 1rem;
}

.rotating-verb {
    color: var(--accent-primary);
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline;
}

.logo-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 1rem;
    font-style: italic;
    letter-spacing: 0.05em;
}

/* News Section */
.news-section {
    padding: 0;
    background: var(--text-primary);
    color: var(--primary-bg);
}

.news-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    border: 2px solid var(--primary-bg);
}

/* Top Stories Layout */
.top-stories {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* consistent, modest gap between stories */
    border-right: 2px solid var(--primary-bg);
}

/* Avoid extra trailing space after the second story by removing bottom border and extra padding on the last one */
.top-stories > .secondary-story {
    border-bottom: none;
    padding-bottom: 0; /* let page content following define spacing */
}

.main-story {
    border-bottom: 2px solid var(--primary-bg);
    padding: 1.5rem 2rem 0 2rem; /* rely on .top-stories gap for spacing */
    background: var(--text-primary);
}

.secondary-story {
    padding: 0 2rem 1.5rem 2rem; /* rely on .top-stories gap for spacing */
    background: var(--text-primary);
}

/* Ensure left column stories stack content then image (title above image) */
.main-story,
.secondary-story {
    display: flex;
    flex-direction: column;
}

/* Force order explicitly to avoid any overrides */
.main-story .story-content,
.secondary-story .story-content {
    order: 0;
}

.main-story .story-image,
.secondary-story .story-image {
    order: 1;
}

.story-image {
    width: 100%;
    margin-top: 1rem; /* image sits below the text block */
    margin-bottom: 1rem; /* breathing room before next elements */
    border-radius: 8px;
    padding: 0.5rem; /* uniform padding around thumbnails */
}

.story-image img {
    width: 100%;
    height: auto; /* preserve natural aspect ratio; no cropping */
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
    max-height: clamp(280px, 28vw, 640px); /* responsive, non-cropping */
    transform: scale(1.02); /* default size is now the hover size */
}

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

.story-content {
    padding: 0;
}

.story-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-bg);
    margin-bottom: 1rem;
    line-height: 1.2;
    border-bottom: 1px solid var(--primary-bg);
    padding-bottom: 0.5rem;
}

.main-story .story-title {
    font-size: 2.2rem;
    font-weight: 900;
}

.story-excerpt {
    color: var(--primary-bg);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-weight: 500;
}

.story-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* Preserve original heading styles for links on homepage */
.story-title a,
.card-title a {
    color: inherit;
    text-decoration: none;
}

.story-title a:hover,
.card-title a:hover,
.story-title a:focus,
.card-title a:focus {
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.story-title a:visited,
.card-title a:visited {
    color: inherit;
    text-decoration: none;
}

/* Right Sidebar - Article Cards and More News */
.right-sidebar {
    display: grid;
    grid-template-rows: auto 1fr;
}

/* Article Cards Grid */
.article-cards {
    display: grid;
    grid-template-rows: auto auto auto; /* size to content */
    row-gap: 1rem; /* increased spacing between cards */
    border-bottom: 2px solid var(--primary-bg);
}

.article-card {
    border-bottom: 1px solid var(--primary-bg);
    padding: 1.5rem; /* increased interior space */
    background: var(--text-primary);
}

.article-card:last-child {
    border-bottom: none;
}

.card-image {
    width: 100%;
    margin-bottom: 1.5rem; /* increased gap between image and text */
    border-radius: 6px;
    padding: 0.25rem; /* lighter padding on right */
}

.card-image img {
    width: 100%;
    height: auto; /* avoid cropping */
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
    max-height: 300px; /* slightly larger thumbnails */
    transform: scale(1.02); /* default size is now the hover size */
}

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

/* Ensure right sidebar cards always show image above content */
.article-card {
    display: flex;
    flex-direction: column;
}

.article-card .card-image { order: 0; }
.article-card .card-content { order: 1; }

.card-content {
    padding: 0;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-bg);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    border-bottom: 1px solid var(--primary-bg);
    padding-bottom: 0.3rem;
}

.card-excerpt {
    color: var(--primary-bg);
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    font-weight: 500;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* Bias tags are now in base.css */

.read-time {
    font-size: 0.8rem;
    color: var(--primary-bg);
    opacity: 0.8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* More News Section */
.more-news {
    background: var(--text-primary);
    padding: 2rem;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-bg);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-bg);
    padding-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.news-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--primary-bg);
    gap: 1rem;
}

.news-item:last-child {
    border-bottom: none;
}

.news-title {
    color: var(--primary-bg);
    font-size: 1rem;
    flex: 1;
    font-weight: 600;
    margin-right: 1rem;
}

/* If news title is an anchor itself, keep look consistent */
.news-title,
.news-title:link,
.news-title:visited,
.news-title:focus {
    color: var(--primary-bg);
    text-decoration: none;
}

.news-title:hover {
    color: var(--primary-bg);
    text-decoration: underline;
    cursor: pointer;
}

.view-all-btn {
    background: var(--primary-bg);
    color: var(--text-primary);
    border: 2px solid var(--primary-bg);
    padding: 0.8rem 1.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-all-btn:hover {
    background: var(--text-primary);
    color: var(--primary-bg);
    border: 2px solid var(--primary-bg);
}

/* Responsive Design for Home Page */
@media (max-width: 1024px) {
    .news-container {
        grid-template-columns: 1fr;
    }
    
    .top-stories {
        border-right: none;
        border-bottom: 2px solid var(--primary-bg);
    }
}

@media (max-width: 768px) {
    .giant-logo h1 {
        font-size: 3.5rem;
    }
    
    .therefore-line {
        font-size: 1.3rem;
    }
    
    .logo-section {
        padding: 3rem 1rem 2rem;
    }
    
    .main-story,
    .secondary-story {
        padding: 1rem;
    }
    
    .article-card {
        padding: 1rem;
    }
    
    .more-news {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .giant-logo h1 {
        font-size: 2.8rem;
    }
    
    .therefore-line {
        font-size: 1.1rem;
    }
    
    .story-title {
        font-size: 1.5rem;
    }
    
    .main-story .story-title {
        font-size: 1.8rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
}
