/*! Place your custom styles here */

/* Grade de atividades da página inicial. */
.home-activity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  clear: both;
  margin-bottom: 30px;
}

.home-activity-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-activity-grid > .masonry__item {
  float: none;
  width: auto;
  min-width: 0;
  padding: 0;
  margin-bottom: 0;
}

.home-activity-grid .product,
.home-activity-grid .product img {
  margin-bottom: 0;
}

.home-activity-grid .product img {
  display: block;
  width: 100%;
}

@media (max-width: 767px) {
  .home-activity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 16px;
    margin-bottom: 24px;
  }
}

/* Lista padronizada de videos do YouTube na barra lateral. */
.youtube-video-list {
  display: grid;
  gap: 24px;
  margin: 0 0 18px;
}

.youtube-video-list--collapsed > .youtube-video-card:nth-child(n+9) {
  display: none;
}

.youtube-video-toggle {
  display: block;
  width: 100%;
  margin: 0 0 30px;
  padding: 11px 16px;
  border: 1px solid #f4a621;
  border-radius: 5px;
  background: #fff;
  color: #e46f18;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.youtube-video-toggle:hover,
.youtube-video-toggle:focus {
  background: #ff7a1a;
  color: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
  outline: none;
}

.youtube-video-card {
  display: block;
  padding: 14px;
  border: 1px solid #f4a621;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.youtube-video-card:hover,
.youtube-video-card:focus {
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.16);
  outline: none;
  transform: translateY(-2px);
}

.youtube-video-card--shorts {
  width: 100%;
  max-width: 220px;
  margin-right: auto;
  margin-left: auto;
}

.youtube-video-thumbnail {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 2px solid #ff7a1a;
  border-radius: 8px;
  background: #111;
}

.youtube-video-card--shorts .youtube-video-thumbnail {
  aspect-ratio: 9 / 16;
}

.youtube-video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 180ms ease;
}

.youtube-video-card:hover .youtube-video-thumbnail img,
.youtube-video-card:focus .youtube-video-thumbnail img {
  transform: scale(1.025);
}

.youtube-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 58px;
  height: 58px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 2px 9px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  transition: background 180ms ease, transform 180ms ease;
}

.youtube-play-button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 53%;
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 17px solid #555;
  transform: translate(-42%, -50%);
}

.youtube-video-card:hover .youtube-play-button,
.youtube-video-card:focus .youtube-play-button {
  background: #fff;
  transform: translate(-50%, -50%) scale(1.08);
}

/* Popup independente do vídeo de boas-vindas. */
.welcome-video-trigger {
  display: block;
  width: 100%;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.welcome-video-trigger img {
  display: block;
  width: 100%;
  margin-bottom: 0;
}

.welcome-video-trigger:focus {
  outline: 3px solid #ff7a1a;
  outline-offset: 3px;
}

.welcome-video-modal[hidden] {
  display: none !important;
}

.welcome-video-modal {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.86);
}

.welcome-video-dialog {
  position: relative;
  width: min(900px, 100%, calc((100vh - 80px) * 1.7778));
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.welcome-video-dialog iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0 !important;
  border: 0;
}

.youtube-video-dialog--details {
  width: min(900px, 100%, calc((100vh - 180px) * 1.7778));
  aspect-ratio: auto;
  padding: 20px;
  border-radius: 10px;
  background: #fff;
}

.youtube-video-dialog--details iframe {
  position: static;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #000;
}

.youtube-popup-title {
  margin: 0 0 14px;
  padding-right: 44px;
  color: #333;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.youtube-popup-title[hidden],
.youtube-popup-channel[hidden] {
  display: none !important;
}

.youtube-popup-channel {
  display: block;
  margin-top: 14px;
  color: #e46f18;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.youtube-popup-channel:hover,
.youtube-popup-channel:focus {
  color: #ff7a1a;
  text-decoration: underline;
}

.welcome-video-close {
  position: absolute;
  z-index: 1;
  top: -42px;
  right: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #222;
  color: #fff;
  font-size: 26px;
  line-height: 30px;
  cursor: pointer;
}

.youtube-video-dialog--details .welcome-video-close {
  top: 10px;
  right: 10px;
  border-color: #555;
}

body.welcome-video-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .youtube-video-card,
  .youtube-video-thumbnail img,
  .youtube-play-button,
  .youtube-video-toggle,
  .welcome-video-modal {
    transition: none;
  }
}

/* Player incorporado da página da autora. */
.mailza-youtube-player {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #000;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
}

.mailza-youtube-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
