/* Custom CSS for PSHT CMS */

:root {
    --primary-color: #1e40af;
    --secondary-color: #dc2626;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --border-color: #e5e7eb;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #374151;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
    position: relative;
}

.section-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin-bottom: 2rem;
}

/* Header Styles */
.top-header {
    font-size: 0.875rem;
}

.contact-info span {
    margin-right: 1rem;
}

.social-links a {
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color) !important;
}

.main-header {
    border-bottom: 1px solid var(--border-color);
}

.site-title h2 {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.hero-slide {
    height: 500px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3));
    display: flex;
    align-items: center;
}

.hero-content {
    color: white;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-excerpt {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-meta span {
    margin-right: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-meta i {
    margin-right: 0.5rem;
}

/* News Cards */
.news-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.news-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.news-content {
    padding: 1.5rem;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.news-title a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: var(--primary-color);
}

.news-excerpt {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.news-meta {
    font-size: 0.8rem;
    color: #9ca3af;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}

.news-meta span {
    margin-right: 1rem;
}

.news-meta i {
    margin-right: 0.25rem;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

/* Popular News */
.popular-item {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.popular-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-number {
    margin-right: 0.75rem;
}

.popular-image {
    width: 60px;
    height: 60px;
    overflow: hidden;
    border-radius: 4px;
}

.popular-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.popular-title a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.popular-title a:hover {
    color: var(--primary-color);
}

/* Category List */
.category-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.category-item:last-child {
    border-bottom: none;
}

.category-link {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.category-link:hover {
    color: var(--primary-color);
}

/* About Widget */
.about-widget p {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

/* Footer */
.footer-area {
    background: var(--dark-color) !important;
}

.widget-title {
    color: white;
    border-bottom-color: var(--primary-color);
}

.footer-widget ul li {
    margin-bottom: 0.5rem;
}

.footer-widget ul li a:hover {
    color: var(--primary-color) !important;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    background: #111827 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-excerpt {
        font-size: 1rem;
    }
    
    .hero-meta span {
        display: block;
        margin-bottom: 0.5rem;
    }
    
    .site-title h2 {
        font-size: 1.25rem;
    }
    
    .search-box {
        margin-top: 1rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* Custom Buttons */
.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* News Carousel Styles - Updated */
.posts-carousel-module {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 25px;
    margin-bottom: 30px;
    position: relative;
}

.module-head {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.carousel-news-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
}

.carousel-news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    border-color: #e8533b;
}

.news-image-container {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.news-thumbnail {
    display: block;
    position: relative;
    width: 100%;
}

.news-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
}

.news-thumbnail:hover .news-image {
    transform: scale(1.05);
}

.news-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(232, 83, 59, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-thumbnail:hover .news-overlay {
    opacity: 1;
}

.news-overlay i {
    color: white;
    font-size: 20px;
}

.news-category-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e8533b;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-content-box {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-entry-title {
    margin-bottom: 10px;
    flex-grow: 1;
}

.news-entry-title a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-entry-title a:hover {
    color: #e8533b;
}

.news-meta {
    margin-top: auto;
    font-size: 11px;
    color: #666;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.news-date, .news-views {
    display: flex;
    align-items: center;
}

.news-date i, .news-views i {
    width: 12px;
    text-align: center;
}

/* Carousel Controls */
.carousel-controls {
    display: flex;
    align-items: center;
}

.carousel-controls .btn {
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-color: #e8533b;
    color: #e8533b;
    transition: all 0.3s ease;
}

.carousel-controls .btn:hover {
    background-color: #e8533b;
    color: white;
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 1199.98px) {
    .news-image {
        height: 160px;
    }
    
    .news-entry-title a {
        font-size: 13px;
    }
    
    .news-content-box {
        padding: 12px;
    }
}

@media (max-width: 991.98px) {
    .posts-carousel-module {
        padding: 20px;
    }
    
    .news-image {
        height: 150px;
    }
    
    .module-head {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .carousel-controls {
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    .posts-carousel-module {
        padding: 15px;
    }
    
    .news-image {
        height: 140px;
    }
    
    .news-entry-title a {
        font-size: 13px;
        -webkit-line-clamp: 3;
    }
    
    .news-content-box {
        padding: 10px;
    }
    
    .news-meta {
        font-size: 10px;
    }
    
    .carousel-controls .btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

@media (max-width: 575.98px) {
    .news-image {
        height: 120px;
    }
    
    .news-entry-title a {
        font-size: 12px;
    }
    
    .news-category-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .news-meta {
        flex-direction: row;
        justify-content: space-between;
        font-size: 9px;
    }
    
    .section-title {
        font-size: 18px;
    }
}

/* Fix for Bootstrap row gutters */
.carousel-inner .row {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

.carousel-inner .row > * {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* Ensure equal height cards */
.carousel-item .row {
    display: flex;
    flex-wrap: wrap;
}

.carousel-item .row > div {
    display: flex;
}

/* Animation improvements */
.carousel-news-item {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state */
.carousel-news-item.loading {
    opacity: 0.7;
}

.carousel-news-item.loading .news-image {
    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;
    }
}

/* Popular News Styles - Updated */
.widget-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 15px;
    margin: -15px -15px 20px -15px;
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid #e8533b;
}

.popular-news-list {
    padding: 0;
}

.popular-news-item {
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid transparent;
}

.popular-news-item:hover {
    background-color: #f8f9fa;
    border-color: #e8533b;
    transform: translateX(5px);
}

.popular-rank {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-width: 40px;
    padding-top: 5px;
}

.rank-number {
    background: linear-gradient(135deg, #e8533b, #ff6b47);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(232, 83, 59, 0.3);
}

.popular-image {
    width: 70px;
    height: 50px;
    overflow: hidden;
    border-radius: 6px;
    flex-shrink: 0;
}

.popular-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.popular-image:hover img {
    transform: scale(1.1);
}

.popular-title a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-title a:hover {
    color: #e8533b;
}

.popular-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
    font-size: 11px;
    color: #666;
}

.popular-meta span {
    display: flex;
    align-items: center;
}

.popular-meta i {
    width: 12px;
    text-align: center;
    margin-right: 3px;
}

/* Category List Styles - Updated */
.category-item {
    transition: all 0.3s ease;
    border: 1px solid transparent;
    margin-bottom: 8px;
}

.category-item:hover {
    background-color: #f8f9fa;
    border-color: #e8533b;
    transform: translateX(3px);
}

.category-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s ease;
}

.category-link:hover {
    color: #e8533b;
}

.category-link i {
    color: #e8533b;
    transition: transform 0.3s ease;
}

.category-item:hover .category-link i {
    transform: translateX(3px);
}

/* About Widget Styles - Updated */
.about-widget {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.contact-info p {
    border-left: 3px solid #e8533b;
    padding-left: 12px;
    margin-bottom: 12px;
    background: rgba(232, 83, 59, 0.05);
    padding-top: 8px;
    padding-bottom: 8px;
    border-radius: 0 4px 4px 0;
}

.contact-info i {
    width: 16px;
    text-align: center;
}

/* Comments Widget Styles - Updated */
.comment-item {
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0 !important;
    padding: 12px 8px !important;
}

.comment-item:hover {
    background-color: #f8f9fa;
    border-radius: 6px;
    border-color: #e8533b !important;
}

.comment-text {
    font-size: 13px;
    line-height: 1.4;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.comment-author strong {
    font-size: 13px;
}

.comment-author a {
    font-size: 12px;
    color: #666;
    transition: color 0.3s ease;
}

.comment-author a:hover {
    color: #e8533b;
}

/* Sidebar Widget General Styles */
.sidebar-widget {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 20px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.sidebar-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    border-color: #e8533b;
}

/* Section title styling */
.section-title {
    font-weight: 700;
    font-size: 22px;
    margin-bottom: 0;
}

.widget-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.widget-title i {
    color: #e8533b;
}

/* Badge styling */
.badge {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 12px;
}

/* Responsive adjustments for mobile */
@media (max-width: 575.98px) {
    .sidebar-widget {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .widget-header {
        padding: 12px;
        margin: -15px -15px 15px -15px;
    }
    
    .widget-title {
        font-size: 14px;
    }
    
    .popular-image {
        width: 60px;
        height: 45px;
    }
    
    .popular-rank {
        min-width: 35px;
    }
    
    .rank-number {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    
    .popular-title a {
        font-size: 12px;
    }
    
    .popular-meta {
        font-size: 10px;
        flex-direction: column;
        gap: 3px;
    }
    
    .category-link {
        font-size: 13px;
    }
    
    .contact-info p {
        font-size: 12px;
    }
    
    .comment-text {
        font-size: 12px;
    }
}

/* Fix for very small screens */
@media (max-width: 374.98px) {
    .carousel-inner .row {
        margin-left: -5px;
        margin-right: -5px;
    }
    
    .carousel-inner .row > * {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    .posts-carousel-module {
        padding: 10px;
    }
    
    .news-image {
        height: 100px;
    }
    
    .news-entry-title a {
        font-size: 11px;
    }
    
    .news-content-box {
        padding: 8px;
    }
    
    .section-title {
        font-size: 16px;
    }
}

/* Ensure proper spacing */
.g-3 > * {
    padding-right: calc(var(--bs-gutter-x) * 0.5);
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    margin-top: var(--bs-gutter-y);
}

/* Custom scrollbar for webkit browsers */
.sidebar-widget::-webkit-scrollbar {
    width: 4px;
}

.sidebar-widget::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.sidebar-widget::-webkit-scrollbar-thumb {
    background: #e8533b;
    border-radius: 2px;
}

.sidebar-widget::-webkit-scrollbar-thumb:hover {
    background: #d63384;
}

/* Print styles */
@media print {
    .carousel-controls,
    .news-overlay,
    .sidebar-widget {
        display: none !important;
    }
    
    .posts-carousel-module {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .carousel-news-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .carousel-news-item {
        border: 2px solid #000;
    }
    
    .news-category-badge {
        background: #000;
        color: #fff;
    }
    
    .news-overlay {
        background: rgba(0, 0, 0, 0.9);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .carousel-news-item,
    .popular-news-item,
    .category-item,
    .sidebar-widget {
        transition: none;
    }
    
    .carousel-item {
        transition: none;
    }
    
    .news-thumbnail:hover .news-image {
        transform: none;
    }
}

/* Search Results Styles */
.search-results {
    border: 1px solid #dee2e6;
    border-top: none;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.search-result-item {
    transition: background-color 0.2s ease;
}

.search-result-item:hover,
.search-result-item.active {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none !important;
}

.search-result-item mark {
    background-color: #fff3cd;
    padding: 1px 2px;
    border-radius: 2px;
}

/* Notification Toast Styles */
.notification-toast {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: none;
}

.notification-toast .btn-close {
    font-size: 12px;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Search Input Enhancements */
.search-container {
    position: relative;
}

.search-input {
    border-radius: 25px;
    padding-left: 45px;
    padding-right: 15px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #e8533b;
    box-shadow: 0 0 0 0.2rem rgba(232, 83, 59, 0.25);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 5;
}

/* Enhanced Carousel Navigation */
.carousel-control-prev,
.carousel-control-next {
    width: 40px;
    height: 40px;
    background: rgba(232, 83, 59, 0.9);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s ease;
}

.carousel:hover .carousel-control-prev,
.carousel:hover .carousel-control-next {
    opacity: 1;
}

.carousel-control-prev {
    left: -20px;
}

.carousel-control-next {
    right: -20px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(232, 83, 59, 1);
    transform: translateY(-50%) scale(1.1);
}

/* Social Share Buttons */
.social-share {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.social-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.social-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    color: white;
}

.social-share-btn.facebook {
    background: #1877f2;
}

.social-share-btn.twitter {
    background: #1da1f2;
}

.social-share-btn.whatsapp {
    background: #25d366;
}

.social-share-btn.telegram {
    background: #0088cc;
}

.social-share-btn.linkedin {
    background: #0077b5;
}

.social-share-btn.copy {
    background: #6c757d;
}

/* Improved Mobile Responsiveness */
@media (max-width: 575.98px) {
    .carousel-control-prev,
    .carousel-control-next {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .carousel-control-prev {
        left: -16px;
    }
    
    .carousel-control-next {
        right: -16px;
    }
    
    .notification-toast {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
    
    .search-results {
        max-height: 300px;
    }
    
    .social-share-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* Accessibility Improvements */
.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;
}

/* Focus styles for better accessibility */
.carousel-news-item:focus-within,
.popular-news-item:focus-within,
.category-item:focus-within {
    outline: 2px solid #e8533b;
    outline-offset: 2px;
}

/* High contrast mode improvements */
@media (prefers-contrast: high) {
    .news-category-badge {
        border: 2px solid #000;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        border: 2px solid #000;
    }
    
    .social-share-btn {
        border: 2px solid #000;
    }
}

/* Print optimizations */
@media print {
    .carousel-controls,
    .social-share,
    .notification-toast,
    .back-to-top,
    .search-container {
        display: none !important;
    }
    
    .carousel-news-item {
        break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .news-image {
        max-height: 200px;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    .carousel-news-item {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .news-entry-title a {
        color: #e2e8f0;
    }
    
    .news-meta {
        color: #a0aec0;
    }
    
    .search-results {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .search-result-item:hover,
    .search-result-item.active {
        background-color: #4a5568;
    }
}

/* Animation for better UX */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel-news-item {
    animation: slideInUp 0.6s ease-out;
}

/* Stagger animation for multiple items */
.carousel-news-item:nth-child(1) { animation-delay: 0.1s; }
.carousel-news-item:nth-child(2) { animation-delay: 0.2s; }
.carousel-news-item:nth-child(3) { animation-delay: 0.3s; }
.carousel-news-item:nth-child(4) { animation-delay: 0.4s; }

/* Smooth transitions for all interactive elements */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-duration: 0.15s;
    transition-timing-function: ease-in-out;
}

/* Override for elements that shouldn't have transitions */
.carousel-inner,
.carousel-item {
    transition: transform 0.6s ease-in-out;
}

/* Custom scrollbar for search results */
.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb {
    background: #e8533b;
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: #d63384;
}

/* Improved button styles */
.btn-outline-primary {
    border-color: #e8533b;
    color: #e8533b;
}

.btn-outline-primary:hover {
    background-color: #e8533b;
    border-color: #e8533b;
    color: white;
}

/* Enhanced card hover effects */
.carousel-news-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(232, 83, 59, 0.05), rgba(232, 83, 59, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 8px;
}

.carousel-news-item:hover::before {
    opacity: 1;
}

/* Skeleton loading for better perceived performance */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    border-radius: 4px;
}

.skeleton-text:last-child {
    width: 80%;
}

/* Improved focus indicators */
.carousel-controls .btn:focus,
.social-share-btn:focus,
.search-input:focus {
    outline: 2px solid #e8533b;
    outline-offset: 2px;
}

/* Better spacing for mobile */
@media (max-width: 575.98px) {
    .posts-carousel-module {
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0;
    }
    
    .carousel-inner .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .carousel-inner .row > * {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Performance optimizations */
.carousel-news-item img {
    will-change: transform;
}

.carousel-item {
    will-change: transform;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .carousel {
        transition: none;
    }
    
    .carousel-item {
        transition: none;
    }
}
