/* This CSS file is used for the 3 pages in this folder */

/* ========================================
   Flexbox 工具類 (Utility Classes)
   ======================================== */

/* 行佈局 (水平排列) */
.myRow {
  display: flex;
  flex-direction: row;
}

/* 列佈局 (垂直排列) */
.column {
  display: flex;
  flex-direction: column;
}

/* 居中對齊 */
.centered {
  justify-content: center;
}

/* 垂直居中對齊 */
.aligned {
  align-items: center;
}

/* 小間距 */
.gap {
  gap: 10px;
}

/* 大間距 */
.bigGap {
  gap: 20px;
}

/* 響應式：小螢幕時從行變成列 */
@media (max-width: 768px) {
  .rowToColumnSmall {
    flex-direction: column !important;
  }
}

/* ======================================== */

a:focus {
  outline: none;
}

body > * {
  box-sizing: border-box;
}

.padding {
  padding: 20px;
}

.maxHeight {
  height: 100%;
  min-height: 100px;
}

.zIndex {
  z-index: 10;
}
.absolute {
  position: absolute;
}
.relative {
  position: relative;
}

.marginSpace {
  margin: 20px 0;
}

.containerSeparator {
  margin-top: 40px;
  margin-bottom: 40px;
}

#class-info-form-container {
  width: 500px;
  border-radius: 10px;
  border: 1px solid #e4e4e4;
  background: linear-gradient(54deg, #1e3a8a 0%, #1e40af 32.92%, #2563eb 100%);
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  z-index: 10;
  left: 50px;
  top: 30px;
  max-width: 90%;
  padding-bottom: 30px;
}
.class-form-title {
  margin-bottom: 8px;
  margin-top: 30px;
}
.class-form-text {
  margin-top: 0;
  margin-bottom: 12px;
}
#drumroll,
#drumroll-text {
  display: none;
}
.marginSpaceAuto {
  margin: 20px auto;
}
#quiz-section {
  display: flex !important;
  max-width: 410px;
  min-width: 380px;
}
#quiz-box {
  box-sizing: border-box;
  border-radius: 5px;
  border: 3px solid var(--border-blue);
}
.question {
  display: none !important;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.question.toBeDisplayed {
  display: flex !important;
  opacity: 1;
}
.question.fadeOut {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.question-button {
  display: flex;
  width: 270px;
  height: 32px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 4px;
  border: 2px solid var(--border-blue);
  background: #fff;
  color: black;
}
.special-style-div {
  left: 50px;
}

.question-button:hover,
.question-button:active {
  background: var(--border-blue);
  color: var(--background-color);
  border: 2px solid var(--border-blue);
}

.headerButton {
  min-width: fit-content;
}
.headerButton > a {
  height: 38px;
  padding: 7px !important;
}

.bold {
  font-weight: 600;
}

.mediumFont {
  font-size: 20px;
}

.bigFont {
  font-size: 32px;
}

.whiteBackground {
  background-color: var(--background-color);
}

.border {
  border-radius: 8px;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
}

.overflow {
  overflow: hidden;
}

.hidden-titles {
  display: none;
}

#week-selection {
  min-width: 290px;
  justify-content: space-between;
}
.week-hidden {
  display: none !important;
}

.week-sentence.lesson {
  margin: 16px 0 0 0;
}
.week-button {
  cursor: pointer;
  background-color: inherit;
  border: none;
  text-align: start;
  margin: 10px 0 0 0;
  color: #525252;
  width: 90%;
  padding: 0;
}
.week-button:active,
.week-button:hover,
.week-button.open {
  color: #2b78e4;
  background-color: inherit;
}
.gray-text {
  color: #525252;
}
.top-divider {
  height: 100px;
  width: 1px;
  background-color: gray;
}

header {
  background-color: var(--background-color);
  top: 0;
  padding: 10px 10%;
  z-index: 998;
  position: sticky;
}

nav {
  flex-grow: 1;
  margin-left: 20px;
}

#logo-container {
  width: 170px;
  display: flex;
  height: 100%;
}

#logo-img {
  width: 100%;
  height: auto;
  flex-shrink: 1;
  min-width: 150px;
}

.svg-mini-containers {
  min-width: 63px;
  height: 63px;
  margin-bottom: 15px;
}

.dropdown-title {
  cursor: pointer;
}

.small-svg-containers {
  min-width: 40px;
  height: 40px;
  margin-right: 10px !important;
}

.icon-container-lr {
  gap: 15px;
  width: 160px;
}
#topic-button-group {
  max-height: 300px;
  overflow: scroll;
}

.is-layout-flex.hidden.active,
.active {
  display: flex;
}

.hidden {
  height: 100%;
}

.menu {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.menu-item,
.menu-item-with-more {
  position: relative;
  margin: 0;
}

.second-menu-active {
  border-bottom: 2px solid #99c669;
}

#second-menu-bar {
  top: 0;
  z-index: 1000;
  position: sticky;
  height: 90px;
  background-color: var(--background-color);
}

#yellow-banner {
  background-color: #ffe696;
}

#banner-inner {
  gap: 30px;
}

#close-banner-btn:hover {
  transform: scale(1.1);
  transition: transform 0.2s ease;
  background-color: #00000018;
  border-radius: 20px;
}
#close-banner-btn {
  cursor: pointer;
}

.second-menu-button {
  font-size: 20px;
  color: black;
  cursor: pointer;
  padding: 6px;
}
.second-menu-spec-btn {
  width: 163px;
  height: 42px;
  border: 2px solid var(--main-color);
  border-radius: 4.803px;
  padding: 0px;
  margin-left: 30px;
}

.menu-item a,
.menu-item-with-more a {
  font-family: 'GenSenRounded TW';
  text-decoration: none;
  color: #000;
  padding: 10px;
  display: block;
  border-radius: 5px;
  font-size: 20px;
  white-space: nowrap;
}
.nowrap {
  white-space: nowrap;
}

.menu-item.top-menu-button a {
  font-size: 16px;
}

.menu-item.highlight a,
.sign-up-button {
  background-color: var(--main-color);
  color: var(--background-color);
  padding: 0px 20px;
  margin-left: 30px;
  height: 42px;
  display: flex;
  font-family: 'Gen Jyuu GothicX';
}

.menu-item.highlight a:hover {
  color: var(--background-color);
}

.menu-item a:hover,
.menu-item-with-more a:hover {
  color: var(--main-color);
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--background-color);
  list-style-type: none;
  margin: 0;
  padding: 0;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1001;
}

.dropdown li {
  margin: 0;
}

.dropdown li a {
  padding: 10px 15px;
  white-space: nowrap;
}

.menu-item:hover .dropdown {
  display: block;
}

.header-hamburger {
  display: none;
  height: 20px;
  gap: 5px;
  cursor: pointer;
}

.hamburger-button {
  width: 25px;
  height: 3px;
  border-radius: 5px;
  background: var(--main-blue);
}

.hamburger-menu {
  display: none;
  position: absolute;
  right: 40px;
  top: 60px;
  background-color: var(--background-color);
  width: 200px;
  padding: 10px;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
}

.hamburger-menu .menu {
  flex-direction: column;
}

.startingScore {
  background: #ebf2fd;
  width: 90px;
  height: 45px;
  border-radius: 5px;
  font-size: 26px;
}

.endingScore {
  background: #ffeeda;
  width: 115px;
  height: 60px;
  border-radius: 5px;
  font-size: 33px;
}

#bubble-container {
  position: relative;
  height: 1200px;
}

#big-blue-bubble {
  width: 1200px;
  height: 1200px;
  background-color: #f4f8ff;
  border-radius: 1200px;
  position: absolute;
  left: -150px;
}

#big-blue-bubble > div:not(#bubble-divider) {
  width: 500px;
}

#bubble-divider {
  display: none;
}

#claire-go {
  transform: translateX(-50px);
  flex-shrink: 1;
}

#picture-bubble {
  position: absolute;
  width: 500px;
  height: 500px;
  top: 200px;
  right: -40px;
  background-color: #f8debe;
  border-radius: 50%;
}

.yellow-numbers {
  width: 37px;
  height: 37px;
  background-color: #ffcc4d;
  border-radius: 50%;
  color: #2e2e2e;
  font-size: 22px;
  font-family: 'Gen Jyuu GothicX';
}
#lottie-player1 {
  width: 1000px;
  height: 400px;
}
#lottie-player2 {
  display: none;
}
.learningResources {
  border-radius: 19.477px;
  border: 1.694px solid #c5daff;
  background: #fff;
  box-shadow: 0px 0.847px 2.54px 0px rgba(0, 0, 0, 0.05);
  flex-wrap: nowrap;
  width: 70%;
  justify-content: space-around;
}

.learningResources.homepage {
  border: none;
  box-shadow: none;
}

.week-select-menu {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: url('data:image/svg+xml;utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>')
    100% 50% no-repeat transparent;
  display: flex;
  height: 44px;
  justify-content: space-between;
  align-items: flex-start;
  align-self: stretch;
  font-size: 14px;
  padding: 11px 12px;
  margin: 10px 0;
  border-radius: 5px;
  font-family: 'GenSenRounded TW';
  color: #888;
  line-height: 150%;
  letter-spacing: -0.154px;
  border: 1px solid #b0b0b0;
}
.week-select-menu:focus {
  outline: 1px solid #b0b0b0;
}

#sign-up-process {
  background: var(--background-blue);
}

.teacher-card-container,
.student-card-container {
  position: relative;
  scroll-behavior: smooth;
  overflow-x: clip;
  margin: 20px auto;
  margin-inline: auto;
}

.prev-button,
.next-button {
  cursor: pointer;
}

.bottom-form {
  border-radius: 8px;
  border: 2px solid var(--main-color);
  background: var(--background-color);
  max-width: 600px;
  width: 90%;
}

.bottom-border {
  border-bottom: 1px solid #b1b1b1;
  margin-bottom: 10px;
  margin-top: 27px;
}

#page-two-class {
  padding: 20px 30px;
}

/* Hero 區塊：桌面版左右排列 */
.top-box-text,
.top-box-pic {
  flex: 1;
  min-width: 0; /* 移除最小寬度限制，允許彈性縮放 */
}

.top-box-wrapper {
  display: flex;
  flex-wrap: nowrap; /* 桌面版強制左右排列，不換行 */
  justify-content: center;
  margin: auto;
  gap: 20px; /* 左右元素之間的間距 */
}

/* Hero 信息框：強制桌面版左右排列 */
#hero-info-box {
  display: flex !important;
  flex-direction: row !important; /* 強制橫向排列 */
  flex-wrap: nowrap !important;
  gap: 20px;
  align-items: center !important;
  background-color: #ffffff !important; /* 確保白色背景 */
  position: relative !important; /* 確保正確的堆疊順序 */
  z-index: 10 !important; /* 提高層級避免被遮蓋 */
  padding: 30px 40px !important; /* 加上內邊距 */
}

/* 內容欄位自動撐滿，但排除分隔線 */
#hero-info-box > .wp-block-column:not([style*="flex-basis: 1px"]) {
  flex: 1 !important;
  min-width: 0 !important;
  max-width: none !important;
}

/* 分隔線保持 1px 寬度 */
#hero-info-box > .wp-block-column[style*="flex-basis: 1px"] {
  flex: 0 0 1px !important;
  min-width: 1px !important;
  max-width: 1px !important;
}

/* 確保內部的 wp-block-columns 也是橫向 */
#hero-info-box .wp-block-columns {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 20px !important;
}

/* 確保內層 column 也是橫向排列，不會上下堆疊 */
#hero-info-box .wp-block-column .wp-block-columns {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 20px !important;
}

/* 內層的 column 自動撐滿 */
#hero-info-box .wp-block-column .wp-block-column {
  flex: 1 !important;
  min-width: 0 !important;
}

#nf-field-15 {
  background: var(--main-color);
  color: var(--background-color);
  border-radius: 6px;
}
#nf-field-15:active {
  color: var(--background-color);
}

#signup-bottom-form::backdrop {
  background-color: rgba(0, 0, 0, 0.476);
}

#next-chongci,
#next-shili {
  cursor: pointer;
  border-radius: 8px;
  border: 2px solid #8bced6;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  transition: all ease-in-out 200ms;
}

#next-chongci:active,
#next-shili:active,
#sign-up-now-shili:active,
#sign-up-now-chongci:active {
  transform: scale(1.05);
}

#next-chongci:hover,
#next-shili:hover,
#sign-up-now-shili:hover,
#sign-up-now-chongci:hover {
  transform: scale(1.05);
}

#sign-up-now-shili,
#sign-up-now-chongci {
  cursor: pointer;
}

.student-card {
  position: absolute;
  transition: all ease-in-out 800ms;
  width: 380px;
  height: 490px;
  padding: 37px 33px;
  gap: 21px;
  border: 2.5px var(--light-blue) solid;
  border-radius: 10px;
  background: var(--background-color);
}

.teachers-card {
  position: absolute;
  border-radius: 10.407px;
  background: #fff8e8;
  box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.25);
  width: 370px;
  height: 450px;
  transition: all ease-in-out 800ms;
}

.carousel-nav-item {
  background: inherit;
  color: black;
  border: none;
  cursor: pointer;
  font-size: 20px;
}

.carousel-nav-item:hover {
  background: inherit;
  color: black;
}

.carousel-nav-item:focus {
  border: none;
  color: black;
}

.carousel-nav-item:active {
  transform: scale(1.3);
}

.carousel-active {
  top: -1rem;
}

.teacher-card-img {
  border-radius: 8px;
}

.faq-text,
.faq-list > li {
  font-size: 20px;
  font-family: 'Gen Jyuu GothicX';
  line-height: 150%; /* 30px */
  letter-spacing: -0.22px;
}

.faq-container,
.widthContainer {
  width: 100%;
  display: grid !important;
  grid-template-columns: 160px repeat(12, 1fr) 160px;
  gap: 10px;
  grid-auto-rows: auto;
}

.faq-div {
  border-radius: 5px;
  border: 2px solid #8bced6;
  background: #fff;
  color: var(--light-blue);
  width: 100%;
  cursor: pointer;
  grid-column: 3 / span 10;
}

.grayBarSeparator {
  width: 0.7px;
  height: 386px;
  background: rgba(160, 160, 160, 0.23);
  margin-right: 40px;
}

.widthChild {
  grid-column: 2 / span 12;
}

.faq-div.expand > p::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 0px;
  border-bottom: 7px solid #898989;
  float: right;
  font-size: 12px;
  margin-left: 5px;
}

.noSelection {
  -moz-user-select: none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.faq-div > p::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 7px solid #898989;
  float: none;
  font-size: 12px;
  position: absolute;
  right: 100px;
}

ol {
  list-style-position: inside;
  padding: 0;
}

.faq-hidden {
  transition: all ease-in-out 600ms;
  border-top: 2px solid #8bced6;
  color: black;
  background: #fff;
  display: none !important;
  min-height: 48px;
  padding: 23px 64px;
}

.datePicker {
  font-size: 48px;
  font-weight: 800;
}

.plus-sign {
  font-size: 35px;
  color: #898989;
  font-weight: 1000;
}

.faq-title {
  margin: 0;
  padding: 16px 0;
}

.faq-div.expand > .faq-hidden {
  display: flex !important;
}

.faq-double-hidden {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 600ms ease-in-out, opacity 600ms ease-in-out;
  display: flex;
  flex-direction: column;
}

.faq-double-hidden.expand {
  max-height: 1000px;
  opacity: 1;
}

.classpage-buttons {
  width: 250px;
  min-width: 180px;
  padding-left: 20px;
  padding-bottom: 20px;
  max-width: 250px;
  margin-bottom: 10px;
}

.week-selection-info h3 {
  opacity: 0.4;
}

.week-selection-info .week-sentence:nth-of-type(1) {
  opacity: 0.4;
}
.week-selection-info .week-sentence:nth-of-type(2) {
  opacity: 0.3;
}
.week-selection-info .week-sentence:nth-of-type(3) {
  opacity: 0.2;
}
.week-selection-info .week-sentence:nth-of-type(4) {
  opacity: 0.1;
}

/* 除錯用：視覺化容器邊界（上線前請移除） */
/*
.wp-block-gutsliders-videos-carousel {
  outline: 3px solid red !important;
}
.wp-block-gutsliders-videos-carousel .swiper {
  outline: 3px solid blue !important;
}
.wp-block-gutsliders-videos-carousel .swiper-slide {
  outline: 2px solid green !important;
}
.wp-block-gutsliders-videos-carousel .gutslider-slide {
  outline: 2px solid orange !important;
}
*/

/* Swiper 修復 - 防止 slide 寬度計算錯誤 */
.wp-block-gutsliders-videos-carousel {
  max-width: 100% !important;
  overflow: hidden !important;
}

.wp-block-gutsliders-videos-carousel .swiper {
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
}

.wp-block-gutsliders-videos-carousel .swiper-wrapper {
  display: flex !important;
  transition-timing-function: linear !important;
}

.wp-block-gutsliders-videos-carousel .swiper-slide {
  flex-shrink: 0 !important;
  /* 移除固定寬度，讓 Swiper 根據 slidesPerView 自動計算 */
}

/* 影片容器高度設定 - 使用 aspect-ratio + fallback */
.wp-block-gutsliders-videos-carousel .gutslider-slide {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 200px; /* fallback for aspect-ratio */
  overflow: hidden;
  background-color: #000;
}

.wp-block-gutsliders-videos-carousel .gutslider-slide iframe {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  display: block !important;
}

/* customRatio 類別使用相同規則 */
.wp-block-gutsliders-videos-carousel .gutslider-slide.customRatio {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  min-height: 200px !important; /* fallback for aspect-ratio */
  overflow: hidden !important;
}

.wp-block-gutsliders-videos-carousel .gutslider-slide.customRatio iframe {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

/* 確保 loop 模式下複製的 slides 也正常顯示 */
.wp-block-gutsliders-videos-carousel .swiper-slide-duplicate {
  display: block !important;
  opacity: 1 !important;
}

/* 修復導航按鈕 */
.wp-block-gutsliders-videos-carousel .swiper-button-next,
.wp-block-gutsliders-videos-carousel .swiper-button-prev {
  cursor: pointer !important;
  pointer-events: auto !important;
}

.wp-block-gutsliders-videos-carousel .swiper-button-disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
}

/* 啟用觸控滑動 */
.wp-block-gutsliders-videos-carousel .swiper {
  touch-action: pan-y pinch-zoom !important;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.wp-block-gutsliders-videos-carousel .swiper-wrapper {
  touch-action: pan-y pinch-zoom !important;
}

/* iframe 預設不攔截觸控事件，讓用戶可以滑動 */
.wp-block-gutsliders-videos-carousel iframe {
  pointer-events: none !important;
}

/* 桌面版：滑鼠懸停時才啟用 iframe 互動（可以點擊播放） */
@media (min-width: 769px) {
  .wp-block-gutsliders-videos-carousel .swiper-slide:hover iframe {
    pointer-events: auto !important;
  }
}

/* 手機版：點擊 slide 後才啟用 iframe，但保持滑動功能 */
@media (max-width: 768px) {
  .wp-block-gutsliders-videos-carousel .swiper-slide-active iframe {
    pointer-events: auto !important;
    /* 點擊後可以播放，但滑動手勢會被 Swiper 捕獲 */
  }
}

/* ==========================================
   視頻輪播區塊樣式
   ========================================== */

/* 視頻輪播區塊整體設置 - 確保不會覆蓋上方內容 */
#video-testimonials-section {
  position: relative !important;
  z-index: 1 !important;
  margin-top: 20px !important; /* 增加margin避開sticky的second-menu-bar (90px高度 + 30px緩衝) */
  padding-top: 10px !important;
}

/* 視頻區塊標題 */
.video-section-title {
  padding: 0;
  margin: 40px 0 -30px 0;
}

/* 輪播 column 寬度 */
.carousel-column {
  flex-basis: 80%;
}

/* 確保父容器有正確的寬度和佈局 */
.centered-slider {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.centered-slider .wp-block-column {
  width: 90%;
  max-width: 100%;
  display: flex;
  justify-content: center;
}

/* 確保 Swiper 容器在桌面版有寬度 */
@media (min-width: 769px) {
  .wp-block-gutsliders-videos-carousel {
    width: 100% !important;
    max-width: 1400px;
    margin: 0 auto; /* 置中 */
  }
  
  .wp-block-gutsliders-videos-carousel .swiper {
    width: 100% !important;
  }
  
  /* 確保影片容器有足夠高度 */
  .wp-block-gutsliders-videos-carousel .gutslider-slide,
  .wp-block-gutsliders-videos-carousel .gutslider-slide.customRatio {
    min-height: 300px !important;
  }
}

/* 手機版樣式優化 */
@media (max-width: 768px) {
  .centered-slider .wp-block-column {
    width: 95%;
  }
  
  /* 手機版影片大小 */
  .wp-block-gutsliders-videos-carousel .gutslider-slide,
  .wp-block-gutsliders-videos-carousel .gutslider-slide.customRatio {
    aspect-ratio: 16 / 9 !important;
  }
  
  /* 手機版時確保 slide 寬度正確 */
  .wp-block-gutsliders-videos-carousel .swiper-slide {
    width: 100% !important;
  }
  
  /* 導航按鈕在手機版的調整 */
  .wp-block-gutsliders-videos-carousel .swiper-button-next,
  .wp-block-gutsliders-videos-carousel .swiper-button-prev {
    width: 30px !important;
    height: 30px !important;
  }
  
  /* 分頁點在手機版更明顯 */
  .wp-block-gutsliders-videos-carousel .swiper-pagination-bullet {
    width: 10px !important;
    height: 10px !important;
    margin: 0 5px !important;
  }
}

@media (max-width: 480px) {
  .centered-slider .wp-block-column {
    width: 100%;
  }
  
  /* 小手機版影片大小 */
  .wp-block-gutsliders-videos-carousel .gutslider-slide,
  .wp-block-gutsliders-videos-carousel .gutslider-slide.customRatio {
    aspect-ratio: 16 / 9 !important;
  }
}

#main-page-hero {
  background-size: cover;
  background-image: url('https://clairesenglish.com/wp-content/uploads/2025/07/blue-bg-scaled.png');
}

#main-page-hero-inner-content {
  gap: 25px;
}

#main-page-hero-pic {
  max-width: 100%;
}

#claire-main {
  width: 100%;
  height: auto;
  align-self: flex-end;
}

#main-page-hero-arrow {
  position: absolute;
  top: 105%;
  left: 50%;
  z-index: 10;
  height: auto;
  width: 380px;
}

#video-section {
  padding-top: 100px;
  /* padding-bottom: 120px; */
}
#contact-section {
  padding-top: 50px;
  padding-bottom: 120px;
}

#video-container {
  border-radius: 10px;
  overflow: hidden;
}

#lottie-container {
  position: absolute;
  top: 68%;
  left: 1%;
  z-index: 10;
}

#info-section {
  background-color: var(--background-blue);
  gap: 65px;
  padding: 55px 20px;
}

.info-box {
  border-top: 4px solid var(--main-color);
  border-radius: 5px;
  width: 330px;
  padding: 51px 17px;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  gap: 18px;
}

.info-box:hover {
  background-color: var(--main-color);
  color: white;
}

.emoji-box {
  font-size: 58px;
}

#video-element {
  max-width: 90%;
  width: 1000px;
  height: 400px;
}

#link-under-video {
  color: var(--blue-btn-blue);
  text-decoration: underline;
  margin-top: 40px;
}

@media (max-width: 1380px) {
  #main-page-hero-arrow {
    width: 334px;
  }
}

@media (max-width: 1250px) {
  #main-page-hero-arrow {
    width: 250px;
  }
  #picture-bubble {
    width: 400px;
    height: 400px;
  }

  .second-menu-spec-btn {
    width: 130px;
  }
  .stopGap {
    gap: 0;
  }
}

@media (max-width: 1100px) {
  #lottie-player1 {
    width: 800px;
  }
  .faq-container,
  .widthContainer {
    grid-template-columns: 32px repeat(8, 1fr) 32px;
  }
  .faq-div {
    grid-column: 3 / span 6;
  }

  .widthChild {
    grid-column: 2 / span 8;
  }
  .second-menu-spec-btn {
    width: 110px;
  }

  nav > ul {
    gap: 5px !important;
  }
}

@media (max-width: 950px) {
  .grayBarSeparator {
    display: none;
  }
  #class-page {
    min-height: 1000px;
  }
  #lottie-player1 {
    width: 700px;
    height: 300px;
  }

  #picture-bubble {
    width: 300px;
    height: 300px;
  }
  #full-class-resources {
    background-color: #fff;
  }
  .learningResources-wrapper {
    flex-direction: row !important;
  }
  .icon-container-lr {
    gap: 10px;
  }
  .learningResources {
    border: none;
    box-shadow: none;
    width: 100%;
    flex: 1;
    justify-content: space-between;
    height: 580px;
  }
}

@media (max-width: 860px) {
  #second-menu-bar {
    display: none;
  }
  .hidden-titles {
    display: block;
    margin: 0;
    font-size: 14px;
    line-height: 150%;
    letter-spacing: -0.154px;
  }
  #week-selection {
    min-width: 260px;
  }
  .centerOnMobile {
    text-align: center;
  }
  #main-page-hero {
    flex-direction: column-reverse;
    padding: 20px 20px 70px 20px;
  }
  #main-page-hero-pic {
    max-width: 310px;
  }
  #main-page-hero-content {
    margin-top: -30px;
  }
  #main-page-hero-arrow {
    top: 122%;
    left: 10%;
    transform: rotate(45deg);
    width: 145px;
  }
}

@media (max-width: 830px) {
  #picture-bubble {
    display: none;
  }

  #big-blue-bubble {
    left: -300px;
  }
  #big-blue-bubble > div:not(#bubble-divider) {
    width: 400px;
  }
}

@media (max-width: 781px) {
  #main-page-hero {
    background-image: url('https://clairesenglish.com/wp-content/uploads/2025/07/blue-bg-mobile.png');
  }
  #lottie-player1 {
    display: none;
  }
  #lottie-player2 {
    display: block;
    width: 500px;
    height: 500px;
  }
  /* 手機/平板版：Hero 區塊改為上下排列 */
  .top-box-wrapper {
    flex-wrap: wrap; /* 允許換行，變成上下排列 */
    flex-direction: column; /* 強制垂直排列 */
  }
  
  .top-box-text,
  .top-box-pic {
    min-width: 100%; /* 每個元素佔滿整行 */
  }
  
  /* 手機/平板版：Hero 信息框改為上下排列 */
  #hero-info-box {
    flex-direction: column !important;
    flex-wrap: wrap !important;
  }
  
  #hero-info-box > .wp-block-column {
    min-width: 100% !important;
    max-width: 100% !important;
  }
  
  #hero-info-box .wp-block-columns {
    flex-direction: column !important;
  }
  
  .top-divider {
    height: 1px;
    width: 100px;
    background-color: gray;
  }
  .top-box-text > h1,
  .top-box-text > p,
  .smallCentered {
    text-align: center;
  }
  .top-box-button > div > div > div {
    display: flex;
    justify-content: center !important;
    align-items: center;
  }
  .top-box-text {
    display: flex;
    flex-direction: column;
    justify-content: center !important;
    align-items: center;
  }
}

@media (max-width: 650px) {
  #footer-socials {
    transform: scale(0.75);
  }
  #video-section {
    /* Tighten space below the video on mobile */
    padding-bottom: 16px;
  }
  #contact-section {
    padding-top: 0px;
    padding-bottom: 100px;
  }
  /* Make the video shorter on small screens to reduce perceived gap */
  #video-element {
    width: 100%;
    max-width: 100%;
    height: 220px;
  }
  #link-under-video {
    margin-top: 0px;
  }
  #lottie-container {
    top: 65%;
    left: 15%;
    transform: translateX(-50%) scale(0.5);
  }
  #lottie-player2 {
    width: 400px;
    height: 600px;
  }
  h1,
  #h1 {
    font-size: 30px !important;
  }
  h1,
  h2 {
    line-height: 36px;
  }
  .date-text {
    font-size: 28px !important;
  }

  .top-box-pic {
    min-width: 300px;
    padding: 0px;
  }

  #week-selection-title {
    padding-bottom: 10px;
    border-bottom: 1px solid #e4e4e4;
  }
  .smallCentered {
    text-align: center;
  }
  .week-select-menu {
    margin-bottom: 20px;
  }
  .classpage-buttons {
    padding-left: 0px;
    padding-bottom: 0px;
    margin-top: 40px;
    width: 100%;
    max-width: 400px;
  }
  #class-page {
    background-color: #fff7f7;
  }
  #bubble-container {
    height: 800px;
  }

  #big-blue-bubble {
    left: -210px;
    width: 800px;
    height: 800px;
    border-radius: 800px;
  }
  #big-blue-bubble > div:not(#bubble-divider) {
    width: 350px;
  }
  #bubble-divider {
    height: 1.5px;
    width: 300px;
    background-color: #e4e4e4;
    display: block;
  }
  .sign-up-item1 {
    order: 3;
    transform: scale(0.7);
    flex: 1;
  }
  .sign-up-item2 {
    order: 1;
  }
  .sign-up-item3 {
    order: 2;
    flex: 1;
  }
  .sign-up-item3 > div {
    padding: 0 0 0 20px;
  }

  .teachers-card {
    width: 330px;
  }
  .student-card {
    width: 330px;
    padding: 20px;
    height: 400px;
  }
  .faq-div > p::after {
    float: none;
    right: 50px;
  }
  .faq-div.expand > p::after {
    float: none;
    right: 50px;
  }
  .faq-container,
  .widthContainer {
    grid-template-columns: 16px repeat(4, 1fr) 16px;
  }
  .faq-div,
  .widthChild {
    grid-column: 2 / span 4;
  }
  #quiz-section {
    display: grid !important;
    max-width: 100%;
    min-width: 350px;
  }
  .special-style-div {
    display: none;
  }
  .datePicker {
    font-size: 34px;
    padding: 16px 0px;
    text-wrap: nowrap;
  }
}

@media (max-width: 450px) {
  #lottie-player2 {
    width: 370px;
    height: 500px;
  }
}
