/* ============================================================
   TRABAHONG ONLINE - Professional CSS
   Mobile-First | SEO-Optimized | Philippines Market
   Senior UX/UI Developer Standards
   ============================================================ */

/* ============================================================
   CSS Variables
   ============================================================ */
:root {
    /* Brand Colors - Trust & Money Theme */
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #DBEAFE;
    --secondary: #10B981;
    --secondary-dark: #059669;
    --accent: #F59E0B;
    --accent-dark: #D97706;

    /* Text Colors */
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;

    /* Background Colors */
    --bg-white: #FFFFFF;
    --bg-light: #F9FAFB;
    --bg-gray: #F3F4F6;
    --bg-dark: #1F2937;

    /* Border Colors */
    --border-light: #E5E7EB;
    --border-medium: #D1D5DB;

    /* Feedback Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Courier New', monospace;

    /* Font Sizes - Mobile First */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;

    /* Layout - GŁÓWNE SZEROKOŚCI */
    --max-width-sm: 640px;
    --max-width-md: 768px;
    --max-width-lg: 1024px;
    --max-width-xl: 1200px;
    --max-width-content: 720px;
    --content-padding: 1rem;

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    --transition: 200ms ease;
    --transition-slow: 300ms ease;
}

@media (min-width: 768px) {
    :root {
        --content-padding: 1.5rem;
    }
}

@media (min-width: 1024px) {
    :root {
        --content-padding: 2rem;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #F9FAFB;
        --text-secondary: #D1D5DB;
        --text-muted: #9CA3AF;
        --bg-white: #111827;
        --bg-light: #1F2937;
        --bg-gray: #374151;
        --bg-dark: #030712;
        --border-light: #374151;
        --border-medium: #4B5563;
        --primary-light: #1E3A5F;
    }
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    flex: 1;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

button {
    cursor: pointer;
    font: inherit;
    background: none;
    border: none;
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: var(--text-3xl); margin-bottom: var(--space-4); }
h2 { font-size: var(--text-2xl); margin-bottom: var(--space-3); }
h3 { font-size: var(--text-xl); margin-bottom: var(--space-2); }
h4 { font-size: var(--text-lg); margin-bottom: var(--space-2); }

@media (min-width: 768px) {
    h1 { font-size: var(--text-4xl); }
    h2 { font-size: var(--text-3xl); }
    h3 { font-size: var(--text-2xl); }
}

p {
    margin-bottom: var(--space-4);
}

/* ============================================================
   Layout Container - IDENTYCZNY WSZĘDZIE
   ============================================================ */
.container {
    width: 100%;
    max-width: var(--max-width-xl);
    margin: 0 auto;
    padding: 15px var(--content-padding);
}

/* ============================================================
   Header - REFERENCE WIDTH
   ============================================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    max-width: var(--max-width-xl);
    margin: 0 auto;
    padding: 0 var(--content-padding);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
}

.logo-accent {
    color: var(--primary);
}

.logo-icon {
    width: 32px;
    height: 32px;
}

/* Navigation */
.nav {
    display: none;
    gap: var(--space-1);
}

@media (min-width: 768px) {
    .nav {
        display: flex;
    }
}

.nav-link {
    padding: var(--space-2) var(--space-3);
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.nav-link:hover {
    color: var(--primary);
    background: var(--bg-light);
    text-decoration: none;
}

/* Language Switcher */
.lang-switch {
    display: flex;
    gap: var(--space-1);
    background: var(--bg-light);
    padding: var(--space-1);
    border-radius: var(--radius-full);
}

.lang-btn {
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius-full);
    transition: all var(--transition);
    text-decoration: none;
}

.lang-btn:hover {
    color: var(--text-primary);
    text-decoration: none;
}

.lang-btn.active {
    background: var(--primary);
    color: white;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #1E40AF 50%, var(--secondary) 100%);
    color: white;
    padding: var(--space-12) var(--content-padding);
    text-align: center;
}

@media (min-width: 768px) {
    .hero {
        padding: var(--space-20) var(--content-padding);
    }
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-4);
}

.hero-title {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: white;
    margin-bottom: var(--space-4);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: var(--text-5xl);
    }
}

.hero-subtitle {
    font-size: var(--text-lg);
    opacity: 0.9;
    margin-bottom: var(--space-8);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    justify-content: center;
    align-items: center;
}

@media (min-width: 480px) {
    .hero-cta {
        flex-direction: row;
    }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-weight: 600;
    font-size: var(--text-base);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    text-decoration: none;
    cursor: pointer;
    border: none;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.btn-accent {
    background: var(--accent);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-accent:hover {
    background: var(--accent-dark);
    color: white;
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
}

/* ============================================================
   Section
   ============================================================ */
.section {
    padding: var(--space-12) 0;
}

@media (min-width: 768px) {
    .section {
        padding: var(--space-16) 0;
    }
}

.section-title {
    font-size: var(--text-2xl);
    text-align: center;
    margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
    .section-title {
        font-size: var(--text-3xl);
        margin-bottom: var(--space-10);
    }
}

/* ============================================================
   Cards
   ============================================================ */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: all var(--transition);
}

.card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.card-link:hover {
    text-decoration: none;
}

.card-title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-2);
    line-height: 1.4;
    color: var(--text-primary);
}

.card-meta {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* Card Grid */
.card-grid {
    display: grid;
    gap: var(--space-6);
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================================
   ARTICLE PAGE - FULL WIDTH LAYOUT
   Identyczna szerokość jak homepage
   ============================================================ */
.article-container {
    width: 100%;
    max-width: var(--max-width-xl);
    margin: 0 auto;
    padding: var(--space-8) var(--content-padding);
}

@media (min-width: 768px) {
    .article-container {
        padding: var(--space-12) var(--content-padding);
    }
}

/* Breadcrumbs - Full Width */
.breadcrumbs {
    margin-bottom: var(--space-6);
    padding: var(--space-2) 0;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-1);
    list-style: none;
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.breadcrumbs li {
    display: flex;
    align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
    content: "›";
    margin: 0 var(--space-2);
    color: var(--text-light);
}

.breadcrumbs a {
    color: var(--text-muted);
    transition: color var(--transition);
}

.breadcrumbs a:hover {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumbs li:last-child {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Article Header - Full Width */
.article-header {
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--border-light);
}

@media (min-width: 768px) {
    .article-header {
        margin-bottom: var(--space-10);
        padding-bottom: var(--space-8);
    }
}

.article-title {
    font-size: var(--text-2xl);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .article-title {
        font-size: var(--text-4xl);
        margin-bottom: var(--space-5);
    }
}

@media (min-width: 1024px) {
    .article-title {
        font-size: var(--text-5xl);
    }
}

/* Article Meta */
.article-meta {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.author-avatar-small {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--text-base);
    flex-shrink: 0;
}

.meta-text {
    font-size: var(--text-sm);
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
}

.author-name {
    color: var(--text-primary);
    font-weight: 600;
}

.meta-separator {
    color: var(--text-light);
}

/* ============================================================
   ARTICLE CONTENT - Full width like header
   ============================================================ */
.article-content {
    width: 100%;
    font-size: var(--text-base);
    line-height: 1.8;
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .article-content {
        font-size: var(--text-lg);
        line-height: 1.85;
    }
}

/* Paragraphs */
.article-content p {
    margin-bottom: var(--space-5);
}

/* Headings in content */
.article-content h2 {
    font-size: var(--text-xl);
    margin-top: var(--space-10);
    margin-bottom: var(--space-4);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-light);
}

@media (min-width: 768px) {
    .article-content h2 {
        font-size: var(--text-2xl);
        margin-top: var(--space-12);
    }
}

.article-content h2:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.article-content h3 {
    font-size: var(--text-lg);
    margin-top: var(--space-8);
    margin-bottom: var(--space-3);
}

@media (min-width: 768px) {
    .article-content h3 {
        font-size: var(--text-xl);
    }
}

/* Lists */
.article-content ul,
.article-content ol {
    margin: var(--space-5) 0;
    padding-left: var(--space-6);
}

.article-content ul {
    list-style: disc;
}

.article-content ol {
    list-style: decimal;
}

.article-content li {
    margin-bottom: var(--space-3);
    line-height: 1.7;
}

.article-content li strong {
    color: var(--text-primary);
}

/* Tables - Full Width */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-6) 0;
    font-size: var(--text-sm);
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

@media (min-width: 640px) {
    .article-content table {
        font-size: var(--text-base);
    }
}

.article-content th,
.article-content td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.article-content th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-primary);
}

.article-content tr:last-child td {
    border-bottom: none;
}

.article-content tr:hover td {
    background: var(--bg-light);
}

/* ============================================================
   TL;DR Box
   ============================================================ */
.tldr {
    background: linear-gradient(135deg, var(--primary-light) 0%, #E0E7FF 100%);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
    padding: var(--space-5) var(--space-6);
    margin-bottom: var(--space-8);
    font-size: var(--text-base);
    line-height: 1.7;
}

@media (min-width: 768px) {
    .tldr {
        padding: var(--space-6) var(--space-8);
        font-size: var(--text-lg);
    }
}

@media (prefers-color-scheme: dark) {
    .tldr {
        background: linear-gradient(135deg, #1E3A5F 0%, #312E81 100%);
    }
}

/* ============================================================
   CTA Box
   ============================================================ */
.cta-box {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border: 2px solid var(--accent);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin: var(--space-8) 0;
    text-align: center;
}

@media (min-width: 768px) {
    .cta-box {
        padding: var(--space-8);
    }
}

@media (prefers-color-scheme: dark) {
    .cta-box {
        background: linear-gradient(135deg, #78350F 0%, #92400E 100%);
    }
}

.cta-box h4 {
    color: var(--accent-dark);
    font-size: var(--text-xl);
    margin-bottom: var(--space-2);
}

.cta-box p {
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.cta-box .btn {
    background: var(--accent);
    color: white;
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
}

.cta-box .btn:hover {
    background: var(--accent-dark);
}

/* ============================================================
   FAQ Section
   ============================================================ */
.faq-section {
    background: var(--bg-light);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin: var(--space-8) 0;
}

@media (min-width: 768px) {
    .faq-section {
        padding: var(--space-8);
    }
}

.faq-section h2 {
    margin-top: 0;
    margin-bottom: var(--space-5);
    padding-top: 0;
    border-top: none;
    font-size: var(--text-xl);
}

@media (min-width: 768px) {
    .faq-section h2 {
        font-size: var(--text-2xl);
    }
}

.faq-item {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
    overflow: hidden;
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-item h3 {
    padding: var(--space-4) var(--space-5);
    margin: 0;
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}

.faq-item h3:hover {
    background: var(--bg-light);
}

.faq-item div[itemscope] p,
.faq-item p {
    padding: 0 var(--space-5) var(--space-4);
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: var(--text-sm);
}

@media (min-width: 768px) {
    .faq-item div[itemscope] p,
    .faq-item p {
        font-size: var(--text-base);
    }
}

/* ============================================================
   Related Articles Section - FULL WIDTH
   ============================================================ */
.related-section {
    margin-top: var(--space-12);
    padding-top: var(--space-10);
    border-top: 1px solid var(--border-light);
}

.related-section h2 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-6);
    padding-top: 0;
    border-top: none;
}

@media (min-width: 768px) {
    .related-section h2 {
        font-size: var(--text-2xl);
    }
}

.related-grid {
    display: grid;
    gap: var(--space-4);
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-5);
    }
}

@media (min-width: 1024px) {
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-6);
    }
}

.related-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.related-card-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.related-card-link:hover {
    text-decoration: none;
}

.related-card-title {
    font-size: var(--text-base);
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    flex-grow: 1;
}

.related-card-meta {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: auto;
}

/* ============================================================
   Author Section - FULL WIDTH
   ============================================================ */
.author-section {
    background: var(--bg-light);
    padding: var(--space-10) var(--content-padding);
    margin-top: var(--space-12);
}

@media (min-width: 768px) {
    .author-section {
        padding: var(--space-12) var(--content-padding);
    }
}

.author-box {
    max-width: var(--max-width-xl);
    margin: 0 auto;
    display: flex;
    gap: var(--space-6);
    align-items: flex-start;
}

@media (max-width: 640px) {
    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

.author-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    font-weight: 700;
    flex-shrink: 0;
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-1);
}

.author-title {
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-bottom: var(--space-3);
}

.author-bio {
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    line-height: 1.7;
}

.author-credentials {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

@media (max-width: 640px) {
    .author-credentials {
        justify-content: center;
    }
}

.credential-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-secondary);
}

.credential-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
}

/* ============================================================
   Category Badge
   ============================================================ */
.category-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
}

.category-badge.comparisons { background: #DBEAFE; color: #1D4ED8; }
.category-badge.tutorials { background: #D1FAE5; color: #059669; }
.category-badge.reviews { background: #FEF3C7; color: #D97706; }
.category-badge.curated,
.category-badge.featured { background: #EDE9FE; color: #7C3AED; }
.category-badge.payments { background: #FCE7F3; color: #DB2777; }
.category-badge.skills { background: #CFFAFE; color: #0891B2; }
.category-badge.ofw,
.category-badge.ofw-alternative { background: #FFEDD5; color: #EA580C; }
.category-badge.taxes { background: #FEE2E2; color: #DC2626; }
.category-badge.problems { background: #F3F4F6; color: #4B5563; }
.category-badge.guides { background: #D1FAE5; color: #059669; }
.category-badge.earnings { background: #FEF3C7; color: #D97706; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: var(--space-12) var(--content-padding) var(--space-8);
    margin-top: auto;
}

.footer-grid {
    max-width: var(--max-width-xl);
    margin: 0 auto var(--space-10);
    display: grid;
    gap: var(--space-8);
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-brand {
    max-width: 300px;
}

.footer-brand-name {
    font-size: var(--text-xl);
    font-weight: 800;
    margin-bottom: var(--space-4);
}

.footer-brand-name .accent {
    color: var(--primary);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
    line-height: 1.7;
}

.footer-heading {
    font-size: var(--text-base);
    font-weight: 600;
    margin-bottom: var(--space-4);
    color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-2);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
    transition: color var(--transition);
}

.footer-links a:hover {
    color: white;
    text-decoration: none;
}

.footer-bottom {
    max-width: var(--max-width-xl);
    margin: 0 auto;
    padding-top: var(--space-8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--text-sm);
}

/* ============================================================
   Legal Pages
   ============================================================ */
.legal-page {
    max-width: var(--max-width-xl);
    margin: 0 auto;
    padding: var(--space-8) var(--content-padding);
}

@media (min-width: 768px) {
    .legal-page {
        padding: var(--space-12) var(--content-padding);
    }
}

.legal-content {
    max-width: var(--max-width-content);
}

.legal-page h1 {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--border-light);
}

.legal-page h2 {
    margin-top: var(--space-10);
    margin-bottom: var(--space-4);
    font-size: var(--text-xl);
    color: var(--primary);
}

.legal-page h3 {
    margin-top: var(--space-6);
    margin-bottom: var(--space-3);
}

.legal-page p {
    margin-bottom: var(--space-4);
    line-height: 1.8;
}

.legal-page ul,
.legal-page ol {
    margin: var(--space-4) 0;
    padding-left: var(--space-6);
}

.legal-page li {
    margin-bottom: var(--space-2);
    line-height: 1.7;
}

.legal-page .last-updated {
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-bottom: var(--space-8);
}

/* ============================================================
   Disclaimer
   ============================================================ */
.disclaimer {
    background: var(--bg-light);
    border-left: 4px solid var(--text-muted);
    padding: var(--space-4) var(--space-5);
    margin: var(--space-8) 0;
    font-size: var(--text-sm);
    color: var(--text-muted);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ============================================================
   Internal Links
   ============================================================ */
.internal-link {
    color: var(--primary);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
    transition: all var(--transition);
}

.internal-link:hover {
    text-decoration-style: solid;
    color: var(--primary-dark);
}

/* ============================================================
   Utility Classes
   ============================================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }

.hidden { display: none; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   Print Styles
   ============================================================ */
@media print {
    .header, .footer, .nav, .lang-switch, .cta-box, .related-section {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: black;
        background: white;
    }

    .article-container {
        max-width: 100%;
        padding: 0;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}

/* ============================================================
   Focus States (Accessibility)
   ============================================================ */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============================================================
   STEP-BY-STEP GUIDE STYLES
   Beautiful presentation for procedural content
   ============================================================ */
.steps-list {
    list-style: none;
    padding: 0;
    margin: var(--space-8) 0;
    counter-reset: step-counter;
}

.steps-list > li {
    position: relative;
    padding: var(--space-6);
    padding-left: var(--space-16);
    margin-bottom: var(--space-4);
    background: var(--bg-light);
    border-radius: var(--radius-xl);
    border-left: 4px solid var(--primary);
    counter-increment: step-counter;
}

.steps-list > li::before {
    content: counter(step-counter);
    position: absolute;
    left: var(--space-4);
    top: var(--space-5);
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--text-lg);
    box-shadow: var(--shadow-md);
}

.steps-list > li strong:first-child {
    display: block;
    font-size: var(--text-lg);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

@media (min-width: 768px) {
    .steps-list > li {
        padding: var(--space-8);
        padding-left: calc(var(--space-16) + var(--space-4));
    }

    .steps-list > li::before {
        width: 44px;
        height: 44px;
        font-size: var(--text-xl);
    }
}

/* Numbered Steps - Alternative Style */
.numbered-steps {
    list-style: none;
    padding: 0;
    margin: var(--space-6) 0;
}

.numbered-steps li {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--border-light);
}

.numbered-steps li:last-child {
    border-bottom: none;
}

.numbered-steps .step-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--text-sm);
}

.numbered-steps .step-content {
    flex: 1;
}

.numbered-steps .step-title {
    font-weight: 600;
    margin-bottom: var(--space-1);
    color: var(--text-primary);
}

.numbered-steps .step-desc {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin: 0;
}

/* Process Steps - Horizontal */
.process-steps {
    display: grid;
    gap: var(--space-4);
    margin: var(--space-8) 0;
}

@media (min-width: 640px) {
    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .process-steps {
        grid-template-columns: repeat(4, 1fr);
    }
}

.process-step {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    text-align: center;
    position: relative;
}

.process-step::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -12px;
    width: 24px;
    height: 2px;
    background: var(--border-light);
    display: none;
}

@media (min-width: 1024px) {
    .process-step:not(:last-child)::after {
        display: block;
    }
}

.process-step .step-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-4);
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
}

.process-step .step-num {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: var(--text-xs);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.process-step h4 {
    margin-bottom: var(--space-2);
    font-size: var(--text-base);
}

.process-step p {
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin: 0;
}

/* Checklist Style */
.checklist {
    list-style: none;
    padding: 0;
    margin: var(--space-6) 0;
}

.checklist li {
    position: relative;
    padding: var(--space-3) 0 var(--space-3) var(--space-8);
    border-bottom: 1px solid var(--border-light);
}

.checklist li:last-child {
    border-bottom: none;
}

.checklist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    background: var(--success);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
}

/* Comparison Box */
.comparison-box {
    display: grid;
    gap: var(--space-6);
    margin: var(--space-8) 0;
}

@media (min-width: 768px) {
    .comparison-box {
        grid-template-columns: 1fr 1fr;
    }
}

.comparison-column {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
}

.comparison-column.pros {
    border-top: 4px solid var(--success);
}

.comparison-column.cons {
    border-top: 4px solid var(--error);
}

.comparison-column h4 {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.comparison-column.pros h4::before {
    content: "+";
    width: 24px;
    height: 24px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.comparison-column.cons h4::before {
    content: "-";
    width: 24px;
    height: 24px;
    background: var(--error);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.comparison-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comparison-column li {
    padding: var(--space-2) 0;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

/* Info/Tip/Warning Boxes */
.info-box, .tip-box, .warning-box, .danger-box {
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    margin: var(--space-6) 0;
    border-left: 4px solid;
}

.info-box {
    background: var(--primary-light);
    border-color: var(--primary);
}

.tip-box {
    background: #D1FAE5;
    border-color: var(--success);
}

.warning-box {
    background: #FEF3C7;
    border-color: var(--warning);
}

.danger-box {
    background: #FEE2E2;
    border-color: var(--error);
}

@media (prefers-color-scheme: dark) {
    .info-box { background: #1E3A5F; }
    .tip-box { background: #064E3B; }
    .warning-box { background: #78350F; }
    .danger-box { background: #7F1D1D; }
}

.info-box strong, .tip-box strong, .warning-box strong, .danger-box strong {
    display: block;
    margin-bottom: var(--space-2);
}

/* ============================================================
   IMPROVED SPACING
   Refined spacing for better visual hierarchy
   ============================================================ */

/* Section spacing improvements */
.section-featured {
    padding-top: var(--space-10);
    padding-bottom: var(--space-10);
}

.section-categories {
    padding-top: var(--space-8);
    padding-bottom: var(--space-12);
    background: var(--bg-light);
}

/* Card improvements */
.card {
    padding: var(--space-5);
}

@media (min-width: 768px) {
    .card {
        padding: var(--space-6);
    }
}

.card-desc {
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-bottom: var(--space-2);
    line-height: 1.5;
}

/* Homepage specific spacing */
.hero {
    padding: var(--space-10) var(--content-padding);
}

@media (min-width: 768px) {
    .hero {
        padding: var(--space-16) var(--content-padding);
    }
}

/* Card grid gap refinement */
.card-grid {
    gap: var(--space-5);
}

@media (min-width: 768px) {
    .card-grid {
        gap: var(--space-6);
    }
}

/* Article content spacing */
.article-content > *:first-child {
    margin-top: 0;
}

.article-content > p + p {
    margin-top: var(--space-4);
}

/* Footer spacing */
.footer {
    padding-top: var(--space-10);
    padding-bottom: var(--space-6);
}

@media (min-width: 768px) {
    .footer {
        padding-top: var(--space-12);
        padding-bottom: var(--space-8);
    }
}

/* Author section spacing */
.author-section {
    padding: var(--space-8) var(--content-padding);
    margin-top: var(--space-10);
}

@media (min-width: 768px) {
    .author-section {
        padding: var(--space-10) var(--content-padding);
    }
}
