/*
Theme Name: Góc Di Động SEO
Theme URI: https://gocdidong.net/
Description: Theme WordPress tin tức công nghệ siêu nhẹ, tối ưu chuẩn SEO tuyệt đối, tích hợp textlink hệ thống tiz.im.
Version: 1.0.0
Author: Antigravity
Author URI: https://gocdidong.net/
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gocdidong-seo
*/

/* --- CORE DESIGN SYSTEM --- */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --border: #e2e8f0;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- RESET & BASIC STYLES --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.5em;
}

ul, ol {
    list-style-position: inside;
}

/* --- CONTAINER --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex-grow: 1;
    padding: 40px 0;
}

/* --- HEADER & NAVIGATION --- */
.site-header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 70px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.site-branding .logo-text {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.site-branding .logo-text span {
    color: var(--primary);
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 32px;
}

.main-navigation a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    position: relative;
    padding: 8px 0;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: var(--primary);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item > a::after {
    width: 100%;
}

/* Hamburger Menu button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 102;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    margin: 6px 0;
    transition: var(--transition);
}

/* Hamburger active transformation */
.menu-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- MOBILE DRAWER OVERLAY --- */
.mobile-menu-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-lg);
    z-index: 101;
    transition: var(--transition);
    padding: 80px 24px 40px;
    display: flex;
    flex-direction: column;
}

.mobile-menu-drawer.open {
    right: 0;
}

.mobile-menu-drawer ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-menu-drawer a {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.mobile-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-backdrop.open {
    opacity: 1;
    visibility: visible;
}

/* --- POST CARDS / GRID --- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.post-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 99, 235, 0.15);
}

.post-card-thumbnail {
    aspect-ratio: 16/9;
    overflow: hidden;
    background-color: var(--border);
    position: relative;
}

.post-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.post-card:hover .post-card-thumbnail img {
    transform: scale(1.05);
}

.post-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.post-card-category {
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    background-color: var(--primary-light);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.post-card-title {
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 12px;
}

.post-card-title a {
    color: var(--text-primary);
}

.post-card-title a:hover {
    color: var(--primary);
}

.post-card-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.post-card-more {
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.post-card-more svg {
    transition: var(--transition);
}

.post-card:hover .post-card-more svg {
    transform: translateX(4px);
}

/* --- HERO SECTION --- */
.hero-section {
    text-align: center;
    padding: 60px 0 40px;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 42px;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.hero-description {
    font-size: 18px;
    color: var(--text-secondary);
}

/* --- PAGINATION --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
}

.pagination .page-numbers {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    font-weight: 600;
    transition: var(--transition);
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* --- SINGLE ARTICLE VIEW --- */
.breadcrumbs {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.breadcrumbs a {
    color: var(--text-secondary);
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.article-header {
    margin-bottom: 32px;
    text-align: center;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.article-category {
    color: var(--primary);
    font-weight: 600;
}

.article-title {
    font-size: 38px;
    line-height: 1.25;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
}

.article-featured-image {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
}

.article-featured-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.article-layout {
    max-width: 800px;
    margin: 0 auto;
}

.article-content {
    font-size: 18px;
    line-height: 1.8;
    color: #1e293b; /* Slate 800 for high readability */
}

.article-content p {
    margin-bottom: 24px;
}

.article-content h2,
.article-content h3 {
    margin-top: 40px;
    margin-bottom: 16px;
}

.article-content h2 {
    font-size: 28px;
}

.article-content h3 {
    font-size: 22px;
}

.article-content blockquote {
    border-left: 4px solid var(--primary);
    background-color: var(--bg-secondary);
    padding: 16px 24px;
    margin: 32px 0;
    font-style: italic;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-content ul,
.article-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 8px;
}

/* Related posts styling */
.related-posts {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.related-posts-title {
    font-size: 24px;
    margin-bottom: 24px;
    text-align: center;
}

/* --- FOOTER & TEXTLINKS --- */
.site-footer {
    background-color: #0f172a; /* Slate 900 */
    color: #94a3b8; /* Slate 400 */
    padding: 60px 0 30px;
    border-top: 4px solid var(--primary);
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col-left {
    grid-column: span 4;
}

.footer-col-right {
    grid-column: span 8;
}

.footer-widget-title {
    color: #ffffff;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
}

.footer-widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary);
}

.footer-about-text {
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-contact-info p {
    margin-bottom: 8px;
}

.footer-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    line-height: 2;
}

.footer-links-container a {
    color: #cbd5e1; /* Slate 300 */
    font-weight: 600;
    transition: var(--transition);
}

.footer-links-container a:hover {
    color: #60a5fa; /* Blue 400 */
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 24px;
    text-align: center;
    font-size: 13px;
    color: #64748b;
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .main-navigation {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .footer-col-left,
    .footer-col-right {
        grid-column: span 12;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .article-title {
        font-size: 30px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .site-content {
        padding: 24px 0;
    }
}
