/* ============================================================
   APEX Tech Schedule Plugin — apex-tech-schedule.css
   v2.0.0 — IFSA-themed
   All class names are prefixed with .ats- to avoid theme conflicts.
   ============================================================ */

:root {
    /* IFSA brand palette (matches Elementor globals) */
    --ats-green:        #08916B;  /* primary   */
    --ats-green-dark:   #066d51;  /* derived hover */
    --ats-navy:         #061844;  /* text      */
    --ats-navy-dark:    #040f2c;  /* derived gradient end */
    --ats-secondary:    #B3B7C2;  /* secondary */
    --ats-gold:         #D0A153;  /* accent    */
    --ats-white:        #FFFFFF;

    /* Functional tokens (derived) */
    --ats-text:         var(--ats-navy);
    --ats-text-muted:   #6b7280;
    --ats-bg:           var(--ats-white);
    --ats-bg-soft:      #f6f7f9;
    --ats-border:       #e5e7eb;

    --ats-shadow-sm:    0 2px 6px rgba(6, 24, 68, 0.08);
    --ats-shadow-md:    0 4px 12px rgba(6, 24, 68, 0.12);
    --ats-shadow-lg:    0 10px 30px rgba(6, 24, 68, 0.18);

    --ats-radius:       10px;
    --ats-radius-sm:    6px;

    --ats-font:         -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                        "Helvetica Neue", Arial, sans-serif;
    --ats-font-display: "Open Sans", -apple-system, BlinkMacSystemFont,
                        "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Layout ---------- */
html {
    scroll-behavior: smooth;
}

.ats-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
    font-family: var(--ats-font);
    color: var(--ats-text);
}

.ats-wrapper * {
    box-sizing: border-box;
}

/* ---------- Day nav ---------- */
.ats-day-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 2rem auto;
    padding: 0;
}
.ats-day-menu a {
    padding: 10px 18px;
    background: var(--ats-green);
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
    transition: background 0.2s ease, transform 0.2s ease;
}
.ats-day-menu a:hover {
    background: var(--ats-green-dark);
    transform: translateY(-1px);
}

/* ---------- Day section ---------- */
.ats-day {
    margin-top: 2.5rem;
    scroll-margin-top: 120px; /* clear the sticky site header so the day heading shows when anchored */
}
.ats-day h2 {
    color: var(--ats-navy);
    font-family: var(--ats-font-display);
    font-size: clamp(22px, 2.5vw, 28px);
    font-weight: 700;
    margin: 0 0 0.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--ats-green);
    display: inline-block;
}
.ats-session-count {
    color: var(--ats-text-muted);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
}

/* ---------- Session list ---------- */
.ats-session-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.ats-session {
    background: var(--ats-bg);
    border: 1px solid var(--ats-border);
    border-left: 4px solid var(--ats-green);
    border-radius: var(--ats-radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--ats-shadow-sm);
    scroll-margin-top: 120px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.ats-session:hover {
    box-shadow: var(--ats-shadow-md);
}
.ats-session-time {
    color: var(--ats-green-dark);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.ats-session-location {
    color: var(--ats-text-muted);
    font-size: 13px;
    font-weight: 500;
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ats-session-title {
    font-family: var(--ats-font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--ats-navy);
    line-height: 1.3;
    margin: 0 0 0.75rem;
}
.ats-session-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}
.ats-session-title a:hover {
    color: var(--ats-green);
}
.ats-session-description {
    color: var(--ats-text);
    line-height: 1.6;
    font-size: 15px;
}
.ats-session-description p {
    margin: 0 0 0.75rem;
}
.ats-session-description p:last-child {
    margin-bottom: 0;
}

/* ---------- Sponsors ---------- */
.ats-sponsor-block {
    margin: 0.75rem 0 1rem;
    padding: 0.75rem 1rem;
    background: var(--ats-bg-soft);
    border-radius: var(--ats-radius-sm);
    border-left: 3px solid var(--ats-gold);
}
.ats-sponsor-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ats-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 0.5rem;
}
.ats-sponsor-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
}
.ats-sponsor-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
.ats-sponsor-logo {
    max-height: 70px;
    max-width: 180px;
    width: auto;
    height: auto;
    display: block;
}
.ats-sponsor-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ats-navy);
    margin: 0;
}

/* ---------- Speaker cards ---------- */
.ats-speaker-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}
.ats-speaker-list--directory {
    gap: 1.25rem;
    margin-top: 1.5rem;
}
.ats-speaker {
    position: relative;
    background: #fff;
    border: 1px solid var(--ats-border);
    border-radius: var(--ats-radius);
    box-shadow: var(--ats-shadow-sm);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    flex: 0 0 215px;
    max-width: 215px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.ats-speaker:hover {
    transform: translateY(-3px);
    box-shadow: var(--ats-shadow-md);
    border-color: var(--ats-green);
}
.ats-speaker-photo {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: var(--ats-radius-sm);
    display: block;
    margin: 0 auto;
}
.ats-speaker-info {
    margin-top: 0.75rem;
}
.ats-speaker-name {
    font-weight: 700;
    color: var(--ats-navy);
    font-size: 15px;
    line-height: 1.3;
}
.ats-speaker-company,
.ats-speaker-title {
    font-size: 13px;
    color: var(--ats-text-muted);
    margin-top: 4px;
    line-height: 1.4;
}
.ats-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(29, 58, 90, 0.85);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: var(--ats-radius);
    pointer-events: none;
}
.ats-speaker:hover .ats-hover-overlay {
    opacity: 1;
}

/* ---------- Bio popup ---------- */
.ats-bio-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: #fff;
    padding: 1.5rem;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    border-radius: var(--ats-radius);
    box-shadow: var(--ats-shadow-lg);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    font-family: var(--ats-font);
}
.ats-bio-popup.is-open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}
.ats-bio-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex-shrink: 0;
}
.ats-bio-header img {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: var(--ats-radius-sm);
    flex-shrink: 0;
}
.ats-bio-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.ats-bio-meta h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--ats-navy);
    font-family: var(--ats-font-display);
}
.ats-bio-meta p {
    margin: 4px 0 0;
    color: var(--ats-text-muted);
    line-height: 1.5;
    font-size: 14px;
}
.ats-bio-content {
    overflow-y: auto;
    color: var(--ats-text);
    line-height: 1.6;
    padding-right: 4px;
}
.ats-bio-close {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 28px;
    line-height: 1;
    background: none;
    border: none;
    color: var(--ats-text-muted);
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s ease;
}
.ats-bio-close:hover {
    color: var(--ats-navy);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .ats-speaker-list {
        justify-content: center;
    }
    .ats-speaker {
        flex: 0 0 calc(50% - 0.5rem);
        max-width: calc(50% - 0.5rem);
    }
    .ats-bio-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .ats-bio-meta {
        align-items: center;
    }
    .ats-session {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .ats-speaker {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
