/* Additions for the CodeIgniter version of the theme. */
@import url('../menu/menu-colors.css');

@import url('../menu/menu-modern.css');

/* "Latest Updates" ticker (replaces the Simple Posts Ticker plugin) */
.latest-updates { overflow: hidden; white-space: nowrap; position: relative; }
.latest-updates-track { display: inline-block; padding-left: 100%; animation: latest-updates-scroll 28s linear infinite; }
.latest-updates:hover .latest-updates-track { animation-play-state: paused; }
.latest-updates .spt-item { display: inline-block; padding: 5px 10px; margin: 0 20px; color: #dd3333; font-weight: 500; font-size: 1.4rem; font-family: "Oswald", sans-serif; text-decoration: none; }
.latest-updates a.spt-item:hover { text-decoration: underline; }
@keyframes latest-updates-scroll { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .latest-updates-track { animation: none; padding-left: 0; white-space: normal; } }

/* The two orange "About" boxes at the bottom of the grey Time Line box */
.new-timeline { box-sizing: border-box; }
.timeline-about { margin-top: auto; padding-top: 28px; width: 100%; display: flex; flex-direction: column; gap: 18px; }
.timeline-about > div { padding: 34px 24px; }
.timeline-about h4 { margin-top: 0; font-size: 1.35rem; }
.timeline-about a { text-decoration: none; }
.timeline-about a:hover { text-decoration: underline; }

/* Footer columns: the Venue column is the widest so the map is shown in landscape */
@media (min-width: 992px) {
    /* Contact and Sponsors take the width of their text, the Venue a fixed share; the free space is split
       into two equal gaps, so the space between the three columns is always the same. */
    #contactus > .d-flex { justify-content: space-between !important; gap: 2rem; }
    #contactus > .d-flex > .footer-col { flex: 0 1 auto; min-width: 0; max-width: 40%; }
    #contactus .footertext { width: auto !important; }
    #contactus > .d-flex > .footer-venue { flex: 0 0 38%; min-width: 0; }
}
.footer-venue iframe { display: block; width: 100%; height: 300px; border: 0; }
@media (max-width: 991.98px) { .footer-venue iframe { height: 260px; } }

/* Footer box: plain rectangle, with the copyright line inside it */
.footer-new { border-radius: 0 !important; }
.footer-after-ribbon, .w-100.px-0.pb-3 { padding-bottom: 0 !important; }
.footer-copyright { color: rgba(255, 255, 255, .85); border-top: 1px solid rgba(255, 255, 255, .25); padding-top: 14px; }
.footer-copyright a { color: #ffb347; }

/* Footer box directly under the green ribbon: no white gap */
.information-stripe { margin-bottom: 0 !important; }
.footer-after-ribbon { margin-top: 0 !important; padding-top: 0 !important; }

/* Every heading gets the green-to-orange bar underneath (same gradient as the speaker cards) */
h1, h2, h3, h4, h5, h6 {
    padding-bottom: .4em;
    margin-bottom: .75rem;
    background: linear-gradient(90deg, #168038 0%, #2fb866 45%, #E88F2A 100%) left bottom / 100% 4px no-repeat;
}
/* Section headings inside page text (e.g. "Chief Patron:"): a title bar with a tinted panel,
   a thick gradient accent on the left, the gradient line underneath and a soft shadow */
.page-content h2, .page-content h3, .page-content h4, .page-content h5, .page-content h6,
.stpec-about-text h2, .stpec-about-text h3, .stpec-about-text h4, .stpec-about-text h5, .stpec-about-text h6 {
    margin: 34px 0 16px;
    padding: 13px 20px 15px 26px;
    border-radius: 8px;
    color: #14351f;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .2px;
    background:
        linear-gradient(90deg, #168038 0%, #2fb866 45%, #E88F2A 100%) left bottom / 100% 4px no-repeat,
        linear-gradient(180deg, #168038 0%, #E88F2A 100%) left top / 7px 100% no-repeat,
        linear-gradient(90deg, rgba(47, 184, 102, .14) 0%, rgba(232, 143, 42, .09) 100%);
    box-shadow: 0 4px 14px rgba(18, 70, 40, .10);
}
.page-content h2, .stpec-about-text h2 { font-size: 2rem; }
.page-content h3, .stpec-about-text h3 { font-size: 1.7rem; }
.page-content h4, .stpec-about-text h4 { font-size: 1.5rem; }
.page-content h5, .page-content h6, .stpec-about-text h5, .stpec-about-text h6 { font-size: 1.25rem; }
.page-content > h2:first-child, .page-content > h3:first-child, .page-content > h4:first-child { margin-top: 8px; }

/* not on the page-title banner at the top of every page */
.page-banner h1, .page-banner h2, .page-banner h3 { background: none; padding-bottom: 0; margin-bottom: .5rem; }
/* not on the white text over the hero video */
.slide-welcome-text h1, .slide-welcome-text h2, .slide-welcome-text h3, .slide-welcome-text h4, .slide-welcome-text h5, .slide-welcome-text h6 {
    background: none; padding-bottom: 0;
}

/* PDF inserted from the editor ("Insert PDF" button) */
.pdf-embedder { margin: 18px 0; }
.pdf-embedder-frame { display: block; width: 100%; height: 80vh; min-height: 560px; border: 1px solid #d3dad3; border-radius: 8px; background: #f4f6f4; }
.pdf-embedder-download { margin: 8px 0 0; text-align: right; font-size: .95rem; }
.pdf-embedder-download a { font-weight: 600; }

/* Page text */
.page-content img { max-width: 100%; height: auto; }
.page-content table { max-width: 100%; }
.page-content iframe { max-width: 100%; }
.sitemap ul { margin-bottom: .25rem; }

/* Speaker cards: same size, same rows, same look. Photo, name, designation, institute and button
   line up across the cards of a row, however much text each speaker has. */
.speakers-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); column-gap: 28px; row-gap: 0; margin: 10px 0 20px; }
@media (max-width: 991.98px) { .speakers-grid { grid-template-columns: repeat(min(var(--cols, 3), 2), minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .speakers-grid { grid-template-columns: minmax(0, 1fr); } }

.speakers-grid .sp-card {
    position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
    margin-bottom: 28px; padding: 30px 22px 26px; overflow: hidden;
    background: #fff; border: 1px solid #e3e8e2; border-radius: 16px;
    box-shadow: 0 10px 28px rgba(18, 70, 40, .12);
    transition: transform .25s ease, box-shadow .25s ease;
}
.speakers-grid .sp-card::before { /* colour band along the top */
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px;
    background: linear-gradient(90deg, #168038, #2fb866 45%, #E88F2A);
}
.speakers-grid .sp-card:hover { transform: translateY(-5px); box-shadow: 0 18px 38px rgba(18, 70, 40, .2); }

/* rows line up across the cards of a row (browsers with subgrid); otherwise the button is pushed to the bottom */
@supports (grid-template-rows: subgrid) {
    .speakers-grid .sp-card { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; justify-items: center; align-items: start; }
}
.speakers-grid .sp-action { margin-top: auto; align-self: end; }

.page-content .speakers-grid .sp-photo,
.speakers-grid .sp-photo { width: 172px; height: 172px; flex: none; border-radius: 50%; padding: 5px; background: #fff; box-shadow: 0 0 0 3px #E88F2A, 0 10px 22px rgba(0, 0, 0, .2); }
.page-content .speakers-grid .sp-photo img,
.speakers-grid .sp-photo img { display: block; width: 100% !important; height: 100% !important; max-width: none !important; border-radius: 50%; object-fit: cover; object-position: center 18%; background: #eef1ee; }

.speakers-grid .sp-name { margin: 22px 0 10px; font-family: "Oswald", sans-serif; font-weight: 600; font-size: 1.4rem; line-height: 1.2; color: #17331f; }
.speakers-grid .sp-role { display: flex; flex-direction: column; gap: 3px; padding: 0 4px; font-size: .98rem; line-height: 1.4; color: #5c6670; text-align: center; }
.speakers-grid .sp-role strong { color: #168038; font-weight: 600; }
.speakers-grid .sp-inst { align-self: start; padding: 12px 4px 0; font-size: .92rem; line-height: 1.4; color: #6b7480; }
.speakers-grid .sp-inst .bi { color: #E88F2A; }
.speakers-grid .sp-action { padding-top: 18px; }
.speakers-grid .sp-action .btn { min-width: 138px; padding: 8px 20px; border-radius: 30px; font-size: .95rem; letter-spacing: .3px; box-shadow: 0 5px 12px rgba(232, 143, 42, .35); }
.speakers-grid .sp-action .btn:hover { filter: brightness(.95); transform: translateY(-1px); }

/* Pager */
.pagination a, .pagination span { padding: 4px 10px; }
