/* Clean Professional Style for Review Hai Phong */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --text-dark: #111827;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --bg-white: #ffffff;
    --bg-gray: #f9fafb;
    --bg-light: #f3f4f6;
    --border: #e5e7eb;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Utilities */
.img-fluid { max-width: 100%; height: auto; display: block; }
.hidden { display: none !important; }

/* Header */
.modern-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
}

.top-bar { background: var(--bg-gray); padding: 0.5rem 0; font-size: 0.875rem; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar-left { display: flex; gap: 2rem; align-items: center; }
.weather-info, .current-date { display: flex; align-items: center; gap: 0.5rem; color: var(--text-gray); }
.social-links { display: flex; gap: 1rem; }
.social-links a { color: var(--text-gray); padding: 0.25rem; border-radius: 0.375rem; transition: all 0.2s ease; }
.social-links a:hover { color: var(--primary); background: var(--bg-light); }

.main-header { padding: 1.5rem 0; }
.header-content { display: grid; grid-template-columns: auto 1fr auto; gap: 2rem; align-items: center; }
.logo-img { height: 3rem; width: auto; }

.search-input-group { position: relative; display: flex; }
.search-input { width: 100%; padding: 0.75rem 1rem; padding-right: 3rem; border: 1px solid var(--border); border-radius: 0.5rem; font-size: 0.875rem; background: var(--bg-gray); }
.search-input:focus { outline: none; border-color: var(--primary); background: var(--bg-white); }
.search-btn { position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-light); padding: 0.5rem; cursor: pointer; }

.mobile-menu-toggle { display: none; }

/* Navigation */
.main-navigation { background: var(--bg-white); border-bottom: 1px solid var(--border); }
.nav-menu { display: flex; list-style: none; align-items: center; gap: 0; }
.nav-link { display: flex; align-items: center; gap: 0.5rem; padding: 1rem 1.5rem; color: var(--text-gray); font-weight: 500; transition: all 0.2s ease; border-bottom: 2px solid transparent; text-decoration: none; }
.nav-link:hover, .nav-link.active { color: var(--primary); background: var(--bg-gray); border-bottom-color: var(--primary); }

.dropdown-menu { position: absolute; top: 100%; left: 0; background: var(--bg-white); border: 1px solid var(--border); border-radius: 0.5rem; box-shadow: var(--shadow); min-width: 200px; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.2s ease; z-index: 100; }
.nav-item:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item { display: block; padding: 0.75rem 1rem; color: var(--text-gray); border-bottom: 1px solid var(--bg-gray); transition: all 0.2s ease; text-decoration: none; }
.dropdown-item:hover { background: var(--bg-gray); color: var(--primary); }

/* Article Container */
.modern-article-container { background: var(--bg-gray); min-height: 100vh; }
.article-layout { display: grid; grid-template-columns: 1fr 300px; gap: 3rem; padding: 1rem 0; }
.article-main { background: var(--bg-white); border-radius: 0.75rem; box-shadow: var(--shadow); overflow: hidden; }
.modern-article { padding: 2rem; }

.article-header { margin-bottom: 2rem; }
.article-meta { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; font-size: 0.875rem; }
.meta-category, .meta-date { display: flex; align-items: center; gap: 0.5rem; color: var(--text-gray); }
.category-badge { background: var(--primary); color: white; padding: 0.25rem 0.75rem; border-radius: 1rem; font-size: 0.75rem; font-weight: 500; text-transform: uppercase; }

.article-title { font-size: clamp(1.6rem, 2.2vw + 1rem, 2.5rem); font-weight: 700; line-height: 1.2; margin-bottom: 1rem; color: var(--text-dark); }
.article-excerpt { font-size: 1.125rem; color: var(--text-gray); line-height: 1.6; margin-bottom: 1.5rem; }

.article-author { display: flex; align-items: center; gap: 1rem; padding: 1.5rem; background: var(--bg-gray); border-radius: 0.5rem; margin-bottom: 2rem; }
.author-avatar { width: 3rem; height: 3rem; border-radius: 50%; overflow: hidden; background: var(--bg-light); }
.avatar-img { width: 100%; height: 100%; object-fit: cover; }
.author-name { font-weight: 600; color: var(--text-dark); margin-bottom: 0.25rem; }
.author-title { color: var(--text-gray); font-size: 0.875rem; }

.article-featured-image { margin-bottom: 2rem; border-radius: 0.5rem; overflow: hidden; }
.featured-img { width: 100%; height: auto; display: block; }

.article-body { line-height: 1.8; color: var(--text-gray); }
.article-body h2, .article-body h3, .article-body h4 { margin-top: 2rem; margin-bottom: 1rem; color: var(--text-dark); }
.article-body p { margin-bottom: 1.5rem; }
.article-body img { max-width: 100%; height: auto; border-radius: 0.5rem; margin: 1.5rem 0; }
/* Responsive embeds & tables */
.article-body iframe { width: 100%; aspect-ratio: 16/9; border: 0; }
.article-body table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.article-body table td, .article-body table th { padding: 8px; border: 1px solid var(--border); }

.article-stats { display: flex; align-items: center; gap: 2rem; padding: 1.5rem; background: var(--bg-gray); border-radius: 0.5rem; margin: 2rem 0; border-top: 1px solid var(--border); }
.stat-item { display: flex; align-items: center; gap: 0.5rem; color: var(--text-gray); font-size: 0.875rem; }

.article-tags { margin: 2rem 0; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.tags-title { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; font-weight: 600; color: var(--text-dark); }
.tags-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-item { background: var(--bg-gray); color: var(--text-gray); padding: 0.5rem 1rem; border-radius: 1rem; font-size: 0.875rem; border: 1px solid var(--border); transition: all 0.2s ease; }
.tag-item:hover { background: var(--primary); color: white; border-color: var(--primary); }

.article-share { margin: 2rem 0; padding: 1.5rem; background: var(--bg-gray); border-radius: 0.5rem; border-top: 1px solid var(--border); }
.share-title { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; font-weight: 600; color: var(--text-dark); }
.share-buttons { display: flex; gap: 0.75rem; }
.share-btn { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; background: var(--bg-white); color: var(--text-gray); border: 1px solid var(--border); border-radius: 0.5rem; font-size: 0.875rem; transition: all 0.2s ease; text-decoration: none; }
.share-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.share-btn.facebook { background: #1877f2; color: white; border-color: #1877f2; }
.share-btn.twitter { background: #1da1f2; color: white; border-color: #1da1f2; }
.share-btn.linkedin { background: #0077b5; color: white; border-color: #0077b5; }
.share-btn.whatsapp { background: #25d366; color: white; border-color: #25d366; }

/* Comments */
.comments-section { margin: 2rem 0; padding-top: 2rem; border-top: 1px solid var(--border); }
.comments-title { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; font-weight: 600; color: var(--text-dark); }
.comment-item { padding: 1.5rem; background: var(--bg-gray); border-radius: 0.5rem; margin-bottom: 1rem; border: 1px solid var(--bg-light); }
.comment-avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; overflow: hidden; background: var(--bg-light); margin-bottom: 1rem; }
.comment-author { font-weight: 600; color: var(--text-dark); margin-bottom: 0.25rem; }
.comment-date { font-size: 0.875rem; color: var(--text-light); margin-bottom: 0.75rem; }
.comment-text { color: var(--text-gray); line-height: 1.6; margin-bottom: 1rem; }
.comment-actions { display: flex; gap: 1rem; }
.action-btn { background: none; border: none; color: var(--text-light); font-size: 0.875rem; cursor: pointer; padding: 0.25rem 0.5rem; border-radius: 0.25rem; transition: all 0.2s ease; }
.action-btn:hover { color: var(--primary); background: var(--bg-light); }

/* Sidebar */
.article-sidebar { position: sticky; top: 2rem; }
.sidebar-widget { background: var(--bg-white); border-radius: 0.75rem; box-shadow: var(--shadow); padding: 1.5rem; margin-bottom: 2rem; }
.widget-title { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; font-weight: 600; color: var(--text-dark); font-size: 1.125rem; }
.categories-list { list-style: none; }
.categories-list li { border-bottom: 1px solid var(--bg-light); }
.categories-list li:last-child { border-bottom: none; }
.categories-list a { display: block; padding: 0.75rem 0; color: var(--text-gray); transition: all 0.2s ease; text-decoration: none; }
.categories-list a:hover { color: var(--primary); padding-left: 0.5rem; }

/* Popular Posts (Sidebar) */
.popular-posts { display: grid; grid-template-columns: 1fr; gap: 12px; }
.popular-post-item { display:flex; align-items:center; gap:12px; padding:10px; border:1px solid var(--border); border-radius:10px; background:#fff; transition: box-shadow .2s ease, transform .12s ease; }
.popular-post-item:hover { box-shadow: 0 6px 20px rgba(2,6,23,.08); transform: translateY(-1px); }
.popular-post-link { display:flex; align-items:center; gap:12px; width:100%; text-decoration:none; color:inherit; }
.popular-post-image { width:80px; height:80px; border-radius:8px; overflow:hidden; background:#f3f4f6; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.popular-post-image img { width:100%; height:100%; object-fit:cover; display:block; }
.popular-post-image .no-image { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:#94a3b8; }
.popular-post-info { display:grid; gap:6px; min-width:0; }
.popular-post-title { font-size:14px; font-weight:600; color:#0f172a; line-height:1.35; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.popular-post-meta { display:flex; flex-wrap:wrap; gap:10px; font-size:12px; color:#64748b; }
.popular-post-meta .post-date::before { content:"\f073"; font-family:"Font Awesome 6 Free"; font-weight:900; margin-right:6px; }
.popular-post-meta .post-views::before { content:"\f06e"; font-family:"Font Awesome 6 Free"; font-weight:900; margin-right:6px; }
@media (max-width: 768px){ .popular-post-image{width:72px;height:72px;} .popular-post-title{font-size:13.5px;} }

/* Posts list/category shared layout */
.posts-category { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; }
.posts-category .news-feed { min-width: 0; }
.posts-category .sidebar { position: sticky; top: 2rem; align-self: start; }
.news-item { display: grid; grid-template-columns: 1fr; gap: 16px; border-bottom: 1px solid var(--border); }
.news-image img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; }
.news-content h3 { font-size: 1.05rem; line-height: 1.4; margin-bottom: 6px; }
.news-content p { color: var(--text-gray); font-size: 0.95rem; }
.news-meta { display: flex; gap: 12px; color: var(--text-light); font-size: 0.85rem; margin-top: 6px; }

/* Related posts grid */
.related-posts-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related-posts-list .post-item { display: grid; grid-template-columns: 110px 1fr; gap: 12px; text-decoration: none; color: inherit; background:#fff; border:1px solid var(--border); border-radius:10px; padding:10px; }
.related-posts-list .post-image img { width:100%; height:90px; object-fit:cover; border-radius:8px; }

/* Footer */
.modern-footer { background: var(--bg-white); border-top: 1px solid var(--border); margin-top: 4rem; }
.newsletter-section { background: var(--bg-gray); padding: 3rem 0; text-align: center; }
.newsletter-content { max-width: 600px; margin: 0 auto; }
.newsletter-text h3 { margin-bottom: 1rem; color: var(--text-dark); }
.newsletter-text p { margin-bottom: 2rem; color: var(--text-gray); }
.subscribe-form .form-group { display: flex; gap: 1rem; max-width: 400px; margin: 0 auto; }
.subscribe-form input { flex: 1; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: 0.5rem; font-size: 0.875rem; }
.subscribe-form input:focus { outline: none; border-color: var(--primary); }
.footer-main { padding: 3rem 0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.footer-column h4 { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; color: var(--text-dark); font-size: 1.125rem; }
.footer-logo { margin-bottom: 1rem; }
.footer-logo .logo-img { height: 2.5rem; width: auto; }
.company-description { color: var(--text-gray); line-height: 1.6; margin-bottom: 1.5rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: var(--text-gray); transition: color 0.2s ease; text-decoration:none; }
.footer-links a::before { content: '→'; margin-right: 0.5rem; color: var(--primary); }
.footer-links a:hover { color: var(--primary); }
.contact-details { list-style: none; }
.contact-item { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1rem; }
.contact-item i { color: var(--primary); margin-top: 0.25rem; flex-shrink: 0; }
.contact-text { color: var(--text-gray); line-height: 1.5; }
.contact-text .label { font-weight: 600; color: var(--text-dark); margin-bottom: 0.25rem; }
.footer-bottom { background: var(--bg-gray); padding: 1.5rem 0; border-top: 1px solid var(--border); }
.footer-bottom-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.copyright { color: var(--text-gray); font-size: 0.875rem; }
.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a { color: var(--text-gray); font-size: 0.875rem; transition: color 0.2s ease; text-decoration:none; }
.footer-bottom-links a:hover { color: var(--primary); }

.back-to-top { position: fixed; bottom: 2rem; right: 2rem; width: 3rem; height: 3rem; background: var(--primary); color: white; border: none; border-radius: 50%; cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s ease; box-shadow: var(--shadow); z-index: 1000; }
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* Responsive */
@media (max-width: 1200px) {
    .container { max-width: 100%; }
}

@media (max-width: 1024px) {
    .header-content { grid-template-columns: 1fr auto; gap: 1rem; }
    .mobile-menu-toggle { display: block; }
    /* Collapse nav on tablet/mobile */
    .nav-menu { display: none; flex-direction: column; align-items: flex-start; width: 100%; }
    .nav-menu.open { display: flex; }
    .nav-link { width: 100%; padding: 0.875rem 0.75rem; }
    .dropdown-menu { position: static; border: none; box-shadow: none; min-width: 100%; transform: none; opacity: 1; visibility: visible; padding-left: 12px; }

    .article-layout { grid-template-columns: 1fr; gap: 2rem; }
    .article-sidebar { position: static; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }

    .posts-category { grid-template-columns: 1fr; }
    .news-item { grid-template-columns: 140px 1fr; }
    .related-posts-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .header-content { grid-template-columns: 1fr auto; gap: 0.75rem; text-align: left; }
    .search-section { max-width: none; }
    .newsletter-content { padding: 0 1rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom-content { flex-direction: column; text-align: center; }
    .article-title { font-size: clamp(1.4rem, 3vw + 1rem, 2rem); }
    .modern-article { padding: 1.5rem; }
    .article-stats { flex-direction: column; gap: 1rem; text-align: center; }
    .share-buttons { flex-wrap: wrap; justify-content: center; }
    .comment-item { padding: 1rem; }
    .comment-avatar { width: 2rem; height: 2rem; }
    .top-bar-left { gap: 1rem; }

    .news-item { grid-template-columns: 120px 1fr; }
    .news-image img { height: 100px; }
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .modern-article { padding: 1rem; }
    .article-title { font-size: clamp(1.25rem, 4.5vw + 0.8rem, 1.75rem); }
    .social-links { gap: 0.5rem; }
    .back-to-top { bottom: 1rem; right: 1rem; width: 2.5rem; height: 2.5rem; }
    .news-item { grid-template-columns: 1fr; }
    .news-image img { height: auto; }
    .related-posts-list { grid-template-columns: 1fr; }
}

/* Mobile menu toggle button */
.menu-toggle-btn {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-white);
    cursor: pointer;
}
.menu-toggle-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-dark);
    position: relative;
}
.menu-toggle-btn span + span { margin-top: 5px; }
.menu-toggle-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle-btn.active span:nth-child(2) { opacity: 0; }
.menu-toggle-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav open state helpers */
@media (max-width: 1024px) {
    .main-navigation .container { padding-left: 0; padding-right: 0; }
    .nav-menu.open { border-top: 1px solid var(--border); padding: 6px 12px; background: var(--bg-white); }
}

