/* ===== ApexServer page ===== */

/* Общая обёртка секций */
.apex-section {
    width: 80%;
    max-width: 1536px;
    margin: 30px auto;
}

.apex-section-title {
    text-align: left;
    font-size: clamp(20px, 1.35vw, 26px);
    color: #1b1464;
    font-weight: 500;
    margin: 0 0 25px 30px;
}

/* --- Блок статистики (WITSML / 24-7 / скорость) --- */
.apex-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.apex-stat-card {
    background: #fff;
    color: #1b1464;
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.apex-stat-card.is-primary {
    background: #0079c3;
    color: #fff;
}

.apex-stat-card:hover {
    transform: translateY(-5px);
}

.apex-stat-value {
    font-size: 2.4rem;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.1;
}

.apex-stat-label {
    font-size: 1rem;
    margin: 0;
    color: #555;
}

.apex-stat-card.is-primary .apex-stat-label {
    color: #fff;
    opacity: 0.9;
}

/* --- Секция "Проблемы отрасли" (фото + сетка 2x2) --- */
.apex-problems {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
}

.apex-problems-media {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.apex-problems-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.apex-problems-media:hover img {
    transform: scale(1.05);
}

.apex-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.apex-card {
    background: #fff;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    border-top: 4px solid #0079c3;
}

.apex-card:hover {
    transform: translateY(-5px);
}

.apex-card-title {
    font-size: 1.2rem;
    color: #1b1464;
    font-weight: 600;
    margin: 0 0 10px;
}

.apex-card-desc {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

/* --- Экосистема Apex (поток данных) --- */
.apex-eco {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
}

.apex-eco-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

.apex-eco-card.is-primary {
    background: #0079c3;
    color: #fff;
}

.apex-eco-card:hover {
    transform: translateY(-5px);
}

.apex-eco-thumb {
    flex: 0 0 38%;
    overflow: hidden;
}

.apex-eco-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.apex-eco-text {
    min-width: 0;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.apex-eco-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1b1464;
    margin: 0;
}

.apex-eco-card.is-primary .apex-eco-title {
    color: #fff;
}

.apex-eco-desc {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.55;
    margin: 0;
}

.apex-eco-card.is-primary .apex-eco-desc {
    color: #fff;
    opacity: 0.95;
}

/* --- Преимущества --- */
.apex-adv {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.apex-adv-card {
    background: #0079c3;
    color: #fff;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    text-align: center;
}

.apex-adv-card:hover {
    transform: translateY(-5px);
}

.apex-adv-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 10px;
}

.apex-adv-desc {
    font-size: 0.95rem;
    margin: 0;
    opacity: 0.95;
    line-height: 1.5;
}

/* --- Адаптив --- */
@media (max-width: 1024px) {
    .apex-grid,
    .apex-adv {
        grid-template-columns: repeat(2, 1fr);
    }
    .apex-eco {
        grid-template-columns: 1fr;
    }
    .apex-problems {
        grid-template-columns: 1fr;
    }
    .apex-problems-media {
        min-height: 220px;
    }
}

@media (max-width: 768px) {
    .apex-section {
        width: 90%;
    }
    .apex-stats,
    .apex-grid,
    .apex-adv {
        grid-template-columns: 1fr;
    }
    .apex-section-title {
        font-size: 1.5rem;
    }
    .apex-stat-value {
        font-size: 2rem;
    }
}
