/******************************************************************************/
/*                                                                            */
/* slides.css - Conference slide deck for paged.js                            */
/* ================================================                           */
/*                                                                            */
/* This program is part of the Rexx Parser package                            */
/* [See https://rexx.epbcn.com/rexx-parser/]                                  */
/*                                                                            */
/* Copyright (c) 2024-2026 Josep Maria Blasco <josep.maria.blasco@epbcn.com>  */
/*                                                                            */
/* License: Apache License 2.0 (https://www.apache.org/licenses/LICENSE-2.0)  */
/*                                                                            */
/* Load AFTER rexxpub-base.css.  No size variants — one size fits all.        */
/*                                                                            */
/* Page size: 254mm x 142.875mm (exact 16:9, FHD-compatible)                  */
/* Body font: 20pt sans-serif for projection readability                      */
/*                                                                            */
/* Markdown structure:                                                        */
/*                                                                            */
/*   ::::: title-page        Title slide                                      */
/*   h1 {.slide}             Content slide — h1 is the slide title            */
/*   h1 {.part}              Section divider — centred, large                 */
/*   ::::: closing-page      Optional closing slide                           */
/*                                                                            */
/* Version history:                                                           */
/*                                                                            */
/* Date     Version Details                                                   */
/* -------- ------- --------------------------------------------------------- */
/* 20260303    0.5  First version                                             */
/* 20260306         Refactored: common styles moved to rexxpub-base.css       */
/* 20260411         Title bar with coloured background (print only);          */
/*                  reduced page margins; vertically centred section           */
/*                  dividers; web view unchanged                              */
/* 20260414         New {.slide} class for content slides; {.part} no         */
/*                  longer requires {.newpage} — page break is now in        */
/*                  rexxpub-base.css.  {.newpage} still works.               */
/*                  Fix: closing-page selectors used div.closing-page        */
/*                  but Pandoc generates <section>; changed to               */
/*                  .closing-page (class-only selector)                      */
/* 20260417         Tighter vertical rhythm: line-height 1.4 → 1.3,          */
/*                  paragraph margin-bottom 0.6em → 0.45em.                  */
/*                  Fix: Pandoc-highlighted blocks (div.sourceCode) now      */
/*                  have the same vertical margin as plain pre blocks;       */
/*                  adjacent code blocks (command + output) are tightened.   */
/*                                                                            */
/******************************************************************************/

/******************************************************************************/
/******************************************************************************/
/* Slide content                                                              */
/******************************************************************************/
/******************************************************************************/

div.content {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 20pt;
  line-height: 1.3;                     /* Tighter than base — slides are     */
                                        /* read in glances, not paragraphs    */
  text-align: left;
  text-align-last: left;
  hyphens: manual;                      /* No auto-hyphenation in slides      */
}

/******************************************************************************/
/* Slide title (h1) — web view                                               */
/* Blue text with underline — the original POC style.                        */
/******************************************************************************/

h1 {
  font-size: 1.6em;
  font-weight: bold;
  color: #00529B;
  margin-top: 0;
  margin-bottom: 0.5em;
  padding-bottom: 0.2em;
  border-bottom: 2pt solid #00529B;
}

/******************************************************************************/
/* Section divider slides — web view                                         */
/* Use {.part} on an h1 for a full-page centred section title.               */
/******************************************************************************/

h1.part {
  font-size: 2em;
  text-align: center;
  text-align-last: center;
  border-bottom: none;
  padding-bottom: 0;
  margin-top: 1.5em;                    /* Push down towards vertical centre  */
  color: #00529B;
}

/******************************************************************************/
/* h2, h3 — sub-headings within a slide                                       */
/******************************************************************************/

h2 {
  font-size: 1.2em;
  font-weight: bold;
  color: #333;
  margin-top: 0.8em;
  margin-bottom: 0.3em;
}

h3 {
  font-size: 1em;
  font-weight: bold;
  color: #555;
  margin-top: 0.6em;
  margin-bottom: 0.2em;
}

/******************************************************************************/
/* Paragraphs — block style, no indent                                        */
/******************************************************************************/

div.content p {
  margin: 0;
  margin-bottom: 0.45em;                /* Tighter than base (0.6em) —        */
                                        /* less vertical gap between          */
                                        /* paragraphs on slides               */
  text-indent: 0;
}

/******************************************************************************/
/* Lists — override base for projection readability                           */
/******************************************************************************/

div.content ul,
div.content ol {
  margin-top: 0.3em;
  margin-bottom: 0.5em;
  padding-left: 1.5em;                  /* Tighter than base — space is       */
                                        /* precious on slides                 */
}

div.content li {
  margin-bottom: 0.2em;                 /* Compact but readable               */
}

div.content li:last-child {
  margin-bottom: 0;
}

div.content ul ul,
div.content ol ol,
div.content ul ol,
div.content ol ul {
  margin-top: 0.2em;
  margin-bottom: 0.2em;
  padding-left: 1.3em;
}

/******************************************************************************/
/* Title slide                                                                */
/* Same ::::: title-page structure as article, but styled for projection.     */
/******************************************************************************/

.title-page {
  text-align: center;
  text-align-last: center;
}

.title-page h1 {
  font-size: 1.8em;
  font-weight: bold;
  color: #00529B;
  margin-top: 1em;
  margin-bottom: 0.3em;
  border-bottom: none;
  padding-bottom: 0;
  text-align: center;
  text-align-last: center;
  string-set: presentation-title content();
}

.title-page h1 small {
  display: block;
  font-size: 0.6em;
  margin-top: 0.3em;
  color: #555;
  font-style: italic;
  font-weight: normal;
}

.title-page .author {
  font-size: 1.1em;
  font-weight: normal;
  margin-top: 1em;
}

.title-page .author a {
  color: #00529B;
  text-decoration: none;
}

.title-page .affiliation {
  font-size: 0.85em;
  font-style: italic;
  color: #555;
  margin-top: 0.2em;
}

.title-page .address {
  font-size: 0.8em;
  color: #666;
  margin-top: 0.1em;
}

.title-page .email {
  font-size: 0.8em;
  font-family: Consolas, 'Courier New', monospace;
  margin-top: 0.3em;
}

.title-page .phone {
  font-size: 0.8em;
  font-style: italic;
  color: #666;
  margin-top: 0.1em;
}

.title-page .date {
  font-size: 0.9em;
  margin-top: 1em;
  color: #333;
}

/* Event and venue — useful for conference title slides                       */

.title-page .event {
  font-size: 0.9em;
  color: #00529B;
  margin-top: 1.2em;
}

.title-page .venue {
  font-size: 0.75em;
  color: #666;
  margin-top: 0.1em;
}

/******************************************************************************/
/* Closing slide (thank you, Q&A, contact info)                               */
/******************************************************************************/

div.content .closing-page {
  text-align: center;
  text-align-last: center;
}

div.content .closing-page h1 {
  font-size: 2em;
  border-bottom: none;
  margin-top: 1em;
  color: #00529B;
  text-align: center;
  text-align-last: center;
}

div.content .closing-page p {
  text-align: center;
  text-align-last: center;
}

/******************************************************************************/
/* Inline code — override base: slightly more padding for projection          */
/******************************************************************************/

div.content code {
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

/******************************************************************************/
/* Pre blocks — override base for projection                                  */
/******************************************************************************/

div.content pre {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  font-size: 14pt;
}

div.content > pre {
  background-color: #f5f5f5;
  border: none;
  border-left: none;
  border-radius: 4px;                   /* Slightly rounded for slides        */
  padding: 0.5em 0.8em;
}

/******************************************************************************/
/* Pandoc-highlighted code blocks (div.sourceCode)                            */
/* Without these overrides, highlighted blocks (```bash, ```python, etc.)     */
/* get the base's 1em vertical margin plus div.sourceCode's 0.5em padding —   */
/* noticeably more vertical space than plain fenced blocks.                   */
/******************************************************************************/

div.content div.sourceCode {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  background-color: #f5f5f5;
  border-radius: 4px;
  padding: 0.5em 0.8em;
}

div.content div.sourceCode pre {
  margin: 0;                            /* div.sourceCode already has padding */
  background-color: transparent;
  padding: 0;
}

/* Tighten the gap between adjacent code blocks (e.g. command + output)       */
div.content pre + pre,
div.content div.sourceCode + pre,
div.content pre + div.sourceCode,
div.content div.sourceCode + div.sourceCode {
  margin-top: 0.2em;
}

/******************************************************************************/
/* URIs — override base: shorter font stack for slides                        */
/******************************************************************************/

a.uri {
  font-family: Consolas, 'Courier New', monospace;
  font-size: 0.85em;
}

/******************************************************************************/
/* Quotations — italic with left bar in slides (overrides base)               */
/******************************************************************************/

div.content blockquote,
div.content .quote,
div.content .quotation {
  margin: 0.5em 1.5em;
  padding-left: 0.8em;
  border-left: 3pt solid #00529B;       /* Keep a left bar for slides —       */
                                        /* useful visual anchor on projection */
  font-style: italic;
  color: #444;
}

/******************************************************************************/
/* Tables — override base: slide colours                                      */
/******************************************************************************/

div.content table {
  margin: 0.5em auto;
  font-size: 0.9em;
}

div.content table th,
div.content table td {
  padding: 0.25em 0.6em;
}

div.content table thead {
  border-top: 1.5pt solid #00529B;
  border-bottom: 0.75pt solid #00529B;
}

div.content table tbody {
  border-bottom: 1.5pt solid #00529B;
}

/******************************************************************************/
/******************************************************************************/
/* Print-only styles                                                          */
/* Everything below applies only in paged.js / print mode.                    */
/******************************************************************************/
/******************************************************************************/

@media print {

  /**************************************************************************/
  /* Slide boundary                                                         */
  /**************************************************************************/

  h1.newpage,
  h1.slide {
    margin-top: 0;
  }

  /**************************************************************************/
  /* Slide title (h1) — print view                                         */
  /* Coloured title bar stretching to page edges.  The generous negative    */
  /* margins overshoot any inherited padding; the page box clips them.     */
  /**************************************************************************/

  h1 {
    font-size: 1.4em;
    color: #fff;
    background-color: #00529B;
    margin: 0 -5cm;
    padding: 0.4em 5cm;
    margin-bottom: 0.5em;
    border-bottom: none;
  }

  /**************************************************************************/
  /* Section divider slides — print view                                   */
  /* Vertically centred on the page.                                       */
  /**************************************************************************/

  h1.part {
    background-color: transparent;
    color: #00529B;
    margin: 0;
    margin-top: 45mm;
    padding: 0;
  }

  /**************************************************************************/
  /* Title slide — print view                                              */
  /* No title bar — centred layout as in web view.                         */
  /**************************************************************************/

  .title-page h1 {
    color: #00529B;
    background-color: transparent;
    margin: 1em 0 0.3em 0;
    padding: 0;
  }

  /**************************************************************************/
  /* Closing slide — print view                                            */
  /* No title bar — centred layout.                                        */
  /**************************************************************************/

  div.content .closing-page h1 {
    background-color: transparent;
    color: #00529B;
    margin: 1em 0 0 0;
    padding: 0;
  }

}

/******************************************************************************/
/* Pagination                                                                 */
/* FHD-compatible 16:9 slide: 254mm x 142.875mm                               */
/* @page rules are always print-only by definition.                          */
/******************************************************************************/

@page {

  margin: 0 1cm 0.8cm 1cm;              /* Top: 0 (title bar covers it)       */
                                         /* Sides: 1cm (tighter for slides)    */
                                         /* Bottom: 0.8cm (compact)            */
  size: 254mm 142.875mm;                /* Exact 16:9, FHD-compatible         */

  @bottom-left {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    content: string(presentation-title);
    font-size: 10pt;
    color: #999;
  }

  @bottom-right {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    content: counter(page);
    font-size: 10pt;
    color: #999;
  }

}

/* No footer on the title slide                                              */

@page:first {
  @bottom-left {
    content: none;
  }
  @bottom-right {
    content: none;
  }
}

@page :blank {
  @bottom-left {
    content: none;
  }
  @bottom-right {
    content: none;
  }
}

/******************************************************************************/
/* Footnotes — override base: sans-serif, smaller, left-aligned               */
/******************************************************************************/

.footnotes ol {
  font-size: 12pt;
  ::marker {
    font-size: 9pt;
    vertical-align: super;
  }
}

.footnote {
  font-size: 12pt;
  line-height: 1.3;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  text-align: left;
  text-align-last: left;
  hyphens: manual;
}

.footnote code {
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

@page {
  @footnote {
    border-top: 0.5pt solid #ccc;       /* Lighter line for slides            */
    margin-top: 8pt;
    padding-top: 6pt;
  }
}

/******************************************************************************/
/* Figures — overrides for slides                                             */
/* Captions a little smaller; center the figure itself (base only centers     */
/* its inline contents, which doesn't help when the image is narrower than    */
/* the slide width).                                                          */
/******************************************************************************/

div.content figure {
  margin-left: auto;
  margin-right: auto;
}

div.content figure img {
  display: block;
  margin: 0 auto;
}

div.content figcaption {
  font-size: 0.75em;
}