/* custom variables */
:root {
  --card-padding: 5%;
  --light-background: #ffffff;
  --dark-background: #252525;
  --gray-background: #fafafa;
  --divider-color: #aaa;
  --font-size: 18px;
}

/* global behaviour */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-size: var(--font-size);
}

/* helper classes */

.activated {
  visibility: visible;
}

.deactivated {
  visibility: hidden;
}

/* Navbar */
.cfd-navbar {
  background-color: var(--dark-background);
}

.navbar {
  flex: 0 0 auto;
}

/* Hero section */
.overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  opacity: 0;
  animation: fadeIn 2s linear forwards;
  animation-delay: 1s;
}

.overlay h1 {
  margin: 0;
  color: rgb(255, 255, 255); /* adjust for contrast */
  font-size: clamp(2rem, 5vw, 4rem);
  text-align: center;
  text-shadow: 2px 2px 4px black;
}

.deactivate-interactions {
  pointer-events: none; /* can't select text */
  user-select: none;  /* prevents text selection */
  -webkit-user-select: none; /* Safari/Chrome */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* IE/Edge */
}

.overlay .buttons {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.cfd-hero-image {
  max-height: 400px;
  max-width: 400px;
  border-radius: 50%;
  overflow: hidden;
}

/* Cards */
.cfd-card-container.columns {
  align-items: stretch;
}

.cfd-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* keeps button at bottom */
  height: 100%; /* fill parent column height */
}

.cfd-divider {
  border-top: 3px solid var(--bulma-primary);
  margin-left: 46%;
  margin-right: 46%;
}

.cfd-card-background {
  background-color: var(--gray-background);
  padding-top: 2%;
  padding-bottom: 2%;
}

.cfd-card-title {
  padding-left: var(--card-padding);
  padding-right: var(--card-padding);
  padding-top: var(--card-padding);
}

.cfd-card-img {
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  border-radius: 10px 10px 0 0;
}

.cfd-card-description {
  padding-left: var(--card-padding);
  padding-right: var(--card-padding);
  text-align: justify;
}

/* Footer */
.cfd-footer {
  background-color: var(--dark-background);
  color: white;
  font-size: 1.2rem;
  position: fixed;
  bottom: 0;
}

.cfd-footer-icon {
  padding-left: 5px;
  padding-right: 5px;
}

.cfd-footer-icon:hover {
  color: var(--bulma-primary);
  position: relative;
  top: -5px;
  transition-duration: 1s;
}

.simple-icons-of {
  display: inline-block;
  width: 30px;
  height: 30px;
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M24 4.003h-4.015c-3.45 0-5.3.197-6.748 1.957a7.996 7.996 0 1 0 2.103 9.211c3.182-.231 5.39-2.134 6.085-5.173c0 0-2.399.585-4.43 0c4.018-.777 6.333-3.037 7.005-5.995M5.61 11.999A2.391 2.391 0 0 1 9.28 9.97a2.966 2.966 0 0 1 2.998-2.528h.008c-.92 1.778-1.407 3.352-1.998 5.263A2.392 2.392 0 0 1 5.61 12Zm2.386-7.996a7.996 7.996 0 1 0 7.996 7.996a7.996 7.996 0 0 0-7.996-7.996m0 10.394A2.399 2.399 0 1 1 10.395 12a2.396 2.396 0 0 1-2.399 2.398Z'/%3E%3C/svg%3E");
  background-color: currentColor;
  -webkit-mask-image: var(--svg);
  mask-image: var(--svg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

/* learn cards */
.cfd-learn-card {
  display: flex;
  flex-direction: column;
  background-color: var(--light-background);
  padding: max(2%, 1rem);
  margin: max(3%, 1rem);
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.01);
}

@media (min-width: 1024px) {
  .cfd-learn-card {
    flex-direction: row;
  }
}

.cfd-learn-card-image {
  max-width: min(80%, 300px);
  flex: 1;
}

.cfd-learn-card-content {
  flex: 3;
}

.cfd-learn-card-number-of-articles {
  font-family: 'Muli', sans-serif;
  margin-bottom: 1%;
  font-size: 14px;
  color: gray;
}

/* series card */
.cfd-series-card-image {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  margin-top: 2%;
  margin-bottom: 2%;
}

.cfd-series-card-content {
  background-color: var(--light-background);
  padding: max(3%, 1rem);
  margin: max(3%, 1rem);
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.01);
}

/* articles */
.cfd-articles-background {
  background-color: var(--gray-background);
}

.cfd-articles-container, .cfd-series-card-content a {
  font-weight: 500;
}

.cfd-articles-container h1 {
  padding-bottom: 2rem;
}

.cfd-articles-container {
  background-color: var(--light-background);
  text-align: justify;
  padding: 5%;
  margin: 0%;
}

@media (min-width: 1024px) {
  .cfd-articles-container {
    background-color: var(--light-background);
    text-align: justify;
    padding: 5%;
    margin: 5%;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.01);
  }
}

.cfd-article-divider {
  border-top: 1px;
}

.cfd-article-readtime {
  padding-left: 10px;
  padding-bottom: 10px;
}

.cfd-social-media {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.cfd-social-media-left {
  justify-content: left;
}

.cfd-social-media-left-right {
  justify-content: space-between;
}


.cfd-social-media-share {
  font-size: 1.5rem;
}

.cfd-social-media-button {
  font-size: 2rem;
}

.cfd-social-media-button:hover {
  color: var(--bulma-primary);
  transition-duration: 0.25s;
}

/* pagination */
.cfd-pagination {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.cfd-confirmation {
  flex: 1 1 auto;
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

@media (max-width: 768px) {
  .content-area {
    overflow: auto;
  }
}

/* email validation */
input:invalid:not(:placeholder-shown) {
  border-color: #f14668;
}

/* Valid email */
input:valid {
  border-color: #48c774;
}

/* Show error text only when invalid */
input:invalid:not(:placeholder-shown) ~ .help {
  display: block;
}

input:valid ~ .help {
  display: none;
}

.help {
  display: none;
}

.error-icon {
  display: none;
}

input:invalid:not(:placeholder-shown) ~ .error-icon {
  display: inline-flex;
}

/* figure caption */
figcaption {
  text-align: center;
  margin-bottom: 2rem;
}

/* style WordPress classes for legacy HTML articles */
.aligncenter {
  text-align: center;
}

.wp-block-image {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.custom-category-posts-list li {
  margin-left: 2.5rem;
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
}

.wp-block-aioseo-table-of-contents li {
  margin-left: 2.5rem;
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
}

.wp-block-columns {
  display: flex;
  flex-wrap: wrap;
}

.wp-block-column {
  flex-grow: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
}

/* Base quote styling */
.wp-block-quote {
    margin: 2rem 0;
    padding-left: 1.5rem;
    border-left: 4px solid #dbdbdb; /* subtle vertical line */
}

/* Main quote text (first paragraph only) */
.wp-block-quote p:first-of-type {
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

/* end wordpress classes */

span.tag {
  background-color: var(--light-background);
  font-size: 1.25rem;
}

.cbp-has-line-numbers pre {
  counter-reset: line;
  padding-left: 3.5em;
  position: relative;
  line-height: 0;
  padding-bottom: 0;
  margin: 1.0rem 0;
}

.cbp-has-line-numbers .line {
  display: block;
  counter-increment: line;
  position: relative;
  padding-left: 0.6em;
  line-height: inherit;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  min-height: calc(1.2 * var(--font-size));
}

.cbp-has-line-numbers .line::before {
  content: counter(line);
  position: absolute;
  left: -3em;
  width: 2.5em;
  text-align: right;
  color: var(--cbp-line-number-color, #888);
  opacity: 0.7;
  user-select: none;
  font-family: inherit;
  line-height: inherit;
}

.wp-block-kevinbatdorf-code-block-pro {
  font-size: calc(1.2 * var(--font-size)) !important;
}

.wp-block-columns {
  display: flex;
  gap: 1.5rem;
}

.wp-block-column {
  flex: 1 1 0;
}

/* author bio */
.cfd-divider-author {
  padding-top: 2rem;
  padding-bottom: 2rem;
  display: flex;
  color: var(--divider-color);
  align-items: center;
  text-align: center;
  width: 100%;
}

.cfd-divider-author::before,
.cfd-divider-author::after {
  content: '';
  flex: 1;
  margin-left: 1rem;
  margin-right: 1rem;
  border-bottom: 1px solid var(--divider-color);
}

.media-left.is-one-fifth {
  flex: 0 0 20%;
}

.media-content.is-four-fifths {
  flex: 0 0 80%;
}

.author-image {
  display: block;
  margin: 0 auto;
  max-width: 90%;
  height: auto;
}

@media (max-width: 768px) {
  .cfd-gwanghwamun {
    position: absolute;
    right: 0;
    bottom: 0;
    height: 100px;
  }
}

.cfd-gwanghwamun {
  position: absolute;
  right: 5%;
  bottom: 0;
  height: 150px;
  opacity: 0.3;
  display: inline;
}

@media (max-width: 768px) {
  .media {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .media-left {
    flex: 0 0 100%;
  }

  .media-content {
    flex: 0 0 100%;
    align-items: left;
    text-align: left;
  }

  .author-image {
    max-width: 50%;
    height: auto; 
  }
}

/* testimonial */
.column span#name {
  font-weight: bold;
}

.column span#testimonial {
  padding-top: 0.5rem;
  display: block;
  font-style: italic;
  padding-bottom: 1rem;
}

/* overwrite some default styles */
h1 {
  font-size: 2.5em;
  font-weight: 600;
  margin-bottom: 0.5em;
  text-align: left;
}

h2 {
  font-size: 2.0em;
  font-weight: 600;
  margin-bottom: 0.5em;
  text-align: left;
}

h3 {
  font-size: 1.75em;
  font-weight: 500;
  margin-bottom: 0.5em;
  text-align: left;
}

h4 {
  font-size: 1.5em;
  font-weight: 500;
  margin-bottom: 0.5em;
  text-align: left;
}

h5 {
  font-size: 1.25em;
  font-weight: 500;
  margin-bottom: 0.5em;
  text-align: left;
}

h6 {
  font-size: 1.0em;
  font-weight: 500;
  margin-bottom: 0.5em;
  text-align: left;
}

p {
  margin-bottom: 1rem;
}

li, ol {
  margin-left: 2rem;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;  
}

ul {
  list-style-type: square;
}

code {
  background-color: var(--light-background);
  color: black;
  font-family: 'Ubuntu mono', monospace;
  margin: 0;
  padding: 0;
  font-size: var(--font-size)
}

audio {
  width: 100%;
}

/* tables */

table {
  border-collapse: separate;
  border: 1px solid var(--dark-background);
  margin: 2rem 1rem;
  font-size: 0.9em;
  width: calc(100% - 2rem);
  border-radius: 10px;
  overflow: hidden;
}

thead th {
  background-color: var(--dark-background);
  color: white;
  justify-content: center;
  vertical-align: middle;
  padding: 1rem;
  font-weight: bold;;
}

thead th strong {
  color: white;
  font-weight: bold;
}

tbody td {
  padding: 0.75rem;
}

tbody tr:nth-child(even) {
  background-color: var(--gray-background);
}

tbody tr {
  border-bottom: 1px solid var(--dark-background); /* horizontal line between rows */
}

tbody tr:last-child {
  border-bottom: none; /* optional: remove line after last row */
}