/* Custom CSS for Modern Blog */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --body-bg: #ffffff;
    --text-color: #333333;
    --border-color: #dee2e6;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--body-bg);
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

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

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Main Content */
.main-content {
    margin-top: 76px;
    min-height: calc(100vh - 76px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    width: 100vw;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-top: -80px;
    margin-bottom: 4rem;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 86, 179, 0.7);
    z-index: 1;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-icon {
    flex: 1;
    text-align: center;
}

.hero-icon i {
    font-size: 8rem;
    opacity: 0.3;
}

/* Responsive hero section */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        padding: 0 1rem;
    }
    
    .hero-text {
        max-width: 100%;
        margin-bottom: 2rem;
    }
    
    .hero-icon i {
        font-size: 4rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

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

.card-img-top {
    aspect-ratio: 4/3;
    object-fit: cover;
    width: 100%;
}

/* Product review cards maintain their special design */
.card .card-footer .btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

.card .card-footer .btn-outline-secondary {
    border-color: #6c757d;
    color: #6c757d;
}

.card .card-footer .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.card-text {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Featured Post */
.featured-post {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.featured-post h2 {
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
}

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

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

/* Badges */
.badge {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
}

/* Sidebar */
.sidebar {
    background-color: var(--light-color);
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
}

.sidebar h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.sidebar .list-group-item {
    border: none;
    background: transparent;
    padding: 0.5rem 0;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.sidebar .list-group-item:hover {
    color: var(--primary-color);
    background: transparent;
}

/* Post Content */
.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1.3;
}

.post-content h1 {
    font-size: 2.5rem;
    margin-top: 0;
}

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

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

.post-content h4 {
    font-size: 1.25rem;
}

.post-content h5 {
    font-size: 1.1rem;
}

.post-content h6 {
    font-size: 1rem;
}

.post-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

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

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

.post-content strong {
    font-weight: 700;
    color: var(--dark-color);
}

.post-content em {
    font-style: italic;
    color: var(--secondary-color);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--secondary-color);
    background-color: var(--light-color);
    border-radius: 0 8px 8px 0;
}

.post-content code {
    background-color: var(--light-color);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.post-content pre {
    background-color: var(--light-color);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
}

.post-content pre code {
    background: none;
    padding: 0;
}

/* Comments */
.comment {
    background-color: var(--light-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.comment-author {
    font-weight: 600;
    color: var(--dark-color);
}

.comment-date {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 2px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Admin Dashboard */
.admin-sidebar {
    background-color: var(--dark-color);
    min-height: 100vh;
    padding: 2rem 0;
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.admin-sidebar .nav-link i {
    width: 20px;
    margin-right: 0.5rem;
}

/* Stats Cards */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.stats-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stats-card p {
    opacity: 0.9;
    margin-bottom: 0;
}

/* Tables */
.table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table thead th {
    background-color: var(--light-color);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--dark-color);
}

/* Pagination */
.pagination .page-link {
    border-radius: 6px;
    margin: 0 0.25rem;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Footer */
footer {
    margin-top: auto;
    background-color: #343a40 !important;
    color: #ffffff;
    position: relative;
}

footer h5, footer h6 {
    color: #ffffff;
    font-weight: 600;
}

footer .text-muted {
    color: #adb5bd !important;
}

footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #ffffff !important;
    text-decoration: none;
}

.social-links a {
    font-size: 1.25rem;
    transition: color 0.3s ease;
    display: inline-block;
    margin-right: 1rem;
}

.social-links a:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

footer hr {
    border-color: #495057;
    margin: 2rem 0;
}

footer ul.list-unstyled li {
    margin-bottom: 0.5rem;
}

footer .text-danger {
    color: #dc3545 !important;
}

/* Footer responsive adjustments */
@media (max-width: 768px) {
    footer .text-md-end {
        text-align: left !important;
        margin-top: 1rem;
    }
    
    footer .col-md-4 {
        margin-bottom: 2rem;
    }
    
    footer .social-links {
        margin-top: 1rem;
    }
}

/* Minimal scroll to top button styling */
.btn-primary.position-fixed {
    background: #007bff;
    border: none;
    color: white;
    width: auto;
    height: auto;
    padding: 6px 12px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    font-size: 11px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.btn-primary.position-fixed:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 123, 255, 0.4);
    opacity: 1;
}

.btn-primary.position-fixed:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 123, 255, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .card-img-top {
        height: 150px;
    }
    
    .main-content {
        margin-top: 66px;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .featured-post {
        padding: 1.5rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alert Styles */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Utility Classes */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.bg-light { background-color: var(--light-color) !important; }
.border-primary { border-color: var(--primary-color) !important; }

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

/* Focus styles for accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Image Upload Styles */
.image-upload-container {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: border-color 0.3s ease;
}

.image-upload-container:hover {
    border-color: var(--primary-color);
}

.image-upload-container.dragover {
    border-color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.05);
}

.current-image-preview {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem;
    background-color: var(--light-color);
}

.image-upload-options {
    background-color: var(--light-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.logo-text {
    font-size: 18px !important;
    font-weight: bold;
}