/* =====================================================
   HVLS Projects — Frontend CSS
   Colors: #00285A (blue) | #FE7302 (orange)
   Prefix: .hvls-
   ===================================================== */

/* ── CSS Variables ── */
.hvls-projects-section {
    --hvls-blue:      #00285A;
    --hvls-orange:    #FE7302;
    --hvls-blue-lt:   rgba(0, 40, 90, 0.06);
    --hvls-orange-lt: rgba(254, 115, 2, 0.08);
    --hvls-white:     #ffffff;
    --hvls-bg:        #f5f7fa;
    --hvls-border:    #e2e7ef;
    --hvls-text:      #1a2d45;
    --hvls-muted:     #6b7a8d;
    --hvls-radius:    12px;
    --hvls-shadow:    0 4px 24px rgba(0,40,90,.10);
    --hvls-trans:     all .28s cubic-bezier(.4,0,.2,1);
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    box-sizing: border-box;
}
.hvls-projects-section *, .hvls-projects-section *::before, .hvls-projects-section *::after {
    box-sizing: inherit;
}

/* ── Section Header ── */
.hvls-section-header {
    text-align: center;
    padding: 0 16px 40px;
    max-width: 680px;
    margin: 0 auto;
}
.hvls-subheading {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--hvls-orange);
    margin: 0 0 12px;
}
.hvls-heading {
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 800;
    color: var(--hvls-blue);
    line-height: 1.2;
    margin: 0 0 14px;
}
.hvls-desc {
    font-size: 15px;
    color: var(--hvls-muted);
    line-height: 1.7;
    margin: 0 0 16px;
}
.hvls-header-divider {
    width: 48px;
    height: 3px;
    background: var(--hvls-orange);
    border-radius: 2px;
    margin: 0 auto;
}

/* ── Main Layout ── */
.hvls-main-wrap {
    display: grid;
    grid-template-columns: 255px 1fr;
    gap: 0;
    background: var(--hvls-white);
    border-radius: var(--hvls-radius);
    box-shadow: var(--hvls-shadow);
    overflow: hidden;
    min-height: 500px;
    align-items: start;
}

/* ── Sidebar ── */
.hvls-sidebar {
    background: var(--hvls-white);
    border-right: 1.5px solid var(--hvls-border);
    position: sticky;
    top: 80px;         /* adjust for sticky header */
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    align-self: start;
}
.hvls-sidebar::-webkit-scrollbar { width: 4px; }
.hvls-sidebar::-webkit-scrollbar-track { background: transparent; }
.hvls-sidebar::-webkit-scrollbar-thumb { background: var(--hvls-border); border-radius: 2px; }

.hvls-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hvls-cat-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    cursor: pointer;
    border-left: 4px solid transparent;
    transition: var(--hvls-trans);
    user-select: none;
    position: relative;
}
.hvls-cat-item::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) scaleX(0);
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 10px solid var(--hvls-orange);
    transition: transform .22s ease;
    transform-origin: right center;
}
.hvls-cat-item:hover {
    background: var(--hvls-orange-lt);
    border-left-color: var(--hvls-orange);
}
.hvls-cat-item.is-active {
    background: var(--hvls-blue);
    border-left-color: var(--hvls-orange);
}
.hvls-cat-item.is-active::after {
    transform: translateY(-50%) scaleX(1);
}
.hvls-cat-item.is-active .hvls-cat-text strong,
.hvls-cat-item.is-active .hvls-cat-text small { color: var(--hvls-white); }
.hvls-cat-item.is-active .hvls-cat-icon { color: var(--hvls-orange); }

.hvls-cat-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hvls-blue);
    transition: color .2s;
}
.hvls-cat-icon svg, .hvls-cat-icon img {
    display: block;
    max-width: 100%;
    max-height: 100%;
}
.hvls-cat-item:hover .hvls-cat-icon { color: var(--hvls-orange); }

.hvls-cat-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.hvls-cat-text strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--hvls-text);
    line-height: 1.3;
    transition: color .2s;
}
.hvls-cat-text small {
    font-size: 11px;
    color: var(--hvls-muted);
    transition: color .2s;
}

/* ── Content Area ── */
.hvls-content-area {
    padding: 32px 36px;
    min-height: 500px;
}

.hvls-cat-panel {
    display: none;
    animation: hvlsFadeIn .3s ease;
}
.hvls-cat-panel.is-active { display: block; }

@keyframes hvlsFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Project Entry ── */
.hvls-project-entry {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1.5px solid var(--hvls-border);
}
.hvls-project-entry:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* ── Project Top (info) ── */
.hvls-project-top {
    margin-bottom: 24px;
}

.hvls-project-cat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: var(--hvls-orange-lt);
    border-radius: 10px;
    color: var(--hvls-orange);
    margin-bottom: 14px;
}
.hvls-project-cat-icon svg, .hvls-project-cat-icon img { display: block; }

.hvls-project-heading {
    font-size: clamp(20px, 3vw, 30px);
    font-weight: 800;
    color: var(--hvls-text);
    margin: 0 0 14px;
    line-height: 1.25;
}

.hvls-project-desc {
    font-size: 14px;
    line-height: 1.75;
    color: var(--hvls-muted);
}
.hvls-project-desc p { margin: 0 0 10px; }
.hvls-project-desc p:last-child { margin-bottom: 0; }

/* ── Featured images (top 2) ── */
.hvls-project-featured-imgs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.hvls-feat-img {
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
}
.hvls-feat-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.hvls-feat-img:hover img { transform: scale(1.04); }

/* ── Meta Bar ── */
.hvls-project-meta-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    border: 1.5px solid var(--hvls-border);
    border-radius: 10px;
    padding: 16px 24px;
    margin-bottom: 24px;
    background: var(--hvls-bg);
}

.hvls-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 130px;
}

.hvls-meta-sep {
    width: 1px;
    height: 40px;
    background: var(--hvls-border);
    margin: 0 20px;
    flex-shrink: 0;
}

.hvls-meta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hvls-muted);
}

.hvls-meta-texts {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.hvls-meta-label {
    font-size: 11px;
    color: var(--hvls-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 500;
}
.hvls-meta-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--hvls-text);
}

/* ── Divider ── */
.hvls-divider {
    height: 1.5px;
    background: var(--hvls-border);
    margin: 0 0 24px;
    border: none;
}

/* ── Gallery Grid ── */
.hvls-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.hvls-gal-cell { display: flex; flex-direction: column; gap: 6px; }

.hvls-gal-img-wrap {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: #dde3ec;
}
.hvls-gal-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hvls-gal-name {
    font-size: 12px;
    color: var(--hvls-muted);
    text-align: center;
    margin: 0;
    line-height: 1.4;
    font-weight: 500;
}

/* ── No projects message ── */
.hvls-no-projects {
    padding: 40px;
    text-align: center;
    color: var(--hvls-muted);
    font-size: 15px;
}

/* ── Responsive ── */

/* Large screens (≤ 1200px) */
@media (max-width: 1200px) {
    .hvls-main-wrap { grid-template-columns: 230px 1fr; }
    .hvls-content-area { padding: 28px 28px; }
    .hvls-gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Tablet (≤ 1024px) */
@media (max-width: 1024px) {
    .hvls-main-wrap {
        grid-template-columns: 1fr;
    }
    .hvls-sidebar {
        position: static;
        max-height: none;
        border-right: none;
        border-bottom: 1.5px solid var(--hvls-border);
        overflow-x: auto;
        overflow-y: hidden;
    }
    .hvls-cat-list {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        padding: 0 12px;
        min-width: max-content;
    }
    .hvls-cat-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px;
        padding: 14px 16px;
        border-left: none;
        border-bottom: 3px solid transparent;
        flex-shrink: 0;
    }
    .hvls-cat-item::after { display: none; }
    .hvls-cat-item:hover { border-bottom-color: var(--hvls-orange); border-left-color: transparent; }
    .hvls-cat-item.is-active { background: var(--hvls-blue); border-bottom-color: var(--hvls-orange); }
    .hvls-cat-text { align-items: center; }
    .hvls-content-area { padding: 24px 20px; }
}

/* Mobile (≤ 768px) */
@media (max-width: 768px) {
    .hvls-project-top { grid-template-columns: 1fr; }
    .hvls-project-featured-imgs { grid-template-columns: 1fr 1fr; }
    .hvls-gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .hvls-project-meta-bar { flex-direction: column; align-items: flex-start; gap: 14px; }
    .hvls-meta-sep { width: 100%; height: 1px; margin: 0; }
    .hvls-content-area { padding: 20px 16px; }
    .hvls-cat-item { padding: 12px 12px; }
    .hvls-cat-text strong { font-size: 12px; }
}

/* XS (≤ 480px) */
@media (max-width: 480px) {
    .hvls-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .hvls-project-featured-imgs { grid-template-columns: 1fr; }
    .hvls-feat-img:last-child { display: none; }
    .hvls-section-header { padding-bottom: 28px; }
    .hvls-cat-icon { width: 32px; height: 32px; }
}
