/* ===================================
   LocPick Blog - Modern CSS Stylesheet
   SEO-Optimized Game Localization Blog
   =================================== */

/* CSS Variables */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===================================
   Header Styles
   =================================== */
.site-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo-link {
    display: flex;
    align-items: center;
}

.logo {
    height: 40px;
    width: auto;
    transition: var(--transition);
}

.logo:hover {
    opacity: 0.8;
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.main-nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: white;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: white;
    transition: var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

@media (max-width: 600px) {
    .back {
        width: 7.2rem;
        display: inline-block;
        overflow: hidden;
        white-space: nowrap;
        margin-top: 0.4rem;
    }
}

@media (max-width: 540px) {
    .back {
        width: 7.2rem;
        display: inline-block;
        overflow: hidden;
        white-space: nowrap;
        margin-top: 0.5rem;
        margin-right: -3rem;
    }

    /* Hide all nav links except .back on very small screens */
    .main-nav a:not(.back) {
        display: none;
    }
}

/* ===================================
   Hero Section
   =================================== */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

/* ===================================
   Category Filter
   =================================== */
.category-filter {
    padding: 2rem 0;
    background-color: var(--bg-white);
    margin-bottom: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.categories {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.category-btn {
    padding: 0.625rem 1.25rem;
    border: 2px solid var(--border-color);
    background-color: var(--bg-white);
    color: var(--text-light);
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
}

.category-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(99, 102, 241, 0.05);
}

.category-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===================================
   Blog Posts Grid
   =================================== */
.blog-posts {
    padding: 2rem 0 4rem;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.post-image {
    position: relative;
    overflow: hidden;
    height: 160px;
    background-color: #e6def9;
}

/* Category-specific background colors */
.post-card[data-category="best-practices"] .post-image {
    background-color: #e6def9; /* Soft purple */
}

.post-card[data-category="case-studies"] .post-image {
    background-color: #dff5e6; /* Soft green */
}

.post-card[data-category="industry-news"] .post-image {
    background-color: #fef3c7; /* Soft yellow */
}

.post-card[data-category="technical"] .post-image {
    background-color: #dbeafe; /* Soft blue */
}

.post-card[data-category="cultural"] .post-image {
    background-color: #ffe4e6; /* Soft pink */
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-date {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    display: block;
}

.post-content h2 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.post-content h2 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

.post-content h2 a:hover {
    color: var(--primary-color);
}

.post-content p {
    color: var(--text-light);
    margin-bottom: 1.25rem;
    flex: 1;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.read-time {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.post-tags a {
    font-size: 0.75rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.post-tags a:hover {
    color: var(--secondary-color);
}

/* ===================================
   Load More Button
   =================================== */
.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

.btn-load-more {
    padding: 0.875rem 2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.btn-load-more:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===================================
   Newsletter Section
   =================================== */
.newsletter-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    margin: 4rem 0 0;
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.newsletter-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form input:focus {
    outline: none;
    border-color: white;
    background-color: rgba(255, 255, 255, 0.15);
}

.btn-submit {
    padding: 0.875rem 2rem;
    background-color: white;
    color: var(--primary-color);
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* CTA Section */
.article-cta {
    color: white;
    border-radius: var(--radius-xl);
    text-align: center;
    margin: 3rem 0;
}

.article-cta h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.article-cta p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.btn-cta {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 1.125rem;
    transition: var(--transition);
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* ===================================
   Footer
   =================================== */
.site-footer {
    background-color: var(--text-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3,
.footer-col h4 {
    color: white;
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-col p {
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .main-nav ul {
        gap: 1rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .categories {
        gap: 0.5rem;
    }

    .category-btn {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-section {
        padding: 2rem 0;
    }

    .post-content h2 {
        font-size: 1.125rem;
    }
}

/* ===================================
   Utility Classes
   =================================== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-0 {
    margin-top: 0;
}

.mb-0 {
    margin-bottom: 0;
}

.pt-0 {
    padding-top: 0;
}

.pb-0 {
    padding-bottom: 0;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Print Styles */
@media print {

    .site-header,
    .category-filter,
    .newsletter-section,
    .site-footer,
    .btn-load-more {
        display: none;
    }

    .post-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}