/* ============================================================
   青春聚力郫都 专题页 —— 样式表
   设计还原：严格按照设计图布局/间距/色彩/图片样式
   ============================================================ */


/* ---------- 全局重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #2C2C2C;
    background-color: #F4F4F4;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: color 0.3s ease; }
img { max-width: 100%; height: auto; display: block; }


/* ---------- CSS 变量 ---------- */
:root {
    --red-main: #E63946;
    --red-dark: #C6262D;
    --red-deep: #A81C22;
    --text-1: #2C2C2C;
    --text-2: #666666;
    --text-3: #999999;
    --bg-card: #FFFFFF;
    --border: #EEEEEE;
    --shadow-card: 0 2px 14px rgba(0,0,0,0.05);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
}


/* ---------- 核心容器 ---------- */
.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* ============================================
   模块一：Banner 头图 —— 静态单张 + <img> object-fit 等比适配
   容器：aspect-ratio 保证容器始终 16:9
   图片：object-fit: cover 保证等比填满不拉伸、不变形
   ============================================ */
.banner {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 200px;     /* 移动端最小高度保底 */
    max-height: 993px;    /* PC 端最大高度 */
    overflow: hidden;
}

/* Banner 背景图 —— 绝对铺满 + object-fit 保证等比缩放 */
.banner__img {
    position: absolute;
    inset: 0;
    width: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* 红色渐变遮罩 */
.banner__mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(230,57,70,0.10) 0%,
        rgba(230,57,70,0.45) 70%,
        rgba(198,38,45,0.70) 100%);
    z-index: 2;
    pointer-events: none;
}

/* 文字 */
.banner__content {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #FFFFFF;
    padding: 0 20px;
}

.banner__title { margin-bottom: 16px; text-shadow: 0 4px 20px rgba(0,0,0,0.35); }

.banner__title-main,
.banner__title-sub {
    display: block;
    font-size: 72px;
    font-weight: 700;
    letter-spacing: 6px;
    font-family: "STKaiti", "楷体", "KaiTi", "华文行楷", serif;
    line-height: 1.25;
}

.banner__subtitle {
    font-size: 18px;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.95);
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}


/* ============================================
   通用板块
   ============================================ */
.section {
    padding: 50px 0;
}


/* ============================================
   白色卡片 + 悬浮红色角标
   ============================================ */
.card {
    position: relative;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 36px 30px 28px;   /* 顶部留出角标空间 */
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.3s ease;
}

.card:hover { box-shadow: var(--shadow-hover); }

/*
   红色角标 —— 使用 icon-bg.png（圆角矩形红底）
   位置：悬浮在卡片左上角，向上"溢出"约 16px
*/
.card__tag {
    position: absolute;
    text-align: center;
    top: -14px;
    left: 0;
    display: inline-block;
    min-width: 202px;
    padding: 6px 26px 14px 28px;
    font-size: 26px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 4px;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
    text-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* 左图右文 —— 唐昌镇 */
.card--row {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}
.card--row .card__left { flex: 0 0 46%; }
.card--row .card__right { flex: 1; padding-top: 4px; }


/* ============================================
   图片墙 —— 照片卡片风格
   ============================================ */
.card__gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    margin-top: 30px;
}

/* 默认 4 列 */
.card__gallery > .photo { width: calc((100% - 12px * 3) / 4); }

.card__gallery--3col > .photo { width: calc((100% - 12px * 2) / 3); }
.card__gallery--2col > .photo { width: calc((100% - 12px) / 2); }

/* 每张照片 —— 严格 16:9 等比例 + 圆角 + 轻阴影（无鼠标交互效果） */
.photo {
    position: relative;
    aspect-ratio: 16 / 9;  /* 现代浏览器双保险 */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    background: #EEE;
}

.photo img {
    position: absolute;
    inset: 0;
    width: 100%; 
    object-fit: cover;
}


/* ============================================
   文字介绍区
   ============================================ */
.card__text {
    padding-top: 20px;
    border-top: 1px dashed #E4E4E4;
}

.card__text1 {

}

.card__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 10px;
    line-height: 1.5;
    transition: color 0.3s ease;
    text-align: center;
}
.card__title:hover { color: var(--red-main); }

.card__subtitle {
    font-size: 17px;
    font-weight: 600;
    /* color: #343434; */
    margin-top: 18px;
    margin-bottom: 6px;
    line-height: 1.5;
}

.card__subtitle1 {
    font-size: 17px;
    font-weight: 600;
    /* color: #343434; */
    margin-top: 18px;
    margin-bottom: 6px;
    line-height: 1.5;
    float: left;
}

.card__desc {
    font-size: 15px;
    color: var(--text-2);
    line-height: 2;
    text-align: justify;
    text-indent: 2em;
}

.link-more {

    color: var(--red-main);
    font-weight: 500;

    transition: color 0.3s ease, transform 0.3s ease;
}
.link-more:hover {
    color: var(--red-dark);
    transform: translateX(2px);
}


.link-more1 {
    display: inline-block;
    color: #4a4a4a;
    font-weight: 500;
    margin-left: 2px;
    transition: color 0.3s ease, transform 0.3s ease;
}
.link-more1:hover {
    color: var(--red-dark);
    transform: translateX(2px);
}

/* ============================================
   双标题左右排列 —— 左标题靠左、右标题靠右
   ============================================ */
.subtitle-pair {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

/* 两个链接各占一半宽度，内部文字分别左对齐 / 右对齐 */
.subtitle-pair .link-more1 {
    flex: 1 1 0;
    min-width: 0;
    margin-left: 0;
}
.subtitle-pair__item--left  { text-align: left; }
.subtitle-pair__item--right { text-align: right; }


/* ============================================
   页脚 —— 深红色背景
   ============================================ */
.footer {
    background: linear-gradient(135deg, #cd3021 0%, #cd3021 100%);
    padding: 48px 0;
    color: rgba(255,255,255,0.92);
    text-align: center;
    margin-top: 60px;
}
.footer__line { font-size: 15px; line-height: 2; letter-spacing: 1px; }
.footer__line--sub { font-size: 13px; color: rgba(255,255,255,0.7); margin-top: 6px; }


/* ============================================
   返回顶部
   ============================================ */
.back-top {
    position: fixed;
    right: 24px;
    bottom: 40px;
    width: 44px; height: 44px;
    background: var(--red-main);
    color: #FFFFFF;
    font-size: 20px;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(230,57,70,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 200;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { background: var(--red-dark); transform: translateY(-3px); }


/* ============================================
   响应式 —— 平板 ≤1024px
   ============================================ */
@media (max-width: 1024px) {
    .banner__title-main, .banner__title-sub { font-size: 56px; letter-spacing: 4px; }

    .section { padding: 40px 0; }
    .card { padding: 32px 24px 24px; }
    .card__tag { font-size: 26px; min-width: 120px; padding: 9px 22px 9px 24px; }

    /* 图片墙自动降为 2 列 */
    .card__gallery > .photo,
    .card__gallery--3col > .photo { width: calc((100% - 12px) / 2); }
}


/* ============================================
   响应式 —— 手机 ≤768px
   ============================================ */
@media (max-width: 768px) {
    html, body { font-size: 14px; }

    .banner__title-main, .banner__title-sub { font-size: 34px; letter-spacing: 2px; }
    .banner__subtitle { font-size: 14px; letter-spacing: 1px; }

    .section { padding: 32px 0; }
    .wrap { padding: 0 14px; }

    .card { padding: 28px 16px 20px; border-radius: 10px; }
    .card__tag {
        font-size: 15px;
        min-width: 100px;
        padding: 8px 18px 8px 20px;
        letter-spacing: 3px;
        top: -12px;
    }

    .card__gallery { gap: 8px; margin-bottom: 16px; }
    .card__gallery > .photo,
    .card__gallery--3col > .photo,
    .card__gallery--2col > .photo {
        width: calc((100% - 8px) / 2);
    }

    /* 唐昌镇左图右文 → 上下堆叠 */
    .card--row { flex-direction: column; gap: 16px; }
    .card--row .card__left, .card--row .card__right { flex: none; width: 100%; }

    .card__title { font-size: 17px; }
    .card__subtitle { font-size: 15px; }
    .card__desc { font-size: 14px; line-height: 1.9; }

    /* 双标题左右排列 → 上下堆叠，统一左对齐 */
    .subtitle-pair { flex-direction: column; align-items: stretch; gap: 0; }
    .subtitle-pair__item--right { text-align: left; }

    .footer { padding: 32px 0; }
    .footer__line { font-size: 13px; line-height: 1.9; }

    .back-top { right: 14px; bottom: 24px; width: 40px; height: 40px; }
}


/* ============================================
   响应式 —— 小屏 ≤480px
   ============================================ */
@media (max-width: 480px) {
    .banner__title-main, .banner__title-sub { font-size: 28px; letter-spacing: 2px; }
    .banner__subtitle { font-size: 12px; }

    /* 图片墙单列 */
    .card__gallery > .photo,
    .card__gallery--3col > .photo,
    .card__gallery--2col > .photo { width: 100%; }
}
