/* ==========================================================================
   GAME DEVELOPMENT LAUNCHERS (App Hub Redesign)
   ========================================================================== */

.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%;
}

/* --- 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 FOR ENGINES --- */
.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);
    filter: brightness(0.8) grayscale(0.5);
}

/* 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);
    filter: brightness(1) grayscale(0);
}

.hub-game-card:hover h4 {
    color: #fff;
    transform: translateY(-3px);
}

/* Specific Engine Themed Hover Overlays */
.unity-card:hover .card-overlay { background: linear-gradient(to top, rgba(255, 255, 255, 0.6) 0%, rgba(5,6,8,0.3) 100%); }
.unity-card:hover { border-color: rgba(255, 255, 255, 0.5); }

.unreal-card:hover .card-overlay { background: linear-gradient(to top, rgba(0, 120, 242, 0.8) 0%, rgba(5,6,8,0.3) 100%); }
.unreal-card:hover { border-color: rgba(0, 120, 242, 0.5); }

.godot-card:hover .card-overlay { background: linear-gradient(to top, rgba(71, 140, 191, 0.8) 0%, rgba(5,6,8,0.3) 100%); }
.godot-card:hover { border-color: rgba(71, 140, 191, 0.5); }

.gm-card:hover .card-overlay { background: linear-gradient(to top, rgba(0, 255, 139, 0.6) 0%, rgba(5,6,8,0.3) 100%); }
.gm-card:hover { border-color: rgba(0, 255, 139, 0.5); }

.clickteam-card:hover .card-overlay { background: linear-gradient(to top, rgba(245, 158, 11, 0.8) 0%, rgba(5,6,8,0.3) 100%); }
.clickteam-card:hover { border-color: rgba(245, 158, 11, 0.5); }

.rpg-card:hover .card-overlay { background: linear-gradient(to top, rgba(241, 196, 15, 0.8) 0%, rgba(5,6,8,0.3) 100%); }
.rpg-card:hover { border-color: rgba(241, 196, 15, 0.5); }

.cpp-card:hover .card-overlay { background: linear-gradient(to top, rgba(0, 89, 156, 0.8) 0%, rgba(5,6,8,0.3) 100%); }
.cpp-card:hover { border-color: rgba(0, 89, 156, 0.5); }

.web-card:hover .card-overlay { background: linear-gradient(to top, rgba(227, 79, 38, 0.8) 0%, rgba(5,6,8,0.3) 100%); }
.web-card:hover { border-color: rgba(227, 79, 38, 0.5); }


/* --- PURE CSS ENGINE ICON TICKER --- */
.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: 1.5rem 0;
    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 35s linear infinite;
}

.hub-ticker-track:hover {
    animation-play-state: paused;
}

.hub-ticker-group {
    display: flex;
    gap: 4rem; /* Wide gap for icons */
    padding-right: 4rem; 
}

/* --- THE NEW ICONFY STYLES --- */
.hub-ticker-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100px;
    flex-shrink: 0;
}

.hub-ticker-icon iconify-icon {
    font-size: 5rem;
    color: var(--text-muted);
    opacity: 0.4;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hub-ticker-icon:hover iconify-icon {
    opacity: 1;
    color: var(--icon-color, #ffffff); /* Pulls from inline style variable */
    transform: translateY(-10px) scale(1.15);
    filter: drop-shadow(0 15px 25px rgba(255,255,255,0.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;
}

.hub-process-section .hub-section-title {
    margin-bottom: 5rem !important; 
}

.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(239, 68, 68, 0.2);
    border-radius: 20px;
    padding: 4rem 2rem;
    width: 100%; /* Forces 100% width of the container */
    box-shadow: inset 0 0 40px rgba(239, 68, 68, 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-icon { width: 70px; }
    .hub-ticker-icon iconify-icon { font-size: 3.5rem; }
    
    .engine-icons { gap: 1rem; font-size: 2.2rem; }
    .engine-banner-glass { padding: 3rem 1.5rem; }
}