﻿/* ==========================================================================
   Vulcraft Resources — Combined Stylesheet (single source of truth)
   --------------------------------------------------------------------------
   Merged from:
   - resource-page.css
   - resource-display.css

   Goals:
   - Keep styles organized by feature area
   - Preserve the Verco-like visual system (cards + icon tiles)
   - Preserve Vulcraft behavior (filter sidebar + sortable results)
   - Prevent “hidden” panels from occupying layout space (landing/results switcher)

   Notes:
   - Blocks marked UNUSED are currently not referenced by index.cshtml /
     _ResourceListPartial.cshtml, but are kept (commented) for rollback.
   ========================================================================== */

/* ==========================================================================
   Global / Base
   ========================================================================== */

:root {
    --vvg-green: #006325;
    --vvg-green-dark: #213b34;
    --vvg-cream: #f5f4f0;
    --resource-icon-size: 38px;
    --resource-icon-hover-size: 46px;
    --transition-fast: 180ms;
    --transition-med: 250ms;
    --transition-slow: 350ms;
}
.main-content {
    min-height: 0;
}
a {
    text-decoration: none !important; /* site-wide override (intentional) */
}
.wsmenu-list {
    box-shadow: none;
}
/* Accessibility: keep focus rings visible when keyboarding */
:focus-visible {
    outline: 2px solid rgba(33, 59, 52, 0.65);
    outline-offset: 3px;
}

/* ==========================================================================
   Banner / Hero
   ========================================================================== */

.banner {
    margin: 0;
}

/* Mobile-first typography */
.intro-text {
    color: #ffffff;
    font-size: 0.75em;
    letter-spacing: 0.15em;
}

.banner-title {
    color: #ffffff;
    font-family: Termina;
    font-weight: 900;
    letter-spacing: 1px;
    font-size: 2em;
}

/* ≥576px */
@media (min-width: 576px) {
    .intro-text {
        font-size: 0.8em;
    }

    .banner-title {
        font-size: 2.25em;
    }
}

/* ≥768px */
@media (min-width: 768px) {
    .intro-text {
        font-size: 1em;
    }

    .banner-title {
        font-size: 2.75em;
    }
}

/* ≥992px */
@media (min-width: 992px) {
    .intro-text {
        font-size: 1.2em;
    }

    .banner-title {
        font-size: 3.25em;
    }
}

/* ≥1200px */
@media (min-width: 1200px) {
    .intro-text {
        font-size: 1.5em;
    }

    .banner-title {
        font-size: 3.75em;
    }
}

/* ≥1400px */
@media (min-width: 1400px) {
    .intro-text {
        font-size: 1.7em;
    }

    .banner-title {
        font-size: 4.25em;
    }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.allbtn {
    background: var(--vvg-green);
    color: #ffffff;
    text-decoration: none !important;
    font-family: "FSIndustrie-Bold";
    text-transform: uppercase;
    border-radius: 25px;
    padding: 8px 15px 8px;
    font-size: 1em;
    transition: background var(--transition-med), color var(--transition-med);
    white-space: nowrap;
    border-color: transparent;
}

    .allbtn:hover {
        background: #2c612c;
        color: #ffffff;
        text-decoration: underline !important;
    }

/* --------------------------------------------------------------------------
   UNUSED (kept for potential “show more” / pagination)
   -------------------------------------------------------------------------- */
/*
.show-more{
    background: var(--vvg-cream);
    color: var(--vvg-green);
    border: solid 1px var(--vvg-green);
    border-radius: 50px;
    padding: 6px 18px;
    transition: .5s;
}
.show-more:hover{
    background: #ffffff;
    color: var(--vvg-green-dark);
    border: solid 1px var(--vvg-green-dark);
}
*/

/* ==========================================================================
   Landing ↔ Results panel switcher
   --------------------------------------------------------------------------
   Critical behavior:
   - When hidden, a panel MUST NOT consume height (prevents “below the fold”)
   - When visible, allow a soft fade/slide
   ========================================================================== */

.section-switcher {
    position: relative;
}

/* Default = collapsed until .is-visible applied */
.section-panel {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: max-height var(--transition-med) ease, opacity var(--transition-med) ease, transform var(--transition-med) ease;
}

    /* Hidden = explicit collapsed */
    .section-panel.is-hidden {
        max-height: 0;
        opacity: 0;
        transform: translateY(10px);
        pointer-events: none;
    }

    /* Visible = expanded */
    .section-panel.is-visible {
        max-height: 20000px; /* avoid clipping “tall” result sets */
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

/* Reduced motion: no animation, just the correct layout behavior */
@media (prefers-reduced-motion: reduce) {
    .section-panel {
        transition: none !important;
        transform: none !important;
    }
}
/* ===========================
   RESULTS SWAP: prevent flash
   - While swapping HTML, disable panel transitions so we don't animate from 0-height.
   - Then JS will perform a controlled fade-in.
   =========================== */

body.is-results-swapping .section-panel {
    transition: none !important;
}

#result-section {
    transition: opacity 250ms ease;
}
/* ===========================
   AJAX swap smoothing
   =========================== */

/* Hide results during HTML swap, then fade in */
#result-section {
    transition: opacity 250ms ease;
}

    #result-section.is-swapping {
        opacity: 0;
    }

/* Prevent sidebar filter list flashing removed items during swap */
#descriptorList.is-swapping {
    visibility: hidden;
}
/* --------------------------------------------------------------------------
   UNUSED (older fade-section system)
   Keep commented to avoid two competing visibility systems.
   -------------------------------------------------------------------------- */
/*
.fade-section{
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.fade-section.visible{
    opacity: 1;
    transform: translateY(0);
}
*/

/* ==========================================================================
   “Building Type” section (only for Projects)
   ========================================================================== */

.building-type {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    transition: max-height 320ms ease, opacity 220ms ease, transform 220ms ease;
}

    .building-type.is-visible {
        max-height: 800px;
        opacity: 1;
        transform: translateY(0);
    }

/* ==========================================================================
   Sidebar / Filters
   ========================================================================== */

.sort-title {
    color: #ffffff;
    background-color: var(--vvg-green-dark);
    padding: 0.5em 1em;
    margin-right: 0;
    transition: margin-right 300ms ease;
}
#customSidebar.collapsed .sort-title {
    margin-right: 3em;
}
.form-check-input[type=checkbox] {
    border-radius: 0;
    border: 2px solid var(--vvg-green-dark);
    margin-left: 0.1em;
    margin-right: 0.5em;
}

.sm-icon {
    width: 1.1em;
    height: 1.1em;
    vertical-align: bottom;
    margin-right: 0.5em;
}
.smr-icon {
    width: 0.9em;
    height: 0.9em;
    vertical-align: bottom;
    margin-right: 0.5em;
}
.md-icon {
    width: 1.2em;
    height: 1.2em;
    vertical-align: bottom;
    margin-right: 0.5em;
}

/* --------------------------------------------------------------------------
   Responsive sidebar behavior
   ≤1200px: bottom drawer
   ≥1201px: sticky left sidebar with collapse-to-rail
   -------------------------------------------------------------------------- */

@media (max-width: 1200px) {
    #customSidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background-color: #f8f9fa;
        z-index: 1050;
        overflow: hidden;
        box-shadow: 0 -2px 4px rgba(0,0,0,0.2);
        transition: height 0.5s ease-in-out, transform 0.5s ease-in-out;
    }

        #customSidebar.collapsed {
            height: calc(100vh - 160px);
            transform: translateY(0);
            overflow-y: auto;
        }
        .sidebar {
            background: #ffffff;
        }
    .sidebar-header {
        text-align: center;
        padding: 10px;
        color: var(--vvg-green-dark);
        font-size: 1.2em;
        font-weight: bold;
    }
    .sidebar-header {
        background: #ffffff;
        position: relative;
        z-index: 3;
    }
    .sidebar-body {
        display: none;
        padding: 2em 5em;
    }

    #customSidebar.collapsed .sidebar-body {
        display: block;
    }

    .main-content {
        transition: filter 0.5s ease;
    }

        .main-content.expanded {
            filter: blur(4px);
        }

    #toggleButton {
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--vvg-green-dark);
        border: none;
        background: none;
        font-size: 1.2em;
        cursor: pointer;
        z-index: 1100;
        transition: transform 0.3s ease;
    }

    #customSidebar .fa-times {
        display: none;
    }

    #customSidebar .fa-sliders-h {
        display: block;
    }

    #customSidebar.collapsed .fa-times {
        display: block;
    }

    #customSidebar.collapsed .fa-sliders-h {
        display: none;
    }

    /* Title tag is not present in current markup */
    .title-tag {
        display: none;
    }

    /* Tighten banner title for smaller devices */
    .banner-title {
        font-size: 2.5em;
    }
}

@media (min-width: 1201px) {
    .unavailable {
        color: #dcdcdc;
    }

    #descriptorList {
        padding-top: 3em;
    }

    .fa-times {
        margin-left: 0.5em;
        padding-top: 0.1em;
    }

    .sidebar.collapsed .fa-times {
        display: none;
    }

    .sidebar:not(.collapsed) .fa-times {
        display: block;
    }

    .sidebar.collapsed .fa-sliders-h {
        display: block;
    }

    .sidebar:not(.collapsed) .fa-sliders-h {
        display: none;
    }

    .fa-sliders-h {
        margin-left: 1em;
        transform: rotate(-90deg);
        transition: all .25s ease-out;
    }

    .sidebar.collapsed .filter-btn {
        transform: rotate(-90deg);
        transform-origin: top right;
        transition: all .25s ease-out;
        margin-right: 40px !important;
    }

    .filter-btn {
        display: inline-flex;
        float: right;
        margin-right: 11px;
        font-family: Termina;
        font-size: 1.2em;
        font-weight: 600;
        padding-top: 10px;
        text-decoration: none;
    }

    #customSidebar:hover .filter-btn {
        margin-right: 11px;
    }

    #customSidebar {
        width: 300px;
        overflow: visible;
        padding: 1em;
        box-shadow: 2px 2px 2px rgba(0,0,0,0.1);
        transition: width 0.5s ease;
        position: relative;
        top: auto;
        height: auto; /* match main-content height */
        align-self: stretch; /* fill the flex row height */
    }
    .sidebar-sticky-shell {
        width: 100%;
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
        transition: transform 0.3s ease, opacity 0.2s ease, visibility 0s linear 0s;
    }
        #customSidebar::-webkit-scrollbar {
            width: 4px;
            height: 4px;
            background: transparent;
        }

        #customSidebar::-webkit-scrollbar-thumb {
            background-color: transparent;
            border-radius: 4px;
            transition: background-color 0.3s ease;
        }

        #customSidebar:hover::-webkit-scrollbar-thumb {
            background-color: rgba(0,0,0,0.4);
        }

        #customSidebar:hover::-webkit-scrollbar {
            background: rgba(0,0,0,0.1);
        }

        #customSidebar:hover {
            scrollbar-width: thin;
            scrollbar-color: rgba(0,0,0,0.4) transparent;
        }
    #customSidebar .sidebar-header {
        background: #ffffff;
        position: relative;
        z-index: 3;
    }

    #customSidebar .sidebar-sticky-shell {
        position: relative;
        z-index: 1;
    }

    #customSidebar .filter-btn,
    #customSidebar #toggleButton {
        position: relative;
        z-index: 4;
    }

    /* Sticky filters only after filters are active */
    #customSidebar.has-active-filters .sidebar-sticky-shell {
        position: sticky;
        top: 70px; /* adjust to sit below top nav */
    }

    #customSidebar.has-active-filters .sidebar-header {
        background: #ffffff;
        position: relative;
        z-index: 2;
    }

    #customSidebar.has-active-filters .sidebar-body {
        max-height: calc(100vh - 170px);
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 0.35em;
        scrollbar-width: thin;
        width: 100%;
        box-sizing: border-box;
    }

        #customSidebar.has-active-filters .sidebar-body::-webkit-scrollbar {
            width: 4px;
        }

        #customSidebar.has-active-filters .sidebar-body::-webkit-scrollbar-thumb {
            background: rgba(0,0,0,0.25);
            border-radius: 4px;
        }
    #customSidebar.has-active-filters #descriptorList {
        padding-top: 10px;
    }

    .container-1920 {
        max-width: 1920px;
        margin: 55px auto 0;
        display: flex;
        align-items: stretch; /* allow equal-height columns */
        position: relative;
        transition: width 0.5s ease;
    }

    .sidebar-body {
        margin-left: 0;
    }

    .sidebar.collapsed .sidebar-sticky-shell {
        transform: translateX(-260px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.25s ease, opacity 0.18s ease, visibility 0s linear 0.25s;
    }
    #customSidebar:not(.collapsed) .sidebar-sticky-shell {
        visibility: visible;
        pointer-events: auto;
        transition-delay: 0.12s, 0.12s, 0s;
    }
    #customSidebar.collapsed {
        width: 60px;
        padding: 2em 0.75em;
        overflow: hidden;
    }

    .main-content {
        flex: 1;
        transition: margin-left 0.5s ease;
    }

        .main-content.expanded {
            margin-left: 0;
        }

    /* ----------------------------------------------------------------------
       UNUSED (desktop title-tag; not present in markup)
       ---------------------------------------------------------------------- */
    /*
    .title-tag{
        display: block;
        font-size: 21px;
        text-align: center;
        transition: all 0.5s ease;
    }
    #customSidebar.collapsed .title-tag{
        font-size: 0px;
        transition: all 0.5s ease;
    }
    */
}

/* ==========================================================================
   Resource Cards (grid results)
   --------------------------------------------------------------------------
   This is the “critical block” that was accidentally deleted.
   ========================================================================== */

/* CARD */
.resource-card {
    position: relative;
    display: block;
    overflow: hidden;
    text-decoration: none;
    border-radius: 4px;
}

    /* IMAGE */
    .resource-card img {
        width: 100%;
        height: auto;
        display: block;
    }

/* GRADIENT OVERLAY */
.resource-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient( to top, rgba(245,244,240,1) 0%, rgba(245,244,240,0.7) 40%, rgba(245,244,240,0) 60% );
    z-index: 1;
}

/* CONTENT WRAPPER
   Cover entire card so flex alignment uses full card.
   Title stays bottom-left; reserves space for icon. */
.resource-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 1.25em 1.25em 1.5em;
    padding-right: calc(1.25em + var(--resource-icon-size) + 0.75em);
}

/* TITLE */
.resource-title {
    margin: 0;
    font-size: 1.1em;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--vvg-green);
    transition: color 300ms ease-in-out;
}
@media (min-width: 992px) and (max-width: 1350px) {
    .resource-title {
        font-size: 1em;
        letter-spacing: 0;
    }
}


/* ICON LINK (bottom-right, “rise and become circle” on hover) */
.icon-link {
    position: absolute;
    right: 1.25em;
    top: calc(100% - 1.5em - var(--resource-icon-size));
    z-index: 3;
    width: var(--resource-icon-size);
    height: var(--resource-icon-size);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--vvg-green);
    color: #ffffff;
    border-radius: 2px;
    font-size: 1em;
    line-height: 1;
    transform: translateY(0);
    transition: top var(--transition-slow) ease-in-out, transform var(--transition-slow) ease-in-out, width var(--transition-slow) ease-in-out, height var(--transition-slow) ease-in-out, border-radius var(--transition-slow) ease-in-out, background-color var(--transition-slow) ease-in-out;
    will-change: top, transform, width, height, border-radius;
}

    /* Glyph scales only */
    .icon-link i {
        transform: scale(1);
        transition: transform var(--transition-slow) ease-in-out;
        will-change: transform;
    }

/* HOVER / FOCUS */
.resource-card:hover .resource-title,
.resource-card:focus-visible .resource-title {
    color: #000000;
}

.resource-card:hover .icon-link,
.resource-card:focus-visible .icon-link {
    /* keep position and size fixed */
    background-color: #213b34;
}

    .resource-card:hover .icon-link i,
    .resource-card:focus-visible .icon-link i {
        transform: scale(1.3);
    }

/* ==========================================================================
   Resource Icon Tiles (top “category” icons)
   ========================================================================== */

.resource-icon-tile {
    height: 100%;
}

.resource-icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition-fast) ease, color var(--transition-fast) ease;
}

/* Icon “canvas” to normalize inconsistent SVG viewBox sizing */
.resource-icon-media {
    width: 100%;
    height: 105px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5em;
}

    .resource-icon-media img {
        width: 38%;
        height: 100%;
        max-width: 135px;
        max-height: 105px;
        object-fit: contain;
        display: block;
    }

    /* Wide variant (not currently used in markup) */
    .resource-icon-media.is-wide img {
        width: 100%;
        max-width: 220px;
    }

/* Label */
.resource-icon-label {
    margin: 0;
    color: #a1cead;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
}

.resource-icon-media,
.resource-icon-label {
    transition: transform var(--transition-fast) ease, color var(--transition-fast) ease;
    transform-origin: center;
}

.resource-icon-desc {
    margin: 0.75rem 0 0;
    color: #ffffff;
    text-align: center;
}

/* Responsive tuning */
@media (min-width: 768px) {
    .resource-icon-media {
        height: 115px;
    }

        .resource-icon-media img {
            max-height: 115px;
        }
}

@media (min-width: 992px) {
    .resource-icon-media {
        height: 120px;
    }

        .resource-icon-media img {
            max-height: 120px;
        }
}

/* Hover / focus */
.resource-icon-link:hover .resource-icon-media,
.resource-icon-link:focus-visible .resource-icon-media,
.resource-icon-link:hover .resource-icon-label,
.resource-icon-link:focus-visible .resource-icon-label {
    transform: scale(1.05);
}

.resource-icon-link:hover .resource-icon-label,
.resource-icon-link:focus-visible .resource-icon-label {
    color: #ffffff;
}

.resource-icon-link:hover .resource-icon-media img,
.resource-icon-link:focus-visible .resource-icon-media img {
    filter: brightness(0) invert(1);
    transition: filter var(--transition-fast) ease;
}

/* Grey out non-slected Product */
.product-muted label {
    color: #c8c8c8;
}


/* ==========================================================================
   Legacy / Currently-unused product listing styles
   ========================================================================== */

/*
#D::before, #B::before, #N::before, #W::before, #V::before{
    content: "";
    display: block !important;
    height: 100px !important;
    margin-top: -150px !important;
}

.productDisplay_wrapper{ border: 1px solid #dcdcdc; }
.productDisplay_wrapper:hover{ box-shadow: 0 0 7px #dcdcdc; }
.productDisplay_wrapper:hover h6{ text-decoration: underline !important; }

.productDisplay_content{
    display: flex;
    align-items: baseline;
}

.productDisplay_content > h6{
    font-family: Termina;
    font-size: 0.9em;
    font-weight: 600;
    text-align: left;
    margin: 15px 5px 10px 10px;
}

.productDisplay_content h6{ margin-right: 10px; }

.productDisplay_content p{
    text-align: right;
    font-size: 0.9em;
    line-height: 1.1em;
    margin-left: auto;
    margin-right: 10px;
}

#productList h3{
    background-color: #d9e8e2;
    padding: 0.75em 0 0.75em 1em;
    margin: 0.75em 0;
    text-transform: uppercase;
}

.product-class-desc{
    color: #ffffff;
    font-weight: bold;
    background: var(--vvg-green-dark);
    text-align: center;
    padding: 7px 15px;
}
*/
