/* css styles */

/* Force full-width layout */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  box-sizing: border-box;
  padding-top: 4rem;
}

/* Ensure all elements respect box size (padding doesn't break layout) */
*, *::before, *::after {
  box-sizing: inherit;
}


body,
.page-columns,
.page-columns .content,
.container,
main.content,
.content > div,
.quarto-container,
.quarto-page,
.quarto-article {
  display: block !important;
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 auto !important;
  margin-left: 1vw !important;
  margin-right: 0vw !important;
  margin-top: 3vh !important;
  box-sizing: border-box;
}

.column-margin {
  display: none !important;
}

body, .page-columns, .container, .content {
  background-color: transparent !important;
  line-height: 1.50;
  font-size: 1.10rem;
  font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}

.container {
  margin-left: 0vw;
  margin-right: 0vw;
  padding: 0;
}

section {
  margin: 0vw;
  padding: 0;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("../resources/images/title/00title.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.4; /* 👈 Set your desired opacity here */
  z-index: -1; /* Keeps image behind other content */
  background-color: rgba(255, 255, 255, 0.5); /* soft white overlay */
  background-blend-mode: overlay;
}

/* Custom margin */
.custom-margin {
  margin-left: 20vw;
  margin-right: 20vw;
  margin-top: 2vh;
}

/* Customize section title font sizes */
h1 {
  font-size: 2.25rem; /* top-level page title */
  text-align: center;
}

h2 {
  font-size: 1.6rem;   /* main section */
}

h3 {
  font-size: 1.50rem; /* subsection */
}

h4 {
  font-size: 1.10rem;
  font-style: oblique; /* sub-subsection */
  font-weight: 500;
}

.smallfont {
  font-size: 1.1rem; /* smaller font for less important text */
  font-weight: 100; /* lighter weight for less emphasis */
  font-style: normal;
}

/* Optional: consistent spacing */
.anchor-link {
  position: absolute;
}

h1 {
  text-align: center;
  position: relative;
  margin-left: -10vw;
  margin-top: 0.5em;
  margin-bottom: 5vh;
  line-height: 1.25;
}

h3, h4 {
  text-align: left;
  position: relative;
  margin-left: 0vw;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  line-height: 1.50;
}

h2 {
  text-align: center;
  position: relative;
  margin-left: -10vw;
  margin-top: 5vh;
  margin-bottom: 0.5em;
  line-height: 1.50;
}

h2::after {
  content: "";
  position: absolute;
  width: 5vw;
  height: 0.2rem;
  background-color: #05014a; /* dark blue */
  bottom: -0.5rem; /* position below the heading */
  left: 50%;
  transform: translateX(-50%);
}

/* news card */
/* --- Container styling --- */
.quarto-title-block .quarto-title-meta {
  margin-left: 20vw;
  margin-right: 20vw;
  margin-top: 1vh;
  text-align: left;
}

.quarto-title-block .quarto-categories {
  display: flex;
  justify-content: left;
  margin-left: 20vw;
  margin-right: 20vw;
  margin-top: 1vh;
}

.quarto-listing .quarto-listing-container-default {
  display: flex !important;
  flex-direction: column !important;
  background: transparent;
  padding: 1rem;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.quarto-listing .quarto-listing-default {
  display: flex;
  background: transparent;
  max-width: 100%;
  flex-direction: column !important;
}

/* --- Post layout --- */
.quarto-listing .quarto-post.image-right {
  display: flex !important;               /* Kill grid */
  flex-direction: row !important;         /* Left = text, right = image */
  align-items: flex-start !important;
  gap: 0.50rem;
  position: relative;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  margin-left: 15vw;
  margin-right: 15vw;
  max-width: 100%;
}

/* Also remove grid behavior from the children */
.quarto-listing .quarto-post.image-right > * {
  display: block !important;
  grid-column: auto !important;
  grid-row: auto !important;
}

/* Decorative underline */
.quarto-listing .quarto-post.image-right::after {
  content: "";
  position: absolute;
  width: 50px;
  height: 3px;
  background-color: #05014a;
  bottom: 0;
  left: 0;
}

/* Ensure metadata is above body text */
.quarto-listing .body {
  order: 1 !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  flex-basis: 20% !important;
  max-width: 20% !important;
  min-width: 20% !important;
}

.quarto-listing .metadata {
  order: 2 !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  flex-basis: 35% !important;
  max-width: 35% !important;
  min-width: 35% !important;
}

.quarto-post .thumbnail {
  order: 3 !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  flex-basis: 15% !important;
  max-width: 15% !important;
  min-width: 15% !important;
  position: relative;     /* for aspect ratio box */
  overflow: hidden;       /* clip overflow */
  aspect-ratio: 4 / 3;   /* modern browsers */
}

.quarto-post .thumbnail img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;      /* crop and cover */
}

.quarto-listing .listing-title ,
.quarto-listing .listing-title .no-external {
  font-size: 1.25rem;
  font-weight: 800;
  color: #05014a;
  margin-bottom: 0.5rem;
}

.quarto-listing .listing-date {
  display: block !important; /* Not a grid cell anymore */
  font-size: 0.90rem;
  font-weight: 300;
  color: #05014a;
  margin-bottom: 0.5rem;
  font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande',
               'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}

.quarto-listing .listing-synopsis {
  order: 3 !important;
  display: block !important; /* Not a grid cell anymore */
  margin-top: 0.25rem;
  font-size: 1.10rem;
  font-weight: 300;
  color: #05014a;
  margin-bottom: 0.5rem;
  font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande',
               'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}

.center {
  text-align: center;
  margin-left: 0vw;
  margin-right: 15vw;
  align-items: center;
}

.center img {
  display: inline-block;
  width: 100%;
  align-items: center;
}

/* --- Mobile layout --- */
@media (max-width: 768px) {
  .quarto-listing .quarto-post.image-right {
    flex-direction: column !important;
    align-items: center;
    text-align: center;
  }
}

/* Fine-tune margins for mobile screens */
@media (max-width: 1000px) {
  body {
    margin-left: 2vw;
    margin-right: 2vw;
  }

  section {
    margin-top: 2vw;
    margin-bottom: 2vw;
  }

  h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5vw;
    margin-bottom: 1.5vw;
    text-align: center;
    align-items: center;
    align-content: center;
  }

  p {
    margin-bottom: 1vw;
  }

  footer {
    margin-top: 2vw;
  }
}