/* =====================
   CSS VARIABLES
   ===================== */
:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #DBEAFE;
    --secondary: #10B981;
    --secondary-dark: #059669;
    --accent: #8B5CF6;
    --text-dark: #1F2937;
    --text-medium: #4B5563;
    --text-light: #6B7280;
    --bg-light: #F9FAFB;
    --bg-white: #FFFFFF;
    --border: #E5E7EB;
    --shadow: 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);
    --radius: 12px;
    --radius-lg: 16px;
}

/* =====================
   RESET & BASE
   ===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

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

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

/* =====================
   HEADER
   ===================== */
.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo-icon {
    font-size: 1.75rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-medium);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s;
}

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

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

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* =====================
   HERO SECTION
   ===================== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =====================
   BUTTONS
   ===================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-white {
    background: white;
    color: var(--primary);
}

.btn-white:hover {
    background: var(--primary-light);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
}

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

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* =====================
   CARDS
   ===================== */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* =====================
   SECTIONS
   ===================== */
.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* =====================
   GRID LAYOUTS
   ===================== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* =====================
   TOOL CARDS
   ===================== */
.tool-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    transition: all 0.3s;
}

.tool-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.tool-card .icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.tool-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.tool-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* =====================
   FEATURES
   ===================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.feature-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.feature-content p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* =====================
   FORM ELEMENTS
   ===================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--bg-white);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* Radio/Checkbox Cards */
.option-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.option-card {
    position: relative;
}

.option-card input {
    position: absolute;
    opacity: 0;
}

.option-card label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.option-card label:hover {
    border-color: var(--primary);
}

.option-card input:checked+label {
    border-color: var(--primary);
    background: var(--primary-light);
}

.option-card .option-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.option-card .option-text {
    font-weight: 500;
}

/* =====================
   BLOG CARDS
   ===================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.blog-card-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    line-height: 1.4;
}

.blog-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.blog-card .read-more {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.blog-card .read-more:hover {
    gap: 0.5rem;
}

/* =====================
   ARTICLE PAGE
   ===================== */
.article-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 3rem 0;
}

.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.breadcrumb a {
    color: white;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.article-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.article-body {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: var(--radius-lg);
    margin-top: -2rem;
    position: relative;
    box-shadow: var(--shadow);
}

.article-body h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--text-dark);
}

.article-body h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-dark);
}

.article-body p {
    margin-bottom: 1rem;
    color: var(--text-medium);
    line-height: 1.8;
}

.article-body ul,
.article-body ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
    color: var(--text-medium);
    line-height: 1.7;
}

.article-body ul li {
    list-style: disc;
}

.article-body ol li {
    list-style: decimal;
}

/* =====================
   INFO BOXES
   ===================== */
.info-box {
    padding: 1.5rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.info-box.tip {
    background: #D1FAE5;
    border-left: 4px solid var(--secondary);
}

.info-box.warning {
    background: #FEF3C7;
    border-left: 4px solid #F59E0B;
}

.info-box.note {
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
}

/* =====================
   FAQ
   ===================== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-white);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-question {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-answer {
    padding: 0 1.5rem 1.25rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* =====================
   FOOTER
   ===================== */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #9CA3AF;
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: #9CA3AF;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1.5rem;
    text-align: center;
    color: #9CA3AF;
    font-size: 0.9rem;
}

/* =====================
   RELATED ARTICLES
   ===================== */
.related-articles {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}

.related-articles h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.related-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.related-card:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateX(4px);
}

.related-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.related-title {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.95rem;
}

/* =====================
   PERFORMANCE OPTIMIZATIONS
   ===================== */
img {
    content-visibility: auto;
}

.section {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

/* =====================
   BLOG VISUAL ELEMENTS
   ===================== */

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #EBF5FF 0%, #F0F9FF 100%);
    border-left: 4px solid var(--primary);
    border-radius: 0 12px 12px 0;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.info-box.warning {
    background: linear-gradient(135deg, #FEF3C7 0%, #FFFBEB 100%);
    border-left-color: #F59E0B;
}

.info-box.success {
    background: linear-gradient(135deg, #D1FAE5 0%, #ECFDF5 100%);
    border-left-color: #10B981;
}

.info-box.danger {
    background: linear-gradient(135deg, #FEE2E2 0%, #FEF2F2 100%);
    border-left-color: #EF4444;
}

.info-box h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-box p {
    margin: 0;
    font-size: 0.95rem;
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.comparison-table th {
    background: linear-gradient(135deg, var(--primary) 0%, #1D4ED8 100%);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid #E5E7EB;
}

.comparison-table tr:nth-child(even) {
    background-color: #F9FAFB;
}

.comparison-table tr:hover {
    background-color: #EBF5FF;
}

.comparison-table .highlight {
    background-color: #D1FAE5;
    font-weight: 600;
}

/* Feature Cards Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.feature-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #E5E7EB;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.feature-item .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-item h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.feature-item p {
    margin: 0;
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Spec Box */
.spec-box {
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    color: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.spec-box h4 {
    color: #60A5FA;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spec-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #374151;
}

.spec-item .label {
    color: #9CA3AF;
}

.spec-item .value {
    font-weight: 600;
    color: #10B981;
}

/* Pro/Con List */
.pros-cons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.pros,
.cons {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.pros {
    border-top: 4px solid #10B981;
}

.cons {
    border-top: 4px solid #EF4444;
}

.pros h4,
.cons h4 {
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pros h4 {
    color: #10B981;
}

.cons h4 {
    color: #EF4444;
}

.pros ul,
.cons ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pros li,
.cons li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.pros li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10B981;
    font-weight: bold;
}

.cons li::before {
    content: "✗";
    position: absolute;
    left: 0;
    color: #EF4444;
    font-weight: bold;
}

/* Image Placeholder */
.article-image {
    width: 100%;
    border-radius: 12px;
    margin: 1.5rem 0;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.article-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-image figcaption {
    background: #F3F4F6;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--text-gray);
    text-align: center;
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 3rem 0;
    }

    .article-body {
        padding: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .tool-card {
        padding: 1.5rem;
    }
}