/*
Theme Name: TOWNTY特种蜡
Theme URI: https://townty.cn
Author: TOWNTY Team
Description: 同泰（TOWNTY）特种蜡企业官网主题 - 专为特种蜡行业设计，包含产品中心、行业应用、技术支持、询盘表单等完整模块。
Version: 2.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: townty
*/

/* ================================================
   TOWNTY Theme v2.0 - 完整样式表
   基于布局图设计：深蓝+橙色主色调
   ================================================ */

/* ========== Reset & Base ========== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
    font-family: -apple-system, "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
    color: #333;
    line-height: 1.6;
    background: #fff;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: color .2s; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* ========== Container ========== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ========== Typography ========== */
h1, h2, h3, h4 { font-weight: 700; color: #1a2a4a; }

/* ========== Top Navigation ========== */
.top-nav {
    background: linear-gradient(135deg, #1a2a4a 0%, #2c3e6b 100%);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 3px;
    color: #fff;
    text-transform: uppercase;
}
.logo span { color: #f5a623; }
.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-menu li a {
    display: block;
    color: rgba(255,255,255,.85);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    transition: all .25s ease;
}
.nav-menu li a:hover,
.nav-menu li a.active {
    color: #fff;
    background: rgba(255,255,255,.12);
}
.nav-cta {
    background: linear-gradient(135deg, #f5a623 0%, #e8941a 100%) !important;
    color: #fff !important;
    padding: 9px 24px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(245,166,35,.35) !important;
}
.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(245,166,35,.45) !important;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    transition: all .3s;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ========== Hero Banner ========== */
.hero-banner {
    position: relative;
    color: #fff;
    overflow: hidden;
    line-height: 0;
}
.hero-banner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* ========== Inner Page Banner ========== */
.inner-banner {
    height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #fff;
    overflow: hidden;
}
.inner-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(20,40,80,.75) 0%, rgba(20,40,80,.4) 60%, transparent 100%);
}
.banner-text {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 20px;
}
.banner-text h1 {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.banner-text p {
    font-size: 16px;
    opacity: .9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}
.breadcrumb {
    position: relative;
    z-index: 1;
    margin-top: 14px;
    font-size: 13px;
    opacity: .7;
}
.breadcrumb a { color: #f5a623; }
.breadcrumb a:hover { text-decoration: underline; }
.hero-inner {
    display: flex;
    align-items: center;
    gap: 50px;
}
.hero-text {
    flex: 1;
    max-width: 580px;
}
.hero-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 16px;
    letter-spacing: 1px;
}
.hero-subtitle {
    font-size: 17px;
    line-height: 1.85;
    opacity: .88;
    margin-bottom: 32px;
}
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }

/* Buttons */
.btn-orange {
    display: inline-block;
    background: linear-gradient(135deg, #f5a623 0%, #e8941a 100%);
    color: #fff;
    padding: 13px 30px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    transition: all .3s ease;
    box-shadow: 0 3px 12px rgba(245,166,35,.35);
}
.btn-orange:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(245,166,35,.5);
}
.btn-blue {
    display: inline-block;
    background: linear-gradient(135deg, #2a5caa 0%, #1e4688 100%);
    color: #fff;
    padding: 13px 30px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    transition: all .3s ease;
    border: 1px solid rgba(255,255,255,.22);
}
.btn-blue:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(42,92,170,.4);
}
.btn-sm-blue {
    display: inline-block;
    background: linear-gradient(135deg, #2a5caa 0%, #1e4688 100%);
    color: #fff;
    padding: 8px 24px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: all .3s ease;
}
.btn-sm-blue:hover {
    box-shadow: 0 3px 12px rgba(42,92,170,.4);
    transform: translateY(-1px);
}

.hero-image {
    flex: 1;
    min-width: 380px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero-product-img { border-radius: 12px; }

/* ========== Section Common ========== */
.section { padding: 70px 0; }
.section-alt { background: #f7f8fb; }
.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #1a2a4a;
    margin-bottom: 48px;
    position: relative;
}
.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #f5a623, #2a5caa);
    margin: 12px auto 0;
    border-radius: 2px;
}

/* ========== 行业应用解决方案 ========== */
.industry-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.industry-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    transition: all .3s ease;
    cursor: pointer;
}
.industry-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
}
.industry-img {
    height: 140px;
    overflow: hidden;
    position: relative;
    background: #fafbfc;
}
.industry-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.industry-card:hover .industry-img img {
    transform: scale(1.08);
}
.industry-body { padding: 18px 20px 22px; }
.industry-name {
    font-size: 18px;
    font-weight: 700;
    color: #1a2a4a;
    margin-bottom: 8px;
}
.industry-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.7;
}

/* ========== 产品中心 ========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    transition: all .3s ease;
    border: 1px solid #eee;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,.11);
}
.product-img-wrap {
    padding: 28px 24px 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 210px;
    background: linear-gradient(135deg, #fafbfc 0%, #f0f2f7 100%);
}
.product-img-wrap img {
    max-width: 180px;
    max-height: 170px;
    object-fit: contain;
}
.product-body { padding: 0 22px 24px; }
.product-name {
    font-size: 20px;
    font-weight: 700;
    color: #1a2a4a;
    margin-bottom: 10px;
}
.product-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.75;
    margin-bottom: 18px;
}
.product-btn-wrap { text-align: center; }

/* ========== 技术支持 & 服务优势 ========== */
.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.service-item {
    text-align: center;
    padding: 36px 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    transition: all .3s ease;
}
.service-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 26px rgba(0,0,0,.1);
}
.service-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}
.icon-1 { background: #e8f4fd; color: #2a5caa; }
.icon-2 { background: #eef0fe; color: #4a5ab8; }
.icon-3 { background: #e8fdf4; color: #1a9a6a; }
.icon-4 { background: #fef6ec; color: #e8941a; }
.service-name {
    font-size: 17px;
    font-weight: 600;
    color: #1a2a4a;
}

/* ========== 行业新闻 ========== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.news-card {
    background: #fff;
    border-radius: 10px;
    padding: 26px 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    border-left: 3px solid #2a5caa;
    transition: all .3s ease;
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 26px rgba(0,0,0,.1);
}
.news-tag {
    display: inline-block;
    font-size: 12px;
    color: #2a5caa;
    font-weight: 600;
    margin-bottom: 10px;
}
.news-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a2a4a;
    line-height: 1.6;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-title a:hover { color: #2a5caa; }
.news-excerpt {
    font-size: 13px;
    color: #777;
    line-height: 1.7;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-more { text-align: center; }

/* ========== 联系我们 Section ========== */
.contact-section {
    background: linear-gradient(135deg, #1a2a4a 0%, #2c3e6b 100%);
    color: #fff;
    padding: 60px 0;
}
.contact-section .section-title {
    color: #fff;
}
.contact-section .section-title::after {
    background: linear-gradient(90deg, #f5a623, #fff);
}
.contact-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Contact Form Card */
.contact-form-card {
    background: rgba(255,255,255,.07);
    border-radius: 12px;
    padding: 32px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.12);
}
.form-title { font-size: 20px; font-weight: 700; margin-bottom: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-group { margin-bottom: 14px; }
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 5px;
    background: rgba(255,255,255,.95);
    font-size: 14px;
    color: #333;
    outline: none;
    transition: border-color .3s ease;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #f5a623;
}
.form-group textarea { resize: vertical; min-height: 90px; }
.form-submit {
    width: 100%;
    background: linear-gradient(135deg, #f5a623 0%, #e8941a 100%);
    color: #fff;
    border: none;
    padding: 13px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s ease;
    margin-top: 6px;
}
.form-submit:hover {
    box-shadow: 0 4px 16px rgba(245,166,35,.45);
    transform: translateY(-1px);
}

/* Contact Info Card */
.contact-info-card {
    background: rgba(255,255,255,.07);
    border-radius: 12px;
    padding: 32px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.12);
}
.info-title { font-size: 20px; font-weight: 700; margin-bottom: 22px; }
.info-list { margin-bottom: 20px; }
.info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.6;
}
.info-item .icon { font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.map-placeholder {
    width: 100%;
    height: 150px;
    background: rgba(255,255,255,.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: rgba(255,255,255,.55);
    margin-top: 12px;
}

/* ========== Footer ========== */
.footer {
    background: #111827;
    color: rgba(255,255,255,.65);
    padding: 24px 0;
    font-size: 13px;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-links a {
    color: rgba(255,255,255,.65);
    margin-right: 18px;
    transition: color .2s ease;
}
.footer-links a:hover { color: #f5a623; }
.footer-copy { opacity: .5; }

/* ========== Floating Action Buttons ========== */
.float-buttons {
    position: fixed;
    right: 20px;
    bottom: 80px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.float-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 3px 12px rgba(0,0,0,.2);
    transition: all .3s ease;
    cursor: pointer;
    border: none;
    color: #fff;
}
.float-btn.wechat { background: #07c160; }
.float-btn.whatsapp { background: #25d366; }
.float-btn:hover { transform: scale(1.1); }

/* ========== Content Area (inner pages) ========== */
.content-area {
    padding: 50px 0;
    min-height: 400px;
}
.content-area .entry-title {
    font-size: 30px;
    margin-bottom: 20px;
}
.content-area .entry-content {
    font-size: 15px;
    line-height: 1.9;
    color: #444;
}
.content-area .entry-content h2 { font-size: 24px; margin: 28px 0 14px; }
.content-area .entry-content h3 { font-size: 20px; margin: 22px 0 12px; }
.content-area .entry-content p { margin-bottom: 14px; }
.content-area .entry-content img { border-radius: 8px; margin: 16px 0; }

/* ========== Pagination ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    padding: 20px 0;
}
.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
    transition: all .2s;
}
.pagination a:hover { background: #2a5caa; color: #fff; border-color: #2a5caa; }
.pagination .current { background: #2a5caa; color: #fff; border-color: #2a5caa; }

/* ========== WordPress Admin Fixes ========== */
.wp-caption { max-width: 100%; }
.alignleft { float: left; margin: 0 20px 20px 0; }
.alignright { float: right; margin: 0 0 20px 20px; }
.aligncenter { display: block; margin: 20px auto; }
.screen-reader-text { clip: rect(1px,1px,1px,1px); position: absolute; height: 1px; width: 1px; overflow: hidden; }

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .industry-grid { grid-template-columns: repeat(2, 1fr); }
    .service-grid   { grid-template-columns: repeat(2, 1fr); }
    .product-grid   { grid-template-columns: repeat(2, 1fr); }
    .news-grid      { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    /* Mobile nav */
    .nav-menu { display: none; }
    .menu-toggle { display: block; }
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: #1a2a4a;
        padding: 12px;
        gap: 2px;
        z-index: 999;
        box-shadow: 0 6px 20px rgba(0,0,0,.3);
        animation: slideDown .3s ease;
    }
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .nav-menu.active li a { padding: 12px 16px; font-size: 15px; border-radius: 6px; }
    .nav-menu.active .nav-cta { text-align: center; margin-top: 6px; }
    .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }

    /* Hero */
    .hero-banner img { min-height: 200px; object-fit: cover; object-position: center; }

    /* Grids */
    .product-grid  { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
    .industry-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
    .news-grid     { grid-template-columns: 1fr; }
    .service-grid  { grid-template-columns: repeat(2, 1fr); }
    .contact-wrapper { grid-template-columns: 1fr; }
    .form-row      { grid-template-columns: 1fr; }

    /* Sections */
    .section       { padding: 44px 0; }
    .section-title { font-size: 24px; margin-bottom: 32px; }
    .contact-section { padding: 44px 0; }
    .contact-form-card, .contact-info-card { padding: 24px 20px; }

    /* Footer */
    .footer-inner { flex-direction: column; text-align: center; gap: 10px; }
    .footer-links a { margin: 0 10px; display: inline-block; }

    /* Float buttons */
    .float-buttons { right: 12px; bottom: 60px; gap: 8px; }
    .float-btn { width: 44px; height: 44px; font-size: 20px; }

    /* Nav sizing */
    .logo { font-size: 20px; letter-spacing: 2px; }
    .nav-inner { height: 56px; }

    /* Inner page banner */
    .inner-banner { height: 200px; }
    .banner-text h1 { font-size: 22px; }
    .banner-text p { font-size: 14px; }

    /* Prevent iOS auto-zoom on input focus */
    .form-group input, .form-group textarea, .form-group select { font-size: 16px !important; }

    /* Touch target improvements */
    .nav-menu.active li a { min-height: 44px; display: flex; align-items: center; }
    .btn-orange, .btn-sm-blue, .btn-blue { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
}

@media (max-width: 480px) {
    .container { padding: 0 14px; }
    .section { padding: 36px 0; }
    .section-title { font-size: 21px; margin-bottom: 26px; }
    .product-grid, .industry-grid { max-width: 100%; }
    .service-grid { grid-template-columns: 1fr; }
    .service-item { padding: 28px 16px; }
    .banner-text h1 { font-size: 20px; }
    .contact-form-card, .contact-info-card { padding: 20px 16px; }
    .form-group input, .form-group textarea { font-size: 16px; }
    .footer-links a { font-size: 12px; margin: 0 8px; }
    .footer-copy { font-size: 12px; }
}
