/* Variables
#c1a06e – dark tan
#d9d1ba – light tan
#82b0b2 – light blue
#346b84 – medium blue
#1a3657 – dark blue */
:root {
  /* Color palette */
  --dark-tan: #c1a06e;
  --very-dark-tan: #714B3C;
  --light-pink-tan: #D7C8B3;
  --charcoal-brown: #332E27;
  --light-charcoal-brown: #443E35;
  --light-tan: #d9d1ba;
  --lighter-tan: #E0D8C4;
  --very-light-tan: #F0EDE7;
  --white-80: #fcfaf6;
  --white-70: #fffcf6;
  --light-blue: #82b0b2;
  --medium-blue: #346b84;
  --dark-blue: #1a3657;
  --very-dark-blue: #1D2025;
  --lightgray: #F3F7FE;
  --gray: #c0c0c0;
  --darkgray: #666;
  --navy: #17050f;
  --blue: #0a2b57;
  /* Colors */
  --body-bg: var(--very-light-tan);
  --body-color: var(--charcoal-brown);
  --header-color: var(--dark-blue);
  --border-color: rgba(0, 0, 0, 0.05);
  --h1-color: var(--header-color);
  --h2-color: var(--header-color);
  --h3-color: var(--header-color);
  --h4-color: var(--header-color);
  --h5-color: var(--header-color);
  --h6-color: var(--header-color);
  --link-color: var(--header-color);
  --base-font-size: 18px;
  --body-font-size: 1rem;
  --body-font-size-large: 1.15rem;
  --body-font-size-small: 0.85rem;
  --body-font: "Lora", serif;
  --header-font: "Lora", serif;
  --header-max-width: 28.125rem;
  --header-max-width-large: 31.125rem;
  --content-max-width: 48.25rem;
  --letter-spacing: -0.035em;
  --line-height: 1.4;
  --heading-line-height: 1.35;
  --heading-letter-spacing: -0.06em;
  --image-offset: -2rem;
}

/* Global styles */
* {
  box-sizing: border-box;
}

html {
  font-size: var(--base-font-size);
  font-optical-sizing: auto;
  word-wrap: break-word;
  height: 100%;
}

body {
  background-color: var(--body-bg);
  color: var(--body-color);
  font-family: var(--body-font);
  margin: 0;
  padding: 0;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  letter-spacing: var(--letter-spacing);
  line-height: var(--line-height);
}



/* Typography */
h1,
h2,
h3,
h4,
h5,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
.h1 p,
.h2 p,
.h3 p,
.h4 p,
.h5 p,
.h6 p {
  color: var(--header-color);
  font-family: var(--header-font);
  font-weight: 400;
  line-height: var(--heading-line-height);
  max-width: var(--header-max-width-large);
  letter-spacing: var(--heading-letter-spacing);
}

.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
.h1 p,
.h2 p,
.h3 p,
.h4 p,
.h5 p,
.h6 p,
ol {
  max-width: var(--header-max-width);
}

.post-content blockquote {
  max-width: var(--header-max-width);
}


/* remove outline */
h2, a, button, input, select, textarea, [tabindex]:not([tabindex="-1"]) {
  outline: none;
}

a:focus, button:focus, input:focus, select:focus, textarea:focus, [tabindex]:not([tabindex="-1"]):focus {
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}


h1,
.h1,
.h1 p {
  color: var(--h1-color);
  font-size: 2rem;
  margin-bottom: 1.5rem;
  padding-right: 1rem;
  line-height: 1.05;
  margin-top: 2rem;
}

.home-subtitle {
  font-weight: 600;
}

h2,
.h2,
.h2 p {
  color: var(--h2-color);
  font-size: 1.5rem;
  padding-right: 1rem;
}


h3,
.h3,
.h3 p {
  font-size: 1.2rem;
  color: var(--h3-color);
}

h4,
.h4,
.h4 p {
  font-size: 1.1rem;
  color: var(--h4-color);
}

h5,
.h5,
.h5 p {
  color: var(--h5-color);
}

h6,
.h6,
.h6 p {
  color: var(--h6-color);
}

.post-content.article h1,
.post-content.article h2,
.post-content.article h3,
.post-content.article h4,
.post-content.article h5,
.post-content.article h6 {
  margin-top: 2.5rem;
  max-width: var(--header-max-width-large);
}


.post-content.article .h1::after,
.post-content.article .h2::after,
.post-content.article .h3::after,
.post-content.article .h4::after,
.post-content.article .h5::after,
.post-content.article .h6::after,
.post-content.article .h1::after,
.post-content.article h2::after,
.post-content.article h3::after,
.post-content.article h4::after,
.post-content.article h5::after,
.post-content.article h6::after {
  content: "";
  display: block;
  background: rgba(26, 54, 87, 0.1);
  border: none;
  height: 1px;
  margin: 0.825rem 0 1.75rem 0;
  width: 15rem;
}

p,
ul,
li {
  font-size: var(--body-font-size);
  line-height: 1.5;
  max-width: var(--header-max-width);
}

p:last-child {
  margin-bottom: 0;
}

/* Links */
a[href],
a[href]:visited {
  display: inline-block;
  color: var(--link-color);
  text-decoration: underline;
  text-decoration-color: rgba(10, 43, 87, 0.35);
  text-decoration-thickness: 2px;
  text-underline-offset: 1px;
  text-underline-position: from-font;
  transition: all 0.2s ease-in-out;
}

a.direct-link[href] {
  visibility: hidden;
  text-decoration-thickness: 0;
  text-underline-offset: 0;
  transform: translate3d(0, -2px, 0);
}

@media (max-width: 768px) {
  a[href] {
    text-decoration-color: rgba(10, 43, 87, 0.25);
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
  }
}

a[href]:hover,
a[href]:focus {
  text-decoration-color: rgba(10, 43, 87, 0.55);
  text-decoration-thickness: 4px;
  text-underline-offset: 2px;
  transform: translate3d(0, -2px, 0);
}

a[href].is-active {
  text-decoration-color: rgba(10, 43, 87, 0.75);
  text-decoration-thickness: 3px;
  text-underline-offset: 2px;
  transform: translate3d(0, -1px, 0);
}

/* Layout */
.wrapper {
  padding: 1rem;
  flex: 1 0 auto;
}

header,
main {
  margin: 0 auto;
  max-width: var(--content-max-width);
}

main {
  padding-bottom: 1rem;
}

/* Header */
header {
  line-height: 1;
  align-items: flex-start;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  font-weight: 400;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 0;
}

.logo {
  display: inline;
  width: auto;
  height: 4.5rem;
  margin-top: -0.8rem;
}

a[href].home {
  font-size: 1rem;
  line-height: 0.95;
  padding: 0;
  display: inline-flex;
  align-items: flex-end;
  justify-content: flex-end;
}


.background-image {
  background-size: 512px;
  background-image: url("/img/birds-blue.png");
  background-position: top -100px right -150px;
  background-repeat: no-repeat;
}

@media (min-width: 768px) {
  .background-image {
    background-size: 680px;
    background-position: top 0 right -180px;
  }
}

@media (min-width: 976px) {
  .background-image {
    background-position: top 0 right -100px;
  }
}

@media (min-width: 1360px) {
  .background-image {
    background-size: 768px;
    background-position: top -80px right -50px;
  }
}

.home__title {
  font-weight: 800;
}

.home__subtitle {
  font-weight: 400;
  display: block;
}

/* Navigation */
.nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav,
.nav li {
  font-size: var(--body-font-size);
  line-height: 1.35;
  letter-spacing: var(--heading-letter-spacing);
}

@media (min-width: 768px) {

  .nav,
  .nav li {
    font-size: var(--body-font-size-large);
  }
}

@media (min-width: 976px) {
  header {
    flex-direction: row;
  }

  .home__subtitle {
    font-weight: 400;
    display: inline;
  }
}

.nav-item {
  display: inline-block;
  padding-left: 1em;
  padding-top: 0;
  padding-bottom: 0;
}

.nav-item:first-of-type {
  padding-left: 0;
  font-weight: 600;
}

.nav-item a {
  color: var(--blue);
  padding: 0;
  text-decoration-color: var(--blue);
}

.nav-item a[href]:not(:hover),
.home:not(:hover) {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 1px;
  text-underline-position: from-font;
}

.card-lg {
  background-color: var(--white-80);
  padding: 1rem 2rem 1rem 2rem;
  margin-bottom: 2rem;
  border-radius: 10px;
  box-shadow: 0 8px 16px var(--blue-20);
}

.card-lg--dark {
  background: var(--dark-blue);
  color: var(--white);
}

/* Custom list styles */
/* main ul {
  list-style-type: none;
  padding-left: 1em;
}

main ul li {
  text-indent: -0.5em;
  padding-left: 0;
}

main ul li::before {
  content: "•";
  display: inline-block;
  color: var(--darkgray);
  line-height: 1;
  margin-right: 0.5em;
  padding-left: 0;
} */

ul.success {
  list-style-type: none;
  padding-left: 1.2em;
}

ul.success li {
  /* text-indent: 2em; */
  padding-left: 1em;
  position: relative;
}

ul.success li::before {
  color: var(--header-color);
  position: absolute;
  left: -0.5em;
  top: 0.25em;
  content: "✔";
  display: inline-block;
  line-height: 1;
  margin-right: 0.5em;
  padding-left: 0;
}

ol li {
  list-style-type: none;
  position: relative;
}

ol li::before {
  content: counter(item) ".";
  position: absolute;
  left: -1.2em;
  top: -0.2rem;
  margin-right: 0.5em;
  padding-left: 0;
  font-weight: 600;
  font-size: 1.2rem;
}

ol li::marker {
  color: var(--darkgray);
}

ol li {
  counter-increment: item;
}

/* Homepage */
.homepage-headline {
  font-size: 1.25rem;
  font-weight: 400;
  max-width: var(--header-max-width);
}

.homepage-no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.homepage-no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Posts */
.postlist {
  list-style: none;
  padding: 0;
}

.postlist-item {
  margin-bottom: 1rem;
}

.postlist-date,
.postlist-item:before {
  color: var(--darkgray);
  font-size: 1.015625rem;
}

.postlist-date {
  display: inline;
  word-spacing: -0.5px;
}

.postlist-link {
  text-decoration-thickness: 1px;
  text-underline-offset: 0;
  text-underline-position: from-font;
}

/* Tags */
.post-tag {
  align-items: center;
  border: 1px solid var(--gray);
  border-radius: 0.25em;
  color: var(--darkgray);
  display: inline-flex;
  font-size: 0.9375rem;
  justify-content: center;
  margin: 0.5em 0.6666666666667em 0.5em 0;
  padding: 0.08333333333333em 0.3333333333333em;
  text-decoration: none;
  text-transform: uppercase;
}

a[href].post-tag:hover,
a[href].post-tag:focus {
  background-color: var(--lightgray);
}

/* Images and Media */
img {
  max-width: 100%;
  height: auto;
}

/* Code blocks */
pre,
code {
  font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace;
}

pre {
  background-color: #f6f6f6;
  direction: ltr;
  font-size: 0.875rem;
  hyphens: none;
  margin: 0.5em 0;
  padding: 1em;
  tab-size: 2;
  text-align: left;
  white-space: pre;
  word-break: normal;
  word-spacing: normal;
}

code {
  background-color: #efefef;
  font-size: 1.125rem;
  padding: 0.2em 0.3em;
}

pre code {
  font-size: 0.9375rem;
}

p em {
  font-size: 1.1em;
  font-style: italic;
}

li strong,
p strong {
  font-weight: 600;
  text-decoration-color: var(--header-color);
  /* color: var(--header-color); */
  text-decoration-thickness: 2px;
  text-underline-offset: 1px;
  text-underline-position: from-font;
}

p strong {
  font-size: 1.05em;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

/* Miscellaneous */
hr {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  height: 1px;
  margin: 1.75rem 0;
  width: 15rem;
}

.warning {
  background-color: #ffc;
  padding: 1em 0.625em;
}

.warning ol:only-child {
  margin: 0;
}

.icon {
  height: 1rem;
  vertical-align: top;
}

/* Mobile-only line break */
.mobile-line-break {
  display: none;
}

.max-width-20rem {
  max-width: 20rem;
}

/* Media Queries */
@media (min-width: 976px) {
  .mobile-line-break {
    display: inline;
  }

  h1 br {
    display: inline;
  }
}

/* Profile Image */
.profile-image {
  max-width: 100%;
  height: auto;
  max-height: 10rem;
  width: auto;
  border-radius: 10px;
  background: #3B444E;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Profile image within wrapper should fill the container */
.image-wrapper--profile-image .profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Image wrapper for profile image to prevent CLS */
.image-wrapper--profile-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; /* Square aspect ratio for the profile image */
  max-width: 10rem; /* Match the max-height of profile-image */
}

/* Fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 1 / 1) {
  .image-wrapper--profile-image {
    padding-bottom: 100%; /* 1:1 aspect ratio (square) */
    height: 0;
    max-height: 10rem;
  }

  .image-wrapper--profile-image .profile-image {
    position: absolute;
    top: 0;
    left: 0;
  }
}

.terapeuta-logo-wrapper {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* text-condensed */
.text-condensed h1,
.text-condensed h2,
.text-condensed h3,
.text-condensed h4 {
  margin-bottom: 0.25em;
}

.text-condensed p {
  margin-top: 0;
  margin-bottom: 0.5em;
}


.u-no-margin--bottom {
  margin-bottom: 0 !important;
}

.u-no-margin--top {
  margin-top: 0 !important;
}

.u-no-padding--left {
  padding-left: 0 !important;
}

.small-illustration {
  max-width: 50%;
  height: auto;
}

@media (min-width: 1024px) {
  .small-illustration {
    max-width: 100%;
  }
}

.flex-container {
  display: flex;
  gap: 1rem;
  flex-direction: column;
}

.flex-container.gap-3rem {
  gap: 3rem;
}

.flex-container.always-row {
  flex-direction: row;
}

@media (min-width: 768px) {
  .flex-container {
    flex-direction: row;
  }
}

.flex-item {
  flex: 1;
}

.flex-item:first-child {
  flex: 1;
}

.flex-item--profile {
  margin-top: 1.2rem;
  flex: 0.4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}


.flex-container.footer-author .flex-item--profile .terapeuta-logo-wrapper {
  margin-top: 0.6rem;
}

.flex-container.footer-author>.flex-item:last-child {
  margin-left: 2rem;
}

@media (min-width: 1024px) {
  .flex-container.footer-author>.flex-item:last-child {
    margin-left: 0;
  }

  .flex-container.footer-author .flex-item:first-child {
    order: 2;
  }

  .flex-container.footer-author {
    flex-direction: row;
    gap: 3rem;
  }

  .flex-container.footer-author .flex-item--profile {
    margin-top: 1rem;
  }
}

.card-form.card-form--transparent {
  background-color: transparent;
}

.flex-container.footer-author {
  margin-top: 3rem;
  gap: 1rem;
}

.flex-container.footer-author>.flex-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.flex-container.footer-author .flex-item {
  flex: 0.5;
}



.profile-image--small {
  max-width: 50%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

img.emphasize {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Image wrapper ensures consistent height even when image fails to load */
.image-wrapper--article {
  position: relative;
  width: 100%;
  /* Use aspect-ratio for modern browsers, with fallback */
  aspect-ratio: 16 / 10;
  min-height: 250px; /* Fallback for older browsers */
  background-color: var(--very-light-tan);
  border-radius: 10px;
  overflow: hidden;
}

/* Fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 16 / 10) {
  .image-wrapper--article {
    /* Padding-bottom technique for aspect ratio fallback */
    padding-bottom: 62.5%; /* 16:10 aspect ratio (10/16 = 0.625) */
    height: 0;
  }

  .image-wrapper--article img.article {
    position: absolute;
    top: 0;
    left: 0;
  }
}

img.article {
  width: 100%;
  height: 100%;
  min-width: 100%;
  margin: 0 auto;
  border-radius: 10px;
  object-fit: cover;
  object-position: center;
}

img.article,
.post-content.article img,
.image-wrapper--profile-image img {
  border-radius: 10px;
  background: #3B444E;
  /* hide broken image icons and alt text */
  font-size: 0;
  line-height: 0;
  color: transparent;
  text-indent: -9999px;
  overflow: hidden;
}
/* Dark background for images with header-photo-dark class */
img.article.header-photo-dark,
.header-photo-dark img.article,
.header-photo-dark .post-content.article img,
.header-photo-dark .image-wrapper--profile-image img {
  /* dark background for loading state */
  background: linear-gradient(to right bottom, #2c3e50, #34495e);
}

/* Dark background for image wrapper when header-photo-dark */
.header-photo-dark .image-wrapper--article {
  background: linear-gradient(to right bottom, #2c3e50, #34495e);
}

.post-content.article img {
  position: relative;
  z-index: 1;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease-in-out;
  will-change: transform;
}

.post-content.article img:hover {
  transform: scale3d(1.5, 1.5, 1.5);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

img.terapeuta-logo {
  max-width: 6rem;
  height: auto;
  margin: 0 auto 0 auto;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
}

.max-width-600 {
  max-width: 600px;
}

.image-wrapper {
  order: 2;
  margin-bottom: 1rem;
  margin-top: 2rem;
}

.content-wrapper {
  position: relative;
}

/* header-photo-dark */
.image-wrapper.header-photo-dark {
  order: 1;
}

.text-content--article.header-photo-dark h1,
.text-content--article.header-photo-dark h2,
.text-content--article.header-photo-dark h3,
.text-content--article.header-photo-dark p {
  color: var(--lighter-tan);
}

.text-content--article.header-photo-dark h2 {
  margin-top: -1rem;
}

.text-content--article.header-photo-dark p.author {
  margin-bottom: 0;
  font-size: var(--body-font-size-small);
}

@media (min-width: 1024px) {
  .text-content--article.header-photo-dark p.author {
    margin-bottom: 0;
    font-size: var(--body-font-size);
  }

  .image-wrapper.header-photo-dark {
    margin-left: var(--image-offset);
    margin-right: var(--image-offset);
  }
}

.content-wrapper--article.header-photo-dark {
  margin-bottom: 2rem;
}

.text-content--article.header-photo-dark {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.5rem 0 1.5rem;
  max-width: var(--header-max-width);
  margin-bottom: 1rem;
}

.text-content {
  order: 1;
}

.text-content--article h1 {
  margin-top: 0;
}

.text-content--article .author {
  position: relative;
  margin-bottom: 0.8rem;
  color: var(--header-color);
}

.float-right {
  float: right;
}

.card-form {
  background-color: #E5E3E0;
  padding: 1rem 2rem 1rem 2rem;
  border-radius: 10px;
  margin-top: 2rem;
  margin-bottom: 2rem;
  max-width: var(--header-max-width);
}

@media (min-width: 1024px) {
  .card-form {
    padding: 1rem 2rem 1rem 2rem;
  }
}

.image-wrapper--profile-image img.profile-image {
  max-height: 25rem;
  width: auto;
}

/* Responsive updates for profile image wrapper */
@media (min-width: 768px) {
  .image-wrapper--profile-image {
    max-width: 25rem; /* Match the max-height of img.profile-image on larger screens */
  }
}

.image-wrapper--profile-image video {
  max-height: 80vh;
}

@media (min-width: 768px) {
  .image-wrapper--profile-image video {
    max-height: auto;
  }

  .wrapper {
    padding: 1rem 2rem 2rem;
  }

  .content-wrapper {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .content-wrapper--article {
    flex-direction: column;
  }

  .content-wrapper--home {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    position: relative;
  }

  .text-content {
    flex: 0.6;
  }

  .text-content--article {
    position: relative;
    z-index: 1;
    max-width: 100%;
    margin-top: -4rem;
  }

  .text-content--article.header-push-down {
    margin-top: 0;
  }

  .text-content--article:not(.header-photo-dark) h1,
  .text-content:not(.header-photo-dark) .author {
    max-width: 80%;
  }


  .text-content--home {
    flex: 0.5;
    margin-left: 2rem;
  }

  .image-wrapper {
    flex: 0.35;
    margin-top: 3.015rem;
    position: relative;
  }

  .image-wrapper--home {
    order: 1;
    flex: 0.35;
    margin-top: 0.75rem;
    margin-left: -2rem;
    position: relative;
  }


  .image-wrapper--article {
    order: 1;
    flex: auto;
    margin: 1rem auto 0;
    /* Remove flex display to maintain aspect ratio container */
  }

  .image-wrapper--page img {
    position: absolute;
    top: 0;
    right: 0;
  }

  .image-wrapper--home img {
    position: static;
  }

  header {
    padding: 1rem 0;
  }

  .home {
    padding: 0;
  }

  .nav {
    margin: 0 0 0.25rem 0;
  }

  h1 {
    font-size: 3.2rem;
    max-width: 31.125rem;
  }

  .homepage-headline {
    font-size: 1.45rem;
  }

  form[name="newsletter"] button[type="submit"] {
    margin-left: 0.5rem;
  }

  hr {
    margin: 1.75rem 0 1.75rem 0;
  }
}

@media (min-width: 976px) {
  header {
    align-items: flex-end;
  }
}



/* footer */
.site-footer {
  padding: 1rem 0;
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.site-footer,
.site-footer p {
  color: var(--darkgray);
  padding: 1rem 0;
  font-size: 0.675rem;
}

.site-footer hr {
  margin: 1.75rem 0 1rem 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav ul li {
  display: inline-block;
  margin-bottom: 0.5rem;
}

.footer-nav ul li a {
  color: var(--darkgray);
  text-decoration: none;
}

.footer-nav ul li a:hover {
  text-decoration: underline;
}

.footer-note {
  margin-top: 1rem;
  font-size: 0.875rem;
}

/* footer */
/* Input field styles */
form {
  margin-bottom: 1rem;
}

form .form-group,
form .form-group--home {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1rem;
}

.checkbox-group {
  display: flex;
  width: 100%;
  margin-bottom: 1rem;
}

.checkbox-group input[type="checkbox"] {
  margin: 0.25rem 0 0;
  margin-right: 0.5rem;
  width: auto;
  height: auto;
}

.checkbox-group label {
  font-size: var(--body-font-size);
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  margin: 0;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"]+label {
  padding-left: 0.5rem;
}

form[name="thank-you-form"] button[type="submit"],
button[type="button"] {
  width: 100%;
  margin-left: 0;
}

input,
button,
textarea {
  width: 100%;
  margin-bottom: 1rem;
}

form {
  max-width: var(--header-max-width);
}

@media (min-width: 768px) {

  form .form-group,
  form .form-group--home {
    /* flex-direction: row; */
  }

  form .form-group--home input {
    width: 100%;
  }

  form .form-group--home button[type="submit"] {
    margin-bottom: 0;
  }

  form .form-group--large {
    flex-direction: column;
  }

  input,
  button,
  textarea {
    width: auto;
  }

}

input,
button,
textarea {
  font-family: var(--body-font);
}

button {
  font-weight: 600;
}

input[type="email"],
input[type="text"],
input[type="tel"],
textarea {
  background-color: var(--very-light-tan);
  border: 2px solid var(--border-color);
  border-radius: 4px;
  padding: 0.5rem;
  font-size: var(--body-font-size);
  color: var(--darkgray);
  outline: none;
  transition: border-color 0.2s ease-in;
}

input[type="email"]::placeholder,
input[type="text"]::placeholder,
input[type="tel"]::placeholder,
textarea::placeholder {
  color: var(--darkgray);
  font-size: var(--body-font-size);
  letter-spacing: var(--letter-spacing);
}

input[type="email"]:focus,
input[type="text"]:focus,
textarea:focus {
  border-color: var(--gray);
}

/* Submit button styles */
button[type="submit"],
button[type="button"] {
  background-color: var(--dark-blue);
  color: var(--very-light-tan);
  font-weight: 400;
  font-size: var(--body-font-size);
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-wrap: nowrap;
  width: 100%;
  letter-spacing: var(--letter-spacing);
}

button[type="submit"]:hover,
button[type="button"]:hover {
  background-color: var(--medium-blue);
  color: var(--very-light-tan);
}

button[type="submit"]:active {
  background-color: var(--dark-tan);
}

a[href].button,
a[href]:visited.button {
  display: inline-block;
  text-decoration: none;
  text-align: center;
  width: 100%;
}

button[type="submit"]:hover,
button[type="button"]:hover,
a[href].button:hover,
a[href].button:focus {
  background-color: rgba(10, 43, 87, 0.9);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* POST */

.post img {
  margin: 1rem 0;
  max-width: 100%;
  height: auto;
  mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  box-shadow: 0 10px 20px -5px var(--very-light-tan);
}

.post img.featured {
  margin: 0;
}


@media (max-width: 768px) {
  .post img.featured {
    margin-left: -1rem;
    margin-right: -1rem;
    width: calc(100% + 2rem);
    max-width: calc(100% + 2rem);
  }
}



.post img+h1 {
  margin-top: 0;
  z-index: 2;
}


form[name="thank-you-form"] {
  margin-top: 2rem;
}

.form-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.input-group {
  position: relative;
  width: 100%;
}

.invalid-feedback {
  display: none;
  font-size: 0.8rem;
  color: #dc3545;
  margin-bottom: 1rem;
}

textarea:invalid+.invalid-feedback,
input:invalid+.invalid-feedback {
  display: none;
}

/* Pokazuj błędy tylko dla pól, które były dotknięte lub po próbie wysłania */
input.touched:invalid,
form.was-validated input:invalid,
textarea.touched:invalid,
textarea.was-validated textarea:invalid {
  border-color: #dc3545;
}

input.touched:invalid+.invalid-feedback,
form.was-validated input:invalid+.invalid-feedback,
textarea.touched:invalid+.invalid-feedback,
textarea.was-validated textarea:invalid+.invalid-feedback {
  display: block;
}

/* Pokazuj sukces tylko dla pól, które były dotknięte lub po próbie wysłania */
input.touched:valid,
form.was-validated input:valid {
  border-color: #28a745;
}

.checkbox-group {
  margin-bottom: 1rem;
  position: relative;
}

.checkbox-group label {
  font-size: var(--body-font-size);
  line-height: 1.4;
}

.checkbox-group .invalid-feedback {
  margin-left: 1.5rem;
}

.form-note {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 1rem;
}

.privacy-note {
  margin-bottom: 1rem;
  font-size: 0.7rem;
  color: #666;
  border-radius: 4px;
  line-height: 1.4;
}

.poem {
  line-height: 0.95;
  margin: 1.2rem 0;
  white-space: pre-wrap;
}

.poem p {
  font-size: 1rem;
  margin: 0;
}


@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* Footnote styles */
.footnote {
  color: var(--darkgray);
  line-height: 1.4;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.footnote-item::before {
  font-size: 1rem;
  font-weight: 400;
  color: var(--darkgray);
}

.footnote-item p {
  font-size: 0.85rem;
  color: var(--darkgray);
}

.footnote a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.footnote a:hover,
.footnote a:focus {
  text-decoration: underline;
  color: var(--medium-blue);
}

/* Footnote reference styles */
a.footnote-ref {
  font-size: 0.8rem;
  color: var(--link-color);
  text-decoration: none;
  vertical-align: super;
  /* Superscript style */
  margin-left: 0.2rem;
  transition: color 0.2s ease-in-out;
}

a.footnote-ref:hover,
a.footnote-ref:focus {
  text-decoration: underline;
  color: var(--medium-blue);
  /* Change color on hover/focus */
}

.card-lg .flex-container {
  margin-bottom: 0
}

.flex-item {
  flex: 1;
}

.flex-item:first-child {
  flex: 1;
  /* Adjust the flex value to control the width ratio */
}


/* postlist */

.postlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding-left: 0;
  min-width: 100%;
}

.postlist-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  list-style: none;
  transition: transform 0.2s ease-out;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-indent: 0;
  padding-left: 0;
  padding-bottom: 1rem;
}

.postlist-item::before {
  display: none;
}

.postlist-item:hover,
.postlist-item:focus,
.postlist-item:active {
  transform: translate3d(0, -4px, 0);
}

a[href].postlist-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.postlist-image {
  width: 100%;
  height: 184px; /* Fixed height to prevent layout shift */
  object-fit: cover;
  object-position: top;
  max-width: 100%;
  border-radius: 10px 10px 0 0;
  mask-image: linear-gradient(to bottom, black 0, transparent 95%);
  background-color: var(--very-light-tan); /* Fallback background */
}

.postlist-title {
  text-align: left;
  margin: 8px 36px 4px 16px;
  font-size: 1.2rem;
  line-height: 1.15;
  /* font-weight: 500; */
  color: var(--dark-blue);
  padding-bottom: 1.5rem;
  letter-spacing: var(--heading-letter-spacing);
}

.postlist-subtitle {
  display: none;
  text-align: left;
  font-size: 0.9em;
  color: #666;
  margin-bottom: 16px;
  padding: 0 16px;
}

.szkolenia h4 {
  margin-bottom: 0;
  font-weight: 600;
}

.szkolenia p {
  margin-top: 0;
}

.profile-video {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  aspect-ratio: 9 / 16;
  /* Portrait aspect ratio */
  object-fit: cover;
  /* Ensures the video covers the entire area */
  image-rendering: optimizeQuality;
}

.survey-form {
  max-width: 100%;
}

.survey-form .form-group {
  margin-bottom: 2rem;
  align-items: flex-start;
}


.survey-form input[type="radio"] {
  margin-right: 0.5rem;
  width: auto;
}

.survey-form label {
  display: block;
  text-align: left;
}

.survey-form .radio-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.survey-form .survey-grid {
  display: grid;
  grid-template-columns: 1fr repeat(5, minmax(3rem, 1fr));
  gap: 0.5rem;
  align-items: center;
}

.survey-form .survey-labels {
  display: contents;
}

.survey-form .survey-labels span {
  font-weight: bold;
}

.survey-form .survey-row {
  display: contents;
}

.survey-form .survey-labels span:first-child,
.survey-form .survey-row label {
  grid-column: 1;
}

.survey-form .survey-row input {
  margin: 0 auto;
}

.survey-form .survey-grid {
  position: relative;
}

.survey-form .survey-labels {
  position: sticky;
  top: 0;
  background-color: var(--body-bg);
  /* Ensure the background matches the form */
  z-index: 1;
  padding-top: 1rem;
  grid-template-columns: 1fr repeat(5, auto);
  align-items: center;
}

.survey-form .angled-label {
  transform: rotate(-45deg);
  transform-origin: left bottom;
  white-space: nowrap;
  text-align: left;
  margin-bottom: 1rem;
  margin-left: 2rem;
  width: 3rem;
}

/* Problem box styles */
.problem-box {
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-left: 4px solid var(--dark-blue);
}

.problem-box h3 {
  margin-top: 0;
  color: var(--dark-blue);
  font-weight: 600;
  font-size: 1.2rem;
}

.problem-list {
  padding-left: 0;
  margin: 1rem 0 0;
  max-width: 100%;
}

.problem-list li {
  position: relative;
  padding-left: 1.5rem;
  max-width: 100%;
  /* remove bullet points */
  list-style: none;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.problem-list li::before {
  content: "•";
  color: var(--dark-blue);
  position: absolute;
  left: 0;
  top: -0.1em;
  font-size: 1.2rem;
}

.tmpl-home section {
  margin-bottom: 3.5rem;
}

/* Testimonial styles */
blockquote,
.testimonial {
  margin: 0;
  position: relative;
  font-style: italic;
}

blockquote {
  padding: .5rem 1.5rem .5rem 4rem;
}

.testimonial {
  padding: 1.5rem 1.5rem 1.5rem 4rem;
  margin: 2rem 0;
}

blockquote::before,
.testimonial::before {
  content: "„";
  font-size: 6rem;
  color: var(--header-color);
  position: absolute;
  top: -2.5rem;
  left: 1rem;
  line-height: 1;
}

blockquote::before {
  top: -3.5rem;
  left: 1rem;
}

blockquote p,
blockquote h2,
blockquote h3,
blockquote h4,
blockquote h5,
blockquote h6,
.testimonial p,
.testimonial h2,
.testimonial h3,
.testimonial h4,
.testimonial h5,
.testimonial h6 {
  position: relative;
  z-index: 1;
  max-width: 100%;
  font-size: 1.2rem;
}

.testimonial-author {
  font-style: normal;
  text-align: right;
  margin-top: 1rem;
  margin-bottom: 0;
  font-weight: 600;
}

.testimonial--small {
  padding: .5rem .5rem .5rem 2rem;
}

.testimonial--small p {
  margin-top: 0;
  padding: .5rem;
  font-size: 1.15rem;
  max-width: var(--header-max-width);
}

.testimonial--small p:first-child {
  margin-bottom: 0;
}

.testimonial.testimonial--small .testimonial-author {
  color: var(--darkgray);
  font-weight: 400;
}

.testimonial--small::before {
  font-size: 4rem;
  top: -2.5rem;
  left: 0.5rem;
  color: var(--darkgray);
}

/* Features grid styles */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0 2rem;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-box {
  background-color: var(--white-80);
  border-radius: 10px;
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.feature-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.feature-box h3 {
  margin-top: 0;
  color: var(--dark-blue);
  font-weight: 600;
  font-size: 1.2rem;
}

.feature-box p {
  margin-bottom: 0;
  max-width: 100%;
}

.learn-more {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Results section styles */
.results-section {
  background-color: var(--very-light-tan);
  border-radius: 10px;
  padding: 2rem;
  margin: 2.5rem 0;
}

.results-section h2 {
  margin-bottom: 1.5rem;
  max-width: 100%;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .results-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.result-item {
  background-color: var(--white-80);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.result-item h4 {
  margin-top: 0;
  color: var(--dark-blue);
  font-weight: 600;
  font-size: 1.1rem;
}

.result-item p {
  margin-bottom: 0;
  max-width: 100%;
}

/* CTA section styles */
.cta-section {
  text-align: center;
  padding: 2rem;
  margin: 2.5rem 0;
  border-radius: 10px;
}

.align-right {
  text-align: right;
  max-width: 100%;
}

.center {
  margin: 0 auto;
}

.cta-text {
  margin-bottom: 2.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  max-width: 100%;
  color: var(--dark-blue);
}

.cta-button,
.cta-info,
.cta-button-secondary,
.cta-availability {
  max-width: 100%;
}

.cta-button a {
  display: inline-block;
  background-color: var(--dark-blue);
  color: var(--white-80) !important;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
  margin: 0 auto;
  width: auto;
}

.cta-button a:hover,
.cta-button a:focus {
  background-color: var(--medium-blue);
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.cta-info {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--darkgray);
}

.cta-button-secondary a {
  display: inline-block;
  background-color: var(--white-80);
  color: var(--dark-blue) !important;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  border: 2px solid var(--dark-blue);
  margin-bottom: 0.5rem;
}

.cta-button-secondary a:hover,
.cta-button-secondary a:focus {
  background-color: var(--very-light-tan);
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cta-availability {
  font-size: 0.9rem;
  color: var(--darkgray);
  margin-top: 0.5rem;
}

/* Social section styles */
.social-section {
  margin: 2rem 0;
}

.social-section h3 {
  margin-bottom: 1rem;
  max-width: 100%;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  flex-direction: row;
  justify-content: center;
  gap: 0.5em;
}

.social-link img {
  width: 24px;
  height: 1em;
}

@media (min-width: 768px) {

  /* Newsletter and social media columns */
  .newsletter-social-container,
  .testimonial-newsletter-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
  }

  .newsletter-social-container>div,
  .testimonial-newsletter-container>div {
    flex: 1;
  }

  .testimonial-newsletter-container .newsletter-section {
    margin-top: 3rem;
  }

  /* Keep social links in column format even on larger screens */
  .social-links {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Secondary link */
.secondary-link {
  text-align: center;
  margin: 1.5rem 0;
}

.secondary-link a {
  font-weight: 600;
}

/* Blog section */
.more {
  max-width: 100%;
  text-align: right;
  margin-top: 1rem;
}

.more a {
  font-weight: 600;
}

/* Draft badge styling */
.draft-badge {
  background-color: var(--light-tan);
  color: var(--dark-blue);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-block;
  background-color: #ffcc00;
  color: #333;
  font-size: 0.75em;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: bold;
  white-space: nowrap;
}

.series-badge {
  background-color: var(--body-bg);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
  position: absolute;
  z-index: 100;
  top: 1.5rem;
  right: -1rem;
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.5rem 1rem;
}

.series-badge,
.series-badge a {
  border: 0;
  color: var(--dark-blue) !important;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.series-badge a:hover {
  color: var(--white-80);
  transform: translateY(-1px);color: var(--link-color);
  text-decoration: underline;
  text-decoration-color: white;
  text-decoration-thickness: 2px;
}

/* Disqus comments */
#disqus_thread {
  margin-top: 2rem;
}

.post-comments {
  max-width: var(--header-max-width);
}

/* Table styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background-color: var(--white-80);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  font-size: var(--body-font-size);
}

th {
  text-align: left;
  background-color: var(--very-light-tan);
  color: var(--header-color);
  font-family: var(--header-font);
  font-weight: 500;
  font-size: 1.15rem;
  padding: 1rem;
  border-bottom: 2px solid var(--border-color);
  letter-spacing: var(--heading-letter-spacing);
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
  line-height: var(--line-height);
}

tr:last-child td {
  border-bottom: none;
}

tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.3);
}

/* Table responsive behavior */
@media (max-width: 768px) {
  table {
    font-size: var(--body-font-size-small);
  }

  th, td {
    padding: 0.5rem;
  }
}

/* Table of Contents (TOC) Styles */
.toc {
  padding: 1rem;
  margin: 2rem 0;
  background-color: var(--white-80);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: var(--body-font-size-small);
  max-width: var(--header-max-width);
  position: relative; /* Needed for pseudo-element positioning if complex */
}

/* Add the Polish header */
.toc::before {
  content: "W tym artykule";
  display: block;
  font-family: var(--header-font);
  font-size: 1.3rem;
  color: var(--header-color);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  letter-spacing: var(--heading-letter-spacing);
}

.toc ul {
  list-style: none;
  padding-left: 0.5rem;
  margin: 0;
}

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

/* Desktop specific styles for floating TOC */
@media (min-width: 1024px) {
  .toc {
    float: right;
    width: 250px; /* Adjust width as needed */
    max-width: none;
    margin: 0.5rem 0 1rem 2rem; /* top right bottom left */
    /* Sticky positioning alternative (requires parent container setup) */
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
  }

  /* Add clearfix to parent if needed, e.g., .post-content */
  .post-content::after {
    content: "";
    display: table;
    clear: both;
  }
}

/* Related Posts Styles */
.related-posts {
  margin: 3rem 0 2rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
}

.related-posts h3 {
  color: var(--header-color);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 100%;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 100%;
}

@media (min-width: 768px) {
  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .related-posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.related-post-card {
  background: var(--white-80);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.related-post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

a[href].related-post-link {
  display: block;
  text-decoration: none;
  text-decoration-color: transparent;text-decoration: none;
  color: inherit;
}

.related-post-link:hover {
  text-decoration: none;
}

.related-post-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.related-post-content {
  padding: 1rem;
}

.related-post-title {
  color: var(--header-color);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.5rem 0;
  max-width: 100%;
}

.related-post-excerpt {
  color: var(--body-color);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
  opacity: 0.8;
  max-width: 100%;
}
