/* Custom styles to enhance Tailwind */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}
/* Disable smooth scrolling in admin pages to prevent editor jumping bugs */
html.admin-page {
    scroll-behavior: auto;
}

/* Base Swiper customization */
.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #fff;
    opacity: 0.5;
}
.swiper-pagination-bullet-active {
    background: #b91c1c; /* primary red */
    opacity: 1;
    width: 24px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* Gradient Text for Headings */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(90deg, #b91c1c, #1e3a8a);
}

/* Card Hover Effects */
.hover-card {
    transition: all 0.3s ease;
}
.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Image overlay gradient */
.overlay-gradient {
    background: linear-gradient(to top, rgba(17, 24, 39, 0.9) 0%, rgba(17, 24, 39, 0) 100%);
}

/* Animate data numbers */
.data-number {
    font-family: 'Arial', sans-serif;
    font-weight: bold;
}

/* 移动端菜单激活时阻止底层滚动 */
body.menu-open {
    overflow: hidden;
}

/* 底部融媒体矩阵悬浮二维码 */
.media-icon-group {
    position: relative;
}
.media-icon-group .qr-code {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    transition: all 0.3s ease;
    z-index: 10;
    margin-bottom: 10px;
}
.media-icon-group:hover .qr-code {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.media-icon-group .qr-code::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

/* 底部链接排版样式 (下拉框效果) */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #1f2937; /* gray-800 */
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #4b5563; /* gray-600 */
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #6b7280; /* gray-500 */
}
/* Scroll Animation */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Slogan Typography (Calligraphy font and stroke) */
.slogan-typography {
    font-family: 'STXingkai', 'Xingkai SC', '华文行楷', 'KaiTi', '楷体', serif;
    font-weight: 900;
    -webkit-text-stroke: 1px currentColor;
}

.slogan-typography .anim-red {
    -webkit-text-stroke: 0;
}

/* 公共页面顶部 Banner 容器 */
.page-banner-section {
    position: relative;
    padding-top: 8rem;
    padding-bottom: 5rem;
    background-color: #111827; /* bg-dark */
    overflow: hidden;
}
@media (min-width: 768px) {
    .page-banner-section {
        padding-top: 10rem;
        padding-bottom: 7rem;
    }
}

/* 公共页面顶部 Banner 内容区 */
.page-banner-container {
    position: relative;
    max-width: 80rem; /* max-w-7xl */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: center;
}
@media (min-width: 640px) {
    .page-banner-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}
@media (min-width: 1024px) {
    .page-banner-container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* 公共页面顶部 Banner 标题 */
.page-banner-title {
    font-size: 2.25rem;
    line-height: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}
@media (min-width: 768px) {
    .page-banner-title {
        font-size: 3rem;
        line-height: 1;
    }
}

/* 公共页面顶部 Banner 副标题 */
.page-banner-subtitle {
    font-size: 1.25rem;
    line-height: 1.75rem;
    color: #e5e7eb; /* text-gray-200 */
    max-width: 48rem; /* max-w-3xl */
    margin-left: auto;
    margin-right: auto;
}

/* 通用版块标题 */
.section-title {
    font-size: 1.875rem;
    line-height: 2.25rem;
    font-weight: 700;
    color: #111827; /* text-gray-900 */
    margin-bottom: 1rem;
    display: inline-block;
}
@media (min-width: 768px) {
    .section-title {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }
}

/* 通用版块标题下划线 */
.section-divider {
    width: 4rem; /* w-16 */
    height: 0.25rem; /* h-1 */
    background-color: #b91c1c; /* bg-primary */
    margin-bottom: 0.5rem;
}
.section-divider-center {
    width: 4rem; /* w-16 */
    height: 0.25rem; /* h-1 */
    background-color: #b91c1c; /* bg-primary */
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
}

/* 分页按钮 */
.pagination-btn {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    background-color: #ffffff;
    border-width: 1px;
    border-color: #e5e7eb; /* border-gray-200 */
    border-radius: 0.25rem;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.pagination-btn:hover {
    background-color: #f9fafb; /* hover:bg-gray-50 */
}

/* 公共页面顶部 Banner 背景遮罩 (新闻、招标、人才招聘等列表页) */
.page-banner-overlay {
    position: absolute;
    inset: 0;
    background-color: #b91c1c; /* primary */
    opacity: 0.9;
    mix-blend-mode: multiply;
}

/* 公共页面顶部 Banner 图片透明度 */
.page-banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

/* 详情页蓝色天空背景层 */
.detail-sky-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 16rem; /* 64 */
    background-image: linear-gradient(to bottom, #1e3a8a, #1d4ed8);
    z-index: 0;
}
@media (min-width: 768px) {
    .detail-sky-bg {
        height: 20rem; /* md:h-80 */
    }
}

/* 详情页蓝色天空背景云朵纹理 */
.detail-sky-texture {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 16rem; /* 64 */
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    mix-blend-mode: overlay;
    z-index: 0;
    background-image: url('https://images.unsplash.com/photo-1534081333815-ae5019a08e5e?q=80&w=1920&auto=format&fit=crop');
}
@media (min-width: 768px) {
    .detail-sky-texture {
        height: 20rem; /* md:h-80 */
    }
}

/* 底部友情链接下拉按钮 */
.footer-dropdown-btn {
    width: 100%;
    background-color: #1a2234;
    color: #d1d5db; /* text-gray-300 */
    border-width: 1px;
    border-color: #374151; /* border-gray-700 */
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0.125rem;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.footer-dropdown-btn:hover {
    border-color: #6b7280; /* hover:border-gray-500 */
}

/* 底部友情链接下拉面板 */
.footer-dropdown-panel {
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    margin-bottom: 0.25rem;
    background-color: #1a2234;
    border-width: 1px;
    border-color: #374151; /* border-gray-700 */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* shadow-2xl */
    z-index: 50;
    max-height: 15rem; /* max-h-60 */
    overflow-y: auto;
}

/* 底部友情链接项 */
.footer-dropdown-item {
    display: block;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.625rem; /* py-2.5 */
    padding-bottom: 0.625rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #9ca3af; /* text-gray-400 */
    border-bottom-width: 1px;
    border-color: #1f2937; /* border-gray-800 */
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.footer-dropdown-item:hover {
    background-color: #b91c1c; /* hover:bg-primary */
    color: #ffffff; /* hover:text-white */
}
.footer-dropdown-item:last-child {
    border-bottom-width: 0;
}

/* 首页新闻列表扁平化卡片 */
.list-card-flat {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.75rem;
    border-width: 1px;
    border-color: transparent;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}
.list-card-flat:hover {
    background-color: #f9fafb; /* hover:bg-gray-50 */
    border-color: #f3f4f6; /* hover:border-gray-100 */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* hover:shadow-sm */
}
@media (min-width: 768px) {
    .list-card-flat {
        gap: 1rem;
    }
}

/* 通用列表项卡片 (新闻列表、招标列表) */
.list-card {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    padding: 1rem;
    background-color: #ffffff;
    border-radius: 0.75rem;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
    border-width: 1px;
    border-color: #f3f4f6;
}
.list-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
@media (min-width: 768px) {
    .list-card {
        gap: 1.5rem;
        padding: 1.5rem;
    }
}

/* 通用列表项卡片 - 左侧日期块容器 */
.list-card-date-box {
    flex-shrink: 0;
    width: 6rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-right-width: 1px;
    border-color: #f3f4f6;
    padding-right: 1rem;
}
@media (min-width: 640px) {
    .list-card-date-box {
        width: 7rem;
    }
}
@media (min-width: 768px) {
    .list-card-date-box {
        width: 8rem;
        padding-right: 1.5rem;
    }
}

/* 通用列表项卡片 - 左侧日期大字 (月-日) */
.list-card-date-md {
    font-size: 1.35rem;
    font-weight: 700;
    color: #b91c1c;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
    white-space: nowrap;
}
.list-card:hover .list-card-date-md {
    color: #b91c1b; /* approximate red-700 */
}
@media (min-width: 640px) {
    .list-card-date-md {
        font-size: 1.5rem;
        line-height: 2rem;
    }
}
@media (min-width: 768px) {
    .list-card-date-md {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }
}

/* 通用列表项卡片 - 左侧日期小字 (年份) */
.list-card-date-y {
    color: #9ca3af;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}
@media (min-width: 768px) {
    .list-card-date-y {
        font-size: 0.875rem;
        line-height: 1.25rem;
        margin-bottom: 0.75rem;
    }
}

/* 通用列表项卡片 - 右侧内容容器 */
.list-card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
    padding-left: 0.25rem;
}
@media (min-width: 768px) {
    .list-card-content {
        padding-left: 0.5rem;
    }
}

/* 通用列表项卡片 - 标题 */
.list-card-title {
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 700;
    color: #111827;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-line-clamp: 2;
}
.list-card:hover .list-card-title {
    color: #b91c1c;
}
@media (min-width: 768px) {
    .list-card-title {
        font-size: 1.5rem;
        line-height: 2rem;
        margin-bottom: 0.75rem;
    }
}

/* 详情页面包屑导航容器 */
.detail-breadcrumb {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #e5e7eb;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border-radius: 0.75rem;
    border-width: 1px;
    border-color: rgba(255, 255, 255, 0.2);
    overflow-x: auto;
    white-space: nowrap;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
