/* Styling for Home page */

/* Main Home Section */

#home {
  background: var(--bg-panel);
  padding: 20px;
  border-radius: 10px;
  max-width: 900px;
  margin: 20px auto;
}

@media (max-width: 768px) {
  #home {
    background-attachment: scroll;
    background-size: 100% auto;
  }
}

@media (max-width: 480px) {
  #home {
    background-attachment: scroll;
    background-size: 100% auto;
  }
}

/* Stat Cards */

.pd-welcome-row {
  padding: 24px 20px 20px;
}

.pd-welcome-inner {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  min-height: 150px;
}

.pd-welcome-cat {
  position: absolute;
  left: 100px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.pd-welcome-cat img {
  display: block;
  max-height: 120px;
  width: auto;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.12));
}

.clove-bubble {
  position: absolute;
  bottom: 90%;
  left: 40px;
  background: var(--color-surface);
  border: 2px solid var(--color-brand);
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 0.75rem;
  color: var(--color-text);
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
  z-index: 11;
}

.clove-bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 45px;
  width: 10px;
  height: 12px;
  background: var(--color-surface);
  border-right: 2px solid var(--color-brand);
  border-bottom: 2px solid var(--color-brand);
  transform: rotate(46deg);
}

.pd-welcome-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 32px;
}

.pd-stat-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.pd-stat-card {
  width: 132px;
  padding: 12px 10px;
  border-radius: 12px;
  text-align: center;
  background-color: var(--bg-card);
  border: 1px solid var(--brand-soft);
  box-shadow: var(--shadow-soft);
  position: relative;
  z-index: 1;
  text-decoration: none;
  color: inherit;
  display: block;
}

.pd-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
  z-index: 2;
}

.pd-badge-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 8px;
  border-radius: 50%;
  background-color: var(--color-ui);
  color: var(--color-surface);
  font-size: 1em;
  text-decoration: none;
}

.pd-stat-label {
  font-size: 0.85rem;
  line-height: 1.1;
  font-weight: 700;
  color: var(--color-text);
}

@media (max-width: 900px) {
  .pd-welcome-inner {
    min-height: auto;
  }

  .pd-welcome-cat {
    position: static;
    transform: none;
    width: fit-content;
    margin: 0 auto 14px;
  }

  .pd-welcome-content {
    align-items: center;
  }

  .pd-welcome-cat img {
    max-height: 110px;
  }
}

/* Updates Box */

#updates {
  display: flex;
  justify-content: center;
  margin: 10px 0 40px;
}

.updates-card {
  position: relative;
  width: 100%;
  max-width: 640px;
  padding: 16px 20px 18px;
  border-radius: 12px;
  background-color: var(--color-surface);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.updates-title {
  margin: 0 0 12px;
  font-size: 1.15rem;
  color: var(--color-text);
  text-align: center;
}

.updates-title::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  margin: 10px 0 14px;
  border-radius: 6px 6px 0 0;
  opacity: 0.6;
  background: linear-gradient(
    to right,
    var(--color-brand),
    var(--color-base),
    var(--color-brand)
  );
}

.updates-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 18px;
  max-width: 600px;
  margin: 0 auto;
}

.updates-left {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.updates-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 235px;
}

.updates-left ul {
  margin: 0 0 14px;
  padding-left: 18px;
  list-style-type: disc;
  list-style-position: outside;
}

.updates-left li {
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 6px;
}

/* Updates Pagination */

.pagination {
  margin-top: auto;
  text-align: center;
}

.pagination button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 10px;
  font-size: 1rem;
  color: var(--color-ui);
  transition: color 0.2s ease, transform 0.2s ease;
}

.pagination button:hover {
  color: var(--color-text);
  transform: translateY(-1px);
}

.pagination button:disabled {
  opacity: 0.3;
  cursor: default;
  transform: none;
}

.page-info {
  margin-left: 0.6rem;
  font-size: 0.9rem;
}

/* Carousel */

.updates-right {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding-top: 0;
  margin-top: 1px;
}

.carousel {
  position: relative;
  width: 100%;
  max-width: 260px;
  margin: 0;
  overflow: hidden;
}

.carousel-item {
  display: none;
  position: relative;
}

.carousel-item.active {
  display: block;
}

.carousel-item img {
  display: block;
  max-width: 260px;
  height: auto;
  border-radius: 8px;
  border: 2px solid var(--text-soft);
  box-shadow: var(--shadow-medium);
}

.overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  box-sizing: border-box;
  padding: 6px 8px;
  border-radius: 0 0 8px 8px;
  background-color: var(--overlay-dark);
  color: var(--color-surface);
  text-align: center;
  font-size: 0.95rem;
}

.description {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.25;
  font-weight: 700;
}

@media (max-width: 768px) {
  .updates-card {
    max-width: 90%;
  }

  .updates-inner {
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 100%;
  }

  .updates-title {
    text-align: center;
  }

  .updates-right {
    justify-content: center;
  }

  .pagination {
    text-align: center;
  }
}


@media (max-width: 768px) {
  .pd-welcome-row {
    padding-top: 42px;
  }

  /* --- Clove + bubble --- */

  .pd-welcome-cat {
    position: static;
    transform: none;
    width: fit-content;
    margin: 0 auto 18px;
    text-align: center;
  }

  .pd-welcome-cat img {
    max-height: 110px;
    margin: 0 auto;
  }

  .clove-bubble {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.72rem;
    padding: 6px 10px;
  }

  .clove-bubble::after {
    left: 60%;
    bottom: -8px;
  }

  /* --- Updates card --- */

  #updates {
    margin: 10px 0 30px;
  }

  .updates-card {
    width: calc(100% - 20px);
    max-width: 100%;
    padding: 14px 14px 16px;
  }

  .updates-inner {
    grid-template-columns: 1fr;
    gap: 14px;
    max-width: 100%;
  }

  .updates-left {
    width: 100%;
  }

  .updates-left ul {
    padding-left: 16px;
    margin: 0 0 12px;
  }

  .updates-left li {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .updates-body {
    min-height: auto;
  }

  .updates-right {
    justify-content: center;
    width: 100%;
  }

  .carousel {
    width: 100%;
    max-width: 220px;
  }

  .carousel-item img {
    width: 100%;
    max-width: 220px;
    height: auto;
  }

  .overlay {
    font-size: 0.85rem;
    padding: 5px 7px;
  }

  .description {
    font-size: 0.8rem;
  }
}
