/* AAA Blog — 2026 Refresh */
/* Global reset for mobile */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.75;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Fix for mobile viewport */
@media (max-width: 768px) {
    html, body { overflow-x: hidden; }
    body { position: relative; }
}

:root {
    --bg: #fefefe;
    --bg-alt: #f8fafc;
    --text: #0f172a;
    --text-muted: #475569;
    --primary: #0ea5e9;
    --primary-hover: #0284c7;
    --border: #e2e8f0;
    --card: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 12px 28px rgba(14, 165, 233, 0.12);
    --code-bg: #f1f5f9;
    --category-new: #0ea5e9;
    --category-guide: #10b981;
    --category-case: #8b5cf6;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.75;
    font-size: 16px;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* Header */
.header {
    position: sticky; top: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    padding: 20px 0;
    transition: all 0.3s;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 22px;
    color: var(--text);
    text-decoration: none;
}

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

.logo-icon {
    font-size: 32px;
    transition: transform 0.3s;
}

.logo:hover .logo-icon {
    transform: scale(1.1) rotate(-8deg);
}

.nav { display: flex; gap: 36px; }

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.25);
}

.btn-lg { padding: 16px 36px; font-size: 16px; }

/* Hero */
.hero {
    padding: 96px 0;
    background: var(--bg-alt);
    text-align: center;
}

.hero-title {
    font-size: 52px;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 32px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Sections */
.features, .cases, .posts, .latest {
    padding: 96px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-title {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text);
    letter-spacing: -0.02em;
}

.section-desc {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Cards Grid */
.features-grid, .posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-card, .post-card, .case-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 32px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card:hover, .post-card:hover, .case-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.feature-card::before, .post-card::before, .case-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover::before, .post-card:hover::before, .case-card:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 44px;
    margin-bottom: 16px;
    display: block;
}

.feature-title, .post-title, .case-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.feature-title a, .post-title a, .case-title a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s;
}

.feature-title a:hover, .post-title a:hover, .case-title a:hover {
    color: var(--primary);
}

.feature-desc, .post-excerpt, .case-desc {
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.7;
}

.feature-link, .read-more {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.feature-link:hover, .read-more:hover {
    color: var(--primary-hover);
    gap: 8px;
}

.feature-link::after, .read-more::after {
    content: '→';
    transition: transform 0.3s;
}

.feature-link:hover::after, .read-more:hover::after {
    transform: translateX(4px);
}

/* Post Meta */
.post-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.post-category {
    display: inline-flex;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-category.new {
    background: rgba(14, 165, 233, 0.1);
    color: var(--category-new);
}

.post-category.guide {
    background: rgba(16, 185, 129, 0.1);
    color: var(--category-guide);
}

.post-category.case {
    background: rgba(139, 92, 246, 0.1);
    color: var(--category-case);
}

.post-date {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

/* Article */
.breadcrumbs {
    padding: 20px 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
}

.breadcrumbs-list {
    display: flex;
    gap: 8px;
    list-style: none;
    font-size: 14px;
}

.breadcrumbs-item a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

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

.breadcrumbs-item.active { color: var(--text); }

.article { padding: 64px 0; }

.article-header {
    max-width: 800px;
    margin: 0 auto 48px;
    text-align: center;
}

.article-title {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.article-content {
    max-width: 740px;
    margin: 0 auto;
}

.article-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 48px 0 20px;
    color: var(--text);
    letter-spacing: -0.02em;
}

.article-content h3 {
    font-size: 26px;
    font-weight: 600;
    margin: 36px 0 16px;
    color: var(--text);
}

.article-content p {
    margin-bottom: 20px;
    color: var(--text-muted);
    line-height: 1.8;
}

.article-content ul, .article-content ol {
    margin: 0 0 20px 28px;
    color: var(--text-muted);
}

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

.article-content a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.article-content a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.article-content pre {
    background: var(--code-bg);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 24px 0;
    border: 1px solid var(--border);
    font-size: 15px;
    line-height: 1.6;
}

.article-content code {
    font-family: 'JetBrains Mono', 'Monaco', 'Consolas', monospace;
    font-size: 15px;
    color: var(--text);
}

.article-content p code {
    background: var(--code-bg);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 14px;
}

/* CTA Box */
.article-cta-box {
    background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
    border: 2px solid var(--primary);
    border-radius: 14px;
    padding: 40px;
    margin: 56px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.article-cta-box::before {
    content: '🦞';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 120px;
    opacity: 0.08;
    transform: rotate(15deg);
    user-select: none;
    pointer-events: none;
}

.article-cta-box h3 {
    margin-bottom: 12px;
    color: var(--text);
    font-size: 24px;
}

.article-cta-box p {
    margin-bottom: 24px;
    color: var(--text-muted);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
.footer {
    padding: 56px 0 32px;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--text);
    font-size: 18px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.footer-link:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

.footer-bottom a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* Responsive */
@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; }
    
    .nav {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 16px;
        gap: 24px;
    }
    
    .hero-title { font-size: 36px; }
    .section-title { font-size: 32px; }
    .article-title { font-size: 32px; }
    
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .btn, .btn-outline { width: 100%; justify-content: center; }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card, .feature-card, .case-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: rgba(14, 165, 233, 0.2);
    color: var(--text);
}

/* Focus outline for accessibility */
:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Remove outline for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Mobile fixes for emoji rendering issues */
@media (max-width: 768px) {
    /* Fix oversized logo emoji that looks like a sun */
    .logo-icon {
        font-size: 28px !important;
        line-height: 1;
        display: inline-block;
        vertical-align: middle;
    }
    
    /* Fix header layout on small screens */
    .header {
        padding: 12px 0;
        position: relative; /* Disable sticky on mobile */
    }
    
    .logo {
        font-size: 18px;
        gap: 8px;
    }
    
    .logo-text {
        max-width: 120px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Fix navigation overflow */
    .nav {
        gap: 16px;
        font-size: 14px;
    }
    
    .nav-link {
        padding: 4px 0;
    }
    
    /* Fix hero section spacing */
    .hero {
        padding: 48px 0;
    }
    
    .hero-title {
        font-size: 28px;
        margin-bottom: 16px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    /* Prevent horizontal scroll */
    .container {
        padding: 0 16px;
    }
    
    /* Fix buttons */
    .btn, .btn-outline {
        padding: 10px 20px;
        font-size: 14px;
        white-space: nowrap;
    }
    
    /* Fix cards grid */
    .features-grid, .posts-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .feature-card, .post-card, .case-card {
        padding: 24px;
    }
    
    .feature-icon {
        font-size: 36px;
    }
    
    .feature-title, .post-title, .case-title {
        font-size: 20px;
    }
    
    /* Remove animations on mobile for performance */
    .post-card, .feature-card, .case-card {
        animation: none;
    }
    
    /* Fix footer */
    .footer {
        padding: 32px 0 24px;
    }
}