:root {
    --primary-color: #006eff;
    --primary-hover: #0056cc;
    --secondary-color: #1a1b25;
    --text-main: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --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);
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    --transition-base: all 0.3s ease;
}

/* Base Styles */
body {
    background-color: var(--bg-light);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.server-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.server-hero {
    background: linear-gradient(135deg, #1a1b25 0%, #2d3748 100%);
    color: #fff;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
}

.server-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../../images/server/server-pattern.png') repeat; /* Optional pattern */
    opacity: 0.05;
}

.server-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.server-tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.server-tag {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.server-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.server-desc {
    font-size: 18px;
    color: #9ca3af;
    line-height: 1.6;
    margin-bottom: 32px;
}

.server-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    padding: 12px 32px;
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: var(--transition-base);
    box-shadow: 0 4px 14px 0 rgba(0, 118, 255, 0.39);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 32px;
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: var(--transition-base);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
}

/* Tabs Navigation */
.server-tabs-wrapper {
    margin-bottom: 40px;
}

.server-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.tab-btn {
    padding: 10px 24px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-base);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.tab-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

/* Category Sub-tabs */
.category-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1px;
    margin-bottom: 40px;
}

.cat-link {
    padding: 12px 4px;
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    text-decoration: none;
    transition: var(--transition-base);
}

.cat-link::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.cat-link:hover {
    color: var(--primary-color);
}

.cat-link.active {
    color: var(--primary-color);
}

.cat-link.active::after {
    transform: scaleX(1);
}

/* Product List (Modern Table) */
.product-grid {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 60px;
}

.product-table-header {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr 1.5fr 1fr 1fr 1.5fr 1.5fr;
    padding: 20px 24px;
    background: #f3f4f6;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-item {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr 1.5fr 1fr 1fr 1.5fr 1.5fr;
    padding: 24px;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.product-item:hover {
    background: #f9fafb;
}

.product-item:last-child {
    border-bottom: none;
}

.prod-name {
    display: flex;
    flex-direction: column;
}

.prod-title {
    font-weight: 700;
    color: var(--text-main);
    font-size: 16px;
    margin-bottom: 4px;
}

.prod-cpu {
    font-size: 13px;
    color: var(--text-secondary);
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
    width: fit-content;
}

.prod-spec {
    font-weight: 500;
    color: var(--text-main);
}

.prod-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 18px;
}

.prod-price span {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
}

.prod-action .btn-buy {
    display: block;
    text-align: center;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition-base);
    text-decoration: none;
}

.prod-action .btn-buy:hover {
    background: var(--primary-color);
    color: #fff;
}

.prod-action .btn-soldout {
    display: block;
    text-align: center;
    padding: 8px 16px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #9ca3af;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: not-allowed;
}

/* Features Section */
.features-section {
    padding: 60px 0;
    text-align: center;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-main);
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    border: 1px solid transparent;
}

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

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    border-radius: 16px;
    color: var(--primary-color);
}

.feature-icon svg {
    width: 32px;
    height: 32px;
}

.feature-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}

.feature-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* OS Section */
.os-section {
    background: #111827;
    padding: 80px 0;
    color: #fff;
    margin: 60px 0;
}

.os-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.os-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

.os-content p {
    color: #9ca3af;
    margin-bottom: 12px;
    font-size: 16px;
}

.os-logos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.os-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition-base);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.os-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.os-item svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
}

.os-name {
    font-size: 14px;
    font-weight: 500;
    color: #d1d5db;
}

/* FAQ Section */
.faq-section {
    padding: 60px 0;
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: #fff;
    overflow: hidden;
}

.faq-header {
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-main);
    transition: background 0.2s;
}

.faq-header:hover {
    background: #f9fafb;
}

.faq-header i {
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.faq-header.active i {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.faq-body {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-body.open {
    padding: 0 24px 24px;
    max-height: 500px; /* Approximate max height */
}

/* Responsive */
@media (max-width: 992px) {
    .product-table-header {
        display: none;
    }

    .product-item {
        display: flex;
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
        padding: 20px;
    }

    .prod-name {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 12px;
        margin-bottom: 0;
    }

    .prod-spec {
        display: flex;
        justify-content: space-between;
        width: 100%;
        font-size: 14px;
    }

    .prod-spec::before {
        content: attr(data-label);
        color: var(--text-secondary);
        font-weight: 400;
    }
    
    .prod-price {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 8px;
    }
    
    .prod-action {
        width: 100%;
    }
    
    .features-grid, .os-grid, .os-logos {
        grid-template-columns: 1fr;
    }
    
    .os-logos {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* Additional Styles for Sorting, Articles, and Grid FAQ */

/* Sorting Headers */
.sortable-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    user-select: none;
    transition: color 0.2s;
}

.sortable-header:hover {
    color: var(--primary-color);
}

.sort-icon {
    display: inline-flex;
    flex-direction: column;
    font-size: 8px;
    opacity: 0.3;
    line-height: 1;
}

.sortable-header.asc .sort-icon .up {
    color: var(--primary-color);
    opacity: 1;
}

.sortable-header.desc .sort-icon .down {
    color: var(--primary-color);
    opacity: 1;
}

/* Articles Section */
.articles-section {
    padding: 60px 0;
    background: #fff;
    margin-top: 40px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.article-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

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

.article-img-wrapper {
    height: 200px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-img-wrapper img {
    transform: scale(1.05);
}

.article-icon-placeholder {
    font-size: 48px;
    color: #cbd5e1;
}

.article-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #9ca3af;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Enhanced FAQ Section (Grid Layout) */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.faq-item-grid {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    transition: var(--transition-base);
}

.faq-item-grid:hover {
    box-shadow: var(--shadow-md);
    border-color: #bfdbfe;
}

.faq-item-grid h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.faq-item-grid h3 i {
    color: var(--primary-color);
    font-size: 20px;
    margin-top: 2px;
}

.faq-item-grid p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 15px;
    margin: 0;
}

@media (max-width: 768px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
}
