/* KTC京都机械代理商网站样式 */

/* CSS自定义属性 */
:root {
    /* 色彩系统 */
    --primary-red: #b91c3c;
    --secondary-red: #c41e3a;
    --accent-red: #dc2845;
    --dark-gray: #333333;
    --medium-gray: #666666;
    --light-gray: #F5F7FA;
    --border-gray: #E0E0E0;
    --white: #FFFFFF;
    --success-green: #4CAF50;
    --error-red: #D32F2F;
    
    /* 字体 */
    --font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* 阴影 */
    --shadow-light: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-heavy: 0 8px 24px rgba(0,0,0,0.2);
    
    /* 过渡动画 */
    --transition: all 0.3s ease;
    
    /* 断点 */
    --mobile: 768px;
    --tablet: 1024px;
    --desktop: 1280px;
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
}

/* 容器 */
.container {
    max-width: var(--desktop);
    margin: 0 auto;
    padding: 0 24px;
}

/* 标题样式 */
h1 {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--dark-gray);
}

h2 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--dark-gray);
}

h3 {
    font-size: 22px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--dark-gray);
}

h4 {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--dark-gray);
}

p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--dark-gray);
}

/* 链接样式 */
a {
    color: var(--primary-red);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-red);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.5;
}

.btn-primary {
    background-color: var(--secondary-red);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--accent-red);
    transform: translateY(-1px);
    color: var(--white);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-red);
    border: 1px solid var(--primary-red);
}

.btn-secondary:hover {
    background-color: var(--light-gray);
    color: var(--primary-red);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-red);
    border: 1px solid var(--primary-red);
    padding: 8px 16px;
    font-size: 14px;
}

.btn-outline:hover {
    background-color: var(--primary-red);
    color: var(--white);
}

.btn-full {
    width: 100%;
}

/* 导航栏样式 */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow-light);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar {
    padding: 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.nav-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.brand-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-red);
    margin: 0;
}

.tagline {
    font-size: 12px;
    color: var(--medium-gray);
    margin-top: -4px;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 16px;
    font-weight: 500;
    color: var(--dark-gray);
    padding: 8px 0;
    position: relative;
    transition: var(--transition);
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-red);
}

/* 下拉菜单 */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: var(--shadow-medium);
    border-radius: 4px;
    padding: 8px 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    list-style: none;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    color: var(--dark-gray);
    font-size: 14px;
    transition: var(--transition);
}

.dropdown-menu li a:hover {
    background-color: var(--light-gray);
    color: var(--primary-red);
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    width: 24px;
    height: 3px;
    background-color: var(--dark-gray);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero区域样式 */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: var(--white);
    overflow: hidden;
    margin-top: 80px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.1s ease-out;
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(185, 28, 60, 0.7), rgba(196, 30, 58, 0.8));
    z-index: -1;
}

.hero-content {
    max-width: 600px;
    z-index: 1;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 24px;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-description {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 32px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.hero-buttons .btn {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
}

/* 区域通用样式 */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 16px;
    color: var(--primary-red);
}

.section-subtitle {
    text-align: center;
    font-size: 18px;
    color: var(--medium-gray);
    margin-bottom: 48px;
}

/* 核心优势区域 */
.advantages {
    background-color: var(--light-gray);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.advantage-item {
    background-color: var(--white);
    padding: 32px 24px;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.advantage-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.advantage-icon {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--primary-red);
}

.advantage-item h3 {
    margin-bottom: 12px;
    color: var(--primary-red);
}

.advantage-item p {
    color: var(--medium-gray);
    line-height: 1.6;
}

/* 产品分类区域 */
.product-categories {
    background-color: var(--white);
}

.categories-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 800px;
    margin: 0 auto;
}

.category-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.card-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.category-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 24px;
}

.card-content h3 {
    margin-bottom: 12px;
    color: var(--primary-red);
}

.card-content p {
    margin-bottom: 16px;
    color: var(--medium-gray);
    line-height: 1.6;
}

.feature-list {
    list-style: none;
    margin-bottom: 20px;
}

.feature-list li {
    padding: 4px 0;
    color: var(--medium-gray);
    font-size: 14px;
    position: relative;
    padding-left: 20px;
}

.feature-list li::before {
    content: '•';
    color: var(--primary-red);
    position: absolute;
    left: 0;
}

/* 产品详细展示区域 */
.product-details {
    background-color: var(--light-gray);
}

.product-detail-section {
    margin-bottom: 60px;
}

.product-detail-section:last-child {
    margin-bottom: 0;
}

.product-detail-section h2 {
    color: var(--primary-red);
    margin-bottom: 32px;
    text-align: center;
}

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 48px;
    align-items: start;
}

.detail-content h3 {
    color: var(--primary-red);
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-red);
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.spec-item {
    background-color: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

.spec-item strong {
    display: block;
    color: var(--primary-red);
    margin-bottom: 12px;
    font-size: 16px;
}

.spec-item ul {
    list-style: none;
}

.spec-item ul li {
    padding: 4px 0;
    color: var(--dark-gray);
    font-size: 14px;
    position: relative;
    padding-left: 20px;
}

.spec-item ul li::before {
    content: '✓';
    color: var(--success-green);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.detail-image {
    text-align: center;
}

.detail-image img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-medium);
}

/* 关于我们区域 */
.about {
    background-color: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 48px;
    align-items: start;
}

.about-text h3 {
    color: var(--primary-red);
    margin-bottom: 20px;
}

.about-text h4 {
    color: var(--primary-red);
    margin: 32px 0 16px 0;
}

.about-features,
.service-list {
    list-style: none;
    margin-bottom: 24px;
}

.about-features li,
.service-list li {
    padding: 8px 0;
    position: relative;
    padding-left: 24px;
}

.about-features li::before {
    content: '★';
    color: var(--primary-red);
    position: absolute;
    left: 0;
}

.service-list li::before {
    content: '◆';
    color: var(--success-green);
    position: absolute;
    left: 0;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
}

/* 联系我们区域 */
.contact {
    background-color: var(--light-gray);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.contact-info h3,
.inquiry-form h3 {
    color: var(--primary-red);
    margin-bottom: 24px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 24px;
}

.contact-icon {
    font-size: 24px;
    margin-right: 16px;
    margin-top: 4px;
}

.contact-details strong {
    display: block;
    color: var(--primary-red);
    margin-bottom: 4px;
}

.contact-details p {
    color: var(--medium-gray);
    font-size: 14px;
    line-height: 1.5;
}

/* 表单样式 */
.form {
    background-color: var(--white);
    padding: 32px;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-gray);
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background-color: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-red);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* 页脚样式 */
.footer {
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 48px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 16px;
}

.footer-section h4 {
    color: var(--white);
    margin-bottom: 16px;
    font-size: 16px;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.6;
}

.footer-links,
.footer-contacts {
    list-style: none;
}

.footer-links li,
.footer-contacts li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-contacts li {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin-bottom: 4px;
}

.footer-copyright .author {
    color: var(--secondary-red);
    font-weight: 500;
}

.footer-links-bottom {
    display: flex;
    gap: 16px;
}

.footer-links-bottom a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    transition: var(--transition);
}

.footer-links-bottom a:hover {
    color: var(--white);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: var(--shadow-medium);
}

.back-to-top:hover {
    background-color: var(--secondary-red);
    transform: translateY(-2px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 40px;
    }
    
    .hero-subtitle {
        font-size: 20px;
    }
    
    .detail-grid,
    .about-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    /* 导航栏移动端适配 */
    .hamburger {
        display: flex;
    }
    
    .brand-logo {
        height: 36px;
        width: auto;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
        box-shadow: var(--shadow-medium);
        transform: translateX(-100%);
        transition: var(--transition);
        gap: 16px;
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background-color: var(--light-gray);
        margin-top: 8px;
        border-radius: 4px;
    }
    
    /* Hero区域移动端适配 */
    .hero {
        height: 80vh;
        min-height: 500px;
        padding: 0 20px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .hero-description {
        font-size: 16px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .hero-buttons .btn {
        text-align: center;
    }
    
    /* 容器移动端适配 */
    .container {
        padding: 0 16px;
    }
    
    /* 区域间距调整 */
    section {
        padding: 60px 0;
    }
    
    /* 网格布局调整 */
    .advantages-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .spec-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* 页脚移动端适配 */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    /* 字体大小调整 */
    h1 {
        font-size: 28px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    h3 {
        font-size: 20px;
    }
    
    .section-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .container {
        padding: 0 12px;
    }
    
    .advantage-item,
    .form {
        padding: 20px 16px;
    }
    
    .category-card .card-content {
        padding: 20px 16px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* 滚动动画类 */
.animate-on-scroll {
    opacity: 0;
    transition: var(--transition);
}

.animate-on-scroll.animated {
    opacity: 1;
    animation: fadeInUp 0.8s ease forwards;
}

.animate-left.animated {
    animation: fadeInLeft 0.8s ease forwards;
}

.animate-right.animated {
    animation: fadeInRight 0.8s ease forwards;
}

/* 加载状态 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* 成功状态 */
.success {
    background-color: var(--success-green) !important;
    color: var(--white) !important;
}

/* 错误状态 */
.error {
    border-color: var(--error-red) !important;
    background-color: rgba(211, 47, 47, 0.1) !important;
}

/* 选择状态 */
::selection {
    background-color: var(--primary-red);
    color: var(--white);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background-color: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-red);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--secondary-red);
}

/* 打印样式 */
@media print {
    .header,
    .footer,
    .back-to-top,
    .hamburger {
        display: none !important;
    }
    
    .hero {
        margin-top: 0;
        height: auto;
        min-height: auto;
        padding: 40px 0;
    }
    
    section {
        padding: 40px 0;
    }
    
    * {
        color: #000 !important;
        background: transparent !important;
        box-shadow: none !important;
    }
}
