/**
 * Employee Spotlight Block Styles
 * Based on about-spotlight section from EverSmith-HTML-PAGE/about.html
 */

.employee-spotlight-block {
    position: relative;
    width: 100%;
    background: rgba(233, 247, 248, 0.7);
    padding: 100px 80px 80px;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Main container - ensures content stays within bounds */
.employee-spotlight-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 72px;
    width: 100%; /* Ensure container fills available space */
    box-sizing: border-box;
}

/* --- Top row: intro text left + featured card right --- */
.employee-spotlight-top {
    display: flex;
    gap: 40px;
    align-items: center;
    width: 100%; /* Ensure full width */
    max-width: 100%; /* Prevent overflow */
    box-sizing: border-box;
}

/* Left column: section label, heading, description */
.employee-spotlight-intro {
    flex: 1;
    min-width: 0; /* Allow flex item to shrink below content size */
    max-width: 100%; /* Prevent overflow */
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
}

/* Section label with icon - matches HTML design */
.home-section-label-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.home-section-label-left img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Label crown: theme .es-icon-titles */

.home-section-label-left span {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.5;
    color: #0097a7;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Allow label text to wrap on very small screens to prevent overflow */
@media (max-width: 480px) {
    .home-section-label-left span {
        white-space: normal;
    }
}

.employee-spotlight-desc {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.employee-spotlight-desc p {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.5;
    color: var(--smith-grey, #404a50);
    margin: 0;
}

/* Right column: featured spotlight card */
.employee-spotlight-featured {
    flex: 1;
    min-width: 0;
    max-width: 100%; /* Prevent overflow on mobile */
    background: #f6fbfc;
    border-radius: 8px;
    overflow: hidden;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: 0px 4px 5px -1px rgba(0, 88, 95, 0.12);
    backdrop-filter: blur(21px);
    box-sizing: border-box; /* Ensure padding doesn't cause overflow */
}

/* Featured image container - ensure it doesn't overflow */
.employee-spotlight-featured-image {
    width: 100%;
    max-width: 100%; /* Prevent overflow on mobile */
    height: 327px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0; /* Prevent flex shrinking issues */
}

.employee-spotlight-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* Remove inline image spacing */
}

.employee-spotlight-featured-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.employee-spotlight-featured-header {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.employee-spotlight-featured-name-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.employee-spotlight-featured-name {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.5;
    color: #0097a7;
    margin: 0;
}

.employee-spotlight-linkedin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.employee-spotlight-featured-role {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.5;
    color: var(--smith-grey, #404a50);
    margin: 0;
}

.employee-spotlight-featured-bio {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: var(--smith-grey, #404a50);
    margin: 0;
}

/* "Read More →" link shared by featured + small cards */
.employee-spotlight-readmore {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.5;
    color: var(--link-light-rest, #e57440);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.employee-spotlight-readmore span {
    text-decoration: underline;
}

/* Add arrow indicator via CSS for consistency with design system */
.employee-spotlight-readmore::after {
    content: "→";
    display: inline-block;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.5;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.employee-spotlight-readmore:hover::after {
    transform: translateX(2px);
}

.employee-spotlight-readmore:hover {
    color: var(--link-light-hover, #f26828);
}

.employee-spotlight-readmore:active {
    color: var(--link-light-pressed, #c87400);
}

.employee-spotlight-readmore:focus-visible {
    outline: 2px solid var(--link-light-pressed, #c87400);
    outline-offset: 2px;
    border-radius: 2px;
}

/* --- Carousel wrapper inside spotlight section --- */
.employee-spotlight-carousel-wrapper {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* Static mode (when 3 or less cards) */
.employee-spotlight-carousel-wrapper.is-static .employee-carousel {
    overflow: visible;
}

.employee-spotlight-carousel-wrapper.is-static .employee-carousel-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    transition: none;
}

/* Hide controls in static mode */
.employee-spotlight-carousel-wrapper.is-static .employee-carousel-controls {
    display: none;
}

/* --- Carousel styles --- */
.employee-carousel {
    width: 100%;
    overflow: hidden;
}

.employee-carousel-track {
    display: flex;
    gap: 32px;
    transition: transform 0.5s ease;
}

/* Individual employee card */
.employee-carousel-card {
    flex: 0 0 calc(33.333% - 22px); /* 3 cards visible with 32px gap */
    min-width: 0;
    max-width: 100%; /* Prevent overflow */
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 32px 24px;
    background: #f6fbfc;
    border-radius: 8px;
    box-shadow: 0px 4px 5px -1px rgba(0, 88, 95, 0.12);
    backdrop-filter: blur(21px);
    -webkit-backdrop-filter: blur(21px);
    box-sizing: border-box; /* Ensure padding doesn't cause overflow */
}

/* Card image - circular, 60px as per Figma */
.employee-carousel-card-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.employee-carousel-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* Remove inline image spacing */
}

/* Card content */
.employee-carousel-card-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

/* Name row - contains name and LinkedIn icon */
.employee-carousel-card-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Name - Teal color, 22px, bold */
.employee-carousel-card-name {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.5;
    color: #0097a7;
    margin: 0;
}

/* LinkedIn icon next to name */
.employee-carousel-card-linkedin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.employee-carousel-card-linkedin:hover {
    opacity: 0.7;
}

.employee-carousel-card-linkedin img {
    width: 16px;
    height: 16px;
    display: block;
}

/* Role - Dark gray, 16px, bold */
.employee-carousel-card-role {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.5;
    color: var(--smith-grey, #404a50);
    margin: 0;
}

/* Quote/description */
.employee-carousel-card-quote {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: var(--smith-grey, #404a50);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(16px * 1.5 * 3);
}

/* Read More link */
.employee-carousel-card-readmore {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.5;
    color: var(--orange, #e57440);
    text-decoration: none;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.employee-carousel-card-readmore span {
    text-decoration: underline;
    text-decoration-skip-ink: none;
}

.employee-carousel-card-readmore:hover {
    color: var(--link-light-hover, #f26828);
}

.employee-carousel-card-readmore span:nth-child(2) {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.employee-carousel-card-readmore:hover span:nth-child(2) {
    transform: translateX(2px);
}

/* Carousel controls - matching newsroom style */
.employee-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1280px;
    margin: 32px auto 0;
}

/* Dots - matching newsroom style */
.employee-carousel-dots {
    display: flex;
    gap: 8px;
}

.employee-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.2s ease;
}

.employee-carousel-dot:hover {
    background: #999;
}

.employee-carousel-dot.active {
    background: var(--orange, #e57440);
}

.employee-carousel-dot:focus-visible {
    outline: 2px solid var(--orange, #e57440);
    outline-offset: 2px;
}

/* Arrows - matching newsroom style (no padding, simple buttons) */
.employee-carousel-arrows {
    display: flex;
    gap: 12px;
}

.employee-carousel-arrow {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.employee-carousel-arrow img {
    width: 15px;
    height: 11px;
    display: block;
}

/* Tablet breakpoint (max-width: 1200px) - matches about.html exactly */
@media (max-width: 1200px) {
    .employee-spotlight-block {
        padding: 80px 40px 60px;
        background: #E9F7F8;
    }

    .employee-spotlight-top {
        flex-direction: column;
        gap: 40px;
    }

    .employee-spotlight-featured-image {
        height: 260px;
    }

    /* Static grid becomes 2 columns on tablet */
    .employee-spotlight-carousel-wrapper.is-static .employee-carousel-track {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Carousel shows 2 cards at a time with slightly reduced gap */
    .employee-carousel-card {
        flex: 0 0 calc(50% - 16px);
        max-width: calc(50% - 16px); /* Prevent overflow */
    }

    .employee-carousel-track {
        gap: 24px; /* Slightly reduced from 32px for tablet */
    }

    /* Tablet controls - match newsroom */
    .employee-carousel-controls {
        margin-top: 24px;
        padding-left: 40px;
        padding-right: 40px;
    }
}

/* Mobile breakpoint (max-width: 768px) */
@media (max-width: 768px) {
    .employee-spotlight-block {
        padding: 60px 24px 48px;
        background: #E9F7F8;
    }

    .employee-spotlight-container {
        gap: 48px;
    }

    /* Stack the top section vertically on mobile */
    .employee-spotlight-top {
        flex-direction: column;
    }

    .employee-spotlight-desc p {
        font-size: 16px;
    }

    .home-section-label-left span {
        font-size: 14px;
    }

    .employee-spotlight-featured-image {
        height: 220px;
    }

    .employee-spotlight-carousel-wrapper {
        flex-direction: column;
        gap: 24px;
    }

    /* Static grid becomes 1 column on mobile */
    .employee-spotlight-carousel-wrapper.is-static .employee-carousel-track {
        grid-template-columns: 1fr;
    }

    /* Carousel shows 1 card at a time with smaller gap */
    .employee-carousel-card {
        flex: 0 0 100%;
        max-width: 100%; /* Ensure card doesn't overflow */
        padding: 24px;
    }

    /* Reduce gap on mobile to prevent overflow */
    .employee-carousel-track {
        gap: 16px;
    }

    /* Controls stay in row like newsroom - removed column stacking */
    .employee-carousel-controls {
        margin-top: 24px;
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Small mobile breakpoint (max-width: 480px) */
@media (max-width: 480px) {
    .employee-spotlight-block {
        padding: 48px 16px 40px; /* Slightly reduced horizontal padding */
    }

    .employee-spotlight-featured {
        padding: 24px 20px; /* Slightly reduced padding */
    }

    .employee-spotlight-featured-image {
        height: 180px;
    }

    /* Further reduce gap on small screens */
    .employee-carousel-track {
        gap: 12px;
    }

    .employee-carousel-card {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 24px 20px;
    }

    .employee-carousel-card-image {
        width: 60px;
        height: 60px;
    }

    /* Ensure content doesn't overflow */
    .employee-spotlight-featured-content,
    .employee-carousel-card-content {
        max-width: 100%;
    }

    /* Small mobile controls - match newsroom */
    .employee-carousel-controls {
        margin-top: 24px;
        padding-left: 16px;
        padding-right: 16px;
    }
}
