/* ═══════════════════════════════════════════════════════
   🍔 MENU HUB — Premium Food Park Landing
   Linktree-Style Gastronómico | ClickMenu SaaS
   ═══════════════════════════════════════════════════════ */

/* --- CSS VARIABLES --- */
:root {
    --hub-bg: #0a0a0f;
    --hub-surface: rgba(255, 255, 255, 0.04);
    --hub-border: rgba(255, 255, 255, 0.08);
    --hub-text: #f0f0f5;
    --hub-text-muted: #8a8a9a;
    --hub-accent: #F59E0B;
    --hub-accent-rgb: 245, 158, 11;
    --hub-card-bg: rgba(255, 255, 255, 0.06);
    --hub-glow: rgba(var(--hub-accent-rgb), 0.4);
}

/* --- RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.hub-body {
    font-family: 'Outfit', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--hub-bg);
    color: var(--hub-text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- ANIMATED BACKGROUND --- */
.hub-bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.hub-bg-orb {
    position: absolute;
    border-radius: 50%;
    /* filter: blur(100px); REMOVED FOR MOBILE PERFORMANCE */
    opacity: 0.5; /* Slightly increased to compensate for no blur */
    animation: orbFloat 20s ease-in-out infinite;
    /* Use will-change to offload animation to GPU */
    will-change: transform;
}

.hub-bg-orb:nth-child(1) {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(var(--hub-accent-rgb), 0.3) 0%, rgba(var(--hub-accent-rgb), 0.1) 40%, transparent 70%);
    top: -15%;
    left: -15%;
    animation-delay: 0s;
}

.hub-bg-orb:nth-child(2) {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, rgba(59, 130, 246, 0.08) 40%, transparent 70%);
    bottom: -10%;
    right: -15%;
    animation-delay: -7s;
}

.hub-bg-orb:nth-child(3) {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.2) 0%, rgba(168, 85, 247, 0.05) 40%, transparent 70%);
    top: 35%;
    left: 45%;
    animation-delay: -14s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.05); }
    50% { transform: translate(-15px, 25px) scale(0.95); }
    75% { transform: translate(20px, 15px) scale(1.02); }
}

/* --- ADMIN ACCESS BUTTON --- */
.hub-admin-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--hub-border);
    padding: 10px 15px;
    border-radius: 12px;
    color: var(--hub-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hub-admin-btn i {
    font-size: 0.9rem;
    color: var(--hub-accent);
}

.hub-admin-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--hub-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--hub-accent-rgb), 0.2);
}

.hub-admin-btn:active {
    transform: scale(0.95);
}

@media (max-width: 480px) {
    .hub-admin-btn span {
        display: none; /* Hide text on small mobiles to save space */
    }
    .hub-admin-btn {
        padding: 12px;
        border-radius: 50%;
    }
}

/* --- MAIN CONTAINER --- */
.hub-container {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- COVER PHOTO (Full-Width Hero) --- */
.hub-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 320px;
    z-index: 0;
    overflow: hidden;
}

.hub-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.hub-cover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to top, var(--hub-bg) 0%, transparent 100%);
}

/* --- AVATAR / LOGO --- */
.hub-avatar-wrap {
    position: relative;
    z-index: 2;
    margin-top: 60px;
    margin-bottom: 24px;
}

.hub-avatar-ring {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    padding: 4px;
    background: #F59E0B;
    animation: pulseGlow 3s infinite ease-in-out;
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.4),
                0 0 80px rgba(245, 158, 11, 0.2);
}

@keyframes pulseGlow {
    0%, 100% { 
        box-shadow: 0 0 30px rgba(245, 158, 11, 0.3),
                    0 0 60px rgba(245, 158, 11, 0.1);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 50px rgba(245, 158, 11, 0.7),
                    0 0 100px rgba(245, 158, 11, 0.4);
        transform: scale(1.02);
    }
}

.hub-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--hub-bg);
    background: var(--hub-surface);
}

.hub-avatar-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- HUB INFO --- */
.hub-info {
    text-align: center;
    position: relative;
    z-index: 2;
    margin-bottom: 12px;
}

.hub-name {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hub-description {
    font-size: 0.95rem;
    color: var(--hub-text-muted);
    line-height: 1.6;
    max-width: 380px;
    margin: 0 auto 16px;
}

/* --- SOCIAL LINKS --- */
.hub-socials {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 35px;
    position: relative;
    z-index: 2;
}

.hub-social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--hub-border);
    background: var(--hub-surface);
    backdrop-filter: blur(10px);
}

.hub-social-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.hub-social-btn.whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
}

.hub-social-btn.instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
    border-color: #d6249f;
}

/* --- SECTION DIVIDER --- */
.hub-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.hub-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--hub-border), transparent);
}

.hub-divider-text {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--hub-text-muted);
    white-space: nowrap;
}

/* --- RESTAURANT CARDS GRID --- */
.hub-restaurants {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* --- INDIVIDUAL RESTAURANT CARD --- */
.hub-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 18px;
    background: var(--hub-card-bg);
    border: 1px solid var(--hub-border);
    backdrop-filter: blur(20px);
    text-decoration: none;
    color: var(--hub-text);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    min-height: 76px;

    /* Stagger animation - Faster entrance */
    opacity: 0;
    transform: translateY(20px);
    animation: cardSlideIn 0.4s ease-out forwards;
}

.hub-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, 
        rgba(var(--hub-accent-rgb), 0.08) 0%, 
        transparent 50%,
        rgba(59, 130, 246, 0.05) 100%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
}

.hub-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(var(--hub-accent-rgb), 0.4);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4),
                0 0 30px rgba(var(--hub-accent-rgb), 0.15);
}

.hub-card:hover::before {
    opacity: 1;
}

.hub-card:active {
    transform: translateY(-2px) scale(0.99);
}

/* Card stagger animation */
@keyframes cardSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hub-card:nth-child(1) { animation-delay: 0.05s; }
.hub-card:nth-child(2) { animation-delay: 0.1s; }
.hub-card:nth-child(3) { animation-delay: 0.15s; }
.hub-card:nth-child(4) { animation-delay: 0.2s; }
.hub-card:nth-child(5) { animation-delay: 0.25s; }
.hub-card:nth-child(6) { animation-delay: 0.3s; }
.hub-card:nth-child(7) { animation-delay: 0.35s; }
.hub-card:nth-child(8) { animation-delay: 0.4s; }
.hub-card:nth-child(9) { animation-delay: 0.45s; }
.hub-card:nth-child(10) { animation-delay: 0.5s; }

/* --- CARD: EMOJI/ICON --- */
.hub-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: rgba(var(--hub-accent-rgb), 0.12);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.hub-card:hover .hub-card-icon {
    transform: scale(1.1);
    background: rgba(var(--hub-accent-rgb), 0.2);
}

/* --- CARD: IMAGE VARIANT --- */
.hub-card-image {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    border: 1px solid var(--hub-border);
}

.hub-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hub-card:hover .hub-card-image img {
    transform: scale(1.15);
}

/* --- CARD: TEXT CONTENT --- */
.hub-card-content {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.hub-card-name {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-card-desc {
    font-size: 0.8rem;
    color: var(--hub-text-muted);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- CARD: ARROW --- */
.hub-card-arrow {
    color: var(--hub-text-muted);
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.hub-card:hover .hub-card-arrow {
    color: var(--hub-accent);
    transform: translateX(4px);
}

/* --- FOOTER / POWERED BY --- */
.hub-footer {
    margin-top: 50px;
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 20px 0;
}

.hub-powered {
    font-size: 0.72rem;
    color: var(--hub-text-muted);
    opacity: 0.5;
    text-decoration: none;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    letter-spacing: 0.5px;
}

.hub-powered:hover {
    opacity: 0.9;
    color: var(--hub-accent);
}

.hub-powered-dot {
    width: 4px;
    height: 4px;
    background: var(--hub-accent);
    border-radius: 50%;
    display: inline-block;
}

/* --- 404 PAGE --- */
.hub-404 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 40px 20px;
}

.hub-404-icon {
    font-size: 5rem;
    color: var(--hub-accent);
    margin-bottom: 30px;
    animation: pulse404 3s ease-in-out infinite;
}

@keyframes pulse404 {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.hub-404 h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--hub-accent);
}

.hub-404 p {
    color: var(--hub-text-muted);
    font-size: 1rem;
    margin-bottom: 40px;
    max-width: 400px;
}

/* --- OPEN INDICATOR BADGE --- */
.hub-badge-open {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.hub-badge-open i {
    font-size: 0.45rem;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* --- RESPONSIVE --- */
@media (min-width: 600px) {
    .hub-container {
        padding-top: 50px;
    }

    .hub-cover {
        height: 380px;
    }

    .hub-avatar-ring {
        width: 150px;
        height: 150px;
    }

    .hub-name {
        font-size: 2.2rem;
    }

    .hub-card {
        padding: 18px 24px;
    }

    .hub-card-icon, .hub-card-image {
        width: 54px;
        height: 54px;
    }
}

@media (max-width: 380px) {
    .hub-container {
        padding: 30px 16px 50px;
    }

    .hub-avatar-ring {
        width: 110px;
        height: 110px;
    }

    .hub-name {
        font-size: 1.5rem;
    }

    .hub-card {
        padding: 14px 16px;
        gap: 12px;
    }

    .hub-card-icon, .hub-card-image {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .hub-card-name {
        font-size: 0.92rem;
    }
}

/* --- LOADING SKELETON --- */
.hub-skeleton {
    background: linear-gradient(90deg, 
        var(--hub-surface) 25%, 
        rgba(255,255,255,0.08) 50%, 
        var(--hub-surface) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 14px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
