
:root {
  --nav-height: 125px;
  --footer-height: 30px;
  --footer-padding: 4px;
  --footer-margin: 5px;

  --toc-width: 220px;
  --thumb-width: 160px;

  --border: #ADAEB3;
  --link: #2563eb;
  --text: #333333;
  --muted: #575b63;
  --bg-light: #fafafa;
}

html {
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: #ffffff; /* fallback color */
  overflow-x: hidden;
}

/* Transparent Background Image */
body::before {
  content: "";
  position: fixed;
  inset: 0; /* shorthand for top:0; left:0; right:0; bottom:0 */
  background: url("../images/mosaic.jpg") center center / cover no-repeat;
  opacity: 0.75; /* adjust transparency here */
  z-index: -2;
}

/* ---------- Top Navigation ---------- */
.top-nav {
  position: sticky;
  top: 0;
  height: var(--nav-height);
  font-size: 120%;
  line-height: 1.0; /* space between text lines */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px 5px 5px; /* top | right | bottom | left */
  z-index: 1000;
  background-color: rgba(21,67,96,0.99);
  border-radius: 3px;
  margin: var(--footer-margin);
}

.top-nav .myLogo {
    display: flex;
}

.myLogo {
    height: calc(var(--nav-height) - 10px);
    width: auto;
    border-radius: 3px;
    cursor: pointer;
  }

.top-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.top-nav a {
    text-decoration: none;
    color: white;
}

.top-nav a:hover {
   border-radius: 3px;
   background-color: rgba(36,113,163,0.99);
   color: black;
}

/* ---------- Layout ---------- */
.page {
    display: grid;
    flex: 1;
    grid-template-columns: 0.5fr 3fr 0.5fr;
}
.pageBlog {
    display: grid;
    flex: 1;
    grid-template-columns: 0.7fr 3fr 0.5fr;
}

/* ---------- left - side ---------- */
aside.lft {
    position: sticky;
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height) - var(--footer-height) -2 * var(--footer-margin));
    padding: 1.25rem;
    overflow-y: auto;
}

aside.toc {
    position: sticky;
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height) - var(--footer-height) -2 * var(--footer-margin));
    padding: 1.25rem;
    border-right: 2px solid var(--border);
    background: rgba(255,255,255,0.85);
    border-radius = 3px;
    overflow-y: auto;
}

.toc h3 {
  font-size: 90%;
}

.toc ul {
  list-style: none;
  padding: 0;
}

.toc li {
  margin-bottom: 0.5rem;
}

.toc a {
  text-decoration: none;
  color: var(--link);
  font-size: 90%;
}

.toc a:hover{
  color: blue;
}

/* ---------- center - Main Content ---------- */
main {
    padding: 0.5rem 2rem;
    max-width: calc(vw - var(toc-width) - var(--thumb-width) );
    background: rgba(255,255,255,0.90);
    border-radius: 3px;
}

section {
  margin-top: 2rem;
  scroll-margin-top: calc(var(--nav-height) + 1rem);
}

section h1 {
  font-size: 160%;
}

section h2 {
  font-size: 140%;
}

.subTitle{
    font-size: 75%;
}

.whitespace {
    margin-top: 0em;
    margin-bottom: 0em;
    font-size: 25% ;
    color: white;
}

.myVideo{
    width:90%;
    display:block;
    margin:auto;
}

.myimg {
  max-width:90%;
  height:auto;
  display:block;
  margin:auto;
}

/* ---------- right - side ---------- */
aside.rght {
    position: sticky;
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height) - var(--footer-height) -2 * var(--footer-margin));
    padding: 1.25rem;
}

aside.thumbs {
    position: sticky;
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height) - var(--footer-height) -2 * var(--footer-margin));
    padding: 1.25rem;
    border-left: 2px solid var(--border);
    background: rgba(255,255,255,0.85);
    border-radius = 3px;
}

.thumbs h3 {
  font-size: 90%;
}

.thumbs img {
  width: 100%;
  margin-bottom: 0.75rem;
  border-radius: 3px;
  cursor: pointer;
  z-index: 50;
}

.thumbs img:hover {
  border: 2px solid blue;
}

/* ---------- Footer ---------- */
footer {
    background: rgba(21,67,96,0.99);
    border-radius: 3px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    z-index: 100;
    height: var(--footer-height);
    margin: var(--footer-margin);
}

.footer-left img {
    width: auto;
    height: calc( var(--footer-height) - 2 * var(--footer-padding) );
    object-fit: cover;
    filter: invert(100%);
    cursor: pointer;
    padding-top: calc(var(--footer-padding) + 1px);
    padding-bottom: calc(var(--footer-padding) - 1px);
    padding-left: 10px;
}

.footer-right {
  font-size: 80%;
}

/* ---------- goto top button ---------- */

#toTop {
  display: none; /* Hidden by default */
  position: fixed; /* Fixed/sticky position */
  bottom: 40px; /* Place the button at the bottom of the page */
  right: 20px; /* Place the button 30px from the right */
  z-index: 100; /* Make sure it is on top ov everything */
  border: none; /* Remove borders */
  outline: none; /* Remove outline */
  background-color: rgba(26,82,118,0.99);
  color: white; /* Text color */
  cursor: pointer; /* Add a mouse pointer on hover */
  padding: 10px; /* Some padding around text*/
  border-radius: 3px; /* Rounded corners */
  font-size: 80%; /* Increase font size */
}

#toTop:hover {
   background-color: rgba(36,113,163,0.99);
   color: black;
}


/* ---------- collapsible ---------- */

.collapsible {
  color:white;
  background-color: #606060;
  cursor: pointer;
  padding: 10px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  width:100%;
  font-size:100%;
}
.active, .collapsible:hover{
  color:white;
  background-color: #909090;
}
.collapsible:after {
  content: '\002B';
  color: white;
  font-weight: bold;
  float: right;
  margin-left: 5px;
  text-align: right;
}
.active:after {
  color: white;
  content: "\2212";
}

.content {
  padding: 0 18px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
  background-color: #f1f1f1;
  font-style: italic;
}

/* ----- Slideshow -----*/

.slideshow-container {
    position: relative;
    width: 90%;
    max-width: 900px;
    margin: auto;
    background: #303030;
    border-radius: 3px;
    overflow: hidden;
    text-align: center;
}

/* Slides */
.slide {
    display: none;
    padding: 10px;
}

/* Images keep original ratio */
.slide img {
    max-width: 100%;
    max-height: 70vh;
    height: auto;
    width: auto;
    object-fit: contain;
}

/* slide buttons */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 12px 18px;
    color: white;
    font-size: 22px;
    border: none;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
}

.prev { left: 15px; }
.next { right: 15px; }

.prev:hover, .next:hover {
    background: rgba(0,0,0,0.8);
}

/* Caption */
.caption {
    color: #fff;
    padding-top: 10px;
    font-size: 16px;
}

.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}


/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .pageBlog {
    grid-template-columns: var(--toc-width) 1fr;
  }
  aside.thumbs {
    display: none;
  }
}

@media (max-width: 900px) {
  .pageBlog {
    grid-template-columns: 1fr;
  }
  .page {
    grid-template-columns: 1fr;
  }
  aside.toc {
    display: none;
  }
  aside.lft {
    display: none;
  }
  aside.rght {
    display: none;
  }
}

@media (max-width: 650px) {
    main {
        max-width: 500px;
    }
    .top-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    .top-nav a {
        font-size: 70%;
    }
    .myLogo{
        height: 40px;
        width: auto;
    }
    .myVideo{
        width:100%
    }
}



