/* ==========================================================================
   建筑竞赛资讯 - 首页/列表样式
   顶部为主题原设计，本样式只作用于 .ac-archive 区域：
   自定义大标题（ac-hero）→ 精选轮播（ac-carousel）→ 竞赛列表 + 右侧推荐（16:9）。
   ========================================================================== */

.ac-archive {
	--ac-text: #1f2328;
	--ac-text-2: #57606a;
	--ac-text-3: #8b949e;
	--ac-link: #0969da;
	--ac-border: #d8dee4;
	--ac-border-soft: #eaeef2;
	--ac-bg-soft: #f6f8fa;
	--ac-blue-soft: #ddf4ff;
	--ac-amber: #9a6700;
	--ac-serif: Georgia, "Times New Roman", "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", serif;
	background: #fff;
	color: var(--ac-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
	-webkit-font-smoothing: antialiased;
}

.ac-archive__shell {
	container-type: inline-size;
	max-width: 1240px;
	margin: 0 auto;
	padding: 44px 24px 80px;
}

.ac-archive__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 44px;
}
@container (min-width: 1000px) {
	.ac-archive__inner { grid-template-columns: minmax(0, 1fr) 320px; }
}

/* --------------------------------------------------------------------------
   大标题（独立设计，不依赖主题标题样式）
   -------------------------------------------------------------------------- */
.ac-hero {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 18px;
	margin-bottom: 30px;
	padding-bottom: 22px;
	border-bottom: 2px solid #111418;
}
.ac-hero__title {
	margin: 0;
	font-family: var(--ac-serif);
	font-size: 46px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: .08em;
	color: #111418;
}
.ac-hero__sub {
	margin: 0 0 4px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .42em;
	text-transform: uppercase;
	color: var(--ac-text-3);
}

/* --------------------------------------------------------------------------
   精选轮播
   -------------------------------------------------------------------------- */
.ac-carousel {
	position: relative;
	margin-bottom: 40px;
}
.ac-carousel__viewport {
	overflow: hidden;
	border-radius: 12px;
	background: #e9edf1;
}
.ac-carousel__track {
	display: flex;
	transition: transform .6s cubic-bezier(.25, .46, .45, .94);
}
.ac-carousel__slide {
	position: relative;
	display: block;
	flex: 0 0 100%;
	aspect-ratio: 2.35 / 1;
	text-decoration: none;
	overflow: hidden;
}
.ac-carousel__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .8s ease;
}
.ac-carousel__slide:hover .ac-carousel__img { transform: scale(1.03); }
.ac-carousel__img--empty { background: linear-gradient(135deg, #dfe4ea, #ccd5dd); }

.ac-carousel__caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 46px 28px 22px;
	background: linear-gradient(180deg, transparent 0%, rgba(12, 16, 20, .72) 100%);
	font-family: var(--ac-serif);
	font-size: 21px;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: .02em;
	color: #fff;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
}

.ac-carousel__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .88);
	color: #1f2328;
	cursor: pointer;
	opacity: 0;
	transition: opacity .25s ease, background-color .15s ease;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}
.ac-carousel:hover .ac-carousel__arrow { opacity: 1; }
.ac-carousel__arrow:hover { background: #fff; }
.ac-carousel__arrow.is-prev { left: 14px; }
.ac-carousel__arrow.is-next { right: 14px; }

.ac-carousel__dots {
	position: absolute;
	right: 18px;
	bottom: 14px;
	z-index: 2;
	display: flex;
	gap: 7px;
}
.ac-carousel__dot {
	width: 22px;
	height: 3px;
	padding: 0;
	border: 0;
	border-radius: 2px;
	background: rgba(255, 255, 255, .45);
	cursor: pointer;
	transition: background-color .2s ease;
}
.ac-carousel__dot.is-active { background: #fff; }

/* --------------------------------------------------------------------------
   竞赛列表（横向卡片）
   -------------------------------------------------------------------------- */
.ac-list__items { display: flex; flex-direction: column; }

.ac-card {
	display: grid;
	grid-template-columns: 250px minmax(0, 1fr);
	gap: 22px;
	padding: 22px 0;
	border-bottom: 1px solid var(--ac-border-soft);
}
.ac-card:first-child { padding-top: 0; }

.ac-card__cover {
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-radius: 8px;
	background: var(--ac-bg-soft);
}
.ac-card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.ac-card:hover .ac-card__cover img { transform: scale(1.035); }
.ac-card__placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #eef1f4, #e3e8ed); }

.ac-card__top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.ac-card__top time { font-size: 12.5px; color: var(--ac-text-3); font-variant-numeric: tabular-nums; }

.ac-card__title {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 650;
	line-height: 1.5;
}
.ac-card__title a { color: #111418; text-decoration: none; transition: color .15s ease; }
.ac-card:hover .ac-card__title a { color: var(--ac-link); }

.ac-card__excerpt {
	margin: 0 0 14px;
	font-size: 14px;
	line-height: 1.85;
	color: var(--ac-text-2);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ac-card__meta { display: flex; align-items: center; gap: 14px; }
.ac-card__deadline { font-size: 12.5px; color: var(--ac-text-3); font-variant-numeric: tabular-nums; }

.ac-badge {
	display: inline-block;
	padding: 1px 9px;
	border-radius: 999px;
	font-size: 12px;
	line-height: 1.8;
	font-weight: 600;
	background: var(--ac-bg-soft);
	color: var(--ac-text-2);
}
.ac-badge.is-ongoing { color: var(--ac-link); background: var(--ac-blue-soft); }
.ac-badge.is-soon    { color: var(--ac-amber); background: #fff8c5; }
.ac-badge.is-closed  { color: var(--ac-text-3); background: var(--ac-bg-soft); }

.ac-chip {
	display: inline-block;
	padding: 2px 10px;
	border: 1px solid var(--ac-border);
	border-radius: 999px;
	font-size: 12px;
	line-height: 1.7;
	color: var(--ac-text-2);
	text-decoration: none;
	background: #fff;
	transition: all .15s ease;
}
.ac-chip:hover { border-color: var(--ac-link); color: var(--ac-link); }

/* 分页 */
.ac-pagination { margin-top: 36px; text-align: center; font-size: 14px; }
.ac-pagination .page-numbers {
	display: inline-block;
	min-width: 34px;
	margin: 0 3px;
	padding: 6px 10px;
	border: 1px solid var(--ac-border-soft);
	border-radius: 8px;
	color: var(--ac-text-2);
	text-decoration: none;
	transition: all .15s ease;
}
.ac-pagination .page-numbers:hover { border-color: var(--ac-link); color: var(--ac-link); }
.ac-pagination .page-numbers.current { background: #111418; border-color: #111418; color: #fff; }
.ac-pagination .page-numbers.dots { border: 0; }

/* 空状态 */
.ac-empty {
	padding: 36px 24px;
	border: 1px dashed var(--ac-border);
	border-radius: 10px;
	text-align: center;
	color: var(--ac-text-3);
	font-size: 13.5px;
	line-height: 2;
}

/* --------------------------------------------------------------------------
   右侧推荐位（标题 + 封面 + 链接，固定 16:9）
   height:auto 必须显式声明：覆盖 img 标签 width/height 属性的内建提示，
   否则 aspect-ratio 不生效（任一维度被属性锁定时比例即失效）。
   -------------------------------------------------------------------------- */
.ac-sidebar { min-width: 0; }
.ac-promo {
	display: block;
	margin-bottom: 18px;
	border: 1px solid var(--ac-border-soft);
	border-radius: 10px;
	overflow: hidden;
	text-decoration: none;
	background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.ac-promo:hover {
	border-color: var(--ac-border);
	box-shadow: 0 6px 20px rgba(31, 35, 40, .08);
	transform: translateY(-2px);
}
.ac-promo__cover, .ac-promo img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}
.ac-promo__placeholder { display: block; width: 100%; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #eef1f4, #e3e8ed); }
.ac-promo__body { display: block; padding: 12px 14px; }
.ac-promo__note { display: block; font-size: 11px; letter-spacing: .08em; color: var(--ac-text-3); margin-bottom: 4px; }
.ac-promo__title { display: block; font-size: 14px; font-weight: 600; line-height: 1.6; color: #111418; }

/* 小屏适配 */
@media (max-width: 640px) {
	.ac-archive__shell { padding: 24px 16px 64px; }
	.ac-hero__title { font-size: 32px; }
	.ac-hero__sub { letter-spacing: .28em; }
	.ac-carousel__slide { aspect-ratio: 16 / 9; }
	.ac-carousel__caption { font-size: 16px; padding: 34px 18px 16px; }
	.ac-carousel__arrow { display: none; }
	.ac-card { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.ac-card__cover { max-height: 200px; }
}
