/* Variables - ELTE IK Brand Colors */

:root {
    --elte-red: rgb(185,32,37);
    --elte-dark-blue: #002140;
    --elte-teal: #009fa3;
    --elte-light-teal: #72baba;
    --elte-white: #ffffff;
}

section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
    color: #fff;
}

/*********************************************
* GLOBAL STYLES
*********************************************/

body {
    background: #fff;
    background-color: #fff;
}

/* Background strips - dark blue on top and bottom, teal below top */
.reveal::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: var(--elte-dark-blue);
    z-index: -1;
}

.reveal::after {
    content: "";
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: var(--elte-dark-blue);
    z-index: -1;
}

/* Teal strip below dark blue at top */
body::before {
    content: "";
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    height: 120px;
    background-color: var(--elte-teal);
    z-index: -1;
}

.reveal {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 24px;
    font-weight: normal;
    color: #222;
}

::selection {
    color: #fff;
    background: #98bdef;
    text-shadow: none;
}

::-moz-selection {
    color: #fff;
    background: #98bdef;
    text-shadow: none;
}

.reveal .slides section, .reveal .slides section>section {
    line-height: 1.0;
    font-weight: inherit;
}

/*********************************************
* HEADERS
*********************************************/

.reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 {
    margin: 0 0 8px 0;
    color: var(--elte-red);
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: normal;
    text-transform: none;
    text-shadow: none;
    word-wrap: break-word;
}

/* Fixed header for slide titles - positioned in the teal strip */
/* This element is outside .reveal so position:fixed works correctly */
#slide-header {
    position: fixed;
    top: 85px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    text-align: center;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 2.5em;
    font-weight: 600;
    color: var(--elte-white);
    z-index: 1001;
    pointer-events: none;
}

.reveal h1 {
    font-size: 1.5em;
}

.reveal h2 {
    font-size: 1.3em;
}

.reveal h3 {
    font-size: 1.2em;
}

.reveal h4 {
    font-size: 1.2em;
    color: #1a53a1;
}

.reveal h1 {
    text-shadow: none;
}

/*********************************************
* OTHER
*********************************************/

.reveal p {
    margin: 12px 0;
    line-height: 1.1;
}

/* Ensure certain elements are never larger than the slide itself */

.reveal img, .reveal video, .reveal iframe {
    max-width: 95%;
    max-height: 95%;
}

.reveal strong, .reveal b {
    font-weight: bold;
}

.reveal em {
    font-style: italic;
}

.reveal ol, .reveal dl, .reveal ul {
    display: inline-block;
    text-align: left;
    margin: 0 0 0 1em;
}

.reveal ol {
    list-style-type: decimal;
}

.reveal ul {
    list-style-type: none;
}

.reveal ul li::before {
    content: "\2022";  /* Add content: \2022 is the CSS Code/unicode for a bullet */
    color: var(--elte-red); /* ELTE red */
    font-weight: bold; /* If you want it to be bold */
    display: inline-block; /* Needed to add space between the bullet and the text */
    width: 0.75em; /* Also needed for space (tweak if needed) */
    margin-left: -0.75em; /* Also needed for space (tweak if needed) */
}

.reveal ul ul, .reveal ol ul {
    font-size: 24px;
    color: rgb(105,104,104);
}

.reveal ul ul, .reveal ul ol, .reveal ol ol, .reveal ol ul {
    display: block;
    margin-left: 30px;
}

.reveal dt {
    font-weight: bold;
}

.reveal dd {
    margin-left: 40px;
}

.reveal blockquote {
    display: block;
    position: relative;
    width: 90%;
    margin: 20px auto;
    padding: 5px;
    font-style: italic;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}

.reveal blockquote p:first-child, .reveal blockquote p:last-child {
    display: inline-block;
}

.reveal q {
    font-style: italic;
}

.reveal pre {
    display: block;
    position: relative;
    width: 90%;
    margin: 20px auto;
    text-align: left;
    font-size: 0.55em;
    font-family: monospace;
    line-height: 1.2em;
    word-wrap: break-word;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}

.reveal code {
    font-family: monospace;
    background: rgb(221, 220, 220);
    border-radius: 10px;
    padding: 5px;
    text-transform: none;
    font-size: 0.75em;
}

.reveal pre code {
    display: block;
    padding: 10px 15px;
    overflow: auto;
    max-height: 65vh;  /* Use viewport height for better scaling */
    word-wrap: normal;
    background: #6d6d6c;
    color: #f8f8f2;
    border-radius: 8px;
}

.reveal pre code .hljs-comment {
    color: #9cdcfe;
}

.reveal table {
    margin: auto;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: .8em;
}

.reveal table tr:nth-child(odd) {
    background-color: #dae5ef;
}

.reveal table th {
    background-color: #ffffff;
    font-weight: bold;
}

.reveal table th, .reveal table td {
    text-align: left;
    padding: 0.2em 0.5em 0.2em 0.5em;
    border-bottom: 1px solid;
}

.reveal table th[align="center"], .reveal table td[align="center"] {
    text-align: center;
}

.reveal table th[align="right"], .reveal table td[align="right"] {
    text-align: right;
}

.reveal table tbody tr:last-child th, .reveal table tbody tr:last-child td {
    border-bottom: none;
}

.reveal sup {
    vertical-align: super;
    font-size: smaller;
}

.reveal sub {
    vertical-align: sub;
    font-size: smaller;
}

.reveal small {
    display: inline-block;
    font-size: 0.6em;
    line-height: 1.2em;
    vertical-align: top;
}

.reveal small * {
    vertical-align: top;
}

/*********************************************
* LINKS
*********************************************/

.reveal a {
    color: #2a76dd;
    text-decoration: none;
    -webkit-transition: color .15s ease;
    -moz-transition: color .15s ease;
    transition: color .15s ease;
}

.reveal a:hover {
    color: #6ca0e8;
    text-shadow: none;
    border: none;
}

.reveal .roll span:after {
    color: #fff;
    background: #1a53a1;
}

/*********************************************
* IMAGES
*********************************************/

.reveal section img {
    margin: 10px 0px;
    background: rgba(255, 255, 255, 0.12);
}


/*********************************************
* NAVIGATION CONTROLS
*********************************************/

.reveal .controls {
    color: var(--elte-red);
}

/*********************************************
* PROGRESS BAR
*********************************************/

.reveal .progress {
    background: rgba(0, 0, 0, 0.2);
    color: var(--elte-red);
}

.reveal .progress span {
    -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
    -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
    transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
}

/*********************************************
* PRINT BACKGROUND
*********************************************/

@media print {
    .backgrounds {
        background-color: #fff;
    }
}

/**
   Custom capabilities
   */

/* Make slides more compact for screen viewing */
.reveal .slides {
    width: 90%;
    max-width: 1400px;
    height: 100%;
}

/* ELTE logo in top-right corner (in the teal strip area) */
body::after {
    content: "";
    position: fixed;
    top: 65px;
    right: 10%;
    width: 90px;
    height: 90px;
    background: url('assets/ik_logo.png') no-repeat;
    background-size: contain;
    z-index: 1000;
    pointer-events: none;
}

/* ELTE IK logo in top-left corner (in the teal strip area) */
/* Using html::before instead of .reveal .slides::before to avoid
   Reveal.js transform affecting fixed positioning */
html::before {
    content: "";
    position: fixed;
    top: 70px;
    left: 5%;
    width: 250px;
    height: 150px;
    background: url('assets/ELTE_IK_logo.svg') no-repeat;
    background-size: contain;
    z-index: 1000;
    pointer-events: none;
}

.reveal .slides > section {
    padding: 60px 20px 40px 20px;
    margin-top: 0;
}

.reveal .slides > section > section {
    padding: 10px 0;
}


/* Adjust list spacing for compactness */
.reveal ul, .reveal ol {
    margin: 8px 0 8px 1em;
}

.reveal li {
    margin: 12px 0;
    font-size: 1.2em;
}

/* Make code blocks more compact */
.reveal pre {
    margin: 8px auto;
    width: fit-content;
    max-width: 95%;
}

.reveal code {
    font-size: 0.7em;
    padding: 2px 4px;
}

/* Large questionnaire-style code blocks - allow full height */
.reveal pre code[class*="text"] {
    max-height: 70vh;
    font-size: 1em;
    line-height: 1.2;
}

/* Compact tables */
.reveal table {
    margin: 10px auto;
}

.reveal table th, .reveal table td {
    padding: 0.1em 0.4em 0.1em 0.4em;
}

#left {
    margin: 10px 0 15px 20px;
    text-align: left;
    float: left;
    z-index: -10;
    width: 48%;
    font-size: 0.80em;
    line-height: 1.5;
}

#right {
    margin: 10px 0 15px 0;
    float: right;
    text-align: left;
    z-index: -10;
    width: 48%;
    font-size: 0.80em;
    line-height: 1.5;
}

/* Mermaid diagram styling - zoomed out to show full diagram */
.mermaid {
    max-height: 118vh !important;
    overflow: auto !important;
    display: block;
    margin-top: 25px;
    transform: scale(0.5);
    transform-origin: top center;
}

.mermaid .node rect,
.mermaid .node circle,
.mermaid .node ellipse,
.mermaid .node polygon {
    stroke-width: 1px !important;
}

.mermaid .nodeLabel,
.mermaid .edgeLabel {
    font-size: 12px !important;
}

/* Adjust node text positioning */
.mermaid .node .label {
    padding: 2px 8px !important;
}

.mermaid .node foreignObject {
    overflow: visible !important;
}

.mermaid .nodeLabel {
    white-space: nowrap !important;
    padding-top: 0 !important;
    margin-top: -2px !important;
}

.mermaid .edgePath .path {
    stroke-width: 1px !important;
}

/** LIGHTBOX MARKUP **/

.lightbox {
	/** Default lightbox to hidden */
	display: none;

	/** Position and style */
	position: fixed;
	z-index: 999;
	width: 100%;
	height: 100%;
	text-align: center;
	top: 0;
	left: 0;
	background: rgba(0,0,0,0.8);
}

.lightbox img {
	/** Pad the lightbox image */
	max-width: 90%;
	max-height: 80%;
	margin-top: 2%;
}

.lightbox:target {
	/** Remove default browser outline */
	outline: none;

	/** Unhide lightbox **/
	display: block;
}
