/*
Theme Name: News Pro PWA
Description: قالب ووردبريس احترافي للمواقع الإخبارية مع ميزات PWA متقدمة، Mobile-First Responsive Design وتحسينات أداء متطورة - يدعم RTL بالكامل
Version: 4.0.0
Author: News Pro Team
Text Domain: news-pro
Domain Path: /languages
Requires at least: 5.0
Tested up to: 6.3
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: news, blog, responsive, rtl-language-support, arabic, mobile-first, performance-optimized, pwa, progressive-web-app

News Pro v4.0.0 - Complete PWA Integration
تم إضافة ميزات تطبيق الويب التقدمي (PWA) الكاملة مع Service Worker متطور، Push Notifications، وإمكانيات العمل بدون إنترنت.
*/

/* ==========================================================================
   RTL BASE RESET & TYPOGRAPHY - إعادة تعيين RTL والطباعة
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    direction: rtl;
    text-align: right;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    height: 100%;
}

body {
    font-family: 'Tajawal', 'Cairo', 'Almarai', 'Amiri', 'Noto Sans Arabic', 'Segoe UI', Arial, sans-serif;
    line-height: 1.7;
    color: #2c3e50;
    background-color: #f8f9fa;
    direction: rtl;
    text-align: right;
    font-size: 1rem;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Enhanced Arabic Typography */
body, p, span, div, a, li, h1, h2, h3, h4, h5, h6, input, textarea, button {
    font-feature-settings: "liga" 1, "kern" 1, "calt" 1;
    text-rendering: optimizeLegibility;
    word-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-family: 'Tajawal', 'Cairo', sans-serif;
}

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

p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

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

a:hover {
    color: #c82333;
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Lists */
ul, ol {
    margin-bottom: 1rem;
    padding-right: 2rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Code & Pre */
code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

pre {
    background: #f4f4f4;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

blockquote {
    border-right: 4px solid #dc3545;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

/* ===== RTL CONTAINER & GRID SYSTEM ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.container-fluid {
    width: 100%;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col, 
[class*="col-"] {
    padding: 0 15px;
    width: 100%;
    min-height: 1px;
}

/* RTL Grid Classes */
.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* Medium devices and up */
.col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; }
.col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-md-9 { flex: 0 0 75%; max-width: 75%; }
.col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-md-12 { flex: 0 0 100%; max-width: 100%; }

/* RTL Flexbox Utilities */
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.d-none { display: none; }

.flex-row { flex-direction: row; }
.flex-row-reverse { flex-direction: row-reverse; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.justify-content-start { justify-content: flex-start; }
.justify-content-end { justify-content: flex-end; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-around { justify-content: space-around; }
.justify-content-evenly { justify-content: space-evenly; }

.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }
.align-items-center { align-items: center; }
.align-items-baseline { align-items: baseline; }
.align-items-stretch { align-items: stretch; }

/* RTL Text Alignment */
.text-start { text-align: right; }
.text-end { text-align: left; }
.text-center { text-align: center; }
.text-justify { text-align: justify; }

/* 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); }
}

/* ==========================================================================
   Enhanced Features & Animations - ميزات محسنة وحركات
   ========================================================================== */

/* PWA Install Button */
.pwa-install-prompt {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.5s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
}

.pwa-install-prompt.show {
    transform: translateY(0);
    opacity: 1;
}

.pwa-install-prompt:hover {
    background: linear-gradient(135deg, #c82333, #a71e2a);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(220, 53, 69, 0.4);
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.skeleton-title {
    height: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.skeleton-image {
    height: 200px;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Enhanced Animations */
.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

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

.slide-in-right {
    animation: slideInRight 0.5s ease-out forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.bounce-in {
    animation: bounceIn 0.8s ease-out forwards;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Parallax Effect */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

/* Advanced Grid Layouts */
.masonry-grid {
    column-count: 3;
    column-gap: 30px;
    column-fill: balance;
}

.masonry-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 30px;
    break-inside: avoid;
    page-break-inside: avoid;
}

/* Enhanced Cards */
.card-3d {
    perspective: 1000px;
}

.card-3d .card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-3d:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.card-back {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Advanced Buttons */
.btn-gradient {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-gradient:hover::before {
    left: 100%;
}

.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(220, 53, 69, 0.3);
}

/* Enhanced Forms */
.form-floating {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-floating input,
.form-floating textarea {
    width: 100%;
    padding: 1rem 1rem 0.5rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-floating input:focus,
.form-floating textarea:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-floating label {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1rem;
    color: #6c757d;
    pointer-events: none;
    transition: all 0.3s ease;
    background: white;
    padding: 0 0.5rem;
}

.form-floating input:focus + label,
.form-floating input:not(:placeholder-shown) + label,
.form-floating textarea:focus + label,
.form-floating textarea:not(:placeholder-shown) + label {
    top: -0.5rem;
    font-size: 0.85rem;
    color: #dc3545;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #ffffff;
        --card-bg: #2d2d2d;
        --border-color: #404040;
    }

    body {
        background-color: var(--bg-color);
        color: var(--text-color);
    }

    .post-card,
    .widget,
    .content-area {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
    }

    .search-field,
    .form-floating input,
    .form-floating textarea {
        background: var(--card-bg);
        color: var(--text-color);
        border-color: var(--border-color);
    }
}

/* Print Styles */
@media print {
    .site-header,
    .main-navigation,
    .breaking-news,
    .widget-area,
    .site-footer,
    .pwa-install-prompt,
    .scroll-to-top {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: white;
    }

    .site-main {
        grid-template-columns: 1fr;
        padding: 0;
    }

    .post-card {
        box-shadow: none;
        border: 1px solid #ddd;
        margin-bottom: 1rem;
        page-break-inside: avoid;
    }

    a {
        color: #000 !important;
        text-decoration: underline;
    }

    .post-title {
        font-size: 14pt;
        font-weight: bold;
    }

    .post-thumbnail {
        height: auto;
        max-height: 200px;
    }
}

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

.skip-link {
    position: absolute;
    top: -40px;
    right: 6px;
    z-index: 999999;
    color: white;
    background: #dc3545;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 0 0 4px 4px;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    a {
        text-decoration: underline;
    }

    button,
    .btn {
        border: 2px solid currentColor;
    }

    .post-card {
        border: 2px solid #333;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus Indicators */
*:focus {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
}

button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #c82333, #a71e2a);
}

/* Selection Colors */
::selection {
    background: #dc3545;
    color: white;
}

::-moz-selection {
    background: #dc3545;
    color: white;
}
