/* =====================================================
   Services Page Styles
   ===================================================== */

/* Page Header */
.page-header {
    padding: calc(72px + 4rem) 0 3rem;
    text-align: center;
}

.page-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.page-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Services Section */
.services-section {
    padding: 2rem 0 var(--section-padding);
}

/* Service Block */
.service-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color);
}

.service-block:last-child {
    border-bottom: none;
}

.service-block.reverse {
    direction: rtl;
}

.service-block.reverse > * {
    direction: ltr;
}

.service-content {
    position: relative;
}

.service-number {
    font-family: var(--font-mono);
    font-size: 4rem;
    font-weight: 700;
    color: var(--bg-tertiary);
    position: absolute;
    top: -20px;
    left: -10px;
    z-index: 0;
    user-select: none;
}

.service-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.service-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.service-features {
    list-style: none;
}

.service-features li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.6rem 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.feature-bullet {
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    margin-top: 8px;
    flex-shrink: 0;
}

/* Visual Cards */
.visual-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

/* KVM Visual */
.kvm-visual {
    gap: 1rem;
}

.kvm-layer {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1rem;
}

.kvm-layer.hypervisor {
    flex: 1;
}

.layer-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
    display: block;
}

.kvm-vms {
    display: flex;
    gap: 0.75rem;
}

.kvm-vm {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
}

.vm-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.vm-led {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-tertiary);
}

.vm-led.active {
    background: var(--accent-green);
    box-shadow: 0 0 6px var(--accent-green);
}

.vm-stats {
    display: flex;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

.hardware-specs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Ceph Visual */
.ceph-visual {
    justify-content: space-between;
}

.ceph-cluster {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1.5rem;
}

.ceph-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.node-icon {
    width: 48px;
    height: 48px;
    color: var(--accent-primary);
}

.node-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.node-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-tertiary);
}

.node-status.active {
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
    animation: pulse 2s infinite;
}

.ceph-replication {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.replication-line {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), transparent);
    animation: flow 1.5s infinite;
}

@keyframes flow {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

.ceph-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-item .stat-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-primary);
    display: block;
}

.stat-item .stat-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* Network Visual */
.network-visual {
    justify-content: center;
    align-items: center;
}

.network-topology {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.network-node {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.network-node.internet {
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
}

.network-node.router {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.network-node.datacenter {
    background: var(--accent-primary-dim);
    border-color: var(--accent-primary);
}

.network-line {
    width: 2px;
    height: 20px;
    background: var(--border-color);
}

.network-branches {
    display: flex;
    gap: 2rem;
    position: relative;
}

.network-branches::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    height: 2px;
    background: var(--border-color);
}

.branch-line {
    width: 2px;
    height: 20px;
    background: var(--border-color);
}

.network-servers {
    display: flex;
    gap: 1rem;
}

.server-node {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Datacenter Visual */
.datacenter-visual {
    justify-content: center;
    align-items: center;
}

.dc-map {
    width: 100%;
    max-width: 250px;
    margin-bottom: 1.5rem;
}

.dc-map svg {
    width: 100%;
    height: auto;
}

.dc-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.dc-stat {
    text-align: center;
}

.dc-value {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-primary);
    display: block;
}

.dc-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* Monitoring Visual */
.monitoring-visual {
    gap: 1rem;
}

.monitor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.monitor-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.monitor-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--accent-green);
}

.status-led {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.monitor-metrics {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    justify-content: center;
}

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

.metric-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.metric-header span:first-child {
    color: var(--text-secondary);
}

.metric-value {
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.metric-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.metric-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-green));
    border-radius: 3px;
    transition: width 1s ease;
}

/* API Visual */
.api-visual {
    padding: 0;
    overflow: hidden;
}

.code-window {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot.red { background: #ff5f56; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green { background: #27ca40; }

.code-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-left: auto;
}

.code-content {
    flex: 1;
    padding: 1.5rem;
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.8;
    overflow-x: auto;
    background: var(--bg-card);
}

.code-comment { color: var(--text-tertiary); }
.code-keyword { color: var(--accent-primary); }
.code-string { color: var(--accent-green); }
.code-key { color: var(--accent-secondary); }

/* Responsive */
@media (max-width: 1024px) {
    .service-block {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-block.reverse {
        direction: ltr;
    }

    .service-visual {
        order: -1;
    }

    .visual-card {
        min-height: 250px;
    }
}

@media (max-width: 768px) {
    .service-number {
        font-size: 3rem;
    }

    .service-title {
        font-size: 1.5rem;
    }

    .kvm-vms {
        flex-direction: column;
    }

    .ceph-cluster {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .ceph-stats,
    .dc-stats {
        gap: 2rem;
    }
}
