/* IranDailyNews - Tailwind Custom Companion CSS */
/* Aftonbladet-inspired redesign with Iran Blue branding */

/* Base Typography - System sans-serif, no Google Fonts */
body {
    font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Bold Sans-Serif Headlines */
.font-headline {
    font-family: 'Arial Black', Arial, 'Helvetica Neue', Helvetica, sans-serif;
    font-weight: 900;
}

/* Ticker Animation */
@keyframes ticker-scroll {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-100%); }
}

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

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

/* Smooth Sidebar Transition */
.sidebar-transition {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Article Prose Content Styling */
.article-content p {
    margin-bottom: 1.1em;
    line-height: 1.6;
    font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
}

.article-content h2 {
    font-family: 'Arial Black', Arial, 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    margin-top: 2em;
    margin-bottom: 0.75em;
}

.article-content h3 {
    font-family: 'Arial Black', Arial, 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 1.5em 0;
}

.article-content blockquote {
    border-left: 4px solid #DD2A30;
    padding-left: 1em;
    margin: 1.5em 0;
    font-style: italic;
    color: #4b5563;
}

.article-content ul, .article-content ol {
    margin: 1em 0;
    padding-left: 1.5em;
}

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

.article-content a {
    color: #DD2A30;
    font-weight: 700;
    text-decoration: none;
}

.article-content a:hover {
    text-decoration: underline;
    color: #b91c1c;
}

/* Breaking News Label */
.breaking-label {
    background: #DD2A30;
    color: white;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 11px;
    padding: 2px 8px;
}

/* Category Label */
.category-label {
    background: #003DA5;
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 10px;
    padding: 2px 6px;
    letter-spacing: 0.05em;
}

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

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

/* Print Styles */
@media print {
    .noprint {
        display: none !important;
    }
}

/* Image lazy load fade-in */
.lozad {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lozad[data-loaded="true"],
.lozad.loaded {
    opacity: 1;
}

/* Backdrop blur fallback for older browsers */
@supports not (backdrop-filter: blur(4px)) {
    .backdrop-blur-sm {
        background: rgba(0, 0, 0, 0.8);
    }
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #003DA5;
    outline-offset: 2px;
}

/* Horizontal scroll container for mobile */
.scroll-snap-x {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.scroll-snap-x > * {
    scroll-snap-align: start;
}

/* Hide scrollbar for horizontal scroll */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Guardian-inspired editorial system */
:root {
    --brand-navy: #052962;
    --brand-red: #c70000;
    --brand-warm: #ffe500;
    --page-bg: #f6f6f6;
    --card-bg: #ffffff;
    --text-strong: #121212;
    --text-muted: #4a4a4a;
    --rule: #dcdcdc;
}

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

/* Cleaner mobile rhythm for stacked sections */
section {
    margin-bottom: 1.2rem;
}

@media (min-width: 768px) {
    section {
        margin-bottom: 1.8rem;
    }
}

/* Make section cards feel like editorial modules */
section article,
section .bg-white.border {
    background: var(--card-bg);
}

/* Shared headline behavior */
h1, h2, h3, h4 {
    text-wrap: balance;
}

/* Links look sharper, less saturated than bright red */
a {
    text-decoration-thickness: 1.5px;
    text-underline-offset: 2px;
}

/* News rails */
.breaking-label,
.category-label {
    border-radius: 0;
    letter-spacing: 0.06em;
}

/* Tighter mobile card spacing to keep content dense */
@media (max-width: 767px) {
    .max-w-\[1200px\].mx-auto.px-3 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .font-headline.text-4xl,
    .font-headline.text-5xl,
    .font-headline.text-6xl {
        letter-spacing: -0.02em;
    }
}
