/*
Theme Name: AJAX News Theme
Theme URI: https://example.com/ajax-news-theme
Author: Your Name
Author URI: https://example.com
Description: Modern news theme with AJAX navigation, dark mode, social sharing, reactions, and video player support.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ajax-news-theme
Tags: news, blog, ajax, dark-mode, bootstrap, responsive
*/

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --light-bg: #f8fafc;
    --dark-bg: #0f172a;
    --text-light: #1e293b;
    --text-dark: #f1f5f9;
}

/* Dark Mode Variables */
body.dark-mode {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --card-bg: #2d2d2d;
    --border-color: #404040;
}

body {
    --bg-color: #ffffff;
    --text-color: #212529;
    --card-bg: #ffffff;
    --border-color: #dee2e6;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 14px;
    line-height: 1.6;
}

/* Reduce heading sizes for news theme */
h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

/* Page Transition */
.page-transition {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.page-transition.loaded {
    opacity: 1;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
}

/* News Card Styles */
.news-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 15px;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card-body {
    padding: 12px;
}

.news-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    line-height: 1.4;
}

.news-card-title a {
    color: var(--text-color);
    text-decoration: none;
}

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

/* Reaction Buttons */
.reaction-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.reaction-btn:hover {
    background: var(--light-bg);
    transform: scale(1.05);
}

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

.reaction-btn.liked {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.reaction-btn.disliked {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

.reaction-btn.saved {
    background: var(--warning-color);
    color: white;
    border-color: var(--warning-color);
}

/* Social Share Buttons */
.social-share {
    display: flex;
    gap: 8px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.social-share h4 {
    width: 100%;
    font-size: 1rem;
    margin-bottom: 10px;
}

.social-share-btn {
    padding: 8px 15px;
    border-radius: 5px;
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    font-size: 13px;
}

.social-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.social-share-btn.facebook { background: #3b5998; }
.social-share-btn.twitter { background: #1da1f2; }
.social-share-btn.whatsapp { background: #25d366; }
.social-share-btn.linkedin { background: #0077b5; }
.social-share-btn.telegram { background: #0088cc; }

/* Video Player Container */
.video-player-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    margin: 20px 0;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-player-container iframe,
.video-player-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Loading Spinner */
.ajax-loader {
    display: none;
    text-align: center;
    padding: 50px;
}

.ajax-loader.loading {
    display: block;
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .news-card img {
        height: 200px;
    }
    
    .dark-mode-toggle {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
}