/* 
 * Main Stylesheet
 * Yemen Media News Website
 */

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #0e2a47;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d62828;
}

/* Dark Mode Scrollbar */
.dark ::-webkit-scrollbar-track {
    background: #1f2937;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #d62828;
}

/* Zoom Effect */
.zoom-effect {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.group:hover .zoom-effect {
    transform: scale(1.1);
}

/* Slider Styles */
.slide {
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
}

/* Play Button Pulse */
.play-pulse {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    animation: pulse-white 2s infinite;
}

@keyframes pulse-white {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Breaking News Ticker Animation */
@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.ticker-animate {
    animation: ticker 20s linear infinite;
}

/* Line Clamp Utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Dark Mode Transitions */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Print Styles */
@media print {

    header,
    footer,
    .no-print,
    #dark-mode-toggle,
    .fixed {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    a {
        text-decoration: underline;
    }

    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
input:focus {
    outline: 2px solid #d62828;
    outline-offset: 2px;
}

/* Custom Selection Color */
::selection {
    background-color: #d62828;
    color: white;
}

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

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    animation: spin 1s linear infinite;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #0e2a47 0%, #d62828 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Mobile Menu Slide Animation */
#mobile-menu {
    transition: max-height 0.3s ease-in-out;
}

/* Share Buttons */
.share-btn {
    transition: all 0.2s ease;
}

.share-btn:hover {
    transform: scale(1.1);
}

/* Content Formatting */
.article-content {
    line-height: 1.8;
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 1.5rem 0 1rem;
    color: #0e2a47;
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin: 1.25rem 0 0.75rem;
    color: #0e2a47;
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
    margin: 1rem 0;
    padding-right: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-right: 4px solid #d62828;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: #f8fafc;
    font-style: italic;
}

.dark .article-content h2,
.dark .article-content h3 {
    color: #fff;
}

.dark .article-content blockquote {
    background: #1f2937;
    border-right-color: #ff4d4d;
}

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

.dark .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Slider Title Hover - Remove Red */
#slider-container h2,
#slider-container h2:hover,
.slide h2,
.slide h2:hover {
    color: white !important;
}

/* Category Titles - Black/Dark */
.category-title a {
    color: #1a1a1a !important;
}

.dark .category-title a {
    color: #ffffff !important;
}

.category-title a:hover {
    color: #d62828 !important;
}