/* ==========================================================================
   VoiceMan AI - Work Details Page Custom Styles
   Page: Why We Built Voiceman AI
   ========================================================================== */

/* Base & Layout variables */
:root {
    --page-max-width: 1200px;
    --article-max-width: 820px;
    --accent-color: #ffffff;
    --muted-color: rgba(255, 255, 255, 0.75);
    --subtle-border: rgba(255, 255, 255, 0.12);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-hover-bg: rgba(255, 255, 255, 0.07);
}

/* Page wrapper inside shell */
.PageWorksDetail__container {
    position: relative;
    z-index: 2;
    padding: 120px 20px 80px;
    max-width: var(--page-max-width);
    margin: 0 auto;
}

.PageWorksDetail__inner {
    width: 100%;
}

/* Works Section Header */
.PageWorksDetail__head {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 28px;
    letter-spacing: 0.01em;
    border-bottom: 1px solid var(--subtle-border);
    padding-bottom: 16px;
}

/* Thumbnail Slider / Cards Grid */
.PageWorksDetail__thumbnailSliderWrapper {
    margin-bottom: 64px;
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 10px 0 24px;
}

.PageWorksDetail__thumbnailSlider {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 12px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    cursor: grab;
}

.PageWorksDetail__thumbnailSlider::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
    height: 0;
    width: 0;
}

@media (max-width: 768px) {
    .PageWorksDetail__thumbnailSlider {
        gap: 16px;
    }
}

.PageWorksDetail__thumbnailItem {
    display: block;
    flex: 0 0 250px;
    width: 250px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Active item is wider and prominent like the reference screenshot */
.PageWorksDetail__thumbnailItem.is-active {
    flex: 0 0 400px;
    width: 400px;
}

@media (max-width: 768px) {
    .PageWorksDetail__thumbnailItem {
        flex: 0 0 220px;
        width: 220px;
    }
    .PageWorksDetail__thumbnailItem.is-active {
        flex: 0 0 300px;
        width: 300px;
    }
}

.PageWorksDetail__thumbnailItem_link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.WorksListItem__container {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.WorksListItem__thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 4px;
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.PageWorksDetail__thumbnailItem.is-active .WorksListItem__thumbnail {
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
}

.PageWorksDetail__thumbnailItem_link:hover .WorksListItem__thumbnail {
    border-color: rgba(255, 255, 255, 0.4);
}

.WorksListItem__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.PageWorksDetail__thumbnailItem_link:hover .WorksListItem__thumbnail img {
    transform: scale(1.05);
}

.WorksListItem__info {
    padding-top: 12px;
    display: flex;
    flex-direction: column;
}

/* Hide metadata underneath the active card so layout matches screenshot */
.PageWorksDetail__thumbnailItem.is-active .WorksListItem__info {
    display: none;
}

.WorksListItem__group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 6px;
    letter-spacing: 0.03em;
}

.WorksListItem__date {
    letter-spacing: 0.05em;
}

.WorksListItem__category {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
}

.WorksListItem__title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    color: #ffffff;
    transition: color 0.3s ease;
}

.PageWorksDetail__thumbnailItem_link:hover .WorksListItem__title {
    color: #cccccc;
}

/* Detail Section & Background Marquee Text */
.PageWorksDetail__detail {
    position: relative;
    margin-top: 20px;
}

.PageWorksDetail__currentInfo {
    position: relative;
    padding: 60px 0 40px;
    border-bottom: 1px solid var(--subtle-border);
    margin-bottom: 50px;
    overflow: hidden;
}

.PageWorksDetail__infoGroup {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 16px;
}

.PageWorksDetail__date {
    letter-spacing: 0.06em;
}

.PageWorksDetail__category {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.PageWorksDetail__title {
    position: relative;
    z-index: 2;
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 400;
    line-height: 1.2;
    color: #ffffff;
    letter-spacing: -0.01em;
}

/* Background Animated Watermark Text */
.PageWorksDetail__bg {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    z-index: 1;
    pointer-events: none;
    user-select: none;
    overflow: hidden;
    display: flex;
    opacity: 0.06;
}

.PageWorksDetail__bg_track {
    display: flex;
    white-space: nowrap;
    animation: marqueeTextScroll 35s linear infinite;
}

.PageWorksDetail__bg_display {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 400;
    line-height: 1;
    text-transform: uppercase;
    padding-right: 40px;
    color: #ffffff;
}

@keyframes marqueeTextScroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

/* Article Body Typography & Layout */
.PageWorksDetail__body {
    max-width: var(--article-max-width);
    margin: 0 auto 80px;
    position: relative;
    z-index: 2;
}

.PageWorksDetail__heroImg {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 16px;
    margin: 20px auto 48px;
    display: block;
    border: 1px solid var(--subtle-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.PageWorksDetail__body p {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--muted-color);
    margin-bottom: 24px;
    letter-spacing: 0.01em;
}

.PageWorksDetail__body p:first-of-type {
    font-size: 1.22rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
}

/* Pagination Section */
.Pagination__pagination {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--article-max-width);
    margin: 0 auto 60px;
    padding-top: 40px;
    border-top: 1px solid var(--subtle-border);
}

.Pagination__pagination li {
    display: flex;
    align-items: center;
}

.Pagination__pagination_prev,
.Pagination__pagination_next {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--subtle-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.Pagination__pagination_prev.Pagination__pagination_noActive {
    opacity: 0.25;
    pointer-events: none;
}

.Pagination__pagination_next a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #ffffff;
    text-decoration: none;
}

.Pagination__pagination_next:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(4px);
}

.Pagination__pagination svg {
    width: 8px;
    height: 12px;
    fill: #ffffff;
}

/* Responsive & RTL Adjustments */
html[lang="he"] .PageWorksDetail__container,
html[lang="he"] .PageWorksDetail__body,
html[lang="he"] .WorksListItem__info {
    direction: rtl;
    text-align: right;
}

html[lang="he"] .WorksListItem__group {
    flex-direction: row-reverse;
}

html[lang="he"] .PageWorksDetail__infoGroup {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

html[lang="he"] .Pagination__pagination_next:hover {
    transform: translateX(-4px);
}

html[lang="he"] .Pagination__pagination svg {
    transform: rotate(180deg);
}

/* ==========================================================================
   Rich Editorial Components & Interactive Layout
   ========================================================================== */

/* Lead Paragraph */
.Article__lead {
    font-size: 1.35rem !important;
    line-height: 1.8 !important;
    color: #ffffff !important;
    font-weight: 400;
    margin-bottom: 36px !important;
    border-left: 3px solid rgba(255, 255, 255, 0.4);
    padding-left: 20px;
}

html[lang="he"] .Article__lead {
    border-left: none;
    border-right: 3px solid rgba(255, 255, 255, 0.4);
    padding-left: 0;
    padding-right: 20px;
}

/* Glassmorphic Pull Quote Box */
.Article__quoteCard {
    position: relative;
    margin: 56px 0;
    padding: 40px 48px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
}

.Article__quoteCard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0.2));
}

html[lang="he"] .Article__quoteCard::before {
    left: auto;
    right: 0;
}

.Article__quoteText {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.4rem, 2.8vw, 1.85rem);
    line-height: 1.5;
    color: #ffffff;
    font-style: italic;
    margin: 0 0 16px;
}

.Article__quoteAuthor {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

/* Editorial Figure & Image Caption */
.Article__figure {
    margin: 56px 0;
}

.Article__figureImg {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 16px;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.Article__figureCaption {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 14px;
    text-align: center;
    letter-spacing: 0.03em;
}

/* 2-Column Comparison Diagram (Traditional vs Autonomous) */
.Article__comparisonGrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 56px 0;
}

.CompareCard {
    position: relative;
    padding: 36px 32px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.CompareCard:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.25);
}

.CompareCard--highlight {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
}

.CompareCard__badge {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 18px;
}

.CompareCard--highlight .CompareCard__badge {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-weight: 500;
}

.CompareCard__title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.55rem;
    color: #ffffff;
    margin: 0 0 16px;
}

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

.CompareCard__list li {
    position: relative;
    padding-left: 22px;
    font-size: 0.98rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 14px;
}

html[lang="he"] .CompareCard__list li {
    padding-left: 0;
    padding-right: 22px;
}

.CompareCard__list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: rgba(255, 255, 255, 0.35);
}

html[lang="he"] .CompareCard__list li::before {
    left: auto;
    right: 0;
}

.CompareCard--highlight .CompareCard__list li::before {
    content: '✦';
    color: #ffffff;
}

/* 3-Column Impact Cards Grid */
.Article__impactGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 56px 0;
}

.ImpactCard {
    padding: 30px 24px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.35s ease, border-color 0.35s ease;
}

.ImpactCard:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.3);
}

.ImpactCard__number {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 12px;
    display: block;
}

.ImpactCard__title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 10px;
}

.ImpactCard__desc {
    font-size: 0.94rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

@media (max-width: 900px) {
    .Article__comparisonGrid,
    .Article__impactGrid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .PageWorksDetail__container {
        padding: 90px 16px 60px;
    }
    .PageWorksDetail__head {
        font-size: 2.2rem;
    }
    .PageWorksDetail__currentInfo {
        padding: 40px 0 28px;
    }
    .PageWorksDetail__title {
        font-size: 2.1rem;
    }
    .PageWorksDetail__body p {
        font-size: 1rem;
        line-height: 1.75;
    }
    .PageWorksDetail__heroImg {
        max-height: 280px;
        margin-bottom: 32px;
    }
    .Article__quoteCard {
        padding: 28px 24px;
        margin: 40px 0;
    }
    .CompareCard {
        padding: 28px 22px;
    }
}
