/* ============================================
   HOMEPAGE REDESIGN V2 - Visual & Interactive
   ============================================ */

/* ============================================
   IP TRANSIT PRICING SLIDER
   ============================================ */

.hye-transit-slider-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Step dot indicators */
.hye-transit-steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 1.5rem;
}

.hye-transit-step-line {
    flex: 1;
    height: 2px;
    background: rgba(42, 42, 53, 0.6);
    transition: background 0.3s ease;
    max-width: 60px;
}

.hye-transit-step-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(26, 26, 34, 0.8);
    border: 2px solid rgba(42, 42, 53, 0.6);
    color: var(--hye-text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.hye-transit-step-dot:hover {
    border-color: var(--hye-purple);
    color: var(--hye-text);
}

.hye-transit-step-dot.active {
    background: var(--hye-purple);
    border-color: var(--hye-purple);
    color: #fff;
    box-shadow: 0 0 16px rgba(147, 51, 234, 0.4);
    transform: scale(1.15);
}

.hye-transit-dot-popular::after {
    content: '★';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: var(--hye-purple-light);
}

/* Range input */
.hye-transit-range-wrap {
    padding: 0 20px;
    margin-bottom: 2rem;
}

.hye-transit-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(to right, var(--hye-purple) 0%, rgba(42, 42, 53, 0.6) 0%);
    outline: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.hye-transit-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--hye-purple);
    border: 3px solid #fff;
    box-shadow: 0 0 10px rgba(147, 51, 234, 0.5);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hye-transit-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 18px rgba(147, 51, 234, 0.7);
}

.hye-transit-range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--hye-purple);
    border: 3px solid #fff;
    box-shadow: 0 0 10px rgba(147, 51, 234, 0.5);
    cursor: pointer;
}

/* Tier display card */
.hye-transit-tier-display {
    background: rgba(26, 26, 34, 0.6);
    border: 1px solid rgba(42, 42, 53, 0.5);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.hye-transit-tier-display.is-popular {
    border-color: rgba(147, 51, 234, 0.4);
    box-shadow: 0 8px 30px rgba(147, 51, 234, 0.15);
}

.hye-transit-tier-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--hye-purple);
    color: #fff;
    padding: 0.25rem 1rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.hye-transit-tier-mbps {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--hye-text);
    line-height: 1;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
}

.hye-transit-tier-mbps span {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--hye-text-muted);
}

.hye-transit-tier-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--hye-purple-light);
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.hye-transit-tier-price span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--hye-text-muted);
}

.hye-transit-tier-desc {
    color: var(--hye-text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
    transition: all 0.2s ease;
}

.hye-transit-order-btn {
    min-width: 220px;
}

/* Animate tier content change */
.hye-transit-tier-display.changing .hye-transit-tier-mbps,
.hye-transit-tier-display.changing .hye-transit-tier-price,
.hye-transit-tier-display.changing .hye-transit-tier-desc {
    opacity: 0;
    transform: translateY(6px);
}

/* ============================================
   IP TRANSIT PROTOCOL SHOWCASE
   ============================================ */

.hye-transit-protocol-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 2rem;
}

.hye-transit-protocol-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--hye-text);
}

.hye-transit-protocol-content p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--hye-text-muted);
    margin-bottom: 1.5rem;
}

.hye-transit-protocol-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.hye-transit-protocol-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    color: var(--hye-purple);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.hye-transit-protocol-badge:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
}

.hye-transit-protocol-badge i {
    font-size: 0.9rem;
}

.hye-transit-protocol-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hye-transit-protocol-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--hye-text-muted);
}

.hye-transit-protocol-features li i {
    color: var(--hye-purple);
    font-size: 1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.hye-transit-protocol-features li strong {
    color: var(--hye-text);
    font-weight: 600;
}

.hye-transit-protocol-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(26, 26, 34, 0.6);
    border: 1px solid rgba(42, 42, 53, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hye-transit-protocol-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* ============================================
   SCROLL ANIMATIONS
   Scoped to homepage tab grid and why section only
   ============================================ */

.hye-tab-btn,
.hye-tab-product-grid .hye-pc,
.hye-panel-demo-wrapper,
.hye-why-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.hye-animate-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Stagger animation delays for grid items */
.hye-tab-product-grid .hye-pc:nth-child(1) { transition-delay: 0.1s; }
.hye-tab-product-grid .hye-pc:nth-child(2) { transition-delay: 0.2s; }
.hye-tab-product-grid .hye-pc:nth-child(3) { transition-delay: 0.3s; }
.hye-tab-product-grid .hye-pc:nth-child(4) { transition-delay: 0.4s; }

.hye-why-grid .hye-why-card:nth-child(1) { transition-delay: 0.1s; }
.hye-why-grid .hye-why-card:nth-child(2) { transition-delay: 0.2s; }
.hye-why-grid .hye-why-card:nth-child(3) { transition-delay: 0.3s; }
.hye-why-grid .hye-why-card:nth-child(4) { transition-delay: 0.4s; }

/* ============================================
   PRODUCT TABS SYSTEM
   ============================================ */

.hye-products-tabbed {
    padding: 5rem 0;
    background: transparent;
    border: none;
}

.hye-product-tabs {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hye-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: rgba(26, 26, 34, 0.4);
    border: 1px solid rgba(42, 42, 53, 0.5);
    border-radius: 999px;
    color: var(--hye-text-muted);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.hye-tab-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.hye-tab-btn:hover {
    border-color: var(--hye-purple);
    color: var(--hye-text);
    transform: translateY(-2px);
}

.hye-tab-btn:hover i {
    transform: scale(1.1);
}

/* Active tab — consolidated (no ::after underline, softer glow) */
.hye-tab-btn.active {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.15), rgba(192, 132, 252, 0.1));
    border-color: rgba(147, 51, 234, 0.4);
    color: var(--hye-purple-light);
    box-shadow: 0 0 20px rgba(147, 51, 234, 0.1);
}

.hye-tab-content {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.hye-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hye-tab-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   PANEL SHOWCASE V2
   ============================================ */

.hye-panel-showcase-v2 {
    padding: 5rem 0;
    background: linear-gradient(180deg, transparent 0%, rgba(22, 22, 31, 0.5) 15%, rgba(22, 22, 31, 0.5) 85%, transparent 100%);
    border: none;
}

/* Consolidated panel demo wrapper (removed duplicate) */
.hye-panel-demo-wrapper {
    max-width: 1000px;
    margin: 0 auto 2rem;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(42, 42, 53, 0.4);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.hye-panel-demo-wrapper:hover {
    transform: translateY(-5px);
    border-color: rgba(147, 51, 234, 0.3);
    box-shadow: 0 20px 60px rgba(147, 51, 234, 0.12);
}

.hye-panel-demo-image {
    position: relative;
    width: 100%;
    background: var(--hye-bg-card);
}

.hye-panel-demo-image img {
    width: 100%;
    height: auto;
    display: block;
}

.hye-panel-features-badges {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.hye-feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--hye-text-muted);
    font-size: 1rem;
    font-weight: 500;
    background: rgba(26, 26, 34, 0.4);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(42, 42, 53, 0.3);
}

.hye-feature-badge i {
    color: var(--hye-purple-light);
    font-size: 1.2rem;
}

.hye-panel-cta-center {
    text-align: center;
}

/* ============================================
   WHY HYEHOST SECTION — HOVER CARDS
   ============================================ */

/* Consolidated why-section (removed duplicate) */
.hye-why-section {
    padding: 3rem 0 5rem;
    background: transparent;
    border: none;
}

.hye-why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Consolidated why-card (removed duplicate) */
.hye-why-card {
    background: rgba(26, 26, 34, 0.5);
    border: 1px solid rgba(42, 42, 53, 0.4);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.hye-why-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hye-why-card:hover::before {
    opacity: 1;
}

.hye-why-card:hover {
    border-color: rgba(147, 51, 234, 0.3);
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(147, 51, 234, 0.12);
}

.hye-why-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(147, 51, 234, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.hye-why-card:hover .hye-why-icon {
    background: rgba(147, 51, 234, 0.2);
    transform: scale(1.1) rotate(5deg);
}

.hye-why-icon i {
    font-size: 2rem;
    color: var(--hye-purple-light);
}

.hye-why-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--hye-text);
    transition: color 0.3s ease;
}

.hye-why-card:hover h3 {
    color: var(--hye-purple-light);
}

.hye-why-detail {
    color: var(--hye-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    margin: 0;
}

.hye-why-card:hover .hye-why-detail {
    max-height: 200px;
    opacity: 1;
    margin-top: 0.75rem;
}

/* ============================================
   HOMEPAGE PRODUCT CARD OVERRIDES
   Softer borders scoped to tabbed section only
   ============================================ */

.hye-products-tabbed .hye-pc {
    border-color: rgba(42, 42, 53, 0.5);
    background: rgba(26, 26, 34, 0.6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.hye-products-tabbed .hye-pc:hover {
    border-color: rgba(147, 51, 234, 0.35);
    box-shadow: 0 8px 30px rgba(147, 51, 234, 0.12);
}

.hye-products-tabbed .hye-pc-featured {
    border-color: rgba(147, 51, 234, 0.25);
}

.hye-products-tabbed .hye-pc-price {
    border-bottom-color: rgba(42, 42, 53, 0.3);
}

/* Remove inherited borders from section heads */
.hye-products-tabbed .hye-section-head,
.hye-panel-showcase-v2 .hye-section-head,
.hye-why-section .hye-section-head {
    border: none;
}

.hye-products-tabbed .hye-section-head h2,
.hye-panel-showcase-v2 .hye-section-head h2,
.hye-why-section .hye-section-head h2 {
    border: none;
    padding-bottom: 0;
}

/* Footer — no hard top border */
.hye-why-section + * + .hye-footer,
main + .hye-footer {
    border-top: none;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

@media (max-width: 1200px) {
    .hye-tab-product-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

@media (max-width: 968px) {
    .hye-transit-protocol-showcase {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hye-transit-protocol-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .hye-product-tabs {
        flex-direction: column;
        align-items: stretch;
    }

    .hye-tab-btn {
        justify-content: center;
    }

    .hye-tab-product-grid {
        grid-template-columns: 1fr;
    }

    .hye-why-grid {
        grid-template-columns: 1fr;
    }

    /* Always show why-card detail on mobile (no hover) */
    .hye-why-card .hye-why-detail {
        max-height: none;
        opacity: 1;
        margin-top: 0.75rem;
    }
}

@media (max-width: 480px) {
    .hye-transit-step-dot {
        width: 32px;
        height: 32px;
        font-size: 0.6rem;
    }

    .hye-transit-tier-mbps {
        font-size: 2.75rem;
    }

    .hye-transit-tier-display {
        padding: 2rem 1.25rem;
    }

    .hye-hero-ctas {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hye-hero-ctas .hye-btn {
        width: 100%;
    }

    .hye-panel-features-badges {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
}

/* Respect user's motion preferences — consolidated */
@media (prefers-reduced-motion: reduce) {
    .hye-tab-btn,
    .hye-tab-product-grid .hye-pc,
    .hye-panel-demo-wrapper,
    .hye-why-card {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hye-tab-content {
        animation: none;
    }
}

/* ============================================================
   VPS PLAN TABLE — compact horizontal spec layout
   ============================================================ */

.hye-vps-plan-table {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(18, 18, 26, 0.6);
}

.hye-vpt-header {
    display: grid;
    grid-template-columns: 1.8fr 0.7fr 0.7fr 0.8fr 0.8fr 1fr 1fr 0.9fr;
    align-items: center;
    padding: 0.65rem 1.25rem;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    gap: 0.5rem;
}

.hye-vpt-row {
    display: grid;
    grid-template-columns: 1.8fr 0.7fr 0.7fr 0.8fr 0.8fr 1fr 1fr 0.9fr;
    align-items: center;
    padding: 0.85rem 1.25rem;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s ease;
}

.hye-vpt-row:last-child {
    border-bottom: none;
}

.hye-vpt-row:hover {
    background: rgba(255,255,255,0.03);
}

.hye-vpt-row.hye-vpt-popular {
    background: rgba(99, 102, 241, 0.07);
    border-left: 3px solid var(--hye-accent, #6366f1);
    padding-left: calc(1.25rem - 3px);
}

.hye-vpt-row.hye-vpt-popular:hover {
    background: rgba(99, 102, 241, 0.12);
}

.hye-vpt-name {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.hye-vpt-name strong {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
}

.hye-vpt-name span {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
}

.hye-vpt-popular .hye-vpt-name span {
    color: var(--hye-accent, #6366f1);
    font-weight: 600;
}

.hye-vpt-popular .hye-vpt-name span i {
    font-size: 0.6rem;
}

/* Spec cell — unit label is dimmed/small; value span pops */
.hye-vpt-spec {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255,255,255,0.45);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.hye-vpt-spec i {
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* The key value — bright white, larger, bold */
.hye-vpt-spec .hye-vpt-val {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
}

/* Per-column icon colours */
.hye-vpt-row > .hye-vpt-spec:nth-child(2) i { color: #60a5fa; } /* vCPU — blue */
.hye-vpt-row > .hye-vpt-spec:nth-child(3) i { color: #a78bfa; } /* RAM — purple */
.hye-vpt-row > .hye-vpt-spec:nth-child(4) i { color: #fbbf24; } /* Disk — amber */
.hye-vpt-row > .hye-vpt-spec:nth-child(5) i { color: #34d399; } /* Transfer — green */
.hye-vpt-row > .hye-vpt-spec:nth-child(6) i { color: #22d3ee; } /* Network — cyan */

/* Network cell — uniform text, no split val span */
.hye-vpt-spec-net {
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
}

.hye-vpt-price {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    white-space: nowrap;
}

.hye-vpt-price strong {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.hye-vpt-price span {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.4);
}

.hye-vpt-action {
    display: flex;
    justify-content: flex-end;
}

/* Small button variant */
.hye-btn-sm {
    padding: 0.35rem 0.9rem;
    font-size: 0.78rem;
    border-radius: 6px;
}

/* Responsive: stack to cards on mobile */
@media (max-width: 768px) {
    .hye-vpt-header {
        display: none;
    }

    .hye-vps-plan-table {
        display: flex;
        flex-direction: column;
    }

    .hye-vpt-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem 1rem;
        padding: 1rem 1.25rem;
    }

    .hye-vpt-row.hye-vpt-popular {
        border-left: none;
        border-top: 3px solid var(--hye-accent, #6366f1);
        padding-left: 1.25rem;
        padding-top: calc(1rem - 3px);
    }

    .hye-vpt-name {
        grid-column: 1 / -1;
    }

    .hye-vpt-action {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .hye-vpt-action .hye-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}