/* Blog CMS - Main Stylesheet */
/* Mobile-first responsive design for all devices */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #10b981;
    --dark: #1e293b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--dark);
    background: var(--light);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navbar */
.navbar { padding: 0.75rem 0; }
.navbar-brand { font-size: 1.4rem; }
.nav-link { font-weight: 500; font-size: 0.95rem; padding: 0.5rem 1rem !important; }
.nav-link:hover { color: var(--primary) !important; }

/* Article Cards */
.article-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: var(--radius);
    overflow: hidden;
}
.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.article-card .card-title { font-size: 1rem; line-height: 1.4; }
.article-card .card-title a:hover { color: var(--primary) !important; }

/* Featured Section */
.featured-card, .featured-card-sm {
    transition: transform 0.3s ease;
}
.featured-card:hover, .featured-card-sm:hover {
    transform: scale(1.02);
}
.featured-overlay {
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

/* Article Content */
.article-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
}
.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
}
.article-body h2, .article-body h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}
.article-body p { margin-bottom: 1.2rem; }
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}
.article-body ul, .article-body ol {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
}
.article-body li { margin-bottom: 0.5rem; }
.article-body blockquote {
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: #f1f5f9;
    border-radius: 0 8px 8px 0;
}

/* Ad Container */
.ad-container {
    padding: 10px;
    margin: 15px 0;
    min-height: 50px;
}

/* Sidebar */
.card { border-radius: var(--radius); }
.list-group-item { border-left: 0; border-right: 0; }

/* Footer */
footer a { transition: color 0.2s; }
footer a:hover { color: var(--primary) !important; }

/* Pagination */
.page-link { border-radius: 8px !important; margin: 0 3px; }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

/* Share Buttons */
.share-buttons .btn { width: 36px; height: 36px; padding: 0; line-height: 36px; border-radius: 50%; }

/* Responsive */
@media (max-width: 991.98px) {
    .article-title { font-size: 1.6rem; }
    .article-body { font-size: 1rem; }
    .featured-card { height: 280px !important; }
}

@media (max-width: 767.98px) {
    .article-title { font-size: 1.4rem; }
    .navbar-brand { font-size: 1.1rem; }
    .featured-card { height: 220px !important; }
    .featured-card-sm { height: 160px !important; }
}

@media (max-width: 575.98px) {
    .container { padding-left: 15px; padding-right: 15px; }
    .article-meta { font-size: 0.85rem; }
}

/* Safari/iOS fixes */
@supports (-webkit-touch-callout: none) {
    .article-card img { -webkit-transform: translateZ(0); }
    body { -webkit-text-size-adjust: 100%; }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --light: #0f172a;
        --dark: #f1f5f9;
        --border: #334155;
    }
}

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Print styles */
@media print {
    .navbar, footer, .sidebar, .share-buttons, .ad-container, .pagination { display: none !important; }
    .article-body { font-size: 12pt; }
}

/* Loading animation */
.article-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
.article-card:nth-child(4) { animation-delay: 0.4s; }
