/* Case Study / Work Detail Specific Styles */

.work-detail-page {
    /* Background handled by p5 sketch + dark mode */
    background: transparent;
    color: #ffffff;
    /*padding-top: 25rem !important;*/
    /* Space for fixed header */
}

/* Force dark header on work detail pages to be WHITE (Dark mode behavior) */
.topShelf a,
.topShelf a i {
    color: #ffffff !important;
}

/* Plumo Page Specific */
.plumo-page {
    /*padding-top: 25rem !important;*/
}

/* Removed extra restriction to allow better flow within main container */
.cs-container {
    width: 100%;
    padding: 0;
}

/* Hero Section (New Structure) */
.cs-hero {
    display: flex;
    align-items: flex-start;
    /* Align top */
    justify-content: space-between;
    gap: 4rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    padding: 8rem 0 4rem !important;
    gap: 2rem;
}

.cs-hero-content {
    flex: 1;
    min-width: 300px;
    padding-top: 2rem;
    /* Slight offset */
}

.cs-hero-content h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
    line-height: 1.1;
}

.cs-hero-content .tagline {
    font-size: 1.3rem;
    color: #aeaeae;
    margin-bottom: 2rem;
    display: block;
    font-weight: 300;
}

.cs-hero-image {
    flex: 1;
    max-width: 300px;
    display: flex;
    justify-content: flex-end;
}

.cs-hero-image img {
    width: 100%;
    max-width: 500px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* Overview Section (New) */
.cs-overview {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

.cs-overview h3 {
    font-size: 1.2rem;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.cs-overview p {
    color: #ddd;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 45ch;
    font-weight: 100;
    font-family: 'Roboto', sans-serif;
    font-weight: 100;
    font-style: normal;
    font-variation-settings:
        "wdth" 100;
}


/* Alternating Sections */
.cs-section {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Centering items if they don't fill width */
    gap: 4rem;
    /* Reduced gap */
    margin-bottom: 10rem;
    flex-wrap: wrap;
    /* Default to wrap for mobile */
    opacity: 1;
    /* Temporarily removed animation for debugging/stability */
    /* animation: fadeInUp 0.8s ease forwards; */
}

/* Force side-by-side on larger screens */
@media (min-width: 900px) {


    .cs-intro {
        flex-wrap: nowrap !important;
        justify-content: space-between;
    }

    .cs-section {
        flex-wrap: nowrap !important;
        justify-content: center !important;
    }


    .cs-section.reverse {
        flex-direction: row-reverse;
        justify-content: center !important;

    }

    .cs-text-col {
        flex: 1 !important;
        /* changed from 0 0 500px to allow fluid sizing */
        max-width: 500px !important;
        /* Keep constraint but allow shrinking/growing relations */
    }

    .cs-media-col {
        flex: 1 !important;

    }
}

.cs-section:nth-child(2) {
    animation-delay: 0.2s;
}

.cs-section:nth-child(3) {
    animation-delay: 0.4s;
}

.cs-section:nth-child(4) {
    animation-delay: 0.6s;
}


.cs-section.reverse {
    flex-direction: row-reverse;
}

.cs-text-col {
    flex: 0 1 auto;
    /* Don't grow, allow shrink */
    min-width: 300px;
    padding: 1rem;
    max-width: 600px;
    /* Prevent text from becoming too wide alone */
}

.cs-text-col h3 {
    font-size: 2rem;
    color: #fff;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.cs-text-col ul {
    list-style: none;
    padding: 0;
}

.cs-text-col ul li {
    margin-bottom: 1.2rem;
    color: #ddd;
    font-size: 1.1rem;
    line-height: 1.5;
    position: relative;
    padding-left: 1.5rem;
    font-weight: 100;
}

.cs-text-col ul li::before {
    content: "•";
    color: var(--accent-color, tomato);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.cs-text-col p {
    color: #ddd;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 45ch;
    font-family: 'Roboto', sans-serif;
    font-weight: 100;
    font-style: normal;
    font-variation-settings:
        "wdth" 100;
}

.cs-media-col {
    flex: 0 1 auto;
    /* Don't grow */
    display: flex;
    justify-content: center;
    min-width: 300px;
}

/* Simple Video Container (Frame Removed) */
.phone-frame {
    width: 100%;
    max-width: 400px;
    /* increased from fixed 290px */
    aspect-ratio: 9/19;
    /* Maintain vertical ratio */
    height: 95%;
    /* Let aspect ratio drive height */
    background: transparent;
    border-radius: 60px;
    overflow: hidden;
    position: relative;
    /* Optional: simpler shadow if desired */
    /* box-shadow: 0 10px 30px rgba(0,0,0,0.3); */
}

/* Landscape Video Container */
.landscape-frame {
    width: 100%;
    /* Removed max-width constraint to fill column */
    aspect-ratio: 16/9;
    background: transparent;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.landscape-frame video,
.landscape-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    display: block;
}

.phone-frame video,
.phone-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    display: block;
}

/* Credits Section */
.cs-credits {
    text-align: center;
    margin: 4rem 0 6rem;
    color: #bbb;
}

.cs-credits h4 {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

.cs-credits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cs-credits li {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.cs-credits a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.cs-credits a:hover {
    border-bottom-color: #fff;
}

/* Documentation Card */
.doc-card-container {
    display: flex;
    justify-content: center;
    /* Centered as per request */
    margin-bottom: 6rem;
}

.doc-card {
    background: transparent;
    color: #fff;
    /* White text by default */
    border-radius: 16px;

    width: 300px;
    overflow: hidden;
    text-align: left;
    transition: all 0.3s ease;
}

.doc-card:hover {
    background: #fff;
    color: #000 !important;
    /* Force black text */
    transform: translateY(-5px);
    box-shadow: 4px 4px 0px #d50808;
}

.doc-card:hover h4,
.doc-card:hover p,
.doc-card:hover a {
    color: #000 !important;
    /* Override dark-mode specific links */
}

.doc-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.doc-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.doc-card-content {
    padding: 1.5rem;
    /* opacity: 0; Removed to keep text visible */
    transition: opacity 0.3s ease;
}

.doc-card:hover .doc-card-content {
    opacity: 1;
}

.doc-card h4 {
    color: inherit;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.doc-card p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

/* Compact Card Modifier */
.compact-card .doc-card {
    width: 220px;
    /* Reduced width */
}

.compact-card .doc-card img {
    height: 140px;
    /* Reduced image height */
}

.compact-card .doc-card h4 {
    font-size: 1rem;
    /* Smaller title */
}

.compact-card .doc-card p {
    font-size: 0.8rem;
    /* Smaller text */
}

/* Ensure container allows smaller card */
.doc-card-container.compact-card {
    /* Optional: adjustments if needed, currently mainly targets children */
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Video Reload Button */
.video-reload,
.dark-mode .video-reload {
    text-align: center;
    margin-top: 0.5rem;
    cursor: pointer;
    color: #000000ff !important;
    font-weight: bold;
    /* Important to override dark mode defaults */
    font-size: 0.8rem;
}