/* ==========================================================================
   PROGRAM.CSS - ACM HCOMP 2026
   Styles for the program page listings (papers, talks, posters/demos, DC).
   ========================================================================== */

/* --------------------------------------------------
   1. Jump Navigation
   -------------------------------------------------- */
.program-jump {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: 2rem;
    margin-bottom: 2.5rem;
}

.program-jump-label {
    font-size: 0.9rem;
    color: #777;
    font-weight: 600;
    margin-right: 0.25rem;
}

.program-jump a {
    display: inline-block;
    background-color: #f3f3f3;
    color: var(--primary-color, #861F41);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none !important;
    padding: 0.4rem 0.85rem;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.program-jump a:hover {
    background-color: #ffffff;
    border-color: var(--secondary-color, #E87722);
    color: var(--secondary-color, #E87722);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.06);
}

.program-jump a:focus-visible {
    outline: 2px solid var(--secondary-color, #E87722);
    outline-offset: 2px;
}

/* --------------------------------------------------
   2. Listing Sections
   -------------------------------------------------- */
:root {
    --program-anchor-offset: 10rem;
}

.program-section {
    scroll-margin-top: var(--program-anchor-offset);
    margin-bottom: 3.5rem;
}

.program-note {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555555;
    margin-top: -0.5rem;
    margin-bottom: 1.75rem;
    max-width: 75ch;
}

/* --------------------------------------------------
   3. Listings
   -------------------------------------------------- */
.program-list {
    list-style: none !important;
    padding-left: 0 !important;
    margin-bottom: 0 !important;
}

.program-item {
    padding: 1.15rem 0;
    border-bottom: 1px solid #eeeeee;
    margin-bottom: 0 !important;
}

.program-item:first-child {
    padding-top: 0;
}

.program-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.program-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.5;
    color: #111111;
    margin-bottom: 0.25rem !important;
    max-width: 75ch;
}

.program-title a {
    color: var(--primary-color, #861F41);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.program-title a:hover {
    color: var(--secondary-color, #E87722);
    border-bottom-color: var(--secondary-color, #E87722);
}

.program-title a:focus-visible {
    outline: 2px solid var(--secondary-color, #E87722);
    outline-offset: 3px;
    border-radius: 2px;
}

.program-authors {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555555;
    margin-bottom: 0 !important;
    max-width: 75ch;
}

/* Two columns for posters and demos list */
.program-list.is-split {
    column-count: 2;
    column-gap: 3.5rem;
}

.program-list.is-split .program-item {
    break-inside: avoid;
    padding: 0 0 1.1rem 0;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid #eeeeee;
}

/* --------------------------------------------------
   4. Poster / Demo Tags
   -------------------------------------------------- */
.program-type {
    display: inline-block;
    background-color: #f0f0f0;
    color: #555555;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 3px;
    vertical-align: 2px;
    white-space: nowrap;
    margin-left: 6px;
}

.program-type.is-demo {
    background-color: rgba(232, 119, 34, 0.15);
    color: #d16b1f;
}

/* --------------------------------------------------
   5. Keynotes Grid & Spotlight Showcase Styling
   -------------------------------------------------- */
.keynote-showcase-container {
    position: relative;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.keynote-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: opacity 0.3s ease;
}

.keynote-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 2.2rem 1.5rem 1.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    cursor: pointer;
    margin-bottom: 0 !important;
}

.keynote-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
    border-color: rgba(134, 31, 65, 0.25);
}

.keynote-badge {
    display: inline-block;
    padding: 4px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    margin-bottom: 1.25rem;
}

.badge-industry {
    background-color: rgba(232, 119, 34, 0.12);
    color: #d16b1f;
    border: 1px solid rgba(232, 119, 34, 0.3);
}

.badge-academia {
    background-color: rgba(134, 31, 65, 0.1);
    color: #861F41;
    border: 1px solid rgba(134, 31, 65, 0.25);
}

.badge-government {
    background-color: rgba(0, 167, 157, 0.12);
    color: #008080;
    border: 1px solid rgba(0, 167, 157, 0.3);
}

.keynote-photo-wrapper {
    position: relative;
    margin-bottom: 1.25rem;
}

.keynote-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    display: block;
    background-color: #f0f0f0;
}

.keynote-card.is-industry .keynote-photo,
.spotlight-content.is-industry .spotlight-avatar {
    box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px #E87722;
}

.keynote-card.is-academia .keynote-photo,
.spotlight-content.is-academia .spotlight-avatar {
    box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px #861F41;
}

.keynote-card.is-government .keynote-photo,
.spotlight-content.is-government .spotlight-avatar {
    box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px #00a79d;
}

.keynote-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
}

.keynote-name {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.35rem;
    color: var(--primary-color, #861F41);
}

.keynote-role {
    font-size: 0.95rem;
    line-height: 1.4;
    color: #444;
    margin-bottom: 0.2rem;
}

.keynote-org {
    font-size: 1rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 1.25rem;
}

.keynote-schedule {
    margin-top: auto;
    width: 100%;
    padding-top: 0.9rem;
    border-top: 1px solid #eaeaea;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    text-align: center;
}

.keynote-day {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.keynote-day i {
    color: var(--primary-color, #861F41);
}

.keynote-time {
    margin-bottom: 0 !important;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary-color, #E87722);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.keynote-time i {
    color: var(--secondary-color, #E87722);
}

/* Card CTA Action Button */
.keynote-view-btn {
    margin-top: 1.15rem;
    width: 100%;
    padding: 9px 18px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
    font-family: inherit;
}

.keynote-card:hover .keynote-view-btn,
.keynote-view-btn:hover {
    background: var(--primary-color, #861F41);
    border-color: var(--primary-color, #861F41);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(134, 31, 65, 0.25);
}

/* --------------------------------------------------
   Spotlight Full Row View (Single Active Speaker Showcase)
   -------------------------------------------------- */
.keynote-spotlight-panel {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    padding: 1.5rem 1.75rem 2rem;
    animation: spotlightFadeIn 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

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

.spotlight-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 1.15rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eaeaea;
}

.spotlight-header-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spotlight-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #f4f4f4;
    border: 1px solid #dcdcdc;
    color: #444;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.spotlight-back-btn:hover {
    background: var(--primary-color, #861F41);
    border-color: var(--primary-color, #861F41);
    color: white;
}

.spotlight-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.spotlight-tab {
    background: transparent;
    border: 1px solid #e0e0e0;
    color: #555;
    padding: 6px 13px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.spotlight-tab:hover {
    border-color: #bbb;
    color: #222;
}

.spotlight-tab.is-industry.is-active {
    background: #E87722;
    border-color: #E87722;
    color: white;
}

.spotlight-tab.is-academia.is-active {
    background: #861F41;
    border-color: #861F41;
    color: white;
}

.spotlight-tab.is-government.is-active {
    background: #008080;
    border-color: #008080;
    color: white;
}

.spotlight-close-btn {
    background: transparent;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.2s ease;
}

.spotlight-close-btn:hover {
    color: var(--primary-color, #861F41);
}

.spotlight-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* Sidebar / Profile Area */
.spotlight-sidebar {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-right: 1.75rem;
    border-right: 1px solid #eaeaea;
}

.spotlight-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    display: block;
    background-color: #f0f0f0;
    margin-bottom: 0.85rem;
}

.spotlight-sidebar-info {
    width: 100%;
}

.spotlight-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-color, #861F41);
    margin: 0 0 0.25rem 0;
}

.spotlight-name a {
    color: inherit !important;
    text-decoration: none !important;
}

.spotlight-name a:hover {
    color: var(--secondary-color, #E87722) !important;
}

.spotlight-role {
    font-size: 0.88rem;
    color: #555;
    margin-bottom: 0.2rem;
    line-height: 1.35;
}

.spotlight-org {
    font-size: 0.95rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 1rem;
}

.spotlight-schedule-box {
    background: #f9f9f9;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 0.75rem 0.85rem;
    width: 100%;
    font-size: 0.82rem;
    color: #444;
    text-align: center;
}

.spotlight-schedule-box p {
    margin-bottom: 3px !important;
}

.spotlight-schedule-box .highlight-time {
    font-weight: 700;
    color: var(--secondary-color, #E87722);
    margin-bottom: 0 !important;
}

/* Detail Area & Segmented Chunking Subtabs */
.spotlight-details {
    flex: 1;
    min-width: 0;
}

.spotlight-subtabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
}

.spotlight-subtab-btn {
    background: #f5f5f5;
    border: 1px solid #e4e4e4;
    color: #555;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.spotlight-subtab-btn:hover {
    background: #ececec;
    color: #222;
}

.spotlight-subtab-btn.is-active {
    background: var(--primary-color, #861F41);
    border-color: var(--primary-color, #861F41);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(134, 31, 65, 0.2);
}

.spotlight-subtab-btn i {
    font-size: 0.85rem;
}

.spotlight-panel-view {
    display: none;
    animation: subtabFadeIn 0.25s ease-out forwards;
}

.spotlight-panel-view.is-active {
    display: block;
}

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

.spotlight-talk-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.spotlight-abstract,
.spotlight-bio {
    font-size: 0.94rem;
    color: #333333;
    line-height: 1.65;
    margin-bottom: 0.85rem !important;
}

.spotlight-abstract:last-child,
.spotlight-bio:last-child {
    margin-bottom: 0 !important;
}

.keynote-pending {
    font-size: 0.9rem;
    font-style: italic;
    color: #666666;
    background: #f9f9f9;
    padding: 0.85rem 1.15rem;
    border-radius: 6px;
    border-left: 3px solid #ccc;
    margin-bottom: 0 !important;
}

/* --------------------------------------------------
   Tablet & Mobile Optimization (Screen width <= 880px)
   -------------------------------------------------- */
@media (max-width: 880px) {
    .keynote-spotlight-panel {
        padding: 1.25rem 1rem 1.5rem;
    }

    .spotlight-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }

    .spotlight-header-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .spotlight-tabs {
        display: flex;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        scrollbar-width: none;
    }

    .spotlight-tabs::-webkit-scrollbar {
        display: none;
    }

    .spotlight-tab {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .spotlight-content {
        flex-direction: column;
        gap: 1.25rem;
    }

    /* Compact horizontal profile banner on mobile/tablet */
    .spotlight-sidebar {
        width: 100%;
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid #eaeaea;
        padding-bottom: 1.15rem;
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .spotlight-avatar {
        width: 68px;
        height: 68px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .spotlight-sidebar-info {
        flex: 1;
        min-width: 180px;
    }

    .spotlight-sidebar-info .spotlight-name {
        font-size: 1.2rem;
        margin: 0 0 2px 0;
    }

    .spotlight-sidebar-info .spotlight-role {
        font-size: 0.82rem;
        margin-bottom: 2px;
    }

    .spotlight-sidebar-info .spotlight-org {
        font-size: 0.86rem;
        margin-bottom: 0;
    }

    .spotlight-schedule-box {
        width: 100%;
        margin-top: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.5rem 0.85rem;
        font-size: 0.78rem;
    }

    .spotlight-schedule-box p {
        margin-bottom: 0 !important;
    }

    .spotlight-subtabs {
        width: 100%;
        justify-content: flex-start;
    }

    .spotlight-subtab-btn {
        flex: 1;
        justify-content: center;
        font-size: 0.82rem;
        padding: 7px 10px;
    }

    .spotlight-talk-title {
        font-size: 1.1rem;
    }

    .spotlight-abstract,
    .spotlight-bio {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}

/* --------------------------------------------------
   6. CTA Box & Highlight Box Tweaks
   -------------------------------------------------- */
.cta-box {
    background-color: #f8f8f8;
    border-left: 4px solid var(--secondary-color, #E87722);
    padding: 2rem 2.5rem;
    margin-bottom: 3.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    border-radius: 0 4px 4px 0;
}

.cta-box h3 {
    color: var(--primary-color, #861F41);
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.cta-box p {
    margin-bottom: 1.25rem;
    max-width: 950px;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color, #861F41);
    color: #ffffff !important;
    padding: 12px 28px;
    text-decoration: none !important;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1.05rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border-bottom: 3px solid var(--secondary-color, #E87722);
}

.cta-button:hover {
    background-color: var(--secondary-color, #E87722);
    color: #ffffff !important;
    transform: translateY(-2px);
}

.highlight-box {
    background-color: rgba(134, 31, 65, 0.04);
    border-left: 4px solid var(--primary-color, #861F41);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 4px 4px 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.highlight-box p:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------
   7. Responsive Adjustments
   -------------------------------------------------- */
@media (max-width: 960px) {
    .program-list.is-split {
        column-count: 1;
    }
}

@media (max-width: 768px) {
    :root {
        --program-anchor-offset: 17rem;
    }

    .program-title {
        font-size: 1rem;
    }

    .program-item {
        padding: 1rem 0;
    }

    .cta-box {
        padding: 1.5rem;
    }

    .keynote-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    :root {
        --program-anchor-offset: 22rem;
    }
}
