/* Hugo custom css by Lyngby DAT team */

/* Match Geekdoc style, but add horizontal lines between rows */
table {
  border-collapse: collapse !important;
  width: 100% !important;
}

thead tr {
  border-bottom: 2px solid var(--gdoc-border-color, #ccc) !important; /* header underline */
}

tbody tr {
  border-bottom: 1px solid var(--gdoc-border-color, #ccc) !important; /* horizontal row lines */
}

th,
td {
  padding: 0.6em 0.8em !important;
  text-align: left !important;
  vertical-align: top !important;
}

/* Optional: zebra striping */
tbody tr:nth-child(even) {
  background-color: var(--gdoc-background-secondary, #f9f9f9) !important;
}

/* Vertical lines: add borders to table cells */
.gdoc-markdown th,
.gdoc-markdown td {
  border-left: 1px solid var(--gdoc-border-color, #ccc) !important;
  border-right: 1px solid var(--gdoc-border-color, #ccc) !important;
}

/* Optional: outer border so the table has a frame */
.gdoc-markdown table {
  border: 1px solid var(--gdoc-border-color, #ccc) !important;
  border-collapse: collapse !important;
}

.schedule-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.25rem;
  align-items: stretch;
  margin-top: 1.5rem;
}

.schedule-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem;
  border: 1px solid var(--gdoc-border-color, #ccc);
  border-radius: 0.75rem;
  background:
    linear-gradient(
      180deg,
      rgba(232, 210, 133, 0.2) 0%,
      rgba(232, 210, 133, 0.05) 4rem,
      transparent 4rem
    ),
    var(--gdoc-background-secondary, #f9f9f9);
  box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.05);
}

.schedule-card--link {
  color: inherit !important;
  text-decoration: none !important;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.schedule-card--link:hover,
.schedule-card--link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0.7rem 1.4rem rgba(0, 0, 0, 0.08);
  border-color: var(--gdoc-color-link, #0038a8);
}

.schedule-card__meta {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gdoc-color-link, #0038a8);
}

.schedule-card__title {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.3;
  color: inherit;
}

.schedule-card p {
  margin: 0;
}

.schedule-card__output {
  margin-top: auto !important;
  padding-top: 0.85rem;
  border-top: 1px solid var(--gdoc-border-color, #ccc);
}

:root[color-theme='dark'] .schedule-card {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(
      180deg,
      rgba(232, 210, 133, 0.22) 0%,
      rgba(232, 210, 133, 0.1) 4rem,
      rgba(255, 255, 255, 0.02) 4rem
    ),
    rgba(255, 255, 255, 0.035);
  box-shadow: 0 0.7rem 1.6rem rgba(0, 0, 0, 0.28);
}

:root[color-theme='dark'] .schedule-card--link:hover,
:root[color-theme='dark'] .schedule-card--link:focus-visible {
  border-color: rgba(232, 210, 133, 0.75);
  box-shadow: 0 0.9rem 1.8rem rgba(0, 0, 0, 0.34);
  background:
    linear-gradient(
      180deg,
      rgba(232, 210, 133, 0.28) 0%,
      rgba(232, 210, 133, 0.14) 4rem,
      rgba(255, 255, 255, 0.045) 4rem
    ),
    rgba(255, 255, 255, 0.055);
}

:root[color-theme='dark'] .schedule-card__meta {
  color: #f0d98a;
}

:root[color-theme='dark'] .schedule-card__output {
  border-top-color: rgba(255, 255, 255, 0.12);
}

/* You can add custom styles here. */

:root {
  --header-background: #e8d285 !important;
  --footer-background: #d0ba6c !important;
  --header-font-color: #0038a8 !important;
}

.gdoc-brand__img {
  margin-right: 2rem;
  width: auto;
  height: 2rem;
}

.gdoc-brand__title {
  margin-right: 1rem;
  width: auto;
  height: 2rem;
  padding-top: 2px;
}

.frontpage-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 22rem);
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 2rem;
}

.frontpage-intro__text p:first-child {
  margin-top: 0;
}

.frontpage-intro__text p:last-child {
  margin-bottom: 0;
}

.frontpage-intro__media {
  display: flex;
  justify-content: flex-end;
}

.frontpage-intro__logo {
  display: block;
  width: min(50%, 22rem);
  height: auto;
  padding: 0.85rem;
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at top left, rgba(232, 210, 133, 0.3), transparent 45%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(232, 210, 133, 0.18));
  box-shadow:
    0 1rem 2.5rem rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(0, 56, 168, 0.08);
  transform: rotate(-2deg);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
  filter: saturate(1.05) contrast(1.02);
}

.frontpage-intro__logo:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow:
    0 1.25rem 2.75rem rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(0, 56, 168, 0.12);
  filter: saturate(1.1) contrast(1.04);
}

:root[color-theme='dark'] .frontpage-intro__logo {
  background:
    radial-gradient(circle at top left, rgba(232, 210, 133, 0.38), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(232, 210, 133, 0.12));
  box-shadow:
    0 1rem 2.5rem rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(232, 210, 133, 0.14);
  filter: saturate(1.08) contrast(1.05) brightness(1.02);
}

/* Half-width responsive images */
.half {
  display: block;
  margin: 2rem auto; /* Center horizontally + space above/below */
  width: 50%;
  max-width: 100%; /* Prevent overflow on small screens */
  height: auto;
}

.half-left {
  display: block;
  margin-top: 2rem; /* Center horizontally + space above/below */
  width: 50%;
  max-width: 100%; /* Prevent overflow on small screens */
  height: auto;
}

.half-right {
  display: block;
  float: right; /* Pushes the image to the right */
  margin: 0rem 0 2rem 2rem; /* Top/Right/Bottom/Left spacing */
  width: 50%;
  max-width: 100%; /* Prevent overflow on small screens */
  height: auto;
}

.twothird {
  display: block;
  margin: 2rem auto; /* Center horizontally + space above/below */
  width: 67%;
  max-width: 100%; /* Prevent overflow on small screens */
  height: auto;
}

/* Third-width responsive images */
.third {
  display: block;
  margin: 2rem auto; /* Center horizontally + space above/below */
  width: 33%;
  max-width: 100%; /* Prevent overflow on small screens */
  height: auto;
}

/* Third-width responsive images */
.fourth {
  display: block;
  margin: 2rem auto; /* Center horizontally + space above/below */
  width: 25%;
  max-width: 100%; /* Prevent overflow on small screens */
  height: auto;
}

.fourth-right {
  display: block;
  float: right; /* Pushes the image to the right */
  margin: 0rem 0 2rem 2rem; /* Top/Right/Bottom/Left spacing */
  width: 25%;
  max-width: 100%; /* Prevent overflow on small screens */
  height: auto;
}

/* Responsive adjustments for planUML images */

/* Make PlantUML diagrams responsive (works for <img>, <object>, or inline <svg>) */
.plantuml svg,
.plantuml img,
.plantuml object {
  display: block;
  max-width: 200% !important; /* prevent overflow on small screens */
  width: 200%;
  height: auto !important; /* defeats any inline fixed height */
  aspect-ratio: auto; /* keep natural aspect ratio when possible */
}

/* Optional: if a very wide PNG is used and can't shrink nicely, allow horizontal scroll */
.plantuml {
  overflow-x: auto !important;
}

@media screen and (max-width: 900px) {
  .frontpage-intro {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .frontpage-intro__media {
    justify-content: start;
  }

  .frontpage-intro__logo {
    width: min(182px, 22rem);
  }
}

@media screen and (max-width: 659px) {
  .gdoc-brand__title {
    padding-top: 4px;
  }

  .schedule-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .schedule-card {
    padding: 1rem;
  }
}
