/*
Theme Name: NewsPortal Pro
Description: Modern news portal theme inspired by CNN design with responsive layout and advanced features. Tema portal berita modern dengan desain responsif seperti CNN untuk website berita Indonesia.
Version: 1.0
Author: NewsPortal Team
Text Domain: newsportal
Tags: news, magazine, blog, responsive, two-columns, custom-menu, featured-images, threaded-comments, translation-ready
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

NewsPortal Pro is a modern, responsive WordPress theme designed for news websites and online magazines. Features include breaking news ticker, featured posts, responsive design, and social media integration.
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.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: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: #000;
    color: #fff;
    padding: 5px 0;
    font-size: 12px;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-main {
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 32px;
    font-weight: bold;
    color: #e60000;
    text-decoration: none;
}

.logo:hover {
    color: #cc0000;
}

/* Navigation */
.main-navigation {
    background: #e60000;
    position: relative;
}

.nav-menu {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    transition: background 0.3s;
}

.nav-menu a:hover {
    background: rgba(255,255,255,0.1);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 15px 20px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.mobile-menu-toggle:focus {
    outline: 2px solid rgba(255,255,255,0.5);
}

/* Dropdown Menu */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 999;
}

.nav-menu li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu a {
    color: #333;
    border-bottom: 1px solid #eee;
}

.nav-menu .sub-menu a:hover {
    background: #f5f5f5;
}

/* Breaking News Bar */
.breaking-news {
    background: #000;
    color: #fff;
    padding: 10px 0;
    overflow: hidden;
}

.breaking-content {
    display: flex;
    align-items: center;
}

.breaking-label {
    background: #e60000;
    padding: 5px 15px;
    margin-right: 15px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
}

.breaking-text {
    white-space: nowrap;
    animation: scroll-left 30s linear infinite;
}

@keyframes scroll-left {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Main Content */
.main-content {
    margin: 30px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

/* Featured Section */
.featured-section {
    margin-bottom: 30px;
}

.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.featured-main .post-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.featured-main .post-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.featured-main .post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
    padding: 30px;
}

.featured-main .post-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.3;
}

.featured-main .post-title a {
    color: #fff;
    text-decoration: none;
}

.featured-side {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.featured-side .post-item {
    display: flex;
    gap: 15px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.featured-side .post-image {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.featured-side .post-content {
    flex: 1;
}

.featured-side .post-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    line-height: 1.3;
}

.featured-side .post-title a {
    color: #333;
    text-decoration: none;
}

.featured-side .post-title a:hover {
    color: #e60000;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.post-card .post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card .post-content {
    padding: 20px;
}

.post-card .post-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.post-card .post-category {
    background: #e60000;
    color: #fff;
    padding: 3px 8px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 11px;
    margin-right: 10px;
}

.post-card .post-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.3;
}

.post-card .post-title a {
    color: #333;
    text-decoration: none;
}

.post-card .post-title a:hover {
    color: #e60000;
}

.post-card .post-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.widget {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.widget-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e60000;
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.widget a:hover {
    color: #e60000;
}

/* Popular Posts Widget */
.popular-post {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.popular-post:last-child {
    margin-bottom: 0;
}

.popular-post .post-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.popular-post .post-content {
    flex: 1;
}

.popular-post .post-title {
    font-size: 13px;
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 5px;
}

.popular-post .post-date {
    font-size: 11px;
    color: #666;
}

/* Footer */
.site-footer {
    background: #333;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #e60000;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 8px;
}

.footer-widget a {
    color: #ccc;
    text-decoration: none;
}

.footer-widget a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #ccc;
}



/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #e60000;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 20px;
    z-index: 1000;
    transition: all 0.3s;
}

.back-to-top:hover {
    background: #cc0000;
    transform: scale(1.1);
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading-spinner::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #e60000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Section Titles */
.section-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #e60000;
    padding-bottom: 10px;
    display: block;
    text-decoration: none;
}

.section-title:hover {
    color: #e60000;
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud a {
    background: #f0f0f0;
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    color: #666;
    font-size: 12px;
    transition: all 0.3s;
}

.tag-cloud a:hover {
    background: #e60000;
    color: #fff;
}

/* Accessibility Improvements */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #000;
    color: #fff;
    padding: 10px 15px;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    left: 0;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .post-card {
        border: 2px solid #000;
    }
    
    .nav-menu a:hover {
        background: #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .breaking-text {
        animation: none;
        position: static;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .sidebar,
    .site-footer,
    .social-share,
    .back-to-top {
        display: none;
    }
    
    .main-content {
        margin: 0;
    }
    
    .post-card {
        break-inside: avoid;
        margin-bottom: 20px;
    }
    
    a {
        color: #000 !important;
        text-decoration: none !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-form {
        min-width: auto;
        width: 100%;
        max-width: 300px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #e60000;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-main .post-image {
        height: 250px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .featured-side .post-item {
        flex-direction: column;
    }
    
    .featured-side .post-image {
        width: 100%;
        height: 150px;
    }
    
    .post-card .post-content {
        padding: 15px;
    }
}

/* Header Search Form */
.header-search {
    position: relative;
}

.search-form {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 25px;
    overflow: hidden;
    min-width: 300px;
}

.search-form input[type="search"] {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 20px;
    background: transparent;
    font-size: 14px;
}

.search-form input[type="search"]::placeholder {
    color: #999;
}

.search-form button {
    background: #e60000;
    border: none;
    color: #fff;
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-form button:hover {
    background: #cc0000;
}

/* Social Media Styles */
.social-media {
    display: flex;
    gap: 10px;
    align-items: center;
}

.social-media a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.header-top .social-media a:hover {
    background: #e60000;
    transform: scale(1.1);
}

.footer-widget .social-media a {
    background: #555;
    color: #fff;
    margin-right: 10px;
    margin-bottom: 10px;
}

.footer-widget .social-media a:hover {
    background: #e60000;
    transform: scale(1.1);
}

/* Breadcrumb Navigation */
.breadcrumb {
    background: #f8f8f8;
    padding: 15px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.breadcrumb-nav {
    font-size: 14px;
    color: #666;
}

.breadcrumb-nav a {
    color: #e60000;
    text-decoration: none;
}

.breadcrumb-nav a:hover {
    text-decoration: underline;
}

.breadcrumb-nav .separator {
    margin: 0 8px;
    color: #999;
}

/* Author Box */
.author-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.author-avatar img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
}

.author-info h4 {
    margin-bottom: 10px;
    color: #333;
}

.author-info p {
    color: #666;
    line-height: 1.5;
}

/* Related Posts */
.related-posts {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.related-posts .section-title {
    font-size: 20px;
    margin-bottom: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* 404 Page Styles */
.error-404 {
    text-align: center;
    padding: 60px 20px;
}

.error-404 h1 {
    font-size: 120px;
    color: #e60000;
    margin-bottom: 20px;
    font-weight: bold;
}

.error-404 h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #333;
}

.error-404 p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.error-404 .search-form {
    max-width: 400px;
    margin: 0 auto 30px;
}

.btn-home {
    display: inline-block;
    background: #e60000;
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-home:hover {
    background: #cc0000;
    color: #fff;
}

/* Archive Page Styles */
.archive-header {
    background: #f8f8f8;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 30px;
    border-radius: 8px;
}

.archive-title {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.archive-description {
    color: #666;
    font-size: 16px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #e60000;
    color: #fff;
    border-color: #e60000;
}

.pagination .current {
    background: #e60000;
    color: #fff;
    border-color: #e60000;
}

/* Newsletter Widget */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-form input[type="email"] {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.newsletter-form input[type="email"]:focus {
    border-color: #e60000;
    box-shadow: 0 0 0 2px rgba(230, 0, 0, 0.1);
}

.newsletter-form button {
    background: #e60000;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: #cc0000;
}

/* Widget Post Count */
.widget .post-count {
    font-size: 11px;
    color: #999;
    font-weight: normal;
}

/* Read More Button */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #e60000;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: color 0.3s;
}

.read-more:hover {
    color: #cc0000;
}

.read-more i {
    font-size: 12px;
}

/* Post Footer */
.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.post-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #666;
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Archive Meta */
.archive-meta {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

.archive-meta i {
    margin-right: 5px;
}

/* Author Stats */
.author-stats {
    display: flex;
    gap: 20px;
    margin: 15px 0;
    font-size: 14px;
    color: #666;
}

.author-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.author-website a {
    color: #e60000;
    text-decoration: none;
    font-weight: bold;
}

.author-website a:hover {
    text-decoration: underline;
}

/* No Posts Message */
.no-posts {
    text-align: center;
    padding: 60px 20px;
    background: #f8f8f8;
    border-radius: 8px;
}

.no-posts h2 {
    color: #333;
    margin-bottom: 15px;
}

.no-posts p {
    color: #666;
    margin-bottom: 25px;
}

/* Pagination Wrapper */
.pagination-wrapper {
    margin: 40px 0;
    text-align: center;
}

/* Date Archive Styles */
.posts-by-date {
    margin-bottom: 30px;
}

.date-group {
    margin-bottom: 40px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.date-header {
    background: #f8f8f8;
    padding: 15px 20px;
    margin: 0;
    font-size: 18px;
    color: #333;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-header i {
    color: #e60000;
}

.date-posts {
    padding: 0;
}

.date-post-item {
    display: flex;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s;
}

.date-post-item:last-child {
    border-bottom: none;
}

.date-post-item:hover {
    background: #f9f9f9;
}

.post-time {
    min-width: 60px;
    font-size: 14px;
    font-weight: bold;
    color: #e60000;
    background: #f0f0f0;
    padding: 5px 10px;
    border-radius: 4px;
    text-align: center;
    height: fit-content;
}

.date-post-item .post-content {
    flex: 1;
    margin-left: 20px;
    display: flex;
    gap: 15px;
}

.date-post-item .post-thumbnail {
    width: 100px;
    height: 70px;
    overflow: hidden;
    border-radius: 4px;
    flex-shrink: 0;
}

.date-post-item .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.date-post-item .post-info {
    flex: 1;
}

.date-post-item .post-title {
    font-size: 16px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.date-post-item .post-title a {
    color: #333;
    text-decoration: none;
}

.date-post-item .post-title a:hover {
    color: #e60000;
}

.date-post-item .post-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.date-post-item .post-meta span {
    margin-right: 15px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.date-post-item .post-excerpt {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* Search Form Enhancements */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-field {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 20px;
    background: transparent;
    font-size: 14px;
}

.search-field:focus {
    background: rgba(255,255,255,0.1);
}

.search-submit {
    background: #e60000;
    border: none;
    color: #fff;
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 0 25px 25px 0;
}

.search-submit:hover {
    background: #cc0000;
}

.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    padding: 0 !important;
    border: 0 !important;
    height: 1px !important;
    width: 1px !important;
    overflow: hidden;
}

/* Post Views Counter */
.post-views {
    font-size: 12px;
    color: #666;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* Related Posts Section */
.related-posts-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.related-post-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.related-post-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.related-post-item .post-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-post-item .post-content {
    padding: 15px;
}

.related-post-item .post-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    line-height: 1.3;
}

.related-post-item .post-title a {
    color: #333;
    text-decoration: none;
}

.related-post-item .post-title a:hover {
    color: #e60000;
}

.related-post-item .post-meta {
    font-size: 11px;
    color: #666;
}

/* Schema Markup - No visual styles needed */

/* Custom Variables for Theme Customizer */
:root {
    --primary-color: #e60000;
    --primary-color-hover: #cc0000;
    --text-color: #333;
    --border-color: #eee;
    --background-color: #f5f5f5;
}

/* RTL Support */
[dir="rtl"] .nav-menu {
    direction: rtl;
}

[dir="rtl"] .featured-side .post-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .popular-post {
    flex-direction: row-reverse;
}

[dir="rtl"] .breadcrumb-nav .separator::before {
    content: "/";
    margin: 0 8px;
}

[dir="rtl"] .search-form {
    flex-direction: row-reverse;
}

[dir="rtl"] .search-submit {
    border-radius: 25px 0 0 25px;
}

/* Mobile Responsive for Date Archives */
@media (max-width: 768px) {
    .date-post-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .date-post-item .post-content {
        margin-left: 0;
        flex-direction: column;
    }
    
    .date-post-item .post-thumbnail {
        width: 100%;
        height: 150px;
    }
    
    .post-time {
        align-self: flex-start;
        margin-bottom: 10px;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .date-header {
        font-size: 16px;
        padding: 12px 15px;
    }
    
    .date-post-item {
        padding: 15px;
    }
    
    .search-form {
        flex-direction: column;
        border-radius: 8px;
    }
    
    .search-field {
        border-radius: 8px 8px 0 0;
        border-bottom: 1px solid #ddd;
    }
    
    .search-submit {
        border-radius: 0 0 8px 8px;
        padding: 10px;
    }
}

/* Accessibility Enhancements */
.nav-menu a:focus,
.search-submit:focus,
.btn-home:focus,
.read-more:focus {
    outline: 2px solid #e60000;
    outline-offset: 2px;
}

/* Focus visible for better accessibility */
.nav-menu a:focus-visible,
.search-submit:focus-visible,
.btn-home:focus-visible {
    outline: 2px solid #e60000;
    outline-offset: 2px;
}

/* High contrast mode improvements */
@media (prefers-contrast: high) {
    .date-post-item {
        border: 1px solid #000;
    }
    
    .related-post-item {
        border: 2px solid #000;
    }
    
    .post-time {
        border: 1px solid #000;
    }
}

/* Shortcode Styles */
.newsportal-recent-posts .recent-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.newsportal-recent-posts .recent-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.newsportal-recent-posts .recent-post-image {
    width: 80px;
    height: 60px;
    overflow: hidden;
    border-radius: 4px;
    flex-shrink: 0;
}

.newsportal-recent-posts .recent-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.newsportal-recent-posts .recent-post-content {
    flex: 1;
}

.newsportal-recent-posts .recent-post-content h4 {
    font-size: 14px;
    margin-bottom: 5px;
    line-height: 1.3;
}

.newsportal-recent-posts .recent-post-content h4 a {
    color: #333;
    text-decoration: none;
}

.newsportal-recent-posts .recent-post-content h4 a:hover {
    color: #e60000;
}

.newsportal-recent-posts .recent-post-date {
    font-size: 11px;
    color: #666;
    margin-bottom: 5px;
}

.newsportal-recent-posts .recent-post-excerpt {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

/* Popular Posts Shortcode */
.newsportal-popular-posts .popular-post-item {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.newsportal-popular-posts .popular-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.newsportal-popular-posts .popular-post-image {
    width: 60px;
    height: 60px;
    overflow: hidden;
    border-radius: 4px;
    flex-shrink: 0;
}

.newsportal-popular-posts .popular-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.newsportal-popular-posts .popular-post-content h4 {
    font-size: 13px;
    margin-bottom: 5px;
    line-height: 1.3;
}

.newsportal-popular-posts .popular-post-content h4 a {
    color: #333;
    text-decoration: none;
}

.newsportal-popular-posts .popular-post-content h4 a:hover {
    color: #e60000;
}

.newsportal-popular-posts .popular-post-date,
.newsportal-popular-posts .popular-post-views {
    font-size: 11px;
    color: #666;
}

/* Category Posts Shortcode */
.newsportal-category-posts {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.newsportal-category-posts.column-2 {
    grid-template-columns: repeat(2, 1fr);
}

.newsportal-category-posts.column-3 {
    grid-template-columns: repeat(3, 1fr);
}

.newsportal-category-posts.column-4 {
    grid-template-columns: repeat(4, 1fr);
}

.newsportal-category-posts .category-post-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.newsportal-category-posts .category-post-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.newsportal-category-posts .category-post-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.newsportal-category-posts .category-post-content {
    padding: 15px;
}

.newsportal-category-posts .category-post-content h3 {
    font-size: 16px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.newsportal-category-posts .category-post-content h3 a {
    color: #333;
    text-decoration: none;
}

.newsportal-category-posts .category-post-content h3 a:hover {
    color: #e60000;
}

.newsportal-category-posts .category-post-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.newsportal-category-posts .category-post-meta span {
    margin-right: 15px;
}

.newsportal-category-posts .category-post-excerpt {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 15px;
}

.newsportal-category-posts .read-more {
    color: #e60000;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
}

.newsportal-category-posts .read-more:hover {
    color: #cc0000;
}

/* Breaking News Shortcode */
.newsportal-breaking-news-shortcode {
    background: #000;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.newsportal-breaking-news-shortcode .breaking-news-label {
    background: #e60000;
    padding: 5px 15px;
    margin-right: 15px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.newsportal-breaking-news-shortcode .breaking-news-content {
    white-space: nowrap;
    animation: scroll-left 30s linear infinite;
}

/* Social Share Shortcode */
.newsportal-social-share {
    margin: 20px 0;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.newsportal-social-share .share-label {
    font-weight: bold;
    color: #333;
    margin-right: 10px;
}

.newsportal-social-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: transform 0.3s;
}

.newsportal-social-share a:hover {
    transform: scale(1.1);
}

.newsportal-social-share .share-facebook {
    background: #1877f2;
}

.newsportal-social-share .share-twitter {
    background: #1da1f2;
}

.newsportal-social-share .share-linkedin {
    background: #0077b5;
}

.newsportal-social-share .share-whatsapp {
    background: #25d366;
}

.newsportal-social-share .share-telegram {
    background: #0088cc;
}

.newsportal-social-share.social-share-vertical {
    flex-direction: column;
    align-items: flex-start;
    max-width: 200px;
}

.newsportal-social-share.social-share-large a {
    width: 45px;
    height: 45px;
}

.newsportal-social-share.social-share-small a {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

/* Newsletter Shortcode */
.newsportal-newsletter-shortcode {
    background: #f8f8f8;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    margin: 30px 0;
}

.newsportal-newsletter-shortcode h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 20px;
}

.newsportal-newsletter-shortcode p {
    color: #666;
    margin-bottom: 20px;
}

.newsletter-form-shortcode .newsletter-input-group {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.newsletter-form-shortcode input[type="email"] {
    flex: 1;
    padding: 12px 20px;
    border: none;
    outline: none;
    font-size: 14px;
}

.newsletter-form-shortcode button {
    background: #e60000;
    color: #fff;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.newsletter-form-shortcode button:hover {
    background: #cc0000;
}

/* Responsive Shortcodes */
@media (max-width: 768px) {
    .newsportal-category-posts.column-3,
    .newsportal-category-posts.column-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .newsportal-social-share {
        justify-content: center;
    }
    
    .newsletter-form-shortcode .newsletter-input-group {
        flex-direction: column;
        border-radius: 8px;
    }
    
    .newsletter-form-shortcode input[type="email"] {
        border-radius: 8px 8px 0 0;
        border-bottom: 1px solid #ddd;
    }
    
    .newsletter-form-shortcode button {
        border-radius: 0 0 8px 8px;
    }
}

@media (max-width: 480px) {
    .newsportal-category-posts.column-2,
    .newsportal-category-posts.column-3,
    .newsportal-category-posts.column-4 {
        grid-template-columns: 1fr;
    }
    
    .newsportal-recent-posts .recent-post-item,
    .newsportal-popular-posts .popular-post-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .newsportal-recent-posts .recent-post-image,
    .newsportal-popular-posts .popular-post-image {
        width: 100%;
        height: 120px;
    }
}
