/* ==========================================================================
   Portfolio Showcase — BEM under .pf-showcase
   Converted from React CSS Modules (PortfolioShowcase, CategoryFilter, ProjectSlider)
   ========================================================================== */

/* ---------- Section ---------- */
.pf-showcase {
    width: 100%;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.pf-showcase--visible {
    opacity: 1;
    transform: translateY(0);
}

.pf-showcase__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ---------- Header ---------- */
.pf-showcase__header {
    text-align: center;
    margin-bottom: 3rem;
}

.pf-showcase__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.pf-showcase__title-accent {
    width: 60px;
    height: 3px;
    background: #5B9B4C;
    margin: 0 auto 1.5rem;
}

.pf-showcase__subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #666;
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* ---------- Category Filter ---------- */
.pf-showcase__filter {
    width: 100%;
    margin-bottom: 3rem;
}

.pf-showcase__filter-list {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.pf-showcase__filter-btn {
    position: relative;
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
    overflow: hidden;
}

.pf-showcase__filter-btn:hover {
    color: #1a1a1a;
}

.pf-showcase__filter-btn--active {
    color: #1a1a1a;
}

.pf-showcase__filter-underline {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 70%;
    height: 2px;
    background: #5B9B4C;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pf-showcase__filter-btn:hover .pf-showcase__filter-underline,
.pf-showcase__filter-btn--active .pf-showcase__filter-underline {
    transform: translateX(-50%) scaleX(1);
}

/* ---------- Slider ---------- */
.pf-showcase__slider-wrapper {
    margin-bottom: 3rem;
}

.pf-showcase__slider {
    position: relative;
    width: 100%;
    outline: none;
}

.pf-showcase__slider:focus-visible {
    outline: 2px solid #5B9B4C;
    outline-offset: 4px;
}

/* ---------- Hero ---------- */
.pf-showcase__hero {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    max-height: 800px;
    overflow: hidden;
    background: #1a1a1a;
}

.pf-showcase__hero-image {
    position: relative;
    width: 100%;
    height: 100%;
    opacity: 1;
}

.pf-showcase__hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.pf-showcase__hero-image:hover img {
    transform: scale(1.02);
}

/* Transition: exiting */
.pf-showcase__hero-image--exiting {
    animation: pfFadeOut 0.35s ease forwards;
}

.pf-showcase__hero-image--exiting img {
    transform: scale(1.03);
}

/* Transition: entering */
.pf-showcase__hero-image--entering {
    animation: pfFadeIn 0.35s ease forwards;
}

@keyframes pfFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes pfFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---------- Overlay ---------- */
.pf-showcase__hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.3) 40%,
        rgba(0, 0, 0, 0.1) 70%,
        transparent 100%
    );
    display: flex;
    align-items: flex-end;
    padding: 3rem;
}

.pf-showcase__project-info {
    max-width: 600px;
    transform: translateY(0);
}

.pf-showcase__hero-image--exiting .pf-showcase__project-info {
    animation: pfSlideOut 0.35s ease forwards;
}

.pf-showcase__hero-image--entering .pf-showcase__project-info {
    animation: pfSlideIn 0.35s ease forwards;
}

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

@keyframes pfSlideIn {
    from { transform: translateY(-15px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.pf-showcase__category-tag {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: #5B9B4C;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.pf-showcase__project-name {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.75rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.pf-showcase__project-tagline {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 1.25rem;
    font-weight: 300;
    line-height: 1.5;
}

.pf-showcase__project-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.pf-showcase__project-meta-text {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* ---------- Nav Arrows ---------- */
.pf-showcase__nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.pf-showcase__nav-arrow svg {
    width: 24px;
    height: 24px;
}

.pf-showcase__nav-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
}

.pf-showcase__nav-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.pf-showcase__nav-arrow--prev {
    left: 1.5rem;
}

.pf-showcase__nav-arrow--next {
    right: 1.5rem;
}

/* ---------- Project CTA ---------- */
.pf-showcase__project-cta {
    position: absolute;
    bottom: 3rem;
    right: 3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: #fff;
    color: #1a1a1a;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 10;
}

.pf-showcase__project-cta svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.pf-showcase__project-cta:hover {
    background: #5B9B4C;
    color: #fff;
}

.pf-showcase__project-cta:hover svg {
    transform: translate(3px, -3px);
}

/* ---------- Thumbnails ---------- */
.pf-showcase__thumbnails {
    display: flex;
    gap: 0.75rem;
    padding: 1.5rem 0;
    justify-content: center;
}

.pf-showcase__thumb {
    width: 100px;
    height: 70px;
    padding: 0;
    border: 2px solid transparent;
    background: none;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.pf-showcase__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pf-showcase__thumb:hover {
    opacity: 1;
}

.pf-showcase__thumb:hover img {
    transform: scale(1.1);
}

.pf-showcase__thumb--active {
    border-color: #5B9B4C;
    opacity: 1;
}

/* ---------- Dot Indicators ---------- */
.pf-showcase__dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.5rem 0 1.5rem;
}

.pf-showcase__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #e5e5e5;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.pf-showcase__dot:hover {
    background: #ccc;
}

.pf-showcase__dot--active {
    background: #5B9B4C;
    transform: scale(1.2);
}

/* ---------- Counter ---------- */
.pf-showcase__counter {
    position: absolute;
    top: 2rem;
    right: 2rem;
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    color: rgba(255, 255, 255, 0.9);
    font-family: inherit;
    z-index: 10;
}

.pf-showcase__counter-current {
    font-size: 1.5rem;
    font-weight: 700;
}

.pf-showcase__counter-sep {
    font-size: 1rem;
    opacity: 0.6;
    margin: 0 0.25rem;
}

.pf-showcase__counter-total {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.6;
}

/* ---------- Empty State ---------- */
.pf-showcase__empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    background: #f8f7f4;
    border: 2px dashed #e5e5e5;
}

.pf-showcase__empty p {
    color: #666;
    font-size: 1.125rem;
}

/* ---------- Bottom CTA ---------- */
.pf-showcase__bottom-cta {
    display: flex;
    justify-content: center;
    padding-top: 1rem;
}

.pf-showcase__cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: #1a1a1a;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pf-showcase__cta-button svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.pf-showcase__cta-button:hover {
    background: #5B9B4C;
    color: #fff;
}

.pf-showcase__cta-button:hover svg {
    transform: translateX(4px);
}

.pf-showcase__cta-button:active {
    transform: scale(0.98);
}

/* ==========================================================================
   Theme Override Resets — scoped specificity bump
   Must appear AFTER base styles, BEFORE responsive queries
   ========================================================================== */

/* Section: remove background */
section.pf-showcase {
    background: transparent;
}

/* Headings */
section.pf-showcase .pf-showcase__title {
    font-size: clamp(2rem, 4vw, 3rem) !important;
    font-weight: 700;
    font-family: inherit !important;
    color: #1a1a1a;
    letter-spacing: -0.02em !important;
    line-height: 1.2;
    text-align: center;
    margin: 0 0 1rem;
}

section.pf-showcase .pf-showcase__project-name {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 0.75rem;
}

/* Paragraphs */
section.pf-showcase .pf-showcase__subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #666;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.5;
    margin: 0;
}

section.pf-showcase .pf-showcase__project-tagline {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    letter-spacing: 0.02em;
    line-height: 1.5;
    margin: 0 0 1.25rem;
}

/* Links — normal state */
section.pf-showcase a.pf-showcase__project-cta {
    color: #1a1a1a;
    background: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    opacity: 1;
}

section.pf-showcase a.pf-showcase__cta-button {
    color: #fff;
    background: #1a1a1a;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    opacity: 1;
}

/* Links — hover state */
section.pf-showcase a.pf-showcase__project-cta:hover {
    background: #5B9B4C;
    color: #fff;
    text-decoration: none;
    opacity: 1;
}

section.pf-showcase a.pf-showcase__cta-button:hover {
    background: #5B9B4C;
    color: #fff;
    text-decoration: none;
    opacity: 1;
}

/* Filter buttons */
section.pf-showcase .pf-showcase__filter-btn {
    color: #666;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    letter-spacing: 0.02em;
    background: transparent;
}

section.pf-showcase .pf-showcase__filter-btn:hover {
    color: #1a1a1a;
}

section.pf-showcase .pf-showcase__filter-btn--active {
    color: #1a1a1a;
}

/* Filter list: remove bullets */
section.pf-showcase .pf-showcase__filter-list,
section.pf-showcase .pf-showcase__filter-list li {
    list-style: none;
}

/* ==========================================================================
   Responsive — 1024px
   ========================================================================== */
@media (max-width: 1024px) {
    .pf-showcase__container {
        padding: 0 1.5rem;
    }

    .pf-showcase__header {
        margin-bottom: 2.5rem;
    }

    .pf-showcase__hero {
        height: 60vh;
        min-height: 400px;
    }

    .pf-showcase__hero-overlay {
        padding: 2rem;
    }

    .pf-showcase__nav-arrow {
        width: 48px;
        height: 48px;
    }

    .pf-showcase__nav-arrow svg {
        width: 20px;
        height: 20px;
    }

    .pf-showcase__nav-arrow--prev {
        left: 1rem;
    }

    .pf-showcase__nav-arrow--next {
        right: 1rem;
    }

    .pf-showcase__project-cta {
        bottom: 2rem;
        right: 2rem;
        padding: 0.875rem 1.25rem;
    }
}

/* ==========================================================================
   Responsive — 768px
   ========================================================================== */
@media (max-width: 768px) {
    .pf-showcase__container {
        padding: 0 1rem;
    }

    .pf-showcase__header {
        margin-bottom: 2rem;
    }

    .pf-showcase__title-accent {
        width: 50px;
        margin-bottom: 1.25rem;
    }

    .pf-showcase__slider-wrapper {
        margin-bottom: 2rem;
    }

    /* Filter — horizontal scroll */
    .pf-showcase__filter {
        margin-bottom: 2rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .pf-showcase__filter::-webkit-scrollbar {
        display: none;
    }

    .pf-showcase__filter-list {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 0;
        padding: 0 1rem;
    }

    section.pf-showcase .pf-showcase__filter-btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
        white-space: nowrap;
    }

    /* Hero */
    .pf-showcase__hero {
        height: 55vh;
        min-height: 350px;
    }

    .pf-showcase__hero-overlay {
        padding: 1.5rem;
    }

    .pf-showcase__category-tag {
        font-size: 0.6875rem;
        padding: 0.3rem 0.75rem;
    }

    .pf-showcase__project-name {
        margin-bottom: 0.5rem;
    }

    .pf-showcase__project-tagline {
        margin-bottom: 1rem;
        font-size: 0.9375rem;
    }

    .pf-showcase__project-meta-text {
        font-size: 0.8125rem;
    }

    /* Nav arrows — show on hover */
    .pf-showcase__nav-arrow {
        width: 40px;
        height: 40px;
        opacity: 0;
        transition: opacity 0.3s ease, background 0.3s ease;
    }

    .pf-showcase__slider:hover .pf-showcase__nav-arrow,
    .pf-showcase__slider:focus .pf-showcase__nav-arrow {
        opacity: 1;
    }

    .pf-showcase__nav-arrow svg {
        width: 18px;
        height: 18px;
    }

    .pf-showcase__nav-arrow--prev {
        left: 0.5rem;
    }

    .pf-showcase__nav-arrow--next {
        right: 0.5rem;
    }

    /* Project CTA — move to top */
    .pf-showcase__project-cta {
        bottom: auto;
        top: 1rem;
        right: 1rem;
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }

    /* Thumbnails — horizontal scroll */
    .pf-showcase__thumbnails {
        gap: 0.5rem;
        padding: 1rem 0;
        overflow-x: auto;
        justify-content: flex-start;
        padding-left: 1rem;
        padding-right: 1rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .pf-showcase__thumbnails::-webkit-scrollbar {
        display: none;
    }

    .pf-showcase__thumb {
        flex-shrink: 0;
        width: 80px;
        height: 56px;
    }

    /* Counter — move to left */
    .pf-showcase__counter {
        top: 1rem;
        left: 1rem;
        right: auto;
    }

    .pf-showcase__counter-current {
        font-size: 1.25rem;
    }

    /* Bottom CTA */
    .pf-showcase__cta-button {
        padding: 0.875rem 1.75rem;
        font-size: 0.875rem;
    }
}

/* ==========================================================================
   Responsive — 480px
   ========================================================================== */
@media (max-width: 480px) {
    .pf-showcase__container {
        padding: 0 0.75rem;
    }

    .pf-showcase__title-accent {
        width: 40px;
        height: 2px;
    }

    section.pf-showcase .pf-showcase__filter-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .pf-showcase__hero {
        height: 50vh;
        min-height: 300px;
    }

    .pf-showcase__hero-overlay {
        padding: 1rem;
    }

    .pf-showcase__thumb {
        width: 70px;
        height: 50px;
    }

    .pf-showcase__dot {
        width: 8px;
        height: 8px;
    }

    .pf-showcase__dots {
        gap: 0.5rem;
    }

    .pf-showcase__bottom-cta {
        padding: 0 1rem;
    }

    .pf-showcase__cta-button {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }
}

/* ==========================================================================
   Focus-visible — WCAG 2.1 SC 2.4.7
   ========================================================================== */
.pf-showcase__filter-btn:focus-visible {
    outline: 2px solid #5B9B4C;
    outline-offset: 2px;
}

.pf-showcase__thumb:focus-visible {
    outline: 2px solid #5B9B4C;
    outline-offset: 2px;
    opacity: 1;
}

.pf-showcase__dot:focus-visible {
    outline: 2px solid #5B9B4C;
    outline-offset: 2px;
}

.pf-showcase__project-cta:focus-visible,
.pf-showcase__cta-button:focus-visible {
    outline: 2px solid #5B9B4C;
    outline-offset: 2px;
}

/* ==========================================================================
   Reduced motion — WCAG 2.1 SC 2.3.3
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .pf-showcase,
    .pf-showcase__hero-image img,
    .pf-showcase__hero-image,
    .pf-showcase__project-info,
    .pf-showcase__nav-arrow,
    .pf-showcase__filter-btn,
    .pf-showcase__thumb,
    .pf-showcase__dot,
    .pf-showcase__project-cta,
    .pf-showcase__cta-button {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
