/* =============================================================================
   HERO SECTION STYLING (MINIMALISTA E ABERTO)
   Caminho: front/pages/home/css/hero.css
   ============================================================================= */

.hero-wrapper {
    width: 100vw;
    position: relative;
    z-index: 10;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background: linear-gradient(180deg, #0b1120 0%, #0f172a 100%);
    padding: calc(2.25rem + var(--navbar-height)) 1.5rem 3.5rem 1.5rem;
    margin-top: calc(-1 * (var(--navbar-height) + var(--margin-default)));
    margin-bottom: 2.5rem;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    box-sizing: border-box;
}

/* Vídeo de Fundo (Desktop) */
.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    pointer-events: none;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
}

.hero-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% * 1280 / 1130);
    height: 100%;
    object-fit: cover;
    object-position: left center;
    pointer-events: none;
    filter: brightness(0.65);
    transform: translate3d(0, 0, 0);
    clip-path: inset(0 11.71875% 0 0 round 0px 0px 24px 24px);
}

.hero-container {
    position: relative;
    z-index: 2;
    transform: translate3d(0, 0, 2px);
    max-width: 1460px;
    width: 100%;
    margin: 0 auto;
    padding: 3.25rem 3rem;
    border-radius: 28px;
    background-color: rgba(12, 17, 28, 0.55);
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: visible;
    box-sizing: border-box;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    gap: 3.5rem;
    align-items: center;
    text-align: left;
}

/* Informações do Hero */
.hero-info {
    display: flex;
    flex-direction: column;
    z-index: 2;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #ffffff;
    align-self: flex-start;
    margin-bottom: 1.25rem;
}

.hero-tag-badge {
    background: var(--accent-gradient);
    color: #ffffff;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
}

.hero-title {
    font-size: 3.25rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

.hero-title-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--accent);
}

.hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 650px;
    line-height: 1.6;
    margin-bottom: 1.85rem;
    font-weight: 400;
}

/* Pesquisa Integrada */
.hero-search-container {
    position: relative;
    max-width: 540px;
    width: 100%;
    z-index: 999;
}

.hero-search-wrapper {
    position: relative;
    width: 100%;
}

.hero-search-wrapper input {
    width: 100%;
    height: 52px;
    padding: 0 3.5rem 0 1.25rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.95);
    outline: none;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-main);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.hero-search-wrapper input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.hero-search-icon-box {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    pointer-events: none;
}

/* Grid de Estatísticas Desktop */
.hero-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 2;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 1.15rem 1.4rem;
    color: #ffffff;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.stat-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background-color: rgba(255, 255, 255, 0.1);
}

.stat-icon-wrapper {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
}

.stat-info h3,
.stat-info .stat-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.15rem 0;
    letter-spacing: -0.02em;
}

.stat-info p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-weight: 400;
}

.stat-icon-wrapper.blue-glow {
    background: rgba(37, 99, 235, 0.15);
}
.stat-icon-wrapper.orange-glow {
    background: rgba(249, 115, 22, 0.15);
}
.stat-icon-wrapper.green-glow {
    background: rgba(16, 185, 129, 0.15);
}

.stat-card-interactive {
    cursor: pointer;
    text-decoration: none;
    border-color: rgba(249, 115, 22, 0.65);
    background-color: rgba(249, 115, 22, 0.2);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.stat-card-interactive:hover {
    border-color: rgba(249, 115, 22, 0.85);
    background-color: rgba(249, 115, 22, 0.25);
}

/* Visibilidade Desktop vs Mobile */
.hero-desktop-header {
    display: block;
}

.hero-mobile-header {
    display: none;
}

.hero-mobile-shortcuts-grid {
    display: none;
}

.hero-mobile-guest-actions {
    display: none;
}

/* Responsivo Tablet */
@media (max-width: 991px) {
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }
    .hero-info {
        align-items: center;
    }
    .hero-tag {
        align-self: center;
    }
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-search-container {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-stats {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    .stat-card {
        flex: 1 1 200px;
        max-width: 280px;
        justify-content: center;
        text-align: left;
    }
}

/* =============================================================================
   MOBILE (MINIMALISTA, SEM CARDS ENVOLVENTES E COM ATALHOS AMPLIADOS)
   ============================================================================= */
@media (max-width: 768px) {
    .hero-wrapper {
        width: 100vw !important;
        max-width: 100vw !important;
        position: relative !important;
        left: 50% !important;
        right: 50% !important;
        margin-left: -50vw !important;
        margin-right: -50vw !important;
        padding: calc(56px + max(12px, env(safe-area-inset-top, 0px)) + 1.25rem) 1.15rem 2.25rem 1.15rem !important;
        margin-top: 0 !important;
        margin-bottom: 1.25rem !important;
        border-radius: 0 0 24px 24px !important;
        background: linear-gradient(160deg, #090d16 0%, #111927 50%, #162035 100%) !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .hero-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 auto !important;
        background: none !important;
        border: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: none !important;
        transform: none !important;
        box-sizing: border-box !important;
    }

    .hero-layout {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .hero-info {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    /* Ordenação quando o utilizador tem sessão iniciada: Barra de pesquisa primeiro */
    .hero-info.hero-info-logged .hero-search-container {
        order: 1 !important;
        margin: 0 0 1.25rem 0 !important;
    }

    .hero-info.hero-info-logged .hero-mobile-header {
        order: 2 !important;
        margin: 1rem 0 1.5rem 1rem !important;
    }

    .hero-info.hero-info-logged .hero-mobile-shortcuts-grid {
        order: 3 !important;
    }

    .hero-video-container,
    .hero-desktop-header,
    .hero-stats {
        display: none !important;
    }

    /* Cabeçalho Mobile Minimalista e Direto */
    .hero-mobile-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: left !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0.25rem 0 1.25rem 0 !important;
        box-sizing: border-box !important;
    }

    .hero-mobile-greeting,
    .hero-mobile-minimal-title {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.25rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .hero-mobile-title {
        font-size: 1.4rem !important;
        font-weight: 800 !important;
        color: #ffffff !important;
        letter-spacing: -0.025em !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        word-break: break-word !important;
    }

    .hero-mobile-sub {
        font-size: 0.85rem !important;
        color: rgba(255, 255, 255, 0.7) !important;
        font-weight: 500 !important;
        margin: 0 !important;
        word-break: break-word !important;
    }

    /* Caixa de Pesquisa no Mobile */
    .hero-search-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 1.15rem 0 !important;
        box-sizing: border-box !important;
    }

    .hero-search-wrapper {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .hero-search-wrapper input {
        width: 100% !important;
        height: 48px !important;
        font-size: 16px !important;
        padding: 0 2.85rem 0 1.15rem !important;
        border-radius: 14px !important;
        background: #ffffff !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        box-sizing: border-box !important;
    }

    /* =========================================================================
       ATALHOS DE CONTA AMPLIADOS (LAYOUT WIDGET 2X2 ANTI-OVERFLOW)
       ========================================================================= */
    .hero-mobile-shortcuts-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.65rem !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .hero-mobile-shortcut-btn {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
        padding: 0.85rem 0.85rem !important;
        min-height: 96px !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.14) !important;
        border-radius: 16px !important;
        text-decoration: none !important;
        color: #ffffff !important;
        box-sizing: border-box !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
        transition: background-color 0.15s ease, border-color 0.15s ease;
    }

    .hero-mobile-shortcut-btn:hover,
    .hero-mobile-shortcut-btn:active {
        background: rgba(255, 255, 255, 0.15) !important;
        border-color: rgba(255, 255, 255, 0.3) !important;
    }

    .shortcut-top-row {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        gap: 0.35rem !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .shortcut-icon-wrapper {
        width: 38px !important;
        height: 38px !important;
        border-radius: 11px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
    }

    .shortcut-icon-wrapper.orange {
        background: rgba(249, 115, 22, 0.2) !important;
    }
    .shortcut-icon-wrapper.blue {
        background: rgba(0, 113, 227, 0.2) !important;
    }
    .shortcut-icon-wrapper.green {
        background: rgba(16, 185, 129, 0.2) !important;
    }
    .shortcut-icon-wrapper.purple {
        background: rgba(139, 92, 246, 0.2) !important;
    }

    .shortcut-badge-pill {
        display: inline-flex !important;
        align-items: center !important;
        background: rgba(52, 211, 153, 0.18) !important;
        color: #34d399 !important;
        border: 1px solid rgba(52, 211, 153, 0.35) !important;
        font-size: 0.65rem !important;
        font-weight: 800 !important;
        padding: 0.2rem 0.5rem !important;
        border-radius: 9999px !important;
        white-space: nowrap !important;
    }

    .shortcut-text-group {
        display: flex !important;
        flex-direction: column !important;
        text-align: left !important;
        gap: 0.15rem !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .shortcut-main-label {
        font-size: 0.85rem !important;
        font-weight: 800 !important;
        color: #ffffff !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.25 !important;
        width: 100% !important;
    }

    .shortcut-sub-label {
        font-size: 0.7rem !important;
        color: rgba(255, 255, 255, 0.6) !important;
        font-weight: 500 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        width: 100% !important;
    }

    .shortcut-sub-label.badge-active-today {
        color: #34d399 !important;
        font-weight: 800 !important;
    }

    /* Ações de Visitante Ampliadas */
    .hero-mobile-guest-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.65rem !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .hero-mobile-action-primary {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.6rem !important;
        width: 100% !important;
        min-height: 48px !important;
        padding: 0.8rem 1.25rem !important;
        background: var(--accent-gradient) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        color: #ffffff !important;
        font-size: 0.875rem !important;
        font-weight: 750 !important;
        text-decoration: none !important;
        border-radius: 14px !important;
        box-sizing: border-box !important;
        transition: background-color 0.15s ease, border-color 0.15s ease;
    }

    .hero-mobile-action-secondary {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        width: 100% !important;
        min-height: 44px !important;
        padding: 0.7rem 1.25rem !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.16) !important;
        color: #ffffff !important;
        font-size: 0.825rem !important;
        font-weight: 700 !important;
        text-decoration: none !important;
        border-radius: 14px !important;
        box-sizing: border-box !important;
        transition: background-color 0.15s ease, border-color 0.15s ease;
    }
}

/* Resultados da pesquisa */
.hero-search-results {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0.75rem;
    text-align: left;
    z-index: 99999;
    box-sizing: border-box;
    transform: translate3d(0, 0, 10px);
}

.hero-search-results::-webkit-scrollbar {
    width: 6px;
}
.hero-search-results::-webkit-scrollbar-track {
    background: transparent;
}
.hero-search-results::-webkit-scrollbar-thumb {
    background-color: rgba(15, 23, 42, 0.15);
    border-radius: 9999px;
}

.hero-result-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #ffffff;
    border-radius: 16px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    transition: border-color 0.15s ease;
    text-decoration: none;
}

.hero-result-card:hover {
    border-color: var(--primary);
}

.hero-result-img {
    width: 64px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background-color: #f1f5f9;
    flex-shrink: 0;
}

.hero-result-fallback-img {
    width: 64px;
    height: 48px;
    border-radius: 8px;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hero-result-info {
    flex: 1;
    min-width: 0;
}

.hero-result-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-result-address {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.hero-result-btn {
    background-color: var(--primary);
    color: #ffffff !important;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-button);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.15s ease;
}

.hero-result-btn:hover {
    background-color: var(--primary-hover);
}



