/* 湖北冠辉新材料科技有限公司网站样式 */
/* 主样式文件 */

/* 全局样式 */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12), 0 6px 12px rgba(0, 0, 0, 0.06);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-apple: cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-fast: 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-slow: 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
    padding-top: 85px; /* 为固定导航栏留出空间 */
    overflow-x: hidden; /* 防止水平滚动 */
    width: 100%;
    max-width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition-fast);
}

a:hover {
    color: #0a58ca;
}

.section-title {
    font-size: 2.5rem;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    border-radius: 2px;
    background-color: var(--primary-color);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

/* 导航栏 */
.navbar {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    padding: 0.75rem 0;
    z-index: 1050;
    transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}

/* 移动端：汉堡按钮与LOGO水平对齐 */
@media (max-width: 991.98px) {
    .navbar > .container {
        align-items: center;
    }

    .navbar-toggler {
        padding: 6px 10px;
        align-self: center;
    }
}

.navbar-scrolled {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* 确保导航栏折叠菜单正确显示 */
.navbar-collapse {
    z-index: 1060;
}

@media (max-width: 991.98px) {
    /* 菜单打开时页面遮罩 */
    .navbar-collapse.show::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: -1;
        animation: fadeIn 0.25s ease-out;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    .navbar-collapse {
        background-color: white;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 8px;
        max-height: 70vh;
        overflow-y: auto;
        transition: max-height 0.35s ease, opacity 0.35s ease;
    }

    .navbar-collapse.collapsing {
        opacity: 0;
    }

    .navbar-collapse.show {
        opacity: 1;
    }

    .navbar-nav {
        text-align: center;
    }

    .nav-link {
        margin: 5px 0;
        padding: 15px 20px !important;
        border-radius: 8px;
        font-size: 1.1rem;
    }

    .nav-item {
        margin-bottom: 5px;
    }
}

.navbar-brand {
    font-size: 0;
    font-weight: 700;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    display: block;
    height: 42px;
    width: auto;
    transition: transform var(--transition-smooth);
    flex-shrink: 0;
}

.brand-text {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #222;
    margin-left: 12px;
    transition: color var(--transition-fast);
    line-height: 1.3;
}

.navbar-brand:hover img {
    transform: scale(1.06);
}

.navbar-brand:hover .brand-text {
    color: var(--primary-color);
}

@media (max-width: 991.98px) {
    .brand-text {
        font-size: 0.95rem;
    }
    .navbar-brand img {
        height: 36px;
    }
}

@media (max-width: 576px) {
    .brand-text {
        font-size: 0.85rem;
        letter-spacing: 0;
    }
    .navbar-brand img {
        height: 32px;
    }
}

.nav-link {
    font-weight: 500;
    margin: 0 5px;
    padding: 12px 20px !important;
    border-radius: 5px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
    transition: width var(--transition-smooth), left var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
    background-color: transparent;
    color: var(--primary-color);
}

.nav-link:hover::after, .nav-link.active::after {
    width: calc(100% - 40px);
    left: 20px;
}

/* 页面标题区域 */
.page-header {
    padding: 100px 0 60px;
    margin-top: -85px;
}

/* 英雄区域 */
.hero-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-section .lead {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    max-width: 600px;
}

.hero-content .btn-light {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.9);
    color: #333;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-content .btn-light:hover {
    background-color: white;
    border-color: white;
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.hero-content .btn-light:active {
    transform: scale(0.97);
}

/* 按钮 Apple 风格悬停 */
.btn {
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
}

.btn:hover {
    transform: scale(1.04);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary:hover {
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.35);
}

.btn-outline-primary:hover {
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.15);
}

.hero-full-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: #333;
}

.hero-full-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    animation: heroZoom 20s ease-out forwards;
}

@keyframes heroZoom {
    from { transform: scale(1.05); }
    to { transform: scale(1); }
}

.hero-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
}

/* 产品卡片 */
.product-card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    overflow: hidden;
    cursor: pointer;
    will-change: transform;
    transform: translateZ(0);
}

.product-card:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}

.product-card:active {
    transform: scale(0.98);
}

.product-icon {
    color: var(--primary-color);
}

/* 产品列表页面 */
.product-item {
    padding: 30px 0;
    border-bottom: 1px solid #eee;
}

.product-item:last-child {
    border-bottom: none;
}

.product-title {
    font-size: 2rem;
    color: var(--dark-color);
}

.product-description {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.product-specs ul {
    list-style-type: none;
    padding-left: 0;
}

.product-specs li {
    padding: 5px 0;
    border-bottom: 1px dashed #eee;
}

.product-specs li:last-child {
    border-bottom: none;
}

.product-applications .badge {
    font-size: 0.9rem;
    padding: 8px 15px;
    margin-bottom: 5px;
}

.product-image {
    margin-bottom: 1.5rem;
    position: relative;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform var(--transition-slow);
}

.product-image:hover img {
    transform: scale(1.06);
}

/* 文化卡片 */
.culture-card, .certification-card, .contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    border-radius: 12px;
    background-color: white;
    box-shadow: var(--shadow);
    height: 100%;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    will-change: transform;
    transform: translateZ(0);
}

.culture-card:hover, .certification-card:hover, .contact-card:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}

.culture-icon, .certification-icon, .contact-icon {
    color: var(--primary-color);
}

/* 关于我们图片容器 */
.about-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.about-image-wrapper img {
    display: block;
    width: 100%;
    transition: transform var(--transition-slow);
}

.about-image-wrapper:hover img {
    transform: scale(1.03);
}

/* 常见问题 */
.accordion-button {
    font-weight: 600;
    padding: 15px 20px;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
}

.accordion-body {
    padding: 20px;
}

/* 页脚 */
.footer {
    background-color: var(--dark-color) !important;
}

.footer h5 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: white;
}

.footer p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.footer ul li {
    margin-bottom: 6px;
}

.footer a.text-white-50 {
    display: inline-block;
    padding: 5px 0;
    min-height: 36px;
    line-height: 1.4;
    position: relative;
    transition: color var(--transition-fast);
}

.footer a.text-white-50::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 0;
    height: 1px;
    background: white;
    transition: width var(--transition-smooth);
}

.footer a.text-white-50:hover {
    color: white !important;
}

.footer a.text-white-50:hover::after {
    width: 100%;
}

.social-icons a {
    display: inline-block;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.social-icons a:hover {
    transform: translateY(-4px);
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero-section {
        min-height: 500px;
    }

    .hero-section h1 {
        font-size: 2.8rem;
    }

    .hero-content {
        padding: 25px;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .hero-image img {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 75px;
    }

    .hero-section {
        padding: 60px 0;
        min-height: 450px;
    }

    .hero-section h1 {
        font-size: 2.2rem;
    }

    .hero-section .lead {
        font-size: 1.2rem;
    }

    .hero-content {
        padding: 20px;
        background-color: rgba(0, 0, 0, 0.5);
        backdrop-filter: none;
        max-width: 100%;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .page-header {
        padding: 80px 0 40px;
        margin-top: -75px;
    }

    .hero-image img {
        max-height: 300px;
    }

    /* 产品列表响应式调整 */
    .product-item {
        padding: 20px 0;
    }

    .product-title {
        font-size: 1.8rem;
        margin-top: 1rem;
    }

    .product-description {
        font-size: 1rem;
    }

    /* 产品图片在移动端调整为正方形 */
    .product-image {
        padding-top: 100%; /* 1:1 正方形 */
    }

    /* 确保移动端所有产品都是图片在上、文字在下 */
    .product-item > div[class*="col-"] {
        order: 2; /* 默认文字在下 */
    }

    .product-item > div[class*="col-"]:first-child {
        order: 1; /* 图片在上 */
    }

    /* 优化联系卡片的移动端间距 */
    .contact-card, .culture-card, .certification-card {
        margin-bottom: 20px;
        padding: 25px 15px;
    }

    /* 优化产品项间距 */
    .product-item {
        margin-bottom: 30px;
    }

    /* 优化页脚在移动端的布局 */
    .footer .col-lg-4 {
        margin-bottom: 30px;
    }

    /* 页脚二维码移动端缩放 */
    .social-icons img {
        width: 100px !important;
        height: 100px !important;
    }

    /* 英雄区域按钮移动端全宽 */
    .hero-content .btn {
        display: block;
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 70px;
    }

    .hero-section {
        min-height: 400px;
        padding: 50px 0;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .hero-section .lead {
        font-size: 1.1rem;
    }

    .hero-content {
        padding: 15px;
        background-color: rgba(0, 0, 0, 0.6);
        backdrop-filter: none;
        max-width: 100%;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .product-title {
        font-size: 1.5rem;
    }

    .hero-image img {
        max-height: 250px;
    }

    /* 产品列表小屏幕调整 */
    .product-item {
        padding: 15px 0;
    }

    .product-description {
        font-size: 0.95rem;
    }

    .product-specs h5,
    .product-applications h5 {
        font-size: 1.1rem;
    }

    .product-applications .badge {
        font-size: 0.8rem;
        padding: 6px 10px;
        margin-bottom: 4px;
    }

    .page-header {
        margin-top: -70px;
    }

    /* 进一步优化超小屏幕的间距 */
    .contact-card, .culture-card, .certification-card {
        padding: 20px 12px;
        margin-bottom: 15px;
    }

    /* 产品卡片文字超小屏幕缩小 */
    .product-card .card-text {
        font-size: 0.85rem;
    }

    .product-card .card-title {
        font-size: 1rem;
    }

    .product-item {
        margin-bottom: 25px;
    }

    .footer .col-lg-4 {
        margin-bottom: 25px;
    }

    /* 优化英雄区域在超小屏幕的间距 */
    .hero-section {
        padding: 40px 0;
    }

    /* 页脚二维码进一步缩小 */
    .social-icons img {
        width: 80px !important;
        height: 80px !important;
    }

    /* 英雄区域按钮 */
    .hero-content .btn {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px 20px;
        font-size: 1rem;
    }
}

/* 极小屏幕 (<400px) */
@media (max-width: 399px) {
    body {
        padding-top: 80px;
    }

    .navbar-brand {
        white-space: normal;
    }

    .brand-text {
        font-size: 0.75rem;
    }

    .navbar-brand img {
        height: 28px;
    }

    .hero-section {
        min-height: 340px;
        padding: 30px 0;
    }

    .hero-section .lead {
        font-size: 1rem;
    }

    .hero-content {
        padding: 12px;
    }

    .hero-content .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .social-icons img {
        width: 65px !important;
        height: 65px !important;
    }
}

/* 图片优化 */
img {
    max-width: 100%;
    height: auto;
}

/* 内容图片悬停微缩放 */
.img-fluid.rounded.shadow,
.about-section img {
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.img-fluid.rounded.shadow:hover,
.about-section img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg) !important;
}

/* 确保非产品图片在移动端显示良好 */
.img-fluid {
    max-width: 100%;
    height: auto;
}

/* 工具类 */
.mt-6 {
    margin-top: 4rem;
}

.mb-6 {
    margin-bottom: 4rem;
}

.rounded-lg {
    border-radius: 15px;
}

.shadow-lg {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

/* 动画效果 — Apple 风格 */
@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes revealLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes revealRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes revealScale {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.reveal {
    opacity: 0;
}

.reveal-up {
    animation: revealUp 0.8s var(--ease-out-expo) forwards;
}

.reveal-left {
    animation: revealLeft 0.8s var(--ease-out-expo) forwards;
}

.reveal-right {
    animation: revealRight 0.8s var(--ease-out-expo) forwards;
}

.reveal-scale {
    animation: revealScale 0.7s var(--ease-out-expo) forwards;
}

.reveal-delay-1 { animation-delay: 0.1s; }
.reveal-delay-2 { animation-delay: 0.2s; }
.reveal-delay-3 { animation-delay: 0.3s; }
.reveal-delay-4 { animation-delay: 0.4s; }

/* 保留旧类名兼容 */
.fade-in {
    animation: revealUp 0.8s var(--ease-out-expo) forwards;
}

/* 触摸设备优化：禁用悬浮缩放效果 */
@media (hover: none) and (pointer: coarse) {
    .product-card:hover,
    .culture-card:hover, .certification-card:hover, .contact-card:hover,
    .btn:hover {
        transform: none;
        box-shadow: var(--shadow);
    }

    .product-card:active,
    .culture-card:active, .certification-card:active, .contact-card:active {
        transform: scale(0.97);
    }

    .social-icons a:hover {
        transform: none;
        opacity: 1;
    }

    .img-fluid.rounded.shadow:hover,
    .about-section img:hover {
        transform: none;
    }

    .navbar-brand:hover img {
        transform: none;
    }
}

/* 打印样式 */
@media print {
    .navbar, .footer, .btn {
        display: none !important;
    }

    body {
        padding-top: 0;
    }

    a {
        text-decoration: underline;
    }
}