/*
Theme Name: News Pro
Description: قالب ووردبريس احترافي لمواقع الأخبار - يحتوي على شريط أخبار متحرك وتصميم متجاوب
Author: Developer
Version: 1.0
License: GPL v2 or later
Text Domain: news-pro
*/

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

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

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

/* Breaking News Ticker */
.breaking-news {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 10px 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.breaking-label {
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    margin-left: 15px;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

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

.ticker-content {
    display: inline-block;
    animation: scroll-left 30s linear infinite;
    padding-left: 20px;
}

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

@keyframes scroll-left {
    0% { transform: translate3d(100%, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

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

/* Header */
.site-header {
    background: white;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-top {
    background: #2c3e50;
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

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

.header-info {
    display: flex;
    gap: 20px;
}

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

.social-links a {
    color: white;
    padding: 5px;
    border-radius: 3px;
    transition: background 0.3s;
}

.social-links a:hover {
    background: rgba(255,255,255,0.2);
}

.header-main {
    padding: 20px 0;
}

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

.site-logo h1 {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #dc3545, #007bff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-form {
    display: flex;
    background: #f8f9fa;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-form input {
    border: none;
    padding: 12px 20px;
    background: transparent;
    outline: none;
    font-size: 14px;
    width: 300px;
}

.search-form button {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border: none;
    color: white;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.search-form button:hover {
    background: linear-gradient(135deg, #c82333, #dc3545);
}

/* Navigation */
.main-navigation {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    color: white;
    padding: 15px 20px;
    font-weight: 500;
    transition: all 0.3s;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
    background: rgba(255,255,255,0.1);
    color: #ffd700;
}

/* Dropdown Menu */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #34495e;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.nav-menu li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu a {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Main Content */
.site-main {
    padding: 40px 0;
}

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

/* Featured Section */
.featured-section {
    margin-bottom: 40px;
}

.featured-post {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

.featured-post:hover {
    transform: translateY(-5px);
}

.featured-post img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

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

.featured-category {
    background: #dc3545;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 10px;
}

.featured-title {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 10px;
}

.featured-meta {
    font-size: 14px;
    opacity: 0.8;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.post-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.post-thumbnail {
    position: relative;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #007bff;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.post-content {
    padding: 20px;
}

.post-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-title a:hover {
    color: #dc3545;
}

.post-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #888;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.read-more {
    color: #dc3545;
    font-weight: 500;
}

.read-more:hover {
    color: #c82333;
}

/* Sidebar */
.sidebar {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 120px;
}

.widget {
    margin-bottom: 40px;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #2c3e50;
    position: relative;
    padding-bottom: 10px;
}

.widget-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #dc3545, #007bff);
    border-radius: 3px;
}

.trending-post {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.trending-post:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.trending-thumbnail {
    width: 80px;
    height: 60px;
    border-radius: 5px;
    overflow: hidden;
    margin-left: 15px;
    flex-shrink: 0;
}

.trending-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.trending-content h4 a:hover {
    color: #dc3545;
}

.trending-date {
    font-size: 12px;
    color: #888;
}

/* Tags Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud a {
    background: #f8f9fa;
    color: #666;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s;
}

.tag-cloud a:hover {
    background: #dc3545;
    color: white;
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-widget h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #ffd700;
}

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

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget ul li a {
    color: #bbb;
    transition: color 0.3s;
}

.footer-widget ul li a:hover {
    color: white;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #34495e;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu a {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .header-main .container {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-form input {
        width: 250px;
    }
    
    .featured-title {
        font-size: 1.5rem;
    }
    
    .breaking-news .container {
        flex-direction: column;
        text-align: center;
    }
    
    .breaking-label {
        margin: 0 0 10px 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .search-form input {
        width: 200px;
    }
    
    .site-logo h1 {
        font-size: 2rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .post-card {
        margin-bottom: 20px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
    font-size: 18px;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, #c82333, #dc3545);
    transform: translateY(-3px);
}
