/* assets/css/style.css - Main Stylesheet */

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e293b;
    --accent-color: #8b5cf6;
    --bg-light: #f8fafc;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --card-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --card-hover-shadow: 0 8px 40px rgba(37, 99, 235, 0.15);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bg-dark {
    background-color:rgb(148 201 255) !important;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.7;
    padding-top: 0;
}

/* Dark Mode */
body.dark-mode {
    background-color: #0f172a;
    color: #e2e8f0;
}

body.dark-mode .bg-white {
    background-color: #1e293b !important;
}

body.dark-mode .card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-mode .navbar {
    background-color: #1e293b !important;
    border-bottom: 1px solid #334155 !important;
}

body.dark-mode .navbar .nav-link,
body.dark-mode .navbar .navbar-brand {
    color: #e2e8f0 !important;
}

body.dark-mode .navbar .nav-link:hover {
    color: #93c5fd !important;
}

body.dark-mode .form-control {
    background-color: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-mode .form-control:focus {
    background-color: #0f172a;
    color: #e2e8f0;
}

body.dark-mode .text-muted {
    color: #94a3b8 !important;
}

body.dark-mode .footer {
    background-color: #0f172a !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: #1d4ed8;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-icon {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.brand-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-link:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

/* Search Form */
.search-form .form-control {
    border-radius: 50px 0 0 50px;
    border: 2px solid #e2e8f0;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    min-width: 200px;
    transition: var(--transition);
}

.search-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.search-form .btn {
    border-radius: 0 50px 50px 0;
    padding: 0.5rem 1.2rem;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e2e8f0;
    background: transparent;
    transition: var(--transition);
}

.dark-mode-toggle:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    overflow: hidden;
}

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

.card-img-top {
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-img-top {
    transform: scale(1.03);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category Badge */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    transition: var(--transition);
}

.category-badge:hover {
    background: var(--primary-color);
    color: white;
}

/* Hero Slider */
.hero-slider {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.hero-slider .swiper-slide {
    position: relative;
    min-height: 400px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

.hero-slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    color: white;
}

.hero-slide-content h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.hero-slide-content .meta {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

.hero-slide-content .meta i {
    margin-right: 4px;
}

.hero-slide-content .btn {
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
}

.hero-slider .swiper-button-next,
.hero-slider .swiper-button-prev {
    color: white;
    background: rgba(0,0,0,0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--transition);
}

.hero-slider .swiper-button-next:hover,
.hero-slider .swiper-button-prev:hover {
    background: var(--primary-color);
}

.hero-slider .swiper-pagination-bullet {
    background: white;
    opacity: 0.6;
}

.hero-slider .swiper-pagination-bullet-active {
    background: var(--primary-color);
    opacity: 1;
}

/* Categories Slider */
.categories-slider {
    padding: 0.5rem 0;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
}

.category-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow);
    background: var(--primary-color);
    color: white;
}

.category-item i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.category-item:hover i {
    color: white;
}

.category-item .cat-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.category-item .cat-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.category-item:hover .cat-count {
    color: rgba(255,255,255,0.7);
}

body.dark-mode .category-item {
    background: #1e293b;
    color: #e2e8f0;
}

body.dark-mode .category-item i {
    color: #93c5fd;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-weight: 800;
    font-size: 1.75rem;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
    margin-top: 4px;
}

.section-header .btn {
    border-radius: 50px;
    font-weight: 600;
}

/* Blog Page */
.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.blog-meta i {
    margin-right: 4px;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.blog-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    scroll-margin-top: 80px;
}

.blog-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(37, 99, 235, 0.05);
    border-radius: 0 12px 12px 0;
    font-style: italic;
}

/* Table of Contents */
.toc {
    background: rgba(37, 99, 235, 0.05);
    border-radius: var(--border-radius);
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.toc a {
    color: var(--text-dark);
    transition: var(--transition);
}

.toc a:hover {
    color: var(--primary-color);
    padding-left: 4px;
}

/* Share Buttons */
.share-buttons .btn {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.share-buttons .btn:hover {
    transform: translateY(-2px);
}

/* Footer */
.footer {
    margin-top: 4rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 800;
}

.footer-brand i {
    color: var(--primary-color);
    margin-right: 8px;
}

.footer a {
    transition: var(--transition);
}

.footer a:hover {
    color: var(--primary-color) !important;
}

.footer-thumbnail {
    border-radius: 6px;
    object-fit: cover;
}

.social-links a {
    display: inline-block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    text-align: center;
    line-height: 36px;
    transition: var(--transition);
}

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

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-suggestions .suggestion-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    transition: var(--transition);
    cursor: pointer;
}

.search-suggestions .suggestion-item:hover {
    background: rgba(37, 99, 235, 0.05);
}

body.dark-mode .search-suggestions {
    background: #1e293b;
}

body.dark-mode .search-suggestions .suggestion-item {
    border-bottom-color: #334155;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-slide-content h2 {
        font-size: 1.5rem;
    }
    
    .hero-slide-content {
        padding: 2rem 1rem;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .search-form .form-control {
        min-width: 120px;
        font-size: 0.8rem;
    }
    
    .footer {
        text-align: center;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .hero-slider .swiper-slide {
        min-height: 300px;
    }
    
    .hero-slide-content h2 {
        font-size: 1.2rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .blog-meta {
        font-size: 0.8rem;
        gap: 0.5rem;
    }
}

/* Loading Animation */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.loading-spinner .spinner-border {
    color: var(--primary-color);
    width: 3rem;
    height: 3rem;
}

/* Pagination */
.pagination .page-link {
    border: none;
    border-radius: 8px;
    color: var(--text-dark);
    font-weight: 500;
    margin: 0 2px;
    transition: var(--transition);
}

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

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

body.dark-mode .pagination .page-link {
    background: #1e293b;
    color: #e2e8f0;
}

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

/* Category Page */
.category-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    color: white;
    margin-bottom: 2rem;
}

.category-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
}

.category-hero .badge {
    background: rgba(255,255,255,0.2);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}