/* ── HseHubNetwork.razor ── */
/* Movido verbatim (tema oscuro/cian; la unificación de theming se hará en otra fase — ver plan
   design-tokens). HseHubNetwork.razor también tiene un HseHubNetwork.razor.css con CSS isolation
   propio, que NO se toca aquí — esto es solo el <style> inline que había en el .razor. */

/* Full-screen page. Scrollbar hiding is scoped to this page's own container so it
   can never affect the left sidebar or other pages. The scroll-lock on the html/body
   elements (and the app-wide .content-inner) is gated behind .hseHub-connect-active — a
   class added on init and removed in Dispose — so it is fully torn down when leaving
   the page; otherwise the sidebar loses its scroll after visiting HSE_HUB Connect, even
   after navigating to another menu. */
.hseHub-network-page,
.hseHub-network-page * {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
.hseHub-network-page::-webkit-scrollbar,
.hseHub-network-page *::-webkit-scrollbar {
    display: none !important;
}

/* overscroll-behavior: none — a sideways two-finger swipe must rotate the ring, not
   trigger the browser's horizontal overscroll / back-navigation gesture. */
.hseHub-connect-active {
    overscroll-behavior: none !important;
    overflow: hidden !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    position: fixed;
    width: 100%;
}

.hseHub-connect-active .content-inner {
    overflow: hidden !important;
}

/* Scoped to the page root — NOT :root. `--card-height` collides with Bootstrap's own
   `.card { height: var(--card-height) }`, so declaring it on :root leaked 60vh into every
   .card across the whole app (see WARNINGS §43). The carousel consumers (.scroll-wrapper,
   .carousel-item, .carousel-spacer, header) are all descendants of .hseHub-network-page and
   still inherit these vars. */
/* Card size is driven by BOTH axes so the ring never overflows: vh keeps it inside
   short screens, vw keeps the three visible cards inside narrow ones, and the px
   bounds stop it degenerating on extremes. */
.hseHub-network-page {
    /* Leaves room under the ring for the pinned tagline on every screen size. */
    --card-height: clamp(240px, min(66vh, 52vw), 700px);
    --card-width: calc(var(--card-height) * 0.64);
    --stage-height: calc(var(--card-height) + 5vh);
    --header-font-size: clamp(2.5rem, 8vh, 4rem);
}

/* 3D turntable stage: the cards are absolutely positioned on a circle and laid out
   by carousel.js (rotation-driven), so there is no horizontal scrolling anymore —
   scrolling now rotates the ring and no card can scroll out of view. */
.scroll-wrapper {
    display: block !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    height: var(--stage-height) !important;
    visibility: visible !important;
    /* Hidden until carousel.js has placed the cards on the ring (.is-laid-out),
       so they never flash stacked in the middle of the stage. */
    opacity: 0;
    transition: opacity 0.4s ease;
    perspective: 2200px !important;
    transform-style: preserve-3d !important;
}
.scroll-wrapper::-webkit-scrollbar {
    display: none !important;
}
.carousel-item {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: var(--card-width) !important;
    height: var(--card-height) !important;
    margin-left: calc(var(--card-width) / -2) !important;
    margin-top: calc(var(--card-height) / -2) !important;
    visibility: visible !important;
    display: block !important;
    will-change: transform, opacity;
}
.scroll-wrapper.is-laid-out {
    opacity: 1;
}
.menu-container {
    display: block !important;
    width: 100% !important;
    overflow: hidden !important;
    margin-top: 0 !important;
}
/* Header (logos + HSE_HUB title) removed; the tagline now sits under the carousel.
   It is pinned to the bottom of #main-view rather than left in the flex flow: any
   theme rule that makes the carousel column grow would otherwise push it past the
   page's overflow:hidden edge and it would simply not be visible. */
#main-view {
    position: relative !important;
}

/* Anchored just under the ring (padding-top of #main-view + stage height) rather than
   to the bottom of the viewport, so it always sits right below the cards instead of
   drifting to the very bottom of tall screens. */
.carousel-footer {
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    /* Sits under the ring, but never past the bottom edge: on a short viewport the
       min() clamps it to a position that still leaves room for the text itself. */
    top: min(calc(2vh + var(--stage-height) + 3vh), calc(100vh - 8vh)) !important;
    bottom: auto !important;
    width: 100% !important;
    text-align: center !important;
    z-index: 20 !important;
    padding: 0 4vw !important;
    box-sizing: border-box !important;
    pointer-events: none;
}

/* Never truncated: the line wraps instead of being cut with an ellipsis, and both the
   size and the tracking shrink with the narrower of the two axes so it fits any screen. */
.carousel-footer p {
    color: var(--hseHub-white) !important;
    opacity: 0.95 !important;
    letter-spacing: clamp(1px, min(0.35vw, 0.35vh), 4px) !important;
    font-size: clamp(0.55rem, min(1.5vh, 2.2vw), 0.85rem) !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
    margin: 0 auto !important;
}
.controls-hint {
    position: fixed !important;
    bottom: 30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-family: var(--hseHub-font-sans) !important;
    font-size: 0.7rem !important;
    letter-spacing: 4px !important;
    text-transform: uppercase !important;
    z-index: 100 !important;
    pointer-events: none !important;
}
/* Carousel + tagline sit near the top of the viewport (flex-start + small padding)
   instead of being centred, so nothing is pushed out of the overflow:hidden page. */
#main-view {
    height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    padding-top: 2vh !important;
    overflow: hidden !important;
}
.hseHub-network-page {
    height: 100vh !important;
    overflow: hidden !important;
}

/* No drop shadow on the cards (see also .card-front in HseHubNetwork.razor.css). */
.carousel-item .card-inner {
    overflow: hidden;
    border: none;
    border-radius: min(18px, 3vh);
    box-shadow: none !important;
}

.carousel-item .card-front {
    box-shadow: none !important;
}
.carousel-item .image-wrapper {
    height: 100% !important;
    width: 100% !important;
    position: absolute;
    inset: 0;
}
/* Translucent text panel floating over the full-bleed image. */
.carousel-item .project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    background: rgba(8, 16, 28, 0.42);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    width: 100%;
    padding: 4px 12px 5px;
    text-align: left;
    transition: background 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    transform: translateY(0);
    opacity: 1;
}
.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}
.hassi-img {
    object-position: 25% 45%;
}
.carousel-item:hover .project-info {
    transform: translateY(0);
    opacity: 1;
    background: rgba(8, 16, 28, 0.58);
}

/* No clamping/ellipsis: the description always shows in full, wrapping onto as many
   lines as it needs — the panel grows downwards over the photo. */
.carousel-item .project-info p {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 400 !important;
    font-size: clamp(0.55rem, 1.15vh, 0.7rem) !important;
    line-height: 1.25 !important;
    margin-bottom: 0 !important;
    display: block;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

.carousel-item h2 {
    font-size: clamp(0.85rem, 2vh, 1.25rem) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    margin-bottom: 0 !important;
    letter-spacing: 0.5px !important;
}

.carousel-item .project-tag {
    font-size: clamp(0.42rem, 1vh, 0.55rem);
    color: #6F90B1 !important;
    letter-spacing: 1.5px;
    line-height: 1.2;
    margin-bottom: 0;
    font-weight: 500;
}

/* Circular arrow CTA (see HseHubNetwork.razor.css for the base button styles). */
.carousel-item .card-footer {
    display: flex !important;
    justify-content: center !important;
    padding-top: 3px !important;
}
/* The full arrow button lives here, not only its overrides. HseHubNetwork.razor.css is
   CSS-isolation, and _Host.cshtml only links Tr.HSE_HUB.Web.styles.css — the app's own
   scoped bundle, which does NOT contain this RCL's scoped styles (the RCL bundle
   _content/Tr.HSE_HUB.Components/Tr.HSE_HUB.Components.styles.css is never linked). So any
   rule that only exists in a .razor.css of this library never reaches the browser: that
   is why the tag/name/arrow colours appeared to be lost after merging. */
.carousel-item .view-details {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 0;
    width: clamp(20px, 3vh, 26px);
    height: clamp(20px, 3vh, 26px);
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #6F90B1 !important;
    color: #FFFFFF !important;
    transition: background 0.3s ease, transform 0.3s ease;
}

.carousel-item .view-details svg {
    width: 60%;
    height: 60%;
    display: block;
    stroke: #FFFFFF !important;
}

.carousel-item:hover .view-details {
    background: #85a6c6 !important;
    transform: translateX(3px);
}

.carousel-spacer {
    display: none !important;
}
