/* Modern News Website Styles */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* CSS Variables for consistent theming */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #00d4aa;
    --accent-dark: #00b894;
    --tech-cyan: #00cec9;
    --tech-purple: #6c5ce7;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* General Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: white;
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 50%, #2b6cb0 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

.main-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-height: calc(100vh - 200px);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    margin-top: 2rem;
    margin-bottom: 5rem;
    box-shadow: var(--shadow-xl);
    color: white;
    padding-bottom: 3rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.3;
    color: white !important;
}

/* White text for dark background */
.text-primary {
    color: white !important;
}

.text-secondary {
    color: rgba(255, 255, 255, 0.8) !important;
}

.text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

.display-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-color), var(--tech-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Header Styles */
.navbar {
    background: rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: white !important;
    text-decoration: none;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: white !important;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--accent-color) !important;
    transform: translateY(-1px);
}

/* Modern Card Styles */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    color: white;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.card-img-top {
    transition: var(--transition);
    height: 220px;
    object-fit: cover;
    border-radius: 0;
}

.card:hover .card-img-top {
    transform: scale(1.1);
}

.card-body {
    padding: 1.5rem;
    position: relative;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.card-title a {
    color: white !important;
    text-decoration: none;
    transition: var(--transition);
}

.card-title a:hover {
    color: var(--accent-color) !important;
}

.card-text {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Featured Card Styles */
.featured-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(245, 158, 11, 0.1));
    border: 2px solid var(--primary-color);
    position: relative;
}

.featured-card::before {
    content: "Nổi bật";
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

/* Glass Card Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Article Content Styles */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 8px;
}

/* Modern Badge Styles */
.badge {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.badge-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.badge-category {
    background: linear-gradient(135deg, var(--accent-color), var(--tech-cyan));
    color: white;
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 212, 170, 0.3);
}

/* Modern Button Styles */
.btn {
    border-radius: var(--border-radius);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), var(--tech-cyan));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 170, 0.4);
    background: linear-gradient(135deg, var(--tech-cyan), var(--accent-color));
}

.btn-outline-primary {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--tech-cyan));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3);
}

/* Floating Action Button */
.btn-floating {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.btn-floating:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

/* Modern Search Form */
.search-form {
    position: relative;
}

.search-input {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px 0 0 25px;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(245, 158, 11, 0.25);
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.search-btn {
    border-radius: 0 25px 25px 0;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--primary-color);
    border-left: none;
}

/* Hero Section */
.hero-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--dark-color), var(--tech-purple));
    border-radius: var(--border-radius-lg);
    margin-bottom: 3rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--accent-color) 0%, transparent 70%);
    opacity: 0.1;
    pointer-events: none;
}

.hero-section .display-title {
    background: linear-gradient(135deg, var(--accent-color), var(--tech-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.9);
}

.hero-image {
    text-align: center;
    position: relative;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    position: relative;
    display: inline-block;
    color: var(--text-primary) !important;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, var(--accent-color), var(--tech-cyan));
    border-radius: 2px;
}

/* Card Image Wrapper */
.card-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.card-img-overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.1) 100%);
    pointer-events: none;
}

/* Card Meta */
.card-meta {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.card-meta small {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500;
}

.author-info, .view-count {
    display: flex;
    align-items: center;
}

.author-info i, .view-count i {
    color: var(--accent-color);
}

/* Comment Styles */
.comment-form {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .card-title {
        font-size: 1rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Breadcrumb Styles */
.breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-weight: bold;
}

/* Modern Footer Styles */
.modern-footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, #0f172a 100%);
    color: white;
    margin-top: 8rem;
    position: relative;
    clear: both;
    z-index: 10;
}

.modern-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.footer-brand h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.footer-title {
    color: white;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.newsletter-form .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.newsletter-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-form .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    color: white;
    box-shadow: none;
}

.newsletter-form .btn {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 2rem 0 1rem 0;
}

.copyright-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Pagination Styles */
.pagination {
    margin-top: 3rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.page-link {
    border-radius: var(--border-radius);
    margin: 0 4px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.page-link:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--accent-color), var(--tech-cyan));
    border-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.4);
}

.page-item.disabled .page-link {
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Ensure pagination doesn't overlap with footer */
.pagination-wrapper {
    padding: 2rem 0;
    margin-bottom: 3rem;
}

/* Social Share Buttons */
.social-share .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Featured Articles */
.featured-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.featured-section .card {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

.featured-section .card-title a {
    color: white;
}

/* Category Grid */
.category-grid .card {
    height: 100%;
    min-height: 250px;
}

/* Article Meta */
.article-meta {
    font-size: 0.9rem;
    color: #6c757d;
}

.article-meta i {
    margin-right: 0.25rem;
}

/* Sidebar */
.sidebar {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
}

.sidebar h5 {
    color: #495057;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Scroll Animations */
.scroll-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.scroll-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Hover Effects */
.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--accent-color), var(--tech-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modern Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
        text-align: center;
    }

    .hero-section .col-lg-6:last-child {
        margin-top: 2rem;
    }

    .display-4 {
        font-size: 2.5rem;
    }

    .navbar-brand {
        font-size: 1.5rem;
    }

    .search-form {
        margin-top: 1rem;
        width: 100%;
    }

    .main-content {
        margin-top: 1rem;
        border-radius: var(--border-radius);
    }

    .card-img-top {
        height: 180px;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }

    .hero-section {
        padding: 1.5rem 0;
    }

    .display-4 {
        font-size: 2rem;
    }

    .navbar {
        padding: 0.5rem 0;
    }
}

/* White Text for Dark Background */
.main-content * {
    color: white;
}

.main-content h1,
.main-content h2,
.main-content h3,
.main-content h4,
.main-content h5,
.main-content h6 {
    color: white !important;
}

.main-content p {
    color: white !important;
}

.main-content .card-title {
    color: white !important;
}

.main-content .card-text {
    color: rgba(255, 255, 255, 0.8) !important;
}

.main-content .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

.main-content .text-secondary {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Breadcrumb text */
.breadcrumb-item a {
    color: var(--accent-color) !important;
}

.breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Ensure all links have proper color */
.main-content a:not(.btn) {
    color: var(--accent-color) !important;
}

.main-content a:not(.btn):hover {
    color: white !important;
}

.Image {
    margin-top: 15px!important;
}

.header-br {
    margin-top: 10px;
}