/* =========================================
   India View 24x7 - Modern News Portal CSS
   Inspired by The New York Times
   ========================================= */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

/* =========================================
   Header Styles
   ========================================= */

.site-header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000;
}

/* Top Bar */
.top-bar {
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
}

.date {
    font-size: 0.85rem;
    color: #666;
}

.top-nav {
    display: flex;
    gap: 20px;
}

.top-nav a {
    text-decoration: none;
    color: #666;
    font-size: 0.85rem;
    font-weight: 500;
}

.top-nav a:hover {
    color: #000;
}

/* Header Main */
.header-main {
    background: #fff;
    padding: 20px 0;
}

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

/* Logo */
.logo {
    flex: 1;
}

.logo h1 {
    font-family: 'Merriweather', serif;
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1.1;
    color: #000;
    letter-spacing: -0.5px;
}

.logo .tagline {
    font-size: 1rem;
    color: #666;
    font-weight: 300;
    margin-top: 5px;
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: #000;
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: #000;
    left: 0;
    transition: transform 0.3s;
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    top: 7px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: #000;
    font-weight: 700;
    font-size: 1rem;
    padding: 5px 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #000;
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Breaking News Ticker */
.breaking-news {
    background: #000;
    color: #fff;
    overflow: hidden;
}

.breaking-news .container {
    display: flex;
    align-items: center;
    padding: 10px 0;
}

.breaking-news .label {
    background: #ff4500;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 4px 10px;
    margin-right: 15px;
    white-space: nowrap;
}

.ticker {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-content {
    display: inline-block;
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* =========================================
   Main Content Styles
   ========================================= */

main {
    padding: 30px 0;
}

.section-title {
    font-family: 'Merriweather', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
    display: inline-block;
}

/* Featured Stories */
.featured-stories {
    margin-bottom: 40px;
}

.story-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
}

.story-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.3s;
}

.story-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.story-image {
    position: relative;
    overflow: hidden;
}

.story-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s;
}

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

.category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 5px 12px;
    text-transform: uppercase;
}

.story-content {
    padding: 20px;
}

.story-content h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.story-content h3 a {
    color: #000;
    text-decoration: none;
}

.story-content h3 a:hover {
    color: #006c4b;
}

.summary {
    color: #555;
    font-size: 1rem;
    margin-bottom: 15px;
}

.meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #777;
}

.medium .story-image,
.medium .story-content h3 {
    font-size: 1.3rem;
}

/* Breaking News Section */
.breaking-news-section {
    margin-bottom: 40px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.news-list {
    list-style: none;
}

.news-list li {
    display: flex;
    margin-bottom: 15px;
}

.time-label {
    min-width: 80px;
    color: #777;
    font-size: 0.9rem;
    font-weight: 500;
}

.news-list li a {
    color: #000;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
}

.news-list li a:hover {
    color: #006c4b;
}

/* Category Grid */
.category-grid {
    margin-bottom: 40px;
}

.category-grid .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.category-tile {
    display: block;
    text-decoration: none;
    color: #000;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.category-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.tile-image {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
}

.category-tile h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.3rem;
    font-weight: 700;
    padding: 15px 20px 5px;
}

.category-tile p {
    padding: 0 20px 15px;
    color: #666;
    font-size: 0.9rem;
}

/* Top Stories by Category */
.top-stories {
    margin-bottom: 40px;
}

.category-section {
    margin-bottom: 40px;
}

.category-section:last-child {
    margin-bottom: 0;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}

.category-header h2 {
    font-family: 'Merriweather', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
}

.view-all {
    color: #006c4b;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

.stories-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.story-preview {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.story-preview:last-child {
    border-bottom: none;
}

.image-container {
    flex: 0 0 150px;
}

.image-container img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.story-preview .content h4 {
    font-family: 'Merriweather', serif;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
}

.story-preview .content h4 a {
    color: #000;
    text-decoration: none;
}

.story-preview .content h4 a:hover {
    color: #006c4b;
}

.summary {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.time-label {
    font-size: 0.8rem;
    color: #999;
}

/* =========================================
   Footer Styles
   ========================================= */

.site-footer {
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    padding: 40px 0 20px;
}

.footer-top {
    margin-bottom: 30px;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-column h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

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

.footer-column li {
    margin-bottom: 8px;
}

.footer-column a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-column a:hover {
    color: #006c4b;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.copyright {
    font-size: 0.9rem;
    color: #777;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: #777;
    text-decoration: none;
    font-size: 0.85rem;
}

.social-links a:hover {
    color: #006c4b;
}

/* =========================================
   Responsive Design
   ========================================= */

@media (max-width: 1024px) {
    .story-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .story-item.large {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .logo h1 {
        font-size: 2rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 10px 0;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        padding: 10px 20px;
    }
    
    .story-grid {
        grid-template-columns: 1fr;
    }
    
    .story-item.large,
    .medium {
        grid-column: span 1;
    }
    
    .stories-row {
        grid-template-columns: 1fr;
    }
    
    .top-bar .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .breaking-news .label {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
    
    .ticker-content {
        animation-duration: 20s;
    }
    
    .category-grid .grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-tile:hover {
        transform: none;
    }
    
    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .story-preview {
        flex-direction: column;
    }
    
    .image-container {
        width: 100%;
        flex: none;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .category-grid .grid {
        grid-template-columns: 1fr;
    }
    
    .category-tile .tile-image {
        height: 150px;
    }
    
    .footer-columns {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

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

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .breaking-news {
        display: none;
    }
}

/* Focus Styles */
:focus {
    outline: 3px solid #006c4b;
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 3px solid #006c4b;
    outline-offset: 2px;
}
