/* Custom CSS for The Internet Papers Blog */

:root {
    --primary-color: #0066cc;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    padding-top: 76px; /* Account for fixed navbar */
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: white;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #004499 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 xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-buttons .btn {
    transition: transform 0.3s ease;
}

.hero-buttons .btn:hover {
    transform: translateY(-2px);
}

.hero-graphic {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Post Cards */
.post-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.post-card .card-body {
    padding: 1.5rem;
}

.post-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.post-card .card-text {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.post-meta {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.post-tags {
    margin-bottom: 1rem;
}

.post-tags .badge {
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
}

/* Article Content */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.article-content h1 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.article-content h2 {
    color: var(--dark-color);
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.25rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    margin: 1.5rem 0;
    padding-left: 1rem;
    font-style: italic;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0 5px 5px 0;
}

.article-content code {
    background-color: #f8f9fa;
    color: #e83e8c;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

.article-content pre {
    background-color: #2d3748;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
}

.article-content table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
}

.article-content table th,
.article-content table td {
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    text-align: left;
}

.article-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Feature Boxes */
.feature-box {
    padding: 2rem 1rem;
    transition: transform 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
}

.feature-box h4 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

/* Social Share */
.social-share .btn {
    margin-bottom: 0.5rem;
}

/* Admin Styles */
.sidebar {
    position: sticky;
    top: 76px;
    height: calc(100vh - 76px);
    overflow-y: auto;
    border-right: 1px solid #dee2e6;
}

.sidebar .nav-link {
    color: var(--dark-color);
    padding: 0.75rem 1rem;
    border-radius: 5px;
    margin-bottom: 0.25rem;
    transition: background-color 0.3s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
}

.content-section {
    padding: 1rem 0;
}

/* Admin Dashboard Cards */
.card.bg-primary,
.card.bg-success,
.card.bg-warning,
.card.bg-info {
    border: none;
    border-radius: 10px;
}

.card .display-6 {
    font-size: 2rem;
    font-weight: bold;
}

/* Admin Tables */
.table-hover tbody tr:hover {
    background-color: rgba(0, 102, 204, 0.05);
}

.badge {
    font-size: 0.75rem;
}

/* Quill Editor Customization */
.ql-toolbar {
    border-top: 1px solid #ccc;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    border-radius: 5px 5px 0 0;
}

.ql-container {
    border-bottom: 1px solid #ccc;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    border-radius: 0 0 5px 5px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Loading States */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 56px;
    }
    
    .hero-section .container {
        padding: 2rem 15px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .sidebar {
        position: relative;
        height: auto;
        top: 0;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        margin-bottom: 1rem;
    }
    
    .post-card {
        margin-bottom: 1.5rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .hero-buttons .btn {
        display: block;
        margin-bottom: 0.5rem;
        margin-right: 0 !important;
    }
    
    .feature-box {
        margin-bottom: 2rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .sidebar,
    footer,
    .social-share {
        display: none !important;
    }
    
    body {
        padding-top: 0;
    }
    
    .article-content {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* Accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
    border-color: var(--primary-color);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 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); }
}

/* Utility Classes */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.border-primary-custom {
    border-color: var(--primary-color) !important;
}

.shadow-custom {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.shadow-hover:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    transition: box-shadow 0.3s ease;
}

/* Admin Page Styles */
.admin-page {
    padding-top: 0 !important;
}

.admin-page .sidebar {
    min-height: calc(100vh - 56px);
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1);
}

.admin-page main {
    min-height: calc(100vh - 56px);
}

.admin-page .content-section {
    padding-top: 0;
}
