/* =========================
   Project page styles
   ========================= */

/* 变量（与 base.css 保持一致的回落值） */

/* 全局基础 */
html, body { margin: 0; height: 100%; }
body{
  font-family: 'Open Sans', sans-serif;
  color: var(--heading-color);
  background-color: #FFB016;
}

/* ===== 顶部主视觉 ===== */
.proj-hero{
  background: transparent; /* 使用整页背景 */
  padding: clamp(8rem, 4vw, 2rem) 1rem 3.5rem; /* 顶部留白＋为卡片留空间 */
  text-align: center;
}
.proj-hero__inner{
  width: min(1200px, 100%);
  margin: 0 auto;
}
.proj-hero__title{
  font-family: 'Yatra One', cursive;
  color: #fff;
  font-size: clamp(2.8rem, 5.5vw, 4.5rem);
  margin: 0 0 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  transform: translateX(-40px); /* 左移 40px，可根据需要调整 */
}
.proj-trophy{ 
  width: clamp(64px, 6vw, 96px);  /* 最小64px，常规按视口放大，最大96px */
  height: auto;
  flex-shrink: 0;                 /* 防止被压缩变形 */
  transform: translateY(-12px);   /* 细调与文字对齐（可按需改为 0） */
}

/* ===== 黄色条带中的 4 张红色卡片（图2风格） ===== */
.proj-band{
  padding: clamp(1rem, 4vw, 2rem) 1rem;  /* 控制卡片整体在黄带中的垂直位置 */
}
.band-grid{
  width: min(1200px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
}

@media (max-width: 1000px){
  .band-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px){
  .band-grid{ grid-template-columns: 1fr; }
}

/* 卡片外层链接 */
.band-card{
  display: block;
  text-decoration: none;
  color: inherit;
}

/* 卡片内容容器（红色圆角矩形）——强制正方形且居中 */
.band-card__inner{
  background: var(--secondary-color); /* 红色背景 */
  border-radius: 18px;                /* 圆角稍小，更像图2 */
  box-shadow: 0 6px 14px rgba(0,0,0,.15);
  transition: transform .2s ease, box-shadow .2s ease;

  /* 固定正方形比例 & 缩小尺寸 */
  aspect-ratio: 1 / 1;
  width: 60%;          /* 缩小一些卡片，不是100% */
  margin: 0 auto;      /* 居中对齐 */

  /* 内容居中 */
  display: flex;
  flex-direction: column;
  justify-content: space-between;  /* 保证上下分布 */
  align-items: center;
  padding: 1rem;
}
.band-card:hover .band-card__inner{
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0,0,0,.18);
  filter: brightness(1.03);
}

/* 图标与标题 */
.band-card__icon{
  width: clamp(60px, 7vw, 90px);
  height: auto;
  display: block;
  margin-bottom: 0;
}
.band-card__title{
  font-family: 'Yatra One', cursive; /* 与主标题一致 */
  color: #fff;
  font-size: clamp(0.9rem, 1.8vw, 1.3rem);
  letter-spacing: .3px;
  text-align: center;
  margin: 0;
}

/* 单独控制羽毛球图标大小 */
.band-card__icon.icon-app{
  width: clamp(40px, 9vw, 60px);
  height: auto;
  transform: translateY(25px);  /* 自己调，比如 15~25px */
}

/* 单独 Industry 专属图标尺寸 */
.band-card__icon.icon-industry{
  width: clamp(78px, 9vw, 120px);
  height: auto;
}

/* ===== 可选：后续分区（锚点列表） ===== */
.proj-main{ padding: 2rem 1rem 0; }
.proj-list{
  width: min(1100px, 100%);
  margin: 2.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.12);
  color: #fff;
}
.proj-list__title{
  font-family: 'Yatra One', cursive;
  color: #fff;
}
.proj-list__grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.75rem, 2vw, 1rem);
  list-style: none;
  padding: 0; margin: 0;
}
@media (max-width: 900px){ .proj-list__grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px){ .proj-list__grid{ grid-template-columns: 1fr; } }

.proj-item{
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 12px;
  padding: 1rem;
  min-height: 120px;
}

/* ===== Footer：半透明，不遮背景图 ===== */
.proj-footer{
  margin-top: 3rem;
  background: rgba(0,0,0,0.55);
  color: #fff;
}
.proj-footer__inner{
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.proj-footer__links{
  display: flex; gap: .85rem; flex-wrap: wrap;
}
.proj-footer__links a{
  display: inline-flex; align-items: center; gap: .35rem;
  text-decoration: none; color: #fff; font-weight: 600;
}
.proj-footer__links a:hover{ color: var(--tertiary-color); }

/* 动效降级（无障碍） */
@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; animation: none !important; }
}

/* 平板区间：整体等比缩小，但保持居中 */
@media (max-width: 1024px) and (min-width: 700px){
  .proj-band{ overflow: visible; }          /* 不裁剪，避免看起来被“偏切” */
  .band-grid{
    margin-left: auto;                      /* 居中 */
    margin-right: auto;
    transform-origin: center center;        /* 从中心缩放 */
    transform: scale(0.85);                 /* 只缩放不平移 */
  }
}

/* 更窄的平板：再小一点，依然居中 */
@media (max-width: 700px) and (min-width: 560px){
  .proj-band{ overflow: visible; }
  .band-grid{
    margin-left: auto;
    margin-right: auto;
    transform-origin: center center;
    transform: scale(0.75);
  }
}

/* <= 740px：两列、更小的卡片，icon 下移；保持正方形 */
@media (max-width: 740px){
  .band-grid{
    /* 两列并整体缩小（一定要覆盖掉之前的 transform:none !important） */
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 1rem;
    transform-origin: center top;
    transform: scale(0.85) !important;   /* ← 覆盖之前的 none */
    width: 92%;                          /* 让容器本身也收紧一点（可调） */
    margin-left: auto;
    margin-right: auto;
  }

  /* 卡片仍按网格宽度取正方形，但更紧凑 */
  .band-card__inner{
    width: 120%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: grid;
    grid-template-rows: 1fr auto;        /* 上图标、下标题 */
    justify-items: center;
    align-items: center;
    row-gap: .45rem;
    padding: .55rem;                      /* 内边距再小一点 */
    border-radius: 16px;
  }

  /* 图标变小并下移（向下 8px，可按需调整） */
  .band-card__icon{
    width: clamp(46px, 10vw, 62px);
    height: auto;
    margin: 0;
    transform: translateY(8px);
  }

  /* 标题同步微调，保持对齐 */
  .band-card__title{
    font-size: clamp(.84rem, 1.6vw, 1.04rem);
    line-height: 1.15;
    min-height: 2.3rem;
    display: flex; align-items: center; justify-content: center;
    margin: 0;
  }

  /* Web Design 不换行 */
  .band-grid .band-card:nth-child(1) .band-card__title{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* 宽屏下 icon 下移 */
@media (min-width: 1000px){
  .band-card__icon{
    transform: translateY(15px); /* 自己调数值，例如 10px~20px */
  }
}

/* =========================
   Timeline (scoped styles)
   ========================= */
.timeline-wrap{
  --tl-bg: rgba(0,0,0,.45);
  --tl-card: rgba(255,255,255,.06);
  --tl-card-border: rgba(255,255,255,.14);
  --tl-cyan: var(--secondary-color, #0B74D6);
  --tl-pink: var(--tertiary-color, #D43321);
  --tl-line: rgba(255,255,255,.35);
  --tl-text: #ededed;
  --tl-muted: #ffffff;

  position: relative;
  margin: 2rem auto 3rem;
  padding: 2rem 1rem;
  color: var(--tl-text);
  backdrop-filter: blur(2px);
}
.timeline-wrap .timeline-container{
  width: min(1000px, 96vw);
  margin: 0 auto;
  position: relative;
}
.timeline-wrap .timeline{
  position: relative;

  padding-left: 200px; /* 放大：原 56px */
}
.timeline-wrap .timeline::before{
  content:"";
  position:absolute; left: 24px; top:0; width: 4px; height: 100%;
  background: linear-gradient(to bottom, var(--tl-line), transparent 85%);
  border-radius: 4px;
}
.timeline-wrap .timeline-item{
  position: relative;
  margin-bottom: 42px;
  padding-left: 32px;
  opacity: 0; transform: translateY(16px);
  animation: tl-fade 0.7s ease forwards;
}
.timeline-wrap .timeline-item:nth-child(1){ animation-delay: .08s; }
.timeline-wrap .timeline-item:nth-child(2){ animation-delay: .18s; }
.timeline-wrap .timeline-item:nth-child(3){ animation-delay: .28s; }
.timeline-wrap .timeline-item:nth-child(4){ animation-delay: .38s; }
.timeline-wrap .timeline-item:nth-child(5){ animation-delay: .48s; }
.timeline-wrap .timeline-item:nth-child(6){ animation-delay: .58s; }

/* 线上的小点（伪元素） */
.timeline-wrap .timeline-item::before{
  content:"";
  position:absolute; left:0px; top: 2px;      /* 放大：原 -24px */
  width: 36px; height: 36px; border-radius: 50%;/* 放大：原 26x26 */
  background: var(--tl-cyan);
  border: 0px solid rgba(0,0,0,.35);            /* 放大：原 4px */
  transition: transform .25s ease, background .25s ease;
}
.timeline-wrap .timeline-item:hover::before{
  transform: scale(1.15);
  background: var(--tl-pink);
}

/* 主圆圈（含图标） */
.timeline-wrap .timeline-icon{
  position:absolute; 
  left:-60px; 
  top: -2px;     /* 放大：原 -52px */
  width: 50px; height: 50px; border-radius: 50%;/* 放大：原 38x38 */
  display:flex; align-items:center; justify-content:center;
  background: var(--tl-cyan); color: #fff;
  transition: transform .45s ease, background .25s ease, filter .25s ease;
  box-shadow: 0 10px 22px rgba(0,0,0,.28);
}
.timeline-wrap .timeline-icon i{
  font-size: 22px; /* 图标放大（可按需 20~24px） */
}
.timeline-wrap .timeline-item:hover .timeline-icon{
  transform: rotate(360deg) scale(1.02);
  background: var(--tl-pink);
  filter: brightness(1.03);
}

/* 内容卡片 */
.timeline-wrap .timeline-content{
  background: #D43321;  /* #FFB016色卡片  红#D43321*/
  border: 1px solid #D43321;
  border-radius: 14px;
  padding: 16px 18px;
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;

  /* 新增：控制卡片宽度 */
  max-width: 700px;   /* 最大宽度 700px，可自行调整 */
  width: 50%;         /* 占容器的 85%，也可以改为固定 px */
  margin: 0 auto;     /* 左右居中 */

  /* 卡片保证统一高度 */
  min-height: 180px;  /* 根据你需要的视觉效果调整数值 */
  display: flex; 
  flex-direction: column;
  justify-content: center; /* 内容垂直居中 */
}
.timeline-wrap .timeline-item:hover .timeline-content{
  transform: translateX(16px);
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
}

.timeline-wrap .timeline-date{
  color: #fff;;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: .3px;
  margin-bottom: 6px;
}
.timeline-wrap .timeline-title{
  color: #fff;
  font-family: 'Yatra One', cursive;
  font-size: 1.15rem;
  margin: 0 0 6px;
}
.timeline-wrap .timeline-description{
  color: var(--tl-muted);
  line-height: 1.55;
  margin: 0;
}


/* Modal */
.timeline-wrap .modal-custom{
  position: fixed; inset: 0;
  display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,.72);
  z-index: 1000;
}
.timeline-wrap .modal-content-custom{
  width: min(600px, 92vw);
  background: rgba(20,20,20,.96);
  color: #e9eef5;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 24px 22px 18px;
  box-shadow: 0 20px 40px rgba(0,0,0,.36);
  position: relative;
}
.timeline-wrap .modal-close{
  position: absolute; right: 12px; top: 10px;
  width: 36px; height: 36px; border-radius: 8px;
  font-size: 1.2rem; line-height: 1;
  background: rgba(255,255,255,.06); color: #fff; border: 0;
  cursor: pointer;
}
.timeline-wrap .modal-close:hover{ background: rgba(255,255,255,.12); }
.timeline-wrap .modal-skill-title{ margin: 12px 0 8px; font-size: .95rem; opacity: .9; }
.timeline-wrap #modal-skills{ margin: 0; padding-left: 1rem; display: grid; gap: .25rem; grid-template-columns: repeat(2, minmax(0,1fr)); }
.timeline-wrap #modal-skills li{ color: #d7e0ea; }

/* 响应式：放大后的小屏适配 */
@media (max-width: 768px){
  .timeline-wrap .timeline{ padding-left: 60px; } /* 原 40px → 为更大的圆让位 */
  .timeline-wrap .timeline::before{ left: 0px; }
  .timeline-wrap .timeline-icon{
    left: -56px;
    width: 48px; height: 48px;
  }
  .timeline-wrap .timeline-icon i{ font-size: 18px; }
  .timeline-wrap .timeline-item::before{
    left: -28px; 
    width: 30px; 
    height: 30px; 
    border-width: 5px;
  }
}

@keyframes tl-fade{
  from{ opacity:0; transform: translateY(16px); }
  to{ opacity:1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce){
  .timeline-wrap *{ animation: none !important; transition: none !important; }
}

/* 卡片里的图标（右边内容区用的） */
.timeline-wrap .timeline-card-icon{
  display: block;
  width: clamp(60px, 10vw, 80px);  /* 把范围整体放大 */
  height: auto;
  margin: 0 auto 10px;   /* 居中 + 和标题留间距 */
  object-fit: contain;
}

/* 去掉卡片内链接的默认样式 */
.timeline-content {
  text-decoration: none;   /* 去掉下划线 */
  color: inherit;          /* 保持继承的文字颜色 */
  display: block;          /* 保证整个卡片可点 */
}
.timeline-content:hover {
  text-decoration: none;   /* 悬停也不要下划线 */
  color: inherit;          /* 保持颜色不变 */
}





/* ============ Contact Bar ============ */
.contact-bar {
  padding-top: clamp(2rem, 6vw, 3.25rem);
}

.contact-grid {
  width: min(1100px, 100%);
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.25rem) clamp(1rem, 3vw, 2rem);
  text-align: center;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.contact-item .label {
  font-size: 0.9rem;
  color: #ffffff;
  font-weight: 600;
}

.contact-item a {
  color: #ffffff;
  text-decoration: none;
  padding: 0.2rem 0.1rem; /* 更易点触 */
}

.contact-item a:hover {
  text-decoration: underline;
}


/* ============ Breakpoints ============ */
/* ≥ 1200px：更宽松的排版 */
@media (min-width: 1200px) {
  .home-hero {
    padding-top: 3rem;
    
    padding-bottom: .5rem !important; 
    
  }
  .hero-title {
    letter-spacing: 0.2px;
  }

  
}

/* ≤ 960px：收紧左右留白，联系方式 2 列 */
@media (max-width: 960px) {
  .home-hero {
    padding: 5rem 2rem 3rem;
    padding-bottom: .5rem !important; 

  }
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ≤ 720px：导航变为纵向居中，行距更友好 */
@media (max-width: 720px) {
  .hero-nav {
    flex-direction: column;
    gap: 1rem;
  }
  .hero-link {
    padding-left: 2rem;
  }
  .contact-grid {
    gap: 0.75rem 1rem;
  }
}

/* ≤ 480px：小屏优化，单列联系方式，放大可点区域 */
@media (max-width: 480px) {
  .home-hero {
    padding: 4rem 1rem 1.5rem;
    padding-bottom: .5rem !important
  }
  .hero-title {
    font-size: clamp(2.1rem, 8vw, 3rem);
  }
  .hero-tagline {
    margin-bottom: 2rem;
  }
  .hero-link {
    font-size: 1.05rem;
    padding-left: 1.8rem;
    padding-block: 0.5rem;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ============ 可访问性：减少动效偏好 ============ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}







/* 默认隐藏主页内容（Intro 显示期间） */
body:not(.show-main) .top-image,
body:not(.show-main) .home-hero,
body:not(.show-main) .floating-menu {
  display: none;
}

.footer {
  z-index: 1;
  --footer-background: #ffffff;
  display: grid;
  position: relative;
  grid-area: footer;
  min-height: 8rem;
  flex-shrink: 0; /* 固定在底部 */
}

/* 气泡动画背景 */
.footer .bubbles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1rem;
  background: var(--footer-background);
  filter: url('#blob');
}

.footer .bubble {
  position: absolute;
  left: clamp(
    calc(var(--size, 4rem) / 2),
    var(--position, 50%),
    calc(100% - (var(--size, 4rem) / 2))
  );
  transform: translate(-50%, 100%);
  background: var(--footer-background);
  border-radius: 100%;
  animation: bubble-size var(--time, 4s) ease-in infinite var(--delay, 0s),
             bubble-move var(--time, 4s) ease-in infinite var(--delay, 0s);
}

@keyframes bubble-size {
  0%, 75% {
    width: var(--size, 4rem);
    height: var(--size, 4rem);
  }
  100% {
    width: 0rem;
    height: 0rem;
  }
}

@keyframes bubble-move {
  0% { bottom: -1rem; }
  100% { bottom: var(--distance, 1rem); }
}

/* 内容主体 */
.footer .content {
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-gap: 4rem;
  padding: 2rem 2rem 0.5rem 2rem;  /* 上=2rem, 右=2rem, 下=0.5rem, 左=2rem */
  background: var(--footer-background);
}

.footer .content a,
.footer .content p,
.footer .content b {
  color: #005EA2;
  text-decoration: none;
}

.footer .content p {
  margin: 0;
  font-size: 0.8rem;
}

.footer .content > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.footer .content > div > div {
  margin: 0.5rem 0;
}

.footer .content > div > div > * {
  margin-right: 0.5rem;
}

.footer .image {
  align-self: center;
  width: 4rem;
  height: 0.5rem;
  margin: 0.5rem 0;
  background-size: cover;
  background-position: center;
}

/* ==== Footer 内容布局：左CONTACT + 右联系方式 ==== */
.footer .content > div:first-child {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--contact-left-gap, 6rem); /* ← 用变量控制整体右移 */
  align-items: start;
}

/* CONTACT 标题 */
.footer .content > div:first-child > div:first-child b {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: block;
  margin: 0;
}

/* 右侧联系方式 */
.footer .content > div:first-child > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* 联系方式表格：两行三列 */
.contact-table {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  row-gap: 0.6rem;
  column-gap: var(--contact-col-gap, 2rem);   /* ← 用变量控制两列距离 */
}

.contact-table .ct-row {
  display: contents;
}

.contact-table .ct-cell {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: #005EA2;
  text-decoration: none;
}

.contact-table .ct-cell span {
  font-weight: 600;
}

.contact-table .ct-cell:hover {
  text-decoration: underline;
}

.contact-table .empty {
  pointer-events: none;
}

/* icon 样式 + hover 动效 */
.ct-cell .ct-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.ct-cell:hover .ct-icon {
  transform: scale(1.2) rotate(10deg);
  filter: brightness(1.2);
}

/* 小屏优化 */
@media (max-width: 720px) {
  .footer .content > div:first-child {
    grid-template-columns: 1fr;
    row-gap: 0.25rem;
  }

  .footer .content > div:first-child > div:first-child b {
    margin-bottom: 0.25rem;
  }

  .contact-table {
    grid-template-columns: 1fr;
  }
}

/* 版权信息部分 */
.footer-bottom {
  text-align: center;
  padding: 0.5rem 0 0rem;  /* 上下留白缩小，下方距离更小 */
  background: #ffffff;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.8rem;
  color: #005EA2;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* 让页面成为纵向 Flex 布局，footer 才能贴底 */
html, body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* 主内容区域填满除 footer 外的空间（你的首屏就是 #home.home-hero） */
#home.home-hero {
  flex: 1 0 auto;
  /* 下面这行按需要留一点呼吸，想更紧就再调小 */
  padding-bottom: .5rem !important;
}

/* footer 始终贴底 */
.footer {
  margin-top: auto;
  
}
