/* Custom CSS for Betlee */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Header Styles */
.navbar-brand img {
    max-height: 50px;
    width: auto;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    padding: 120px 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    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 xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-weight: 700;
    line-height: 1.2;
}

.hero-section .lead {
    font-size: 1.25rem;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.hero-section .btn-light {
    background: rgba(255,255,255,0.95);
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    padding: 15px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero-section .btn-light:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.hero-placeholder {
    background: rgba(255,255,255,0.1);
    border: 2px dashed rgba(255,255,255,0.3);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.hero-placeholder:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.5);
}

/* Article Cards */
.article-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 15px;
    overflow: hidden;
    background: white;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.article-image-container {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image {
    transform: scale(1.05);
}

.article-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 3rem;
}

.article-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-card:hover .article-overlay {
    opacity: 1;
}

.article-title a {
    color: #212529;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-excerpt {
    color: #6c757d;
    line-height: 1.6;
    font-size: 0.95rem;
}

.article-meta {
    border-top: 1px solid #f8f9fa;
    padding-top: 0.75rem;
}

.article-meta small {
    font-size: 0.8rem;
}

.badge {
    font-size: 0.75rem;
    padding: 0.4em 0.8em;
    border-radius: 20px;
    font-weight: 500;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff8c00 100%) !important;
    color: #212529 !important;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

/* Featured Articles */
.article-card:has(.badge.bg-warning) {
    border: 2px solid #ffc107;
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.2);
}

.article-card:has(.badge.bg-warning):hover {
    box-shadow: 0 8px 30px rgba(255, 193, 7, 0.3);
}

/* Article Meta */
.article-meta {
    font-size: 0.9em;
    color: var(--secondary-color);
}


/* Footer */
footer {
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 50px 0;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
}

/* Admin Panel Styles */
.admin-sidebar {
    min-height: 100vh;
    background-color: var(--dark-color);
}

.admin-sidebar .nav-link {
    color: #fff;
    padding: 12px 20px;
    border-radius: 5px;
    margin: 2px 0;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: #fff;
}

.admin-content {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.admin-header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 0;
    margin-bottom: 30px;
}

/* Form Styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 8px;
}

/* Table Styles */
.table {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table th {
    background-color: var(--light-color);
    border-bottom: 2px solid var(--primary-color);
    font-weight: 600;
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 10px 10px 0 0;
}

/* Image Upload */
.image-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.image-upload-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.05);
}

.image-upload-area.dragover {
    border-color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.1);
}

/* AI Article Generator */
.ai-generator {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.ai-generator h5 {
    color: white;
}

/* Site Selector */
.site-selector {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* Content Editor */
.content-editor {
    min-height: 300px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
}

/* Status Badges */
.badge {
    font-size: 0.8em;
    padding: 6px 12px;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Related Articles Styles */
.related-article-item {
    transition: background-color 0.3s ease;
    padding: 0;
}

.related-article-item:hover {
    background-color: #f8f9fa;
}

.related-article-title a {
    color: #212529;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-article-title a:hover {
    color: var(--primary-color);
}

.related-article-excerpt {
    line-height: 1.4;
    color: #6c757d;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-article-image {
    overflow: hidden;
    border-radius: 0;
}

.related-article-image img {
    transition: transform 0.3s ease;
}

.related-article-item:hover .related-article-image img {
    transform: scale(1.05);
}

/* Better spacing for 3 articles */
.related-article-item .p-3 {
    padding: 1rem !important;
}

/* Sidebar Card Improvements */
.card-header.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%) !important;
    border: none;
}

.card-header.bg-primary h5 {
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}