/**
 * Exakt Portfolio Slider — v0.1.0
 *
 * Full-width showcase slider for portfolio items (client websites).
 * Each slide: background image fills the slide, left text overlay,
 * right website screenshot preview with browser chrome mockup.
 * Filter pills above the slider filter by industry.
 *
 * Shares .exakt-slider-* base classes with product-slider.css.
 * Portfolio-specific classes are prefixed .exakt-portfolio-*.
 *
 * @package exakt-slider
 */

/* =============================================================================
   Outer container (extends product slider base)
   ============================================================================= */

.exakt-portfolio-slider {
    position: relative;
    margin: 0 0 20px;
    font-size: 16px !important;
    font-family: var(--exakt-font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    outline: none;
}

/*
 * Full-width breakout — escapes the theme's content container so the slider
 * spans the full viewport width regardless of page template or container width.
 * Technique: shift left by 50vw, then pull back 50% of own width.
 * No transform needed; avoids horizontal scrollbar.
 *
 * NOTE: This breakout only works when Elementor's containing section/column
 * does NOT have overflow:hidden. Set the Elementor section to
 * "Stretch Section = Yes" and "Content Width = Full Width" for best results.
 * The real fix for a narrow full page is: Elementor Page Settings →
 * Page Layout → "Elementor Full Width".
 */
.exakt-portfolio-slider.is-full-width {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: 0 !important;
    box-sizing: border-box;
}

/* Elementor: prevent widget/section containers from clipping the breakout */
.elementor-widget-shortcode,
.elementor-widget-container {
    overflow: visible !important;
}

.elementor-section.elementor-section-stretched .exakt-portfolio-slider.is-full-width,
.elementor-section.elementor-section-full_width .exakt-portfolio-slider.is-full-width {
    /* Already inside a stretched Elementor section — no breakout needed */
    width: 100% !important;
    margin-left: 0 !important;
    max-width: 100% !important;
}

.exakt-portfolio-section-title {
    font-family: var(--exakt-font-heading, inherit) !important;
    font-size: var(--exakt-font-size-h1, 32px) !important;
    font-weight: 700 !important;
    color: var(--exakt-heading, #333333) !important;
    text-align: center !important;
    margin: 0 0 20px !important;
    line-height: 1.2 !important;
    letter-spacing: 0.15em !important;
    text-transform: uppercase !important;
}

/* When full-width, constrain the title + filter pills to a readable max-width */
.exakt-portfolio-slider.is-full-width .exakt-portfolio-section-title,
.exakt-portfolio-slider.is-full-width .exakt-portfolio-filter {
    max-width: 960px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

/* Counter and thumbnails centred within full-width container */
.exakt-portfolio-slider.is-full-width .exakt-slider-counter,
.exakt-portfolio-slider.is-full-width .exakt-slider-thumbnails {
    max-width: 960px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

/* =============================================================================
   Industry filter pills
   ============================================================================= */

.exakt-portfolio-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.exakt-portfolio-filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 999px;
    border: 2px solid var(--exakt-primary, #e05c30);
    background: transparent;
    color: var(--exakt-primary, #e05c30);
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    font-family: var(--exakt-font-body, sans-serif) !important;
    white-space: nowrap;
}

.exakt-portfolio-filter-pill:hover {
    background: var(--exakt-primary, #e05c30);
    color: #ffffff;
}

.exakt-portfolio-filter-pill.is-active {
    background: var(--exakt-primary, #e05c30);
    color: #ffffff;
}

/* =============================================================================
   Slide — taller to accommodate two-column content
   ============================================================================= */

.exakt-portfolio-slider .exakt-slide {
    height: 68vh;
    min-height: 440px;
    max-height: 780px;
}

/* Background image fills slide with cover (scenic photo) */
.exakt-portfolio-slider .exakt-slide-bg img {
    object-fit: cover !important;
    object-position: center !important;
}

/* Gradient overlay to ensure text readability */
.exakt-portfolio-slider .exakt-slide-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.65) 0%,
        rgba(0, 0, 0, 0.30) 55%,
        rgba(0, 0, 0, 0.05) 100%
    );
    z-index: 1;
}

/* Fallback gradient when no background image is set */
.exakt-portfolio-bg-fallback {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

/* =============================================================================
   Two-column content layout
   ============================================================================= */

.exakt-portfolio-slide-content {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    padding: 40px 60px;
    gap: 40px;
}

/* Left column — text info */
.exakt-portfolio-slide-text {
    flex: 0 0 42%;
    max-width: 42%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Right column — screenshot */
.exakt-portfolio-screenshot-wrap {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    max-height: 100%;
}

/* =============================================================================
   Industry / sub-industry pills (inside slide)
   ============================================================================= */

.exakt-portfolio-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.exakt-portfolio-pill {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-family: var(--exakt-font-body, sans-serif) !important;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.exakt-portfolio-pill--primary {
    background: var(--exakt-primary, #e05c30);
    border-color: var(--exakt-primary, #e05c30);
    color: #ffffff;
}

/* =============================================================================
   Feature title (large heading)
   ============================================================================= */

.exakt-portfolio-feature-title {
    font-family: var(--exakt-font-heading, inherit) !important;
    font-size: clamp(22px, 3vw, 42px) !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin: 0 !important;
    line-height: 1.15 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* =============================================================================
   Overview text
   ============================================================================= */

.exakt-portfolio-overview,
.exakt-portfolio-overview p {
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.88) !important;
    line-height: 1.65 !important;
    font-weight: 400 !important;
    font-family: var(--exakt-font-body, sans-serif) !important;
    margin: 0 !important;
}

.exakt-portfolio-overview {
    display: -webkit-box !important;
    -webkit-line-clamp: 5 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* =============================================================================
   CTA button
   ============================================================================= */

.exakt-portfolio-cta {
    align-self: flex-start;
    display: inline-block;
    padding: 12px 24px !important;
    background: #ffffff !important;
    color: #1a1a1a !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    border-radius: 4px;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    font-family: var(--exakt-font-body, sans-serif) !important;
    letter-spacing: 0.02em;
}
.exakt-portfolio-cta:hover {
    background: var(--exakt-primary, #e05c30) !important;
    color: #ffffff !important;
}

/* =============================================================================
   Browser chrome mockup (screenshot wrapper)
   ============================================================================= */

.exakt-portfolio-screenshot-browser {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 4px 16px rgba(0, 0, 0, 0.25);
    max-width: 520px;
    width: 100%;
    flex-shrink: 0;
}

.exakt-portfolio-browser-bar {
    background: #e8e8e8;
    padding: 8px 12px;
    display: flex;
    gap: 5px;
    align-items: center;
}

.exakt-portfolio-browser-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cccccc;
    display: inline-block;
}
.exakt-portfolio-browser-dot:nth-child(1) { background: #ff5f57; }
.exakt-portfolio-browser-dot:nth-child(2) { background: #febc2e; }
.exakt-portfolio-browser-dot:nth-child(3) { background: #28c840; }

.exakt-portfolio-screenshot-browser img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 380px;
    object-fit: cover;
    object-position: top;
    border: none;
}

/* =============================================================================
   Arrows (portfolio variant — positioned vertically centered on content)
   ============================================================================= */

.exakt-portfolio-slider .exakt-slider-arrow {
    z-index: 20;
}

/* =============================================================================
   Thumbnail placeholders (when no image available)
   ============================================================================= */

.exakt-portfolio-thumb-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* =============================================================================
   Responsive — tablet
   ============================================================================= */

@media (max-width: 960px) {
    .exakt-portfolio-slide-content {
        padding: 30px 40px;
        gap: 24px;
    }

    .exakt-portfolio-slide-text {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .exakt-portfolio-screenshot-browser {
        max-width: 380px;
    }

    .exakt-portfolio-slider .exakt-slide {
        height: 75vh;
        min-height: 480px;
    }
}

/* =============================================================================
   Responsive — mobile
   ============================================================================= */

@media (max-width: 640px) {
    .exakt-portfolio-slider .exakt-slide {
        height: auto;
        min-height: 600px;
        max-height: none;
    }

    .exakt-portfolio-slide-content {
        flex-direction: column;
        padding: 24px 20px;
        gap: 20px;
        align-items: flex-start;
        justify-content: center;
    }

    .exakt-portfolio-slide-text {
        flex: none;
        max-width: 100%;
    }

    .exakt-portfolio-screenshot-wrap {
        width: 100%;
        justify-content: center;
    }

    .exakt-portfolio-screenshot-browser {
        max-width: 100%;
    }

    .exakt-portfolio-screenshot-browser img {
        max-height: 200px;
    }

    .exakt-portfolio-feature-title {
        font-size: clamp(20px, 6vw, 28px) !important;
    }

    .exakt-portfolio-overview {
        -webkit-line-clamp: 3 !important;
    }

    .exakt-portfolio-filter-pill {
        font-size: 11px !important;
        padding: 5px 12px;
    }
}
