/* ============================================
   NewsHub - Professional News Portal Styles
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #c41e3a;
    --secondary-color: #1a1a2e;
    --accent-color: #e94560;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f5f5;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 15px;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 15px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #a01830;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #2d2d4a;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

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

/* Top Bar */
.top-bar {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 8px 0;
    font-size: 13px;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-date {
    color: #ccc;
}

.top-bar-social a {
    color: var(--white);
    margin-left: 15px;
    font-size: 14px;
}

.top-bar-social a:hover {
    color: var(--primary-color);
}

/* Main Header */
.main-header {
    background-color: var(--white);
    padding: 15px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
}

.search-bar input {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 25px 0 0 25px;
    width: 250px;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.search-bar input:focus {
    border-color: var(--primary-color);
}

.search-bar button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover {
    background-color: #a01830;
}

/* Navigation */
.main-nav {
    background-color: var(--primary-color);
}

.nav-menu {
    display: flex;
    justify-content: center;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 15px 25px;
    color: var(--white);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* ============================================
   Breaking News Ticker
   ============================================ */

.breaking-news {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 10px 0;
    overflow: hidden;
}

.breaking-news-content {
    display: flex;
    align-items: center;
}

.breaking-label {
    background-color: var(--white);
    color: var(--primary-color);
    padding: 5px 15px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    margin-right: 20px;
    animation: pulse 2s infinite;
}

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

.ticker-wrapper {
    overflow: hidden;
    flex: 1;
}

.ticker-content {
    display: flex;
    animation: ticker 30s linear infinite;
}

.ticker-content:hover {
    animation-play-state: paused;
}

.ticker-item {
    white-space: nowrap;
    padding-right: 50px;
    font-weight: 500;
}

.ticker-item a {
    color: var(--white);
}

.ticker-item a:hover {
    text-decoration: underline;
}

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

/* ============================================
   Hero Section / Featured News
   ============================================ */

.hero-section {
    padding: 30px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.hero-main {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 500px;
}

.hero-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-main:hover img {
    transform: scale(1.05);
}

.hero-main-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--white);
}

.hero-category {
    display: inline-block;
    background-color: var(--primary-color);
    padding: 5px 15px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 10px;
}

.hero-main h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.hero-main h2 a:hover {
    color: var(--primary-color);
}

.hero-meta {
    font-size: 13px;
    color: #ccc;
}

.hero-meta span {
    margin-right: 15px;
}

.hero-meta i {
    margin-right: 5px;
}

/* Hero Side */
.hero-side {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hero-side-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 240px;
}

.hero-side-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-side-item:hover img {
    transform: scale(1.05);
}

.hero-side-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--white);
}

.hero-side-item h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.hero-side-item h3 a:hover {
    color: var(--primary-color);
}

/* ============================================
   News Grid Section
   ============================================ */

.section-title {
    font-size: 1.5rem;
    color: var(--secondary-color);
    padding-bottom: 10px;
    margin-bottom: 25px;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.news-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.news-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

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

.news-card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 5px 12px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    border-radius: 3px;
}

.news-card-content {
    padding: 20px;
}

.news-card-content h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-card-content h3 a:hover {
    color: var(--primary-color);
}

.news-card-excerpt {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-light);
}

.news-card-meta i {
    margin-right: 5px;
}

/* ============================================
   Category Section
   ============================================ */

.category-section {
    padding: 40px 0;
    background-color: var(--white);
    margin: 30px 0;
}

.category-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.category-tab {
    padding: 10px 20px;
    background-color: var(--bg-color);
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.category-tab:hover,
.category-tab.active {
    background-color: var(--primary-color);
    color: var(--white);
}

/* ============================================
   Sidebar Styles
   ============================================ */

.content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    padding: 30px 0;
}

.sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background-color: var(--white);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 1.2rem;
    color: var(--secondary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
}

/* Popular News Widget */
.popular-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.popular-image {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    overflow: hidden;
    flex-shrink: 0;
}

.popular-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-content h4 {
    font-size: 14px;
    margin-bottom: 5px;
    line-height: 1.4;
}

.popular-content h4 a:hover {
    color: var(--primary-color);
}

.popular-content span {
    font-size: 12px;
    color: var(--text-light);
}

/* Categories Widget */
.category-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.category-list a:hover {
    color: var(--primary-color);
}

.category-count {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
}

/* Newsletter Widget */
.newsletter-form input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    margin-bottom: 10px;
    font-size: 14px;
}

.newsletter-form input[type="email"]:focus {
    border-color: var(--primary-color);
    outline: none;
}

.newsletter-form button {
    width: 100%;
}

/* Social Widget */
.social-widget-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-radius: 5px;
    color: var(--white);
    font-weight: 500;
}

.social-link.facebook { background-color: #3b5998; }
.social-link.twitter { background-color: #1da1f2; }
.social-link.instagram { background-color: #c13584; }
.social-link.youtube { background-color: #ff0000; }

.social-link:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.social-link i {
    margin-right: 8px;
}

/* ============================================
   Single News Page
   ============================================ */

.single-news-section {
    padding: 30px 0;
}

.single-news-content {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.single-news-image {
    height: 400px;
    overflow: hidden;
}

.single-news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-news-body {
    padding: 30px;
}

.single-news-category {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 5px 15px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 15px;
}

.single-news-title {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.single-news-meta {
    display: flex;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-light);
    flex-wrap: wrap;
}

.single-news-meta i {
    margin-right: 5px;
}

.single-news-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
}

.single-news-text p {
    margin-bottom: 20px;
}

/* TTS Button */
.tts-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin: 20px 0;
    transition: var(--transition);
}

.tts-btn:hover {
    background-color: var(--primary-color);
}

.tts-btn i {
    font-size: 16px;
}

/* Share Buttons */
.share-section {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}

.share-title {
    font-weight: 600;
    color: var(--secondary-color);
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--white);
    font-size: 16px;
    transition: var(--transition);
}

.share-btn:hover {
    transform: translateY(-3px);
}

.share-btn.facebook { background-color: #3b5998; }
.share-btn.twitter { background-color: #1da1f2; }
.share-btn.whatsapp { background-color: #25d366; }

/* ============================================
   Comments Section
   ============================================ */

.comments-section {
    margin-top: 40px;
    padding: 30px;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 25px;
}

.comment-item {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.comment-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
    font-weight: 600;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 600;
    color: var(--secondary-color);
}

.comment-date {
    font-size: 12px;
    color: var(--text-light);
}

.comment-text {
    color: var(--text-color);
    line-height: 1.6;
}

/* Comment Form */
.comment-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

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

.main-footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 50px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-logo {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.footer-logo span {
    color: var(--primary-color);
}

.footer-about {
    color: #aaa;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    margin-right: 10px;
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--primary-color);
}

.footer-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #aaa;
    font-size: 14px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #aaa;
    font-size: 14px;
    margin-bottom: 12px;
}

.footer-contact i {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    color: #aaa;
    font-size: 14px;
    margin: 0;
}

/* ============================================
   Pagination
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--white);
    border-radius: 5px;
    color: var(--text-color);
    font-weight: 500;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.pagination a:hover,
.pagination a.active {
    background-color: var(--primary-color);
    color: var(--white);
}

/* ============================================
   Search Results
   ============================================ */

.search-results {
    padding: 30px 0;
}

.search-form-large {
    max-width: 600px;
    margin: 0 auto 40px;
}

.search-form-large input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
}

.search-form-large input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.no-results {
    text-align: center;
    padding: 50px;
    color: var(--text-light);
}

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

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-side {
        flex-direction: row;
    }
    
    .hero-side-item {
        height: 200px;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-bar input {
        width: 200px;
    }
    
    .nav-menu {
        flex-direction: column;
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero-main {
        height: 350px;
    }
    
    .hero-side {
        flex-direction: column;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .single-news-image {
        height: 250px;
    }
    
    .single-news-title {
        font-size: 1.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .share-section {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.8rem;
    }
    
    .search-bar input {
        width: 150px;
    }
    
    .hero-main h2 {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

.slide-up {
    animation: slideUp 0.5s ease;
}

/* ============================================
   Loading Spinner
   ============================================ */

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Alert Messages
   ============================================ */

.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* ============================================
   Complaint Form Modal
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--white);
    border-radius: 10px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    transform: translateY(-20px);
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
}

.modal-close:hover {
    color: var(--primary-color);
}