:root {
  --primary-color: #8C8;
  --secondary-color: green;
}


* { box-sizing: border-box; }

body { font-family: 'Noto Sans KR', sans-serif; }

a {
  text-decoration: none;
}

.carousel {
  background: white;;
  margin-top: 10em;
  margin-bottom: 10em;
}

.carousel-cell {
  width: 50%;
  height: 70vh;
  margin-right: 1em;
  margin-bottom: 1em;
  background: var(--primary-color);
  border-radius: 10px;
  counter-increment: carousel-cell;
  display: flex;
  flex-direction: column;
}

.carousel-cell .thumb {
  flex: 0 0 70%; /* Takes up 50% of the .carousel-cell height */
  border-top-right-radius: 10px;
  border-top-left-radius: 10px;
  text-align: center;
  line-height: 1.5em;
  background-size: cover;
  background-position: center;
  position: relative;
  
}

.carousel-cell .thumb::before {
  content: "";
  border-top-right-radius: 10px;
  border-top-left-radius: 10px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.carousel-cell .thumb .date {
  position: absolute;
  top: 90%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: left;
  color: white;
  font-size:large;
  font-weight: 500;
}

.carousel-cell .thumb .title {
  position: absolute;
  width: 95%;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgb(201, 224, 188);
  font-size:larger;
  font-weight: 600;
  z-index: 2;
}
.carousel-cell .thumb .subtitle {
  position: absolute;
  width: 95%;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgb(207, 185, 176);
  font-size:medium;
  font-weight: 600;
  z-index: 2;
}

.carousel-cell .content {
  flex: 1;
  padding-top: 2em;
  padding-left: 2em;
  padding-right: 2em;
  background-color: rgb(243, 247, 242);
  border-bottom-right-radius: 10px;
  border-bottom-left-radius: 10px;
  text-align: justify;
  font-size: medium;
  line-height: 1.5em;
  display: flex;
  flex-direction: column;
}

.carousel-cell .content .text {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  font-size:smaller;
  margin-bottom: 0.5em
  
}

.carousel-cell .content .reference {
  text-align: center;
  font-size: smaller;
  font-weight: 400;
}

.flickity-button {
  background: transparent;
}

.flickity-button:hover {
  background: transparent;
}

.flickity-button:focus {
  outline: none;
  box-shadow: 0 0 0 0;
}

.flickity-button-icon {
  fill: rgb(99, 190, 25);
  filter: opacity(50%);
}
.flickity-button-icon:hover {
  fill: rgb(99, 190, 25);
  filter: opacity(80%);
}
.flickity-button-icon:focus {
  fill: rgb(99, 190, 25);
  filter: opacity(100%);
}


/* position dots in carousel */
.flickity-page-dots {
  bottom: -20px;
}
/* white circles */
.flickity-page-dots .dot {
  width: 12px;
  height: 12px;
  opacity: 1;
  background: transparent;
  border: 2px solid rgb(42, 201, 103);
}
/* fill-in selected dot */
.flickity-page-dots .dot.is-selected {
  background: rgb(42, 201, 103);
}

/* desktop : enable Flickity */
.carousel:after {
  content: 'flickity';
  display: none; /* hide :after */
}

/* mobile : disable Flickity */
@media screen and ( max-width: 768px ) {
  /*disable Flickity for large devices 
  .carousel:after {
    content: '';
  }
  */
 
  /* set width half the size */
  .carousel-cell { width: 80%; }

  .carousel-cell .content .text {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    font-size:smaller;
    margin-bottom: 0.5em
    
  }

}