/* Avenra News Custom Styles */

:root {
    --primary-color: #0066cc;
    --primary-dark: #0052a3;
    --secondary-color: #28a745;
    --accent-color: #ffc107;
    --text-color: #212529;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

/* Typography */
.display-4 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Cards */
.card {
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

/* Topic Cards */
.topic-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.topic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 1rem 3rem rgba(0, 102, 204, 0.15);
}

.topic-icon {
    opacity: 0.9;
    transition: opacity 0.2s ease-in-out;
}

.topic-card:hover .topic-icon {
    opacity: 1;
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.15s ease-in-out;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><g fill="white" fill-opacity="0.05"><circle cx="20" cy="20" r="1"/></g></svg>');
}

/* Forms */
.form-control, .form-select {
    border-radius: 0.375rem;
    border: 1px solid var(--border-color);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.input-group-text {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Tables */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 102, 204, 0.05);
}

/* Alerts */
.alert {
    border-radius: 0.5rem;
    border: none;
}

.alert-info {
    background-color: rgba(0, 102, 204, 0.1);
    color: var(--primary-dark);
}

/* Badges */
.badge {
    font-weight: 500;
    border-radius: 0.375rem;
}

/* Post Content Styles */
.post-content {
    font-size: 1.0625rem;
    line-height: 1.7;
}

.post-content h1, .post-content h2, .post-content h3, 
.post-content h4, .post-content h5, .post-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.post-content h2 {
    font-size: 1.75rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.post-content h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content ul, .post-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

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

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-muted);
}

.post-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.post-content a:hover {
    text-decoration: underline;
}

/* Admin Styles */
.admin-stat-card {
    transition: transform 0.2s ease-in-out;
}

.admin-stat-card:hover {
    transform: translateY(-3px);
}

/* Search and Filter Styles */
.archive-filters {
    background-color: var(--bg-light);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .hero-section {
        padding: 3rem 0;
    }
    
    .topic-card {
        margin-bottom: 1rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1.5rem 1rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
}

/* Print Styles */
@media print {
    .navbar, .footer, .btn, .modal {
        display: none !important;
    }
    
    .post-content {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .card {
        border: none;
        box-shadow: none;
    }
}

/* Focus States for Accessibility */
.btn:focus, .form-control:focus, .form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Dark Mode Support (future enhancement) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e9ecef;
        --text-muted: #adb5bd;
        --bg-light: #343a40;
        --border-color: #495057;
    }
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.shadow-custom {
    box-shadow: var(--shadow-lg) !important;
}

/* Custom spacing */
.py-6 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
}

.my-6 {
    margin-top: 4rem !important;
    margin-bottom: 4rem !important;
}
