/* ============================================================
   PROJECTS SECTION — bento grid (layout inspired by "Why Camp?")
   ============================================================ */
.projects-section {
    position: relative;
    background-color: #000000;
    padding: 90px 20px 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.projects-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.5rem, 7vw, 6rem);
    line-height: 1;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #ffffff;
    text-align: center;
    margin: 0 0 50px;
    opacity: 0;
}

.projects-heading span {
    color: #d4af37;
}

.projects-grid {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 190px;
    grid-auto-flow: dense;
    gap: 22px;
}

.proj-card.size-big {
    grid-column: span 2;
    grid-row: span 2;
}

.proj-card.size-wide {
    grid-column: span 2;
    grid-row: span 1;
}

.proj-card.size-normal {
    grid-column: span 1;
    grid-row: span 1;
}

.proj-card {
    position: relative;
    border-radius: 16px;
    cursor: pointer;
    overflow: hidden;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.12) 0%,
            rgba(255, 255, 255, 0.03) 60%,
            rgba(212, 175, 55, 0.05) 100%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5),
        0 10px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 2px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end; /* Aligns content nicely since icons are removed */
    padding: 24px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.4s ease;
}

.proj-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.08) 0%,
            rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    border-radius: 16px 16px 0 0;
}

.proj-card:hover,
.proj-card:focus-visible {
    transform: translateY(-6px);
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.22) 0%,
            rgba(255, 255, 255, 0.08) 100%);
    box-shadow: 0 0 0 2px #d4af37,
        0 25px 50px rgba(0, 0, 0, 0.7),
        inset 0 1px 2px rgba(255, 255, 255, 0.6);
    outline: none;
}

.proj-card-icon {
    width: 26%;
    max-width: 64px;
    color: #d4af37;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
    transition: transform 0.4s ease;
}

.proj-card.size-big .proj-card-icon {
    max-width: 84px;
}

.proj-card:hover .proj-card-icon {
    transform: scale(1.08);
}

.proj-card-icon svg {
    width: 100%;
    height: 100%;
}

.proj-card-overlay {
    position: relative; /* Changed from absolute since cards no longer have centered icons */
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.proj-card-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 0.5px;
    color: #d4af37;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
    margin: 0;
    transition: color 0.3s ease;
}

.proj-card.size-wide .proj-card-title {
    font-size: 2rem;
}

.proj-card.size-big .proj-card-title {
    font-size: 2.6rem;
    line-height: 1.05;
}

.proj-card-cta {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: #ffffff;
    text-transform: uppercase;
    opacity: 0.7;
    transform: translateY(0);
    transition: opacity 0.3s ease, color 0.3s ease;
}

.proj-card:hover .proj-card-cta,
.proj-card:focus-visible .proj-card-cta {
    opacity: 1;
    color: #d4af37;
}

@media (max-width: 900px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 175px;
        gap: 16px;
    }

    .proj-card.size-wide {
        grid-column: span 2;
    }
}

@media (max-width: 560px) {
    .proj-card,
    .proj-card.size-big,
    .proj-card.size-wide,
    .proj-card.size-normal {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 220px;
        gap: 14px;
    }

    .proj-card.size-big .proj-card-title {
        font-size: 1.3rem;
    }
}

/* ============================================================
   PROJECT DETAIL PANEL
   ============================================================ */
.project-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.project-panel-overlay.active {
    visibility: visible;
    pointer-events: auto;
}

.project-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    width: 92%;
    max-width: 1100px;
    height: 82vh;
    max-height: 720px;
    background-color: #fdf6e3;
    border-radius: 28px;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.project-panel.active {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
}

.project-panel-inner {
    position: relative;
    height: 100%;
}

.project-panel-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 5;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.4);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: #0b0b0b;
    line-height: 1;
    transition: background 0.25s ease, transform 0.25s ease;
}

.project-panel-close:hover {
    background: #f5e9c8;
    transform: scale(1.08);
}

.project-panel-body {
    display: flex;
    height: 100%;
}

.project-panel-left {
    flex: 1 1 56%;
    max-width: 56%;
    padding: 54px 20px 40px 50px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-height: 0;
}

.project-panel-reveal {
    opacity: 0;
}

.project-panel-eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #b8860b;
    font-weight: 700;
    margin: 0 0 10px;
}

.project-panel-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    line-height: 1.05;
    letter-spacing: 1px;
    color: #0b0b0b;
    margin: 0 0 18px;
    text-transform: uppercase;
}

.project-panel-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px;
}

.project-panel-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 30px;
    padding: 6px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0b0b0b;
}

.project-panel-tag svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.project-panel-overview-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin: 0 0 20px;
}

.project-panel-scrolldown {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(11, 11, 11, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #ffffff;
    transition: transform 0.3s ease, background 0.3s ease;
}

.project-panel-scrolldown:hover {
    background: #f5e9c8;
    transform: translateY(3px);
}

.project-panel-scrolldown svg {
    width: 16px;
    height: 16px;
}

.project-panel-overview {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #333333;
    margin: 0;
}

.project-panel-scroll {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-right: 6px;
    min-height: 0;
}

.project-panel-scroll::-webkit-scrollbar {
    display: none;
}

.project-panel-group-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    color: #b8860b;
    margin: 18px 0 8px;
    text-transform: uppercase;
}

.project-panel-features {
    margin: 0 0 6px;
    padding-left: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #333333;
    line-height: 1.6;
}

.project-panel-features li {
    margin-bottom: 8px;
}

.project-panel-right {
    flex: 1 1 44%;
    max-width: 44%;
    background: linear-gradient(160deg, #fbeecb 0%, #fdf6e3 60%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-panel-graphic {
    position: relative;
    width: 260px;
    height: 260px;
}

.project-panel-circle-wrap {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.project-panel-half {
    position: absolute;
    left: 0;
    width: 100%;
    height: 50%;
    display: block;
    text-decoration: none;
    cursor: pointer;
    /* Smooth transition for size, position, and background color */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.35s ease,
                filter 0.35s ease,
                z-index 0s ease;
    z-index: 1;
}

.project-panel-half.half-top {
    top: 0;
    background: #d4af37;
    transform-origin: bottom center; /* Expands outward from the middle split line */
}

.project-panel-half.half-bottom {
    bottom: 0;
    background: #0b0b0b;
    transform-origin: top center; /* Expands outward from the middle split line */
}

/* Hover effects: Scales the entire half-section up */
.project-panel-half.half-top:hover {
    transform: scale(1.08); /* Scales up the entire top half */
    background: #e2bd42;   /* Optional: slight lighten on hover */
    z-index: 3;            /* Brings the hovered half to the front */
}

.project-panel-half.half-bottom:hover {
    transform: scale(1.08); /* Scales up the entire bottom half */
    background: #1a1a1a;   /* Optional: slight lighten on hover */
    z-index: 3;            /* Brings the hovered half to the front */
}

/* Keep icon size consistent or let it center naturally without distorting */
.project-panel-half-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 34%;
    height: 34%;
    pointer-events: none;
    transition: color 0.35s ease;
}

.project-panel-half.half-top:hover .project-panel-half-icon {
    color: #0b0b0b;
}

.project-panel-half.half-bottom:hover .project-panel-half-icon {
    color: #d4af37;
}

.project-panel-half.is-disabled {
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.3) brightness(0.85);
}

.project-panel-half-icon svg {
    width: 100%;
    height: 100%;
}

@media (max-width: 860px) {
    .project-panel {
        width: 94%;
        height: 86vh;
        max-height: none;
    }

    .project-panel-body {
        flex-direction: column;
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .project-panel-body::-webkit-scrollbar {
        display: none;
    }

    .project-panel-left,
    .project-panel-right {
        max-width: 100%;
        flex: none;
    }

    .project-panel-left {
        padding: 60px 24px 30px;
        order: 2;
    }

    .project-panel-right {
        order: 1;
        min-height: 220px;
        padding: 30px 0;
    }

    .project-panel-graphic {
        width: 180px;
        height: 180px;
    }

    .project-panel-scroll {
        overflow-y: visible;
    }

    .project-panel-scrolldown {
        display: none;
    }
}

@media (max-width: 480px) {
    .project-panel-title {
        font-size: 1.6rem;
    }

    .project-panel-left {
        padding: 56px 16px 24px;
    }

    .project-panel-graphic {
        width: 150px;
        height: 150px;
    }
}