/* ===== Index Page - Professional Design ===== */

:root {
    --index-bg: #0f172a;
    --index-card: #1e293b;
    --index-border: #334155;
    --index-text: #e2e8f0;
    --index-muted: #94a3b8;
    --index-accent: #3b82f6;
}

body.index-page {
    background: var(--index-bg);
    color: var(--index-text);
    min-height: 100vh;
}

/* Header */
.index-header {
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
}
.index-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: radial-gradient(ellipse at top, rgba(59, 130, 246, 0.15), transparent 70%);
    pointer-events: none;
}
.index-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.index-logo i {
    font-size: 2.5rem;
    color: var(--index-accent);
}
.index-logo span {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.index-subtitle {
    color: var(--index-muted);
    font-size: 1.1rem;
    margin: 0;
}

/* Section */
.index-section {
    padding: 60px 0;
}
.section-header {
    margin-bottom: 50px;
}
.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.section-header h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--index-accent);
    border-radius: 2px;
}
.section-header p {
    color: var(--index-muted);
    margin: 0;
    padding-left: 16px;
}

/* Flow */
.flow-wrapper {
    background: var(--index-card);
    border: 1px solid var(--index-border);
    border-radius: 16px;
    padding: 50px 40px;
}
.flow-steps {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
}
.flow-steps::before {
    content: '';
    position: absolute;
    top: 35px;
    left: 60px;
    right: 60px;
    height: 2px;
    background: linear-gradient(90deg, #ef4444, #3b82f6, #10b981, #06b6d4, #f59e0b);
    opacity: 0.3;
}
.flow-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}
.flow-step-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
    color: white;
    position: relative;
}
.flow-step-icon::after {
    content: attr(data-step);
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--index-bg);
    border: 2px solid var(--index-border);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--index-muted);
}
.flow-step-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}
.flow-step-desc {
    font-size: 0.8rem;
    color: var(--index-muted);
}

@media (max-width: 992px) {
    .flow-steps { flex-wrap: wrap; gap: 30px; }
    .flow-steps::before { display: none; }
    .flow-step { flex: 0 0 33.33%; }
}
@media (max-width: 576px) {
    .flow-step { flex: 0 0 50%; }
    .flow-wrapper { padding: 30px 20px; }
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
@media (max-width: 992px) {
    .projects-grid { grid-template-columns: 1fr; }
}

.project-card {
    background: var(--index-card);
    border: 1px solid var(--index-border);
    border-radius: 16px;
    padding: 30px;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.project-card:hover {
    border-color: var(--index-accent);
    box-shadow: 0 0 0 1px var(--index-accent);
}

.project-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}
.project-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}
.project-info {
    flex: 1;
    min-width: 0;
}
.project-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.project-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.project-number {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--index-muted);
    opacity: 0.5;
}

.project-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.feature-tag {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(255,255,255,0.05);
    color: var(--index-muted);
    border: 1px solid var(--index-border);
}

.project-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--index-border);
}
.project-pages {
    font-size: 0.8rem;
    color: var(--index-muted);
}
.project-arrow {
    color: var(--index-muted);
    font-size: 0.9rem;
}
.project-card:hover .project-arrow {
    color: var(--index-accent);
}

/* Colors */
.bg-red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.bg-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.bg-green { background: linear-gradient(135deg, #10b981, #059669); }
.bg-cyan { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.bg-amber { background: linear-gradient(135deg, #f59e0b, #d97706); }

.badge-red { background: rgba(239,68,68,0.15); color: #f87171; }
.badge-blue { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-green { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-cyan { background: rgba(6,182,212,0.15); color: #22d3ee; }
.badge-amber { background: rgba(245,158,11,0.15); color: #fbbf24; }

/* Architecture */
.architecture {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    align-items: center;
}
@media (max-width: 992px) {
    .architecture {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.system-block {
    background: var(--index-card);
    border: 1px solid var(--index-border);
    border-radius: 16px;
    overflow: hidden;
}
.system-header {
    padding: 24px;
    text-align: center;
}
.system-header.system-cms {
    background: linear-gradient(135deg, rgba(239,68,68,0.1), rgba(16,185,129,0.1));
    border-bottom: 1px solid var(--index-border);
}
.system-header.system-site {
    background: linear-gradient(135deg, rgba(6,182,212,0.1), rgba(245,158,11,0.1));
    border-bottom: 1px solid var(--index-border);
}
.system-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--index-muted);
    margin-bottom: 8px;
}
.system-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.system-desc {
    font-size: 0.85rem;
    color: var(--index-muted);
}

.system-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.system-item {
    display: grid;
    grid-template-columns: 44px 1fr;
    grid-template-rows: auto auto;
    gap: 4px 14px;
    padding: 16px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--index-border);
    border-radius: 10px;
}
.item-icon {
    grid-row: span 2;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}
.item-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.item-name {
    font-weight: 600;
    font-size: 0.95rem;
}
.item-role {
    font-size: 0.75rem;
    color: var(--index-muted);
}
.item-features {
    font-size: 0.8rem;
    color: var(--index-muted);
}

.system-tech {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: rgba(255,255,255,0.03);
    border-top: 1px solid var(--index-border);
    font-size: 0.8rem;
    color: var(--index-muted);
}
.system-tech i {
    font-size: 1.1rem;
    color: #ff2d20;
}

/* Connector */
.system-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 10px;
}
.connector-line {
    flex: 1;
    width: 2px;
    background: linear-gradient(180deg, var(--index-border), var(--index-accent), var(--index-border));
    min-height: 40px;
}
.connector-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    background: var(--index-card);
    border: 1px solid var(--index-border);
    border-radius: 10px;
    font-size: 0.75rem;
    color: var(--index-muted);
    text-align: center;
}
.connector-label i {
    font-size: 1rem;
    color: var(--index-accent);
}
@media (max-width: 992px) {
    .system-connector {
        flex-direction: row;
        padding: 10px 20px;
    }
    .connector-line {
        height: 2px;
        width: auto;
        min-height: unset;
        min-width: 40px;
    }
    .connector-label {
        flex-direction: row;
        gap: 8px;
    }
}

/* Flow Summary */
.flow-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
    padding: 20px;
    background: var(--index-card);
    border: 1px solid var(--index-border);
    border-radius: 12px;
    flex-wrap: wrap;
}
.flow-summary > i {
    color: var(--index-border);
    font-size: 0.8rem;
}
.flow-summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--index-muted);
}
.flow-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--index-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}
@media (max-width: 768px) {
    .flow-summary {
        flex-direction: column;
        gap: 16px;
    }
    .flow-summary > i {
        transform: rotate(90deg);
    }
}

/* Footer */
.index-footer {
    padding: 40px 0;
    text-align: center;
    color: var(--index-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--index-border);
}
