/*
 * Personal site refresh for Joomla 6 / Cassiopeia.
 * Add this file after the Cassiopeia template styles (or load it as custom.css).
 */

:root {
  --site-ink: #182b2b;
  --site-muted: #5c6b68;
  --site-paper: #f5f7f3;
  --site-card: #ffffff;
  --site-teal: #176c68;
  --site-teal-dark: #104e4c;
  --site-coral: #d86d55;
  --site-line: #e2e9e4;
  --site-shadow: 0 24px 70px rgb(27 54 49 / 9%);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body.site {
  background: var(--site-paper);
  color: var(--site-ink);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.75;
}

body.site .site-grid {
  display: block;
}

body.site .container-component {
  width: min(100% - 2.5rem, 1120px);
  max-width: none;
  margin-inline: auto;
  padding: clamp(2.5rem, 7vw, 6.5rem) 0;
}

.blog-featured {
  display: grid;
  gap: clamp(1.5rem, 3.5vw, 3rem);
}

.blog-featured .blog-items {
  display: grid;
  gap: clamp(1.5rem, 3.5vw, 3rem);
  margin: 0;
}

.blog-featured .blog-item {
  min-width: 0;
  margin: 0;
}

.blog-featured .item-content {
  overflow: hidden;
  border: 1px solid var(--site-line);
  border-radius: 28px;
  background: var(--site-card);
  box-shadow: var(--site-shadow);
}

.blog-featured .item-title {
  margin: 0;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 5vw, 4.5rem) 0;
  color: var(--site-ink);
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.blog-featured .item-title a,
.blog-featured .item-title a:hover,
.blog-featured .item-title a:focus {
  color: inherit;
  text-decoration: none;
}

.blog-featured .item-content > p,
.blog-featured .item-content > ul {
  margin: 0;
  padding-inline: clamp(1.5rem, 5vw, 4.5rem);
}

.blog-featured .item-content > p + p {
  padding-top: 1.15rem;
}

.blog-featured .item-content > p:last-child {
  padding-bottom: clamp(2rem, 5vw, 4.5rem);
}

/* Hero: the first article contains the existing two-column photo/table. */
.blog-featured > .items-leading .item-content {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: clamp(1.5rem, 4vw, 3.5rem);
  background:
    radial-gradient(ellipse at 8% 12%, rgb(224 239 228 / 75%), transparent 44%),
    linear-gradient(135deg, #fff 8%, #f2f7f1 100%);
}

.blog-featured > .items-leading .item-title {
  order: 0;
  position: relative;
  z-index: 1;
  padding-top: clamp(2rem, 5vw, 4.5rem);
  color: var(--site-teal-dark);
  font-size: clamp(2.25rem, 5vw, 4rem);
}

.blog-featured > .items-leading .item-content > table {
  order: 1;
  width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-collapse: separate !important;
  table-layout: fixed;
}

.blog-featured > .items-leading .item-content > table tbody,
.blog-featured > .items-leading .item-content > table tr {
  display: contents;
}

.blog-featured > .items-leading .item-content > table td {
  width: auto !important;
  border: 0 !important;
}

.blog-featured > .items-leading .item-content > table td:first-child {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem clamp(1.5rem, 5vw, 4.5rem) 2rem !important;
  text-align: left !important;
}

.blog-featured > .items-leading .item-content > table td:first-child p {
  margin: 0;
}

.blog-featured > .items-leading .item-content > table td:first-child p:nth-of-type(2) {
  max-width: 13ch;
  color: var(--site-ink);
  font-size: clamp(2.5rem, 5.5vw, 5rem) !important;
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1.02;
}

.blog-featured > .items-leading .item-content > table td:first-child p:nth-of-type(2) span {
  font-family: inherit !important;
  font-size: inherit !important;
}

.blog-featured > .items-leading .item-content > table td:last-child {
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 1.5rem clamp(1.5rem, 5vw, 4.5rem) 0 !important;
  text-align: center !important;
}

.blog-featured > .items-leading .item-content > table img {
  display: block;
  width: min(100%, 340px) !important;
  height: auto;
  max-height: 430px;
  object-fit: cover;
  object-position: center 25%;
  border: 8px solid rgb(255 255 255 / 82%);
  border-radius: 180px 180px 24px 24px;
  box-shadow: 0 18px 48px rgb(24 43 43 / 15%);
}

/* Article cards */
.blog-featured > .blog-items:not(.items-leading) > .blog-item:first-child .item-content {
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

.blog-featured > .blog-items:not(.items-leading) > .blog-item:first-child .item-title {
  padding-top: clamp(2rem, 5vw, 4rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--site-teal-dark);
}

.blog-featured > .blog-items:not(.items-leading) > .blog-item:first-child .item-content > p,
.blog-featured > .blog-items:not(.items-leading) > .blog-item:first-child .item-content > ul {
  max-width: 850px;
  margin-inline: auto;
}

.blog-featured > .blog-items:not(.items-leading) > .blog-item:first-child .item-content > p strong {
  color: var(--site-teal-dark);
  font-weight: 700;
}

.blog-featured > .blog-items:not(.items-leading) > .blog-item:first-child .item-content > ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 2rem;
  padding-top: 1rem;
  padding-bottom: 1.5rem;
  list-style: none;
}

.blog-featured > .blog-items:not(.items-leading) > .blog-item:first-child .item-content > ul li {
  position: relative;
  padding: 0.8rem 1rem 0.8rem 2.5rem;
  border: 1px solid var(--site-line);
  border-radius: 14px;
  background: #f8faf7;
  line-height: 1.45;
}

.blog-featured > .blog-items:not(.items-leading) > .blog-item:first-child .item-content > ul li::before {
  position: absolute;
  top: 0.83rem;
  left: 1rem;
  color: var(--site-coral);
  content: "✳";
  font-size: 1rem;
}

/* The last article in the second list is the contact section. */
.blog-featured > .blog-items:not(.items-leading) > .blog-item:last-child .item-content {
  padding: clamp(1.75rem, 4vw, 3rem);
  border: 0;
  background: var(--site-teal-dark);
  color: #f5fbf7;
  box-shadow: 0 24px 60px rgb(16 78 76 / 18%);
}

.blog-featured > .blog-items:not(.items-leading) > .blog-item:last-child .item-title {
  padding: 0 0 1.25rem;
  color: #fff;
}

.blog-featured > .blog-items:not(.items-leading) > .blog-item:last-child .item-content > p {
  padding: 0;
  color: rgb(245 251 247 / 88%);
}

.blog-featured > .blog-items:not(.items-leading) > .blog-item:last-child .item-content > p + p {
  padding-top: 0.85rem;
}

.blog-featured a:not(.item-title a) {
  color: inherit;
  text-decoration-color: rgb(255 255 255 / 55%);
  text-underline-offset: 0.2em;
}

.blog-featured a:focus-visible {
  outline: 3px solid var(--site-coral);
  outline-offset: 4px;
}

@media (min-width: 760px) {
  .blog-featured > .items-leading .item-content > table {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
    align-items: center;
  }

  .blog-featured > .items-leading .item-content > table td:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .blog-featured > .items-leading .item-content > table td:last-child {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 759px) {
  body.site .container-component {
    width: min(100% - 1.25rem, 640px);
    padding-block: 1.25rem 3rem;
  }

  .blog-featured .item-content {
    border-radius: 22px;
  }

  .blog-featured > .items-leading .item-content > table td:first-child {
    min-height: 0;
    padding-bottom: 1.25rem !important;
  }

  .blog-featured > .items-leading .item-content > table td:first-child p:nth-of-type(2) {
    max-width: 12ch;
    font-size: clamp(2.75rem, 12vw, 4rem) !important;
  }

  .blog-featured > .items-leading .item-content > table td:last-child {
    padding-top: 0 !important;
  }

  .blog-featured > .items-leading .item-content > table img {
    width: min(78%, 300px) !important;
    max-height: 360px;
  }

  .blog-featured > .blog-items:not(.items-leading) > .blog-item:first-child .item-content > ul {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
