/* =========================================
   SunnyDraws 完整樣式表 - 最終佈局與配色整合
   ========================================= */

:root {
  --primary-purple: #6D5D94; 
  --accent-beige: #F9F1DC; 
  --light-purple: #D4CEDD;
  --text-light: #F9F1DC; 
  --text-dark: #4A3F6B;  
  --overlay-gradient: linear-gradient(180deg, rgba(109, 93, 148, 0) 30%, rgba(74, 63, 107, 0.7) 100%);
}

/* --- 1. 基礎佈局與置中 --- */
body {
  /*font-family: 'SF Pro Display', 'PingFang TC', 'Heiti TC', sans-serif;*/
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: 0.05em;
  background-color: var(--primary-purple); 
  color: var(--text-light); 
  margin: 0;
  padding: 0;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 只有標題：才套用圓角無襯線 */
h1, h2, h3, .basic-button {
  font-family: "Arial Rounded MT Bold", rounded, sans-serif;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}


.basic-button {
  display: inline-block;
  color: var(--accent-beige);
  text-decoration: none;
  font-size: 16px;
  border: 1.5px solid var(--accent-beige);
  padding: 6px 24px;
  border-radius: 30px;
  transition: 0.3s;
  box-shadow: 0px 10px 20px rgba(0,0,0,0.2);
}

.basic-button:hover {
  background-color: var(--accent-beige);
  color: var(--primary-purple);
}

/* --- Nav --- */
.top-bar-area {
    display: flex;
    justify-content: center; /* 讓左右兩邊的內容分散對齊 */
    align-items: center;         /* 讓左右兩邊的內容垂直置中 */
    padding: 10px 5%;            /* 上下內襯 15px，左右保留 5% 呼吸空間 */
    height: 80px;  
}

.top-logo-area {         
    height: 80px;                /* 固定 Logo 高度，寬度會自動等比例縮放 */
    display: block;            /* 左右保留一些空間讓 Logo 不會緊貼邊緣 */
    margin: 0 60px;  
}

.top-logo-area img {
    height: 100%;                /* 讓 Logo 圖片撐滿整個區域高度 */
    width: auto;                 /* 寬度自動調整保持比例 */
    display: block;
}

.top-nav {
  font-size: 16px;
  margin: 0 60px;
  text-align: center;
}

.top-nav a {
  text-decoration: none;
  color: var(--light-purple);
  margin: 0 8px;
  transition: 0.3s;
}

.top-nav a:hover { color: white; }

.top-nav span {
  color: rgba(255, 255, 255, 0.2);
  margin: 0 2px;
}


/* --- 2. Header (_includes/header.html) --- */

.home-header{
  text-align: center;
  margin: 20px 0 80px 0;
}

.home-header-logo {  
  height: auto;
}

.subtitle {
  font-size: 24px;
  color: var(--light-purple);
}


/* --- 3. Main Page 排版 --- */
.main-content {
  padding: 50px 0;
  flex: 1;
}

.section-title {
  text-align: center;
  font-size: 40px;
  padding-bottom: 40px;
  margin-bottom: 40px;
  font-weight: 600;
  color: var(--accent-beige);

  letter-spacing: 0.04em;
    /* 文字描邊效果 */
  /*-webkit-text-stroke: 6px rgb(30, 30, 30); /* 字體邊框 */
  /*-webkit-text-stroke-linejoin: round; /* 讓邊角變圓潤 */
  /*paint-order: stroke fill; /* 確保邊框在填充顏色下方(繪製順序) */
}

.section-content {
  margin: 0 auto;
  max-width: 670px;
  font-size: 1.1em;
  text-align: center;
}

.section-content ul{
  margin: 0 40px;
  min-width: 300px;
  text-align: left;
}

.section-content h2{
  margin-top: 80px;
  margin-bottom: 40px;
}


.section-content strong{
  display: inline-block;
  font-size: 1.13em;
  margin-top: 10px;
  margin-bottom: 20px;
}

.license-article-box {
  color: var(--accent-beige);
  display: block;
  border-radius: 30px;
  border: var(--accent-beige) 2px solid;
  padding: 0px 45px 80px 45px;
}



/* --- 4. Illustration 獨立頁面佈局 --- */
.illustration-detail-page {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 60px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.breadcrumb-item {
  background-color: var(--accent-beige);
  color: var(--text-dark);
  padding: 6px 20px;
  border-radius: 25px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.breadcrumb-item.current {
  background-color: transparent;
  border: 1px solid var(--accent-beige);
  color: var(--accent-beige);
}

.illustration-image-wrapper {
  width: 100%;
  max-width: 480px;
  margin-top: 40px;
  margin-bottom: 100px;
  overflow: hidden;
}

.illustration-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.illustration-tags {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 0px;
  margin-bottom: 0px;
  flex-wrap: wrap;
}

.tag-item {
  display: inline-block;
  background-color: rgba(249, 241, 220, 0.1);
  color: var(--accent-beige);
  padding: 2px 16px;
  border-radius: 20px;
  border: 1px solid var(--accent-beige);
  text-decoration: none;
  font-size: 13px;
  transition: 0.3s;
  line-height: 2; /* 增加一點行高確保換行時不重疊 */
  margin: 4px 2px;  /* 增加一點外距讓按鈕間有呼吸空間 */
}

/* 👈 選中狀態 (Active)：背景變實心，文字變深色 */
.tag-item.active {
  background-color: var(--accent-beige);
  color: var(--text-dark); /* 使用你變數中的深紫色 */
  font-weight: 700;
}

.tag-item:hover {
  background-color: rgba(249, 241, 220, 0.3);
}

/* --- 5. 按鈕與 License --- */
.download-btn {
  font-size: 20px;
  font-weight: 700;
  border: 2px solid var(--accent-beige);  
  padding: 16px 40px;
  border-radius: 40px;
}

.license-info-box {
  box-sizing: border-box; /* 確保寬度計算包含 Padding */
  max-width: 600px;
  width: 100%;
  margin: 60px auto 0;    /* 左右 auto 確保置中 */
  padding: 35px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  text-align: center;
}

.license-info-box h3 { 
  color: var(--accent-beige); 
  margin-top: 0;
 }


.license-info-box ul {
  list-style: none;       /* 拿掉圓點 */
  padding-left: 20px ;             /* 歸零縮排 */
}

.license-info-box li {
  margin-bottom: 10px;  /* 讓每個清單項目之間有一點呼吸空間 */
  display: flex;        /* 讓打勾符號跟文字對齊更漂亮 */
  align-items: center;
  gap: 6px;
}

.license-agreement {
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  margin-top: 32px;
  margin-bottom: 0px;
  padding-top: 16px;
  display: flex;
  text-align: center;
  gap: 6px;
}

.license-agreement a {
  color: rgb(255, 106, 225);
  text-decoration: none;
  font-style: italic;
  font-weight: 600;
  transition: 0.3s;
}
.license-agreement a:hover {
  color: rgb(255, 212, 19);
}

.license-info-box .icon {
  margin-right: 2px; 
  font-size: 1.3em;  /* 讓圖示稍微大一點點 */
  padding-right: 2px;
}

/* --- About --- */
.about-article-box{
  color: var(--accent-beige);
  display: block;
  border-radius: 30px;
  border: var(--accent-beige) 2px solid;
  padding: 45px 60px 45px 60px;
  margin: 40px 0px 40px 0px;
}

.about-article-box h2{
  margin-top: 0;
}

.about-article-box h3{
  margin-top: 36px;
}

.about-article-box p{
  font-size: 16px;
  margin-top: 20px;
}

.about-article-box a{
  text-decoration: none;
  color: orange;
}


/* --- 6. Footer --- */
.site-footer {
  text-align: center;
  padding: 50px 0;
  border-top: 2px solid rgba(249, 241, 220, 0.1);
  margin-top: 80px;
}

.cooyright-info {
  color: var(--light-purple);
  font-size: 14px;
  margin-top: 30px;
}



/* --- Illustrations.html: 扁平卡片 --- */

.illustration-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); 
  gap: 20px;
  width: 100%;
  margin: 0 auto;
}

.illustration-card {
  display: flex;
  flex-direction: column; /* 👈 關鍵：讓子元素垂直排列 */
  background-color: var(--text-dark);
  border: var(--text-dark) 2px solid; /* 卡片邊框 */
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  height: 100%; /* 確保所有卡片高度一致 */
  width: 100%;
}

.card-link {
  display: block;
  text-decoration: none;
  overflow: hidden;
}

.sample-area {
  display: flex;
  justify-content: center;
}

.sample-area img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.info-area {
  display: flex;
  justify-content: center;
  width: 100%;        /* 👈 讓標題區域撐滿整個卡片寬度 */
}

.info-area h3 {
  color: var(--light-purple);
  font-size: 18px; /* 字體稍微加大一點 */
  margin: 10px 10px; /* 增加標題周圍的空間 */
  font-weight: 450;
  line-height: 1.3;
  text-align: center;
  /* 標題太長自動換行，最多顯示三行，超過才省略 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word; /* 確保長單字也會換行 */
}

.download-btn-area {
  margin-top: 10px;
  padding: 15px;      /* 增加按鈕周邊的呼吸空間 */
  background-color: var(--text-dark); 
  text-align: center; 
}

/* 響應式調整 */
@media (max-width: 767px) {
  .home-header-logo {
    width: 100%;  
    margin: 30px 0;
  }

  .illustration-grid { grid-template-columns: repeat(1, 1fr); /* 👈 改為一欄 */
    width: 84%; 
    margin: 0 auto;
    gap: 25px;}
  .category-grid { grid-template-columns: repeat(1, 1fr); }
  .illustration-title { font-size: 28px; }
  .download-btn { width: 90%; padding: 16px 0; text-align: center; }
}



/* Paginator */

.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.page-direct{
  display: inline-block;
  color: var(--accent-beige);
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 900;
  margin-top: 30px;
  text-decoration: none;
}

.page-num.current {
  color: var(--light-purple);
  cursor: default;
  font-weight: 900;
}

.page-num {
  display: inline-block;
  color: var(--accent-beige);
  padding: 8px 6px;
  font-size: 16px;
  margin-top: 30px;
  text-decoration: none;
}

.page-num:hover {
  text-decoration: underline;
}

.page-num.current:hover {
  text-decoration: none;
}



/* Gallery */

/* 外層容器：滿寬、隱藏溢出部分 */
.gallery-wrapper {
  width: 100vw;
  overflow: hidden;
  white-space: nowrap;
  padding: 20px 0;
}

/* 滾動軌道：使用 flex 讓圖片排成一橫列 */
.gallery-track {
  display: inline-flex;
  gap: 15px; /* 圖片之間的間距 */
  animation: marquee 30s linear infinite; /* 30秒循環一次，線性速度 */
}

/* 當滑鼠懸停時暫停滾動，方便使用者點擊 */
.gallery-track:hover {
  animation-play-state: paused;
}

/* 圖片包裝連結 */
.gallery-item {
  display: block;
  flex-shrink: 0;
}

/* 圖片本體樣式 */
.gallery-item img {
  height: 250px; /* 固定高度，寬度隨比例自適應 */
  width: auto;
  border-radius: 8px;
  object-fit: cover;
  transition: transform 0.3s ease;
  cursor: pointer;
}

/* 懸停時稍微放大，增加互動感 */
.gallery-item img:hover {
  transform: scale(1.12);
}

/* 跑馬燈的核心動畫 */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%); /* 滾動到總長度的一半時重置 */
  }
}