/* =========================================================
   BRICS YSF — Programme page (programme.php)
   Loaded after home.css and about.css.
   ========================================================= */

.pg-wrap {
    --t1: var(--c1);   /* YSF Theme-I   */
    --t2: var(--c4);   /* YSF Theme-II  */
    --t3: var(--c3);   /* YSF Theme-III */
    --yip: #7b3fb5;    /* YIP           */
    padding-block: 32px 88px;
}

/* Date bar: weekday + date, jumps to each day */
.pg-days .pg-day-link {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
    padding-block: 0.8rem;
    line-height: 1.15;
}
.pg-tab-day {
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    color: var(--accent-dark);
}
.pg-tab-date {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 600;
}
.pg-days .pg-day-link[aria-current="true"] {
    color: var(--navy);
}
.pg-days .pg-day-link[aria-current="true"]::after {
    transform: scaleX(1);
}
.pg-days .pg-day-link.is-today .pg-tab-day::after {
    content: " · Today";
}

/* Toolbar: print */
.pg-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}
.pg-print {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: 0.86rem;
    font-weight: 700;
    transition: border-color 0.2s;
}
.pg-print:hover {
    border-color: var(--navy);
}
.pg-print::before {
    content: "";
    width: 16px;
    height: 16px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9V2h12v7M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'/%3E%3Cpath d='M6 14h12v8H6z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9V2h12v7M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'/%3E%3Cpath d='M6 14h12v8H6z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Days: all shown, one below the other */
.pg-day {
    scroll-margin-top: 170px; /* clears the sticky header + date bar when jumping to a day */
}
.pg-day + .pg-day {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid var(--line);
}
.pg-day-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem;
    margin: 0 0 24px;
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    color: var(--navy);
}
.pg-day-title span {
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--accent-dark);
}

/* Timeline */
.pg-timeline {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}
.pg-timeline::before {
    content: "";
    position: absolute;
    left: 150px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(var(--line), var(--line));
}
.pg-item {
    position: relative;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 0 32px;
    padding-bottom: 22px;
}
.pg-item::before {
    /* timeline dot */
    content: "";
    position: absolute;
    left: 145px;
    top: 9px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--paper);
    border: 2px solid var(--navy);
}
.pg-time time {
    display: inline-block;
    padding-top: 2px;
    font-size: 0.92rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--navy);
    white-space: nowrap;
}

.pg-card {
    padding: 1.25rem 1.4rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 18px 32px -30px rgba(12, 27, 51, 0.6);
}
.pg-plenary {
    border-left: 4px solid var(--accent);
}
.pg-plenary h3 {
    margin: 0;
    font-size: 1.35rem;
    color: var(--navy);
}
.pg-lines {
    display: grid;
    gap: 0.4rem;
    margin: 0.9rem 0 0;
    padding: 0;
    list-style: none;
}
.pg-lines li {
    position: relative;
    padding-left: 1.2rem;
    color: #3f4a5a;
}
.pg-lines li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}
.pg-note .pg-plenary {
    background: var(--navy);
    border-color: transparent;
    border-left-color: var(--c5);
}
.pg-note .pg-plenary h3 {
    color: #fff;
}

/* Breaks */
.pg-break {
    padding-bottom: 18px;
}
.pg-break::before {
    width: 8px;
    height: 8px;
    left: 147px;
    top: 7px;
    border-color: var(--muted);
}
.pg-break .pg-time time {
    font-weight: 600;
    color: var(--muted);
}
.pg-break-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    padding: 0.35rem 0.9rem;
    border: 1px dashed rgba(12, 27, 51, 0.2);
    border-radius: 999px;
    width: fit-content;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}
.pg-break-icon {
    width: 16px;
    height: 16px;
    background: var(--accent-dark);
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
}
.pg-icon-tea {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 8h1a4 4 0 0 1 0 8h-1M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4z'/%3E%3Cpath d='M6 2v2M10 2v2M14 2v2'/%3E%3C/svg%3E");
}
.pg-icon-lunch {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2M7 2v20M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3zm0 0v7'/%3E%3C/svg%3E");
}

/* Sessions */
.pg-session-title {
    margin: 0 0 12px;
    font-size: 1.35rem;
    color: var(--navy);
}
.pg-tracks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.pg-track {
    --tc: var(--navy);
    position: relative;
    overflow: hidden;
    padding-top: 1.35rem;
}
.pg-track::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    background: var(--tc);
}
.pg-track[data-track="theme-1"] { --tc: var(--t1); }
.pg-track[data-track="theme-2"] { --tc: var(--t2); }
.pg-track[data-track="theme-3"] { --tc: var(--t3); }
.pg-track[data-track="yip"] { --tc: var(--yip); }
.pg-track h4 {
    margin: 0 0 0.4rem;
    font-family: var(--sans);
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--tc);
}
.pg-format {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.9rem;
    margin: 0 0 0.85rem;
    font-size: 0.8rem;
    color: var(--muted);
}
.pg-format span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.pg-format span::before {
    content: "";
    width: 12px;
    height: 12px;
    background: var(--muted);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pg-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.pg-chips li {
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    background: var(--paper);
    font-size: 0.8rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}
.pg-yip-card {
    background: linear-gradient(135deg, #fff 60%, rgba(123, 63, 181, 0.07));
}
.pg-yip-card .pg-chips li {
    background: rgba(123, 63, 181, 0.08);
}

/* Live "Now" marker during the Forum (set by programme.js, India time) */
.pg-item.is-past {
    opacity: 0.55;
}
.pg-item.is-now::before {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 6px rgba(232, 137, 43, 0.25);
}
.pg-item.is-now .pg-time time::after {
    content: "Now";
    display: block;
    width: fit-content;
    margin-top: 0.4rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
    .pg-tracks {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .pg-wrap {
        padding-block: 20px 56px;
    }
    .pg-toolbar {
        margin-bottom: 20px;
    }
    .pg-print {
        display: none;
    }
    .pg-timeline::before {
        left: 5px;
    }
    .pg-item {
        grid-template-columns: 1fr;
        gap: 8px;
        padding-left: 28px;
    }
    .pg-item::before,
    .pg-break::before {
        left: 0;
        top: 4px;
    }
    .pg-break::before {
        left: 2px;
    }
    .pg-tracks {
        grid-template-columns: 1fr;
    }
    .pg-day {
        scroll-margin-top: 150px;
    }
    .pg-day + .pg-day {
        margin-top: 28px;
        padding-top: 28px;
    }
    .pg-days .pg-day-link {
        padding-inline: 0.75rem;
    }
}

/* ---------- Print: whole programme, all days ---------- */

@media print {
    .header,
    .section-bar,
    .page-hero-bg,
    .breadcrumb,
    .brics-bar,
    .pg-toolbar,
    footer,
    .skip-link {
        display: none !important;
    }
    body {
        background: #fff;
    }
    .page-hero {
        min-height: 0;
        background: none;
        color: #000;
    }
    .page-hero::before {
        display: none;
    }
    .page-hero h1 {
        color: #000;
    }
    .page-hero-inner {
        padding-block: 0 12px;
    }
    .pg-day {
        break-before: page;
        border-top: 0 !important;
    }
    .pg-day:first-of-type {
        break-before: auto;
    }
    .pg-tracks {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .pg-item {
        break-inside: avoid;
        opacity: 1 !important;
    }
    .pg-card {
        box-shadow: none;
    }
    .pg-item.is-now .pg-time time::after {
        display: none;
    }
}

/* Speakers (welcome, keynote and valedictory addresses) */
.pg-speaker {
    margin-top: 0.7rem;
}
.pg-talk {
    margin: 0 0 0.6rem;
    font-family: var(--serif);
    font-size: 1.08rem;
    font-style: italic;
    line-height: 1.4;
    color: var(--navy);
}
.pg-person {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin: 0;
}
.pg-person strong {
    display: block;
    font-size: 0.95rem;
    color: var(--accent-dark);
}
.pg-person small {
    display: block;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--muted);
}
.pg-person-icon {
    flex: none;
    width: 30px;
    height: 30px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--paper);
    position: relative;
}
.pg-person-icon::before {
    content: "";
    position: absolute;
    inset: 7px;
    background: var(--accent-dark);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4.5'/%3E%3Cpath d='M3 22c0-5 4-8.5 9-8.5s9 3.5 9 8.5z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4.5'/%3E%3Cpath d='M3 22c0-5 4-8.5 9-8.5s9 3.5 9 8.5z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pg-lines .pg-speaker {
    margin: 0.45rem 0 0.25rem;
}

/* =========================================================
   Final programme (Nov 2026): named sessions, jury, delegations
   ========================================================= */
.pg-icon-photo {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h3l2-3h6l2 3h3a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E");
}
.pg-track[data-track="mixed"] { --tc: var(--t2); }
.pg-track[data-track="mixed"]::before { background: linear-gradient(90deg, var(--t2) 50%, var(--t3) 50%); }

/* Session card */
.pg-scard {
    padding: 1.35rem 1.4rem 1.2rem;
}
.pg-session-head {
    display: grid;
    gap: 0.2rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--line);
}
.pg-scard .pg-session-title {
    margin: 0;
    font-family: var(--sans);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--tc);
}
.pg-session-theme {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.3rem;
    line-height: 1.25;
    color: var(--navy);
}
.pg-scard .pg-format {
    margin: 0.25rem 0 0;
}
.pg-scard[data-track="yip"] {
    background: linear-gradient(135deg, #fff 62%, rgba(123, 63, 181, 0.06));
}

/* Running order */
.pg-people {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 1.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.pg-people li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.55rem 0;
    border-top: 1px dashed rgba(12, 27, 51, 0.12);
}
.pg-people li:nth-child(-n+2) {
    border-top: 0;
}
.pg-num {
    flex: none;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--paper);
    background: color-mix(in srgb, var(--tc) 12%, #fff);
    color: var(--tc);
    font-size: 0.75rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.pg-who {
    min-width: 0;
}
.pg-who a,
.pg-delegations a {
    display: block;
    font-weight: 700;
    font-size: 0.97rem;
    line-height: 1.3;
    color: var(--ink);
    text-decoration: none;
}
.pg-who a:hover,
.pg-delegations a:hover {
    color: var(--tc, var(--accent-dark));
    text-decoration: underline;
    text-underline-offset: 3px;
}
.pg-who small,
.pg-delegations small {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.83rem;
    line-height: 1.45;
    color: var(--muted);
}

/* Jury panel inside Session-03 */
.pg-jury {
    margin-top: 1rem;
    padding: 1rem 1.1rem 0.6rem;
    border-radius: 12px;
    background: rgba(123, 63, 181, 0.06);
}
.pg-jury h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.4rem;
    font-family: var(--sans);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--yip);
}
.pg-jury h4::before {
    content: "";
    width: 15px;
    height: 15px;
    background: var(--yip);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M5 7h14M5 7l-3 7a3 3 0 0 0 6 0zM19 7l-3 7a3 3 0 0 0 6 0zM8 21h8'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M5 7h14M5 7l-3 7a3 3 0 0 0 6 0zM19 7l-3 7a3 3 0 0 0 6 0zM8 21h8'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pg-people-plain li {
    padding-left: 0;
}

/* Welcome lines: several speakers, delegation tiles */
.pg-line-title {
    font-weight: 700;
    color: var(--navy);
}
.pg-line-note {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    background: var(--paper);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
}
.pg-speakers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.2rem 1.2rem;
}
.pg-lines .pg-speakers .pg-speaker {
    margin: 0.45rem 0 0.25rem;
}
.pg-plenary > .pg-speakers {
    margin-top: 0.4rem;
}
.pg-lines > li + li {
    margin-top: 0.55rem;
}
.pg-delegations {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0.7rem 0 0.2rem;
    padding: 0;
    list-style: none;
}
.pg-lines .pg-delegations li {
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
    background: var(--paper);
}
.pg-lines .pg-delegations li::before {
    display: none;
}
.pg-country {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-dark);
}

@media (max-width: 900px) {
    .pg-delegations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .pg-people { grid-template-columns: 1fr; }
    .pg-people li:nth-child(2) { border-top: 1px dashed rgba(12, 27, 51, 0.12); }
    .pg-delegations { grid-template-columns: 1fr; }
    .pg-session-theme { font-size: 1.15rem; }
}
@media print {
    .pg-who a, .pg-delegations a { color: #000; }
    .pg-scard, .pg-jury { break-inside: avoid; }
}
/* Names without a profile link (not on the Participants page) */
.pg-who b,
.pg-delegations b {
    display: block;
    font-weight: 700;
    font-size: 0.97rem;
    line-height: 1.3;
    color: var(--ink);
}
