/* Resources Template Styles */

/* Hero Section */
.resources-hero {
    background: var(--bg-primary);
    padding: 120px 0 60px;
    text-align: center;
}

.resources-hero h1 {
    font-size: 48px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.resources-hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Breadcrumb */
/* Breadcrumb - Gold Standard: 7px gap from navbar */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-tertiary);
    padding: 0 !important;
    margin: 7px 0 12px 0 !important;
    border: none !important;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.breadcrumb svg {
    width: 16px;
    height: 16px;
    opacity: 0.5;
}

/* Category Grid (Index Page) */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 24px 0 60px;
}

.resource-category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    text-decoration: none;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
}

.resource-category-card:hover {
    border-color: var(--primary);
    background: var(--bg-secondary);
}

.resource-category-card .icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin: 0;
}

.resource-category-card .icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary, #3b82f6);
}

.resource-category-card .card-content {
    flex: 1;
    min-width: 0;
}

.resource-category-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 !important;
    flex: 1;
    display: flex;
    align-items: center;
    line-height: 1;
}

.resource-category-card p {
    display: none;
}

.resource-category-card .article-count {
    display: none;
}

/* Expand arrow */
.resource-category-card .expand-arrow {
    width: 20px;
    height: 20px;
    color: var(--text-tertiary);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

/* Featured Card */
.resource-category-card.featured {
    grid-column: span 3;
    background: var(--gradient-primary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 48px;
}

.resource-category-card.featured .icon {
    background: rgba(255, 255, 255, 0.2);
}

.resource-category-card.featured h3,
.resource-category-card.featured p {
    color: #fff;
}

.resource-category-card.featured .article-count {
    color: rgba(255, 255, 255, 0.8);
}

.resource-category-card.featured .btn {
    background: #fff;
    color: var(--primary);
    flex-shrink: 0;
}

/* Article Page Layout */
.article-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
    padding: 60px 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* Sidebar Navigation */
.article-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-nav {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.sidebar-nav h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.sidebar-nav a {
    display: block;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    transition: all var(--transition-fast);
}

.sidebar-nav a:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.sidebar-nav a.active {
    background: var(--primary);
    color: #fff;
}

/* Article Content */
.article-content {
    max-width: 800px;
}

.article-header {
    margin-bottom: 0;
}

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

.article-header .intro {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Article Body */
.article-body h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 48px 0 20px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.article-body h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.article-body h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 32px 0 12px;
}

.article-body h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 24px 0 8px;
}

.article-body p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.article-body ul,
.article-body ol {
    margin: 16px 0 24px 24px;
}

.article-body li {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
}

.article-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Visual Flow Diagram */
.flow-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin: 24px 0;
}

.flow-step {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.flow-step.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.flow-arrow {
    color: var(--text-tertiary);
    font-size: 20px;
}

/* Info Cards */
.info-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 24px 0;
}

.info-card.success {
    border-left: 4px solid #22C55E;
}

.info-card.warning {
    border-left: 4px solid #F59E0B;
}

.info-card.info {
    border-left: 4px solid var(--primary);
}

.info-card h4 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-card h4 svg {
    width: 20px;
    height: 20px;
}

/* Tips List */
.tips-list {
    list-style: none;
    margin: 24px 0;
    padding: 0;
}

.tips-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.tips-list li svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--primary);
    margin-top: 2px;
}

/* Fee Calculator */
.fee-example {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 24px 0;
}

.fee-example h4 {
    margin-top: 0;
    margin-bottom: 16px;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.fee-row:last-child {
    border-bottom: none;
    font-weight: 700;
    color: var(--text-primary);
}

.fee-row.highlight {
    color: #22C55E;
}

/* Next/Prev Navigation */
.article-nav {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.article-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-base);
}

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

.article-nav a svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.article-nav .next {
    text-align: right;
}

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

    .resource-category-card.featured {
        grid-column: span 2;
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }

    .article-layout {
        grid-template-columns: 1fr;
        padding: 40px 24px;
    }

    .article-sidebar {
        position: static;
    }

    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 16px;
    }

    .sidebar-nav h4 {
        width: 100%;
    }

    .sidebar-nav a {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .resources-hero {
        padding: 0 0 16px;
        margin-top: 0;
    }

    .resources-hero h1 {
        font-size: 2rem;
        text-align: left;
    }

    .resources-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 0 40px;
    }

    /* Featured card mobile - cleaner stacked layout */
    .resource-category-card.featured {
        grid-column: span 1;
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        text-align: center;
    }

    .resource-category-card.featured h3 {
        font-size: 1.25rem;
        margin-bottom: 8px;
    }

    .resource-category-card.featured p {
        display: block;
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 8px;
    }

    .resource-category-card.featured .btn {
        margin-top: 8px;
        padding: 12px 24px;
    }

    /* Hide sidebar nav on mobile - cards below serve as navigation */
    .article-sidebar {
        display: none;
    }

    .article-layout {
        grid-template-columns: 1fr;
        padding: 0 0 40px;
        gap: 0;
    }

    .article-header h1 {
        font-size: 2rem;
    }

    .article-header .intro {
        font-size: 1rem;
        line-height: 1.5;
    }

    /* Hero subtitle on mobile */
    .resources-hero p {
        font-size: 1rem;
        text-align: left;
        margin: 0;
    }

    .flow-diagram {
        flex-direction: column;
    }

    .flow-arrow {
        transform: rotate(90deg);
    }

    .article-nav {
        flex-direction: column;
    }

    .article-nav .next {
        text-align: left;
    }
}