/* ==========================================================================
   IMPT – Transport Poverty Workshop Barcelona (EIT Urban Mobility Template)
   ========================================================================== */

/* --- Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@300;400;600&family=Play:wght@400;700&display=swap');

/* --- Reveal Base & Light Slide Background --- */
.reveal {
    font-family: 'Barlow', sans-serif; /* Alternative font:Montserrat */
    font-size: 28px;
    font-weight: 400;
    color: #424141;
    background-color: #FFFFFF;
}

/* --- Typography & Base Colors --- */
.reveal p {
    color: #424141;
    font-size: 0.9em;
    line-height: 1.5;
    font-weight: 400;
}

.reveal a {
    color: #f43737; 
    text-decoration: none;
    transition: color 0.2s ease;
}

.reveal a:hover {
    color: #FBAE40;
}

.reveal ul,
.reveal ol,
.reveal li {
    color: #555555;
    font-size: 0.92em;
    line-height: 1.45;
}

.slide-1em-list ul,
.slide-1em-list li {
    font-size: 1em !important;
}

.reveal ul ul,
.reveal ol ol {
    font-size: 0.85em;
    color: #666666;
}

/* --- Headings (Play font matching PPT template) --- */
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
    font-family: 'Play', sans-serif;
    font-weight: 700;
    text-transform: none;
    letter-spacing: -0.01em;
}

.reveal h1 {
    font-size: 2.8em;
    color: #181D70;
}

.reveal h2 {
    font-size: 1.55em;
    color: #181D70;
    margin-bottom: 0.6em;
}

.reveal h3 {
    font-size: 1.25em;
    color: #156082;
}

.reveal h4 {
    font-size: 1.05em;
    color: #E97132;
}

/* --- Title Slide Custom Classes --- */
.title {
    font-family: 'Play', sans-serif !important;
    font-weight: 700 !important;
    font-size: 58px !important;
    line-height: 1.15em !important;
    color: #181D70 !important;
}

.subtitle {
    font-family: 'Play', sans-serif !important;
    font-weight: 700 !important;
    font-size: 34px !important;
    color: #FFC74D !important;
    margin-top: 12px !important;
}

/* Cover slide on dark template background (#181D70) */
.cover-slide {
    color: #FFFFFF !important;
}

.cover-slide .title {
    color: #FFFFFF !important;
}

.cover-slide .subtitle {
    color: #FFC74D !important;
}

.cover-slide h3 {
    color: #A9DCFF !important;
}

.cover-slide p,
.cover-slide li {
    color: #E0E7FF !important;
}

.cover-slide a {
    color: #A9DCFF !important;
}

.cover-slide-logos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 1em;
    padding-bottom: 0.6em;
}

.cover-institution-box {
    background: rgba(255, 255, 255, 0.94);
    border-radius: 8px;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

/* --- Section Slides (Dark Separators matching #181D70) --- */
.section-slide {
    text-align: center;
}

.section-slide h1 {
    font-family: 'Play', sans-serif !important;
    font-weight: 700 !important;
    color: #FFFFFF !important;
    font-size: 2.3em;
    border-bottom: 3px solid #FFC74D;
    padding-bottom: 0.3em;
    display: inline-block;
}

.section-slide h2 {
    font-family: 'Play', sans-serif !important;
    color: #FFC74D !important;
    font-size: 1.3em;
}

.section-slide p,
.section-slide li {
    color: #D3ECFD !important;
}

/* Dark section slide reveal background override */
.reveal .slide-background.section-slide,
.reveal .slide-background[data-background-hash*="181d70"],
.reveal .slide-background[data-background-hash*="181D70"] {
    background-color: #181D70 !important;
}

/* --- Template Alternative Slide Styles --- */
.slide-blue {
    background-color: #A9DCFF !important;
    color: #181D70 !important;
}

.slide-blue h1,
.slide-blue h2,
.slide-blue h3 {
    color: #181D70 !important;
}

.slide-yellow {
    background-color: #FFC74D !important;
    color: #181D70 !important;
}

.slide-yellow h1,
.slide-yellow h2,
.slide-yellow h3 {
    color: #181D70 !important;
}

/* --- Figures & Captions --- */
.reveal figcaption,
.reveal .caption {
    font-size: 0.55em !important;
    color: #75757A !important;
    margin-top: 4px !important;
    text-align: center !important;
    font-weight: 400;
}

/* --- Tables --- */
.reveal table {
    font-size: 0.78em;
    line-height: 1.5 !important;
    border-collapse: collapse !important;
    width: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.reveal table th,
.reveal table td {
    border: none;
    box-shadow: none !important;
    text-align: center;
    padding: 0.22em 0.7em !important;
    color: #424141;
}

.reveal table th {
    font-family: 'Play', sans-serif;
    font-weight: 700;
    color: #181D70;
}

.reveal table thead {
    border-bottom: 2px solid #181D70 !important;
}

.reveal table tr:nth-child(even) {
    background-color: rgba(169, 220, 255, 0.16); /* soft sky-blue tint from template #A9DCFF */
}

/* --- Utility Layout --- */
.v-center-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
}

.h-center-text {
    text-align: center !important;
}

.h-center-text ul {
    display: inline-block !important;
    text-align: left !important;
}

/* --- Dimension Cards --- */
.dim-card {
    margin-bottom: 0.5em;
    font-size: 0.88em;
    line-height: 1.4;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dim-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(24, 29, 112, 0.08);
}

/* --- Table Wrapper & Notes --- */
.table-wrapper {
    margin: auto;
    width: fit-content;
    max-width: 100%;
}

.table-note {
    font-size: 0.52em !important;
    color: #75757A !important;
    text-align: right;
    margin-top: 0.3em;
    line-height: 1.2;
}

/* --- References --- */
div[id="refs"] {
    font-size: 0.82em;
    color: #555555;
}

div[id="refs"] .csl-entry {
    margin-bottom: 0.8em !important;
}

/* --- Footer & Slide Number --- */
.reveal .slide-number {
    font-family: 'Play', sans-serif;
    font-size: 0.55em;
    color: #181D70;
    background: transparent;
}

.reveal .footer {
    font-family: 'Barlow', sans-serif;
    font-size: 0.5em;
    color: #75757A;
    width: 100%;
    max-width: 100%;
    left: 0;
    right: 0;
    margin: 0 auto;
    text-align: center;
    bottom: 12px;
}

.reveal .slide-logo {
    max-height: 32px;
    height: 32px;
    right: 20px !important;
    bottom: 10px !important;
}

/* Invert colors when on dark background */
.reveal.has-dark-background .slide-logo {
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

.reveal.has-dark-background .footer {
    color: #A9DCFF;
}

.reveal.has-dark-background .slide-number {
    color: #FFC74D;
}

/* --- Blockquotes --- */
.reveal blockquote {
    border-left: 4px solid #FFC74D; /* Warm template yellow */
    padding: 0.4em 0.9em;
    color: #181D70;
    background: rgba(255, 199, 77, 0.12);
    border-radius: 0 6px 6px 0;
    box-shadow: none;
    font-style: normal;
}

/* --- Button / Link Pill --- */
.reveal a.btn-action,
.reveal .btn-action,
a.btn-action {
    display: inline-block !important;
    background-color: #181D70 !important;
    color: #FFFFFF !important;
    padding: 0.55em 1.3em !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-family: 'Play', sans-serif !important;
    /* font-weight: 700; */
    box-shadow: 0 4px 12px rgba(24, 29, 112, 0.25) !important;
    transition: background-color 0.2s ease, transform 0.15s ease !important;
}

.reveal a.btn-action:hover,
.reveal .btn-action:hover,
a.btn-action:hover {
    background-color: #FFC74D !important;
    color: #181D70 !important;
    transform: translateY(-2px) !important;
}

/* Hide slide logo and footer on cover slide, section slides, or slides with .no-footer / .no-logo */
.reveal:has(.slides > section.present.cover-slide) .slide-logo,
.reveal:has(.slides > section.present.cover-slide) .footer,
.reveal:has(.slides > section.present.section-slide) .slide-logo,
.reveal:has(.slides > section.present.section-slide) .footer,
.reveal:has(.slides > section.stack.present > section.present.section-slide) .slide-logo,
.reveal:has(.slides > section.stack.present > section.present.section-slide) .footer,
.reveal:has(.slides > section.present.no-footer) .footer,
.reveal:has(.slides > section.stack.present > section.present.no-footer) .footer,
.reveal:has(.slides > section.present.no-logo) .slide-logo,
.reveal:has(.slides > section.stack.present > section.present.no-logo) .slide-logo {
    display: none !important;
}

/* --- Interactive Widgets (PCA, etc.) --- */
.reveal .small,
.small {
    font-size: 0.75em;
    color: #555;
    line-height: 1.35;
}

.reveal .tiny,
.tiny {
    font-size: 0.58em;
    color: #666;
    line-height: 1.25;
}

.reveal .widget,
.widget {
    background: none;
    /* border-top: 3px solid #BFBFBF; */
    padding: 0.5em 0 0.35em;
    margin-bottom: 0.6em;
}

.reveal .widget .row,
.widget .row {
    display: grid;
    grid-template-columns: 9em 1fr 3.4em;
    align-items: center;
    gap: 0.5em;
    margin: 0.15em 0;
}

.reveal .widget input[type=range],
.widget input[type=range] {
    width: 100%;
    accent-color: #181D70;
}

.reveal .widget .val,
.widget .val {
    text-align: right;
    font-weight: 600;
    color: #404040;
}

.reveal .preset,
.preset {
    font: inherit;
    font-size: 0.85em;
    border: 2px solid #404040;
    background: #fff;
    color: #404040;
    border-radius: 999px;
    padding: 0.15em 0.8em;
    margin: 0 0.25em 0.3em 0;
    cursor: pointer;
}

.reveal .preset.on,
.reveal .preset:hover,
.preset.on,
.preset:hover {
    background: #404040;
    color: #fff;
}

.reveal .pca canvas,
.pca canvas {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 290px !important;
    height: auto;
    margin: 0 auto;
}
