/**
 * MinerCore - Ultra-Premium Hosted Mining Stylesheet
 * Strictly matching reference design layout, colors, metrics, and visual hierarchy.
 * Fully responsive and overflow-safe on all viewports.
 */

.hm-page-wrapper {
    --brand-primary: #1890ff;
    --brand-accent: #00d2b4;
    --brand-bg: #ffffff;
}

/* Page Wrapper */
.hm-page-wrapper {
    position: relative;
    width: 100%;
    overflow-x: hidden;
    background: #ffffff;
    color: #1e293b;
    font-family: inherit;
}

.hm-page-wrapper * {
    box-sizing: border-box;
}

.hm-page-wrapper .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* Typography & General Classes */
.hm-eyebrow {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: var(--fw-semibold);
    letter-spacing: 0.12em;
    color: var(--brand-accent, #00d2b4);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: var(--fw-semibold);
    border-radius: 8px;
    padding: 12px 24px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    line-height: 1.3;
}

.hm-btn-primary {
    background: var(--brand-primary, #1890ff);
    color: #ffffff !important;
    border-color: var(--brand-primary, #1890ff);
    box-shadow: 0 4px 14px rgba(24, 144, 255, 0.35);
}

.hm-btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(24, 144, 255, 0.45);
}

.hm-btn-outline {
    background: transparent;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.4);
}

.hm-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    transform: translateY(-2px);
}

.hm-btn-outline-white {
    background: transparent;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    padding: 10px 22px;
    font-size: 0.84rem;
}

.hm-btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #ffffff;
}

.hm-btn-light {
    background: #ffffff;
    color: #0f172a !important;
    border-color: #cbd5e1;
}

.hm-btn-light:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    transform: translateY(-2px);
}

/* =========================================================================
   1. HERO SECTION (Full Size Hero per GEMINI.md)
   ========================================================================= */
.hm-hero-section {
    position: relative;
    width: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: #ffffff;
    padding: 85px 0 95px;
    min-height: 520px;
    display: flex;
    align-items: center;
}

.hm-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
}

.hm-hero-title {
    font-size: clamp(2.3rem, 4vw, 3.4rem);
    font-weight: var(--fw-semibold);
    line-height: 1.12;
    color: #ffffff;
    margin: 0 0 16px;
}

.hm-hero-desc {
    font-size: 0.98rem;
    line-height: 1.65;
    color: #cbd5e1;
    max-width: 580px;
    margin: 0 0 28px;
}

.hm-hero-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* Hero Glass Summary Card */
.hm-hero-summary-wrap {
    display: flex;
    justify-content: flex-end;
}

.hm-hero-card {
    width: 100%;
    max-width: 440px;
    background: rgba(10, 26, 44, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 26px 28px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.hm-hero-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.hm-metric-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hm-metric-icon {
    width: 32px;
    height: 32px;
    color: var(--brand-accent, #00d2b4);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.hm-metric-icon svg {
    width: 22px;
    height: 22px;
}

.hm-metric-label {
    font-size: 0.75rem;
    color: #94a3b8 !important;
    margin-bottom: 4px;
    font-weight: var(--fw-semibold);
}

.hm-metric-val {
    font-size: 1.18rem;
    color: #ffffff !important;
    font-weight: var(--fw-semibold);
    line-height: 1.2;
}

.hm-metric-val strong {
    color: #ffffff !important;
    font-weight: var(--fw-semibold);
}

.hm-hero-card strong {
    color: #ffffff !important;
}

.hm-metric-val small {
    font-size: 0.72rem;
    color: #cbd5e1 !important;
    font-weight: var(--fw-regular);
}

.hm-metric-sub {
    font-size: 0.7rem;
    color: #94a3b8 !important;
    margin-top: 3px;
}

.hm-metric-item--contract {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 18px;
    margin-top: 4px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
}

.hm-metric-item--contract .hm-metric-icon {
    margin-bottom: 0;
}

.hm-metric-item--contract .hm-metric-text {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hm-metric-item--contract .hm-metric-label {
    margin-bottom: 0;
    min-width: 60px;
}

/* =========================================================================
   2. THREE-STEP PROCESS STRIP (Explainer)
   ========================================================================= */
.hm-steps-section {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 30px 0;
}

.hm-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
}

.hm-step-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.hm-step-num {
    font-size: 1.25rem;
    font-weight: var(--fw-semibold);
    color: var(--brand-accent, #00a88f);
    line-height: 1;
    margin-top: 2px;
}

.hm-step-icon {
    width: 30px;
    height: 30px;
    color: var(--brand-accent, #00a88f);
    flex-shrink: 0;
}

.hm-step-icon svg {
    width: 100%;
    height: 100%;
}

.hm-step-title {
    font-size: 0.95rem;
    font-weight: var(--fw-semibold);
    color: #0f172a;
    margin: 0 0 4px;
}

.hm-step-desc {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.45;
    margin: 0;
}

/* =========================================================================
   3. CUSTOMER-OWNED HOSTING PROTECTION
   ========================================================================= */
.hm-protection-section {
    background: #f8fafc;
    padding: 72px 0;
}

.hm-section-header {
    margin-bottom: 36px;
}

.hm-section-eyebrow {
    display: inline-block;
    font-size: 0.74rem;
    font-weight: var(--fw-semibold);
    letter-spacing: 0.12em;
    color: var(--brand-accent, #00a88f);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.hm-section-title {
    font-size: clamp(1.8rem, 3vw, 2.3rem);
    font-weight: var(--fw-semibold);
    color: #0f172a;
    margin: 0 0 8px;
}

.hm-section-subtitle {
    font-size: 0.92rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.hm-protection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.hm-prot-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 22px 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}

.hm-prot-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.05);
}

.hm-prot-icon {
    color: var(--brand-accent, #00a88f);
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}

.hm-prot-icon svg {
    width: 100%;
    height: 100%;
}

.hm-prot-content h3 {
    font-size: 0.92rem;
    font-weight: var(--fw-semibold);
    color: #0f172a;
    margin: 0 0 5px;
}

.hm-prot-content p {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.48;
    margin: 0;
}

.hm-protection-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 36px;
    flex-wrap: wrap;
}

/* =========================================================================
   4. VERIFIABLE OPERATIONS (Transparent Mining Operations - Dark Section)
   ========================================================================= */
.hm-operations-section {
    background: #081a2b;
    color: #ffffff;
    padding: 76px 0;
}

.hm-operations-layout {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 48px;
    align-items: center;
}

.hm-operations-title {
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: var(--fw-semibold);
    color: #ffffff;
    margin: 8px 0 14px;
    line-height: 1.15;
}

.hm-operations-desc {
    font-size: 0.92rem;
    line-height: 1.65;
    color: #94a3b8;
    margin: 0 0 26px;
}

.hm-operations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.hm-op-card {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 22px 14px;
    text-align: center;
    transition: all 0.2s;
}

.hm-op-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.16);
}

.hm-op-icon {
    color: #ffffff;
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
}

.hm-op-icon svg {
    width: 28px;
    height: 28px;
}

.hm-op-title {
    font-size: 0.88rem;
    font-weight: var(--fw-semibold);
    color: #ffffff;
    margin: 0 0 6px;
}

.hm-op-desc {
    font-size: 0.74rem;
    color: #94a3b8;
    line-height: 1.45;
    margin: 0;
}

/* =========================================================================
   5. FREQUENTLY ASKED QUESTIONS (Accordion)
   ========================================================================= */
.hm-faq-section {
    background: #ffffff;
    padding: 72px 0;
}

.hm-faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 100%;
}

.hm-faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hm-faq-item[open] {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.hm-faq-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: var(--fw-semibold);
    color: #0f172a;
    list-style: none;
    user-select: none;
    transition: color 0.2s;
}

.hm-faq-summary::-webkit-details-marker {
    display: none;
}

.hm-faq-summary:hover {
    color: var(--brand-primary, #1890ff);
}

.hm-faq-toggle {
    font-size: 1.25rem;
    font-weight: var(--fw-semibold);
    color: #64748b;
    line-height: 1;
}

.hm-faq-answer {
    padding: 0 22px 18px;
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.6;
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
}

.hm-faq-answer p {
    margin: 0;
}

/* =========================================================================
   6. AVAILABLE HOSTED MINERS (Products Grid & Cloud Crosslink)
   ========================================================================= */
.hm-products-section {
    background: #f8fafc;
    padding: 72px 0;
}

.hm-products-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
    gap: 20px;
}

.hm-products-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hm-terms-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.85rem;
    color: #1e293b;
    font-weight: var(--fw-semibold);
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.hm-terms-btn:hover {
    border-color: var(--brand-primary, #1890ff);
    color: var(--brand-primary, #1890ff);
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.hm-terms-btn svg {
    color: var(--brand-primary, #1890ff);
    flex-shrink: 0;
}

.hm-sort-select {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 0.85rem;
    color: #334155;
    font-weight: var(--fw-semibold);
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.hm-sort-select:hover,
.hm-sort-select:focus {
    border-color: var(--brand-primary, #1890ff);
}

.hm-cards-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.hm-cards-grid .hm-miner-card {
    flex: 0 0 calc((100% - 3 * 20px) / 4);
    max-width: calc((100% - 3 * 20px) / 4);
    min-width: 0;
    box-sizing: border-box;
}

.hm-miner-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.hm-miner-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.hm-card-thumb-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 180px;
    margin-bottom: 14px;
}

.hm-card-thumb-wrap a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.hm-card-thumb-wrap img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.hm-card-title {
    font-size: 0.98rem;
    font-weight: var(--fw-semibold);
    color: #0f172a;
    margin: 0 0 4px;
    text-align: center;
    line-height: 1.35;
}

.hm-card-title a {
    color: inherit;
    text-decoration: none;
}

.hm-card-title a:hover {
    color: var(--brand-primary, #1890ff);
}

.hm-card-subtitle {
    font-size: 0.74rem;
    color: #94a3b8;
    text-align: center;
    margin-bottom: 12px;
}

.hm-card-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.hm-spec-pill {
    background: #f1f5f9;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 0.75rem;
    font-weight: var(--fw-semibold);
    color: #334155;
    text-align: center;
}

.hm-card-calc {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 14px;
}

.hm-calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.74rem;
}

.hm-calc-label {
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hm-info-bubble {
    font-style: normal;
    color: #94a3b8;
    cursor: help;
    font-size: 0.75rem;
}

.hm-calc-val {
    font-weight: var(--fw-semibold);
    color: #334155;
}

.hm-calc-val--fee {
    color: #64748b;
}

.hm-profit--positive {
    color: #16a34a !important;
    font-weight: var(--fw-semibold);
}

.hm-profit--negative {
    color: #dc2626 !important;
    font-weight: var(--fw-semibold);
}

.hm-card-price {
    font-size: 1.45rem;
    font-weight: var(--fw-semibold);
    color: #0f172a;
    text-align: center;
    margin-bottom: 14px;
}

.hm-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: auto;
}

.hm-buy-form {
    margin: 0;
}

.hm-btn-card-buy {
    width: 100%;
    height: 38px;
    background: var(--brand-primary, #1890ff);
    color: #ffffff;
    border: 1px solid var(--brand-primary, #1890ff);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: var(--fw-semibold);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hm-btn-card-buy:hover {
    filter: brightness(1.08);
}

.hm-btn-card-detail {
    width: 100%;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: var(--brand-primary, #1890ff);
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: var(--fw-semibold);
    text-decoration: none;
    transition: all 0.2s;
}

.hm-btn-card-detail:hover {
    background: #f8fafc;
    border-color: var(--brand-primary, #1890ff);
}

/* Cloud Mining Crosslink Banner */
.hm-cloud-banner {
    background: #f0f7ff;
    border: 1px solid #bae0fd;
    border-radius: 12px;
    padding: 22px 28px;
    margin-top: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.hm-cloud-banner-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.hm-cloud-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hm-cloud-icon svg {
    width: 26px;
    height: 26px;
}

.hm-cloud-header strong {
    display: block;
    font-size: 0.95rem;
    font-weight: var(--fw-semibold);
    color: #0f172a;
}

.hm-cloud-header span {
    font-size: 0.78rem;
    color: #64748b;
}

.hm-cloud-banner-desc {
    font-size: 0.84rem;
    color: #334155;
    line-height: 1.5;
    max-width: 500px;
}

.hm-btn-cloud {
    background: #ffffff;
    color: var(--brand-primary, #1890ff) !important;
    border: 1px solid var(--brand-primary, #1890ff);
    border-radius: 6px;
    font-weight: var(--fw-semibold);
    font-size: 0.84rem;
    padding: 10px 22px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hm-btn-cloud:hover {
    background: var(--brand-primary, #1890ff);
    color: #ffffff !important;
}

/* =========================================================================
   7. READY TO OWN & HOST? (Bottom Datacenter CTA Banner)
   ========================================================================= */
.hm-bottom-cta-section {
    position: relative;
    width: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    padding: 56px 0;
    color: #ffffff;
}

.hm-bottom-cta-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.hm-bottom-cta-title {
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: var(--fw-semibold);
    color: #ffffff;
    margin: 6px 0;
}

.hm-bottom-cta-desc {
    font-size: 0.92rem;
    color: #94a3b8;
    margin: 0;
}

.hm-bottom-cta-btn {
    flex-shrink: 0;
}

/* =========================================================================
   RESPONSIVE DESIGN (100% Overflow-Safe per GEMINI.md)
   ========================================================================= */
@media (max-width: 1100px) {
    .hm-cards-grid .hm-miner-card {
        flex: 0 0 calc((100% - 18px) / 2);
        max-width: calc((100% - 18px) / 2);
    }
}

@media (max-width: 992px) {
    .hm-hero-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .hm-hero-summary-wrap {
        justify-content: flex-start;
    }
    .hm-hero-card {
        max-width: 100%;
    }
    .hm-steps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .hm-protection-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hm-operations-layout {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .hm-cloud-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .hm-cloud-banner-desc {
        max-width: 100%;
    }
    .hm-btn-cloud {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hm-hero-section {
        padding: 55px 0 65px;
    }
    .hm-protection-section,
    .hm-operations-section,
    .hm-faq-section,
    .hm-products-section {
        padding: 48px 0;
    }
    .hm-protection-grid {
        grid-template-columns: 1fr;
    }
    .hm-operations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hm-products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .hm-sort-select {
        width: 100%;
    }
    .hm-cards-grid .hm-miner-card {
        flex: 0 0 100%;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }
    .hm-bottom-cta-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .hm-bottom-cta-btn {
        width: 100%;
    }
    .hm-bottom-cta-btn .hm-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hm-hero-card-grid {
        grid-template-columns: 1fr;
    }
    .hm-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .hm-hero-actions .hm-btn {
        width: 100%;
        text-align: center;
    }
    .hm-protection-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .hm-protection-actions .hm-btn {
        width: 100%;
        text-align: center;
    }
    .hm-operations-grid {
        grid-template-columns: 1fr;
    }
}
