/* --- APP HUB SPECIFIC STYLES --- */
.hub-main {
    position: relative;
    z-index: 1;
}

/* Global scale for the Hub titles to ensure uniformity */
.hub-section-title {
    font-size: clamp(2.5rem, 5vw, 4rem) !important;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1px;
}

/* Helper to force full width in flex columns */
.w-100 {
    width: 100%;
}
.d-inline-flex {
    display: inline-flex !important;
}

/* --- HERO & GRID SECTION --- */
.hub-hero {
    position: relative;
    padding-top: 6rem;
    padding-bottom: 2rem;
}

.hub-bg-glow {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

/* Perfect responsive grid using auto-fit */
.hub-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- REDESIGNED COVER CARDS --- */
.hub-game-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9; /* Perfect wide tiles */
    display: flex;
    align-items: flex-end; /* Pushes text to the bottom */
    justify-content: center;
    padding: 1.5rem;
    text-decoration: none;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    background: #0a0c10;
}

/* The Background Image */
.card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* The Gradient Overlay */
.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5,6,8,1) 0%, rgba(5,6,8,0.2) 100%);
    z-index: 2;
    transition: all 0.4s ease;
}

/* The Text */
.hub-game-card h4 {
    position: relative;
    z-index: 3;
    font-size: 1.25rem;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0;
    text-shadow: 0 4px 15px rgba(0,0,0,0.8);
    transition: transform 0.3s ease, color 0.3s ease;
}

/* Default Card Hover Physics */
.hub-game-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0,0,0,0.7), 0 0 20px rgba(0, 123, 255, 0.1);
    transform: translateY(-5px);
}

.hub-game-card:hover .card-img {
    transform: scale(1.08);
}

.hub-game-card:hover h4 {
    color: #fff;
    transform: translateY(-3px);
}

/* Specific Game Themed Hover Overlays */
.mc-card:hover .card-overlay { background: linear-gradient(to top, rgba(74, 222, 128, 0.8) 0%, rgba(5,6,8,0.3) 100%); }
.mc-card:hover { border-color: rgba(74, 222, 128, 0.5); }

.fivem-card:hover .card-overlay { background: linear-gradient(to top, rgba(249, 115, 22, 0.8) 0%, rgba(5,6,8,0.3) 100%); }
.fivem-card:hover { border-color: rgba(249, 115, 22, 0.5); }

.rust-card:hover .card-overlay { background: linear-gradient(to top, rgba(239, 68, 68, 0.8) 0%, rgba(5,6,8,0.3) 100%); }
.rust-card:hover { border-color: rgba(239, 68, 68, 0.5); }

.valheim-card:hover .card-overlay { background: linear-gradient(to top, rgba(45, 212, 191, 0.8) 0%, rgba(5,6,8,0.3) 100%); }
.valheim-card:hover { border-color: rgba(45, 212, 191, 0.5); }

.cs-card:hover .card-overlay { background: linear-gradient(to top, rgba(234, 179, 8, 0.8) 0%, rgba(5,6,8,0.3) 100%); }
.cs-card:hover { border-color: rgba(234, 179, 8, 0.5); }

.steam-card:hover .card-overlay { background: linear-gradient(to top, rgba(56, 189, 248, 0.8) 0%, rgba(5,6,8,0.3) 100%); }
.steam-card:hover { border-color: rgba(56, 189, 248, 0.5); }

.gmod-card:hover .card-overlay { background: linear-gradient(to top, rgba(27, 133, 243, 0.8) 0%, rgba(5,6,8,0.3) 100%); }
.gmod-card:hover { border-color: rgba(27, 133, 243, 0.5); }

.mmo-card:hover .card-overlay { background: linear-gradient(to top, rgba(168, 85, 247, 0.8) 0%, rgba(5,6,8,0.3) 100%); }
.mmo-card:hover { border-color: rgba(168, 85, 247, 0.5); }

/* --- PURE CSS IMAGE TICKER (Matches Homepage) --- */
.hub-carousel-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: rgba(10, 12, 16, 0.4); 
}

.hub-ticker-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 1rem 0;
    
    /* This creates the smooth fade at the left and right edges */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.hub-ticker-track {
    display: flex;
    width: max-content;
    animation: hubScroll 40s linear infinite;
}

/* Pause on hover so users can see the images */
.hub-ticker-track:hover {
    animation-play-state: paused;
}

.hub-ticker-group {
    display: flex;
    gap: 2rem;
    padding-right: 2rem; /* Matches the gap so the loop is seamless */
}

/* --- UPDATED TICKER IMAGE STYLES --- */
.hub-ticker-item {
    width: 220px; /* Keep the width consistent */
    flex-shrink: 0;
}

.hub-ticker-item img {
    width: 100%;
    height: 300px; /* [1] FORCES EQUAL HEIGHT: Set this to your preferred height */
    object-fit: cover; /* [2] PREVENTS DISTORTION: Crops the image to fill the box perfectly */
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    display: block;
    
    /* [3] SATURATION: Lower saturation when idle */
    filter: saturate(0.4); 
    
    /* Smooth transition for both the transform and the filter */
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hub-ticker-item:hover img {
    transform: translateY(-8px); /* Lift up slightly more on hover */
    border-color: var(--primary); /* Uses your core primary variable */
    box-shadow: 0 15px 35px rgba(0, 123, 255, 0.2);
    
    /* [4] SATURATION: Back to normal 100% on hover */
    filter: saturate(1); 
}

@keyframes hubScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- INFO TEXT SECTION --- */
.hub-info-section {
    padding-top: 5rem;
    padding-bottom: 3rem;
}

.info-split-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.hub-notice-box {
    background: rgba(0, 123, 255, 0.05);
    border: 1px solid rgba(0, 123, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

/* --- PROCESS SECTION --- */
.hub-process-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.process-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.process-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 123, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4), inset 0 0 15px rgba(0,123,255,0.05);
}

.process-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 15px rgba(0, 123, 255, 0.4));
}

.process-card h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #fff;
}

.process-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* --- ENGINE BANNER --- */
.hub-engine-section {
    padding-top: 3rem;
    padding-bottom: 6rem;
}

/* Ensures 100% width styling and stops children from stretching */
.engine-banner-glass {
    background: linear-gradient(135deg, rgba(13, 17, 22, 0.9) 0%, rgba(5, 6, 8, 0.95) 100%);
    border: 1px solid rgba(0, 123, 255, 0.3);
    border-radius: 20px;
    padding: 4rem 2rem;
    width: 100%; /* Forces 100% width of the container */
    box-shadow: inset 0 0 40px rgba(0, 123, 255, 0.05), 0 20px 50px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* <--- THIS stops the pill and button from stretching 100% */
    text-align: center;
}

.engine-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 3rem;
    color: var(--text-muted);
}

.engine-icons span {
    transition: all 0.3s ease;
    cursor: default;
}

.engine-icons span:hover {
    color: #fff;
    transform: scale(1.1) translateY(-5px);
    filter: drop-shadow(0 0 15px rgba(255,255,255,0.4));
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 992px) {
    .info-split-layout { 
        grid-template-columns: 1fr; 
        gap: 2rem; 
        text-align: center; 
    }
    .info-left h2 { font-size: clamp(2rem, 4vw, 3rem) !important; }
}

@media (max-width: 768px) {
    .hub-game-grid { 
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    }
    .hub-game-card { padding: 1.5rem; }
    
    .hub-ticker-item { width: 160px; }
    
    .engine-icons { gap: 1rem; font-size: 2.2rem; }
    .engine-banner-glass { padding: 3rem 1.5rem; }
}

/* Increase space under the Process section title */
.hub-process-section .hub-section-title {
    margin-bottom: 6rem !important; /* Adjust this value higher (e.g., 7rem or 8rem) as needed */
}