/* ===========================================
   达州天康餐消 - 主样式文件
   Modern CSS Variables & Flexbox/Grid Layout
   =========================================== */

/* CSS Variables - 主题配色 */
:root {
    --primary-color: #059669;
    --primary-dark: #047857;
    --primary-light: #10b981;
    --secondary-color: #f59e0b;
    --secondary-dark: #d97706;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --text-white: #ffffff;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --bg-dark: #111827;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

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

.section-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 20px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-top: 20px;
}

/* 动画类 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.fade-in-delay.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-2 {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease 0.4s, transform 0.6s ease 0.4s;
}

.fade-in-delay-2.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-3 {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease 0.6s, transform 0.6s ease 0.6s;
}

.fade-in-delay-3.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    padding: 15px 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

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

.navbar-brand .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: var(--border-radius);
    color: var(--text-white);
    font-size: 1.3rem;
}

.logo-text {
    color: var(--primary-color);
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.navbar-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    border-radius: 3px;
    transition: var(--transition);
}

.navbar-menu {
    display: flex;
    gap: 40px;
}

.navbar-menu a {
    color: var(--text-color);
    font-weight: 500;
    font-size: 1rem;
    padding: 8px 0;
    position: relative;
}

.navbar-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
    width: 100%;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    color: var(--primary-color);
}

/* Hero 区域 */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.9), rgba(16, 185, 129, 0.7));
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--text-white);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 40px;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.hero-contact p {
    font-size: 1.2rem;
    margin-bottom: 0;
}

.hero-contact i {
    margin-right: 10px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--text-white);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    border: 2px solid var(--text-white);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--text-white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* 优势展示 */
.features {
    padding: 100px 0;
    background: var(--bg-white);
}

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

.feature-card {
    text-align: center;
    padding: 40px 30px;
    background: var(--bg-light);
    border-radius: var(--border-radius-lg);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 2rem;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* 工厂展示轮播 */
.gallery {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-white) 100%);
}

.gallery-slider {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.gallery-container {
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.gallery-item {
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--text-white);
}

.gallery-caption h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.gallery-caption p {
    font-size: 1rem;
    opacity: 0.9;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-color);
    transition: var(--transition);
    z-index: 10;
}

.gallery-nav:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

.gallery-prev {
    left: -70px;
}

.gallery-next {
    right: -70px;
}

.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
}

.gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(5, 150, 105, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.gallery-dot:hover,
.gallery-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* 公司简介 */
.about {
    padding: 100px 0;
    background: var(--bg-white);
}

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

.about-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: var(--border-radius-lg);
    color: var(--text-white);
}

.badge-year {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.badge-text {
    font-size: 1.1rem;
}

.lead {
    font-size: 1.2rem;
    line-height: 1.9;
    color: var(--text-color);
    margin-bottom: 20px;
}

.highlight {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1), rgba(16, 185, 129, 0.1));
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 25px 0;
    font-weight: 500;
    color: var(--primary-dark);
}

.contact-box {
    margin-top: 30px;
}

.about-map h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.map-image {
    width: 100%;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    margin: 20px 0;
}

.address-info {
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

.address-info p {
    margin-bottom: 10px;
    color: var(--text-light);
}

.address-info i {
    color: var(--primary-color);
    margin-right: 10px;
    width: 20px;
}

/* 产品展示 */
.products {
    padding: 100px 0;
    background: var(--bg-light);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.product-image {
    position: relative;
    overflow: hidden;
}

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

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

.product-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
}

.product-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--secondary-color);
    color: var(--text-white);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
}

.product-info {
    padding: 25px;
}

.product-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.product-desc {
    color: var(--text-light);
    margin-bottom: 20px;
}

.product-features {
    padding: 0;
    margin: 0;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

.product-features i {
    color: var(--primary-color);
    font-size: 0.85rem;
}

/* 合作商家 */
.partners {
    padding: 100px 0;
    background: var(--bg-white);
}

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

.partner-card {
    text-align: center;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--border-radius-lg);
    transition: var(--transition);
    cursor: pointer;
}

.partner-card:hover {
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.partner-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}

.partner-card h3 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 0;
}

/* 资质认证 */
.certifications {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--text-white);
}

.certifications .section-header h2 {
    color: var(--text-white);
}

.certifications .section-header p {
    color: rgba(255, 255, 255, 0.9);
}

.cert-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.cert-text .lead {
    color: var(--text-white);
    margin-bottom: 25px;
}

.cert-text p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
}

.cert-highlight {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    margin: 25px 0;
    backdrop-filter: blur(10px);
}

.cert-highlight i {
    font-size: 2rem;
}

.cert-highlight span {
    font-size: 1.3rem;
    font-weight: 600;
}

.cert-img {
    width: 100%;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
}

/* 联系我们 */
.contact {
    padding: 100px 0;
    background: var(--bg-light);
}

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

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.contact-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(5px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-color);
}

.contact-details p,
.contact-details a {
    color: var(--text-light);
    font-size: 1rem;
}

.phone-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    transition: var(--transition);
}

.phone-number:hover {
    color: var(--primary-dark);
}

.contact-cta {
    margin-top: 10px;
}

.map-image-large {
    width: 100%;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

/* 页脚 */
.footer-main {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 60px 0;
}

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

.footer-brand h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-light);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--primary-light);
}

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

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

.footer-links a:hover {
    color: var(--primary-light);
    padding-left: 5px;
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

.footer-contact i {
    color: var(--primary-light);
    margin-right: 10px;
    width: 20px;
}

.footer-bottom {
    background: #0f131a;
    color: rgba(255, 255, 255, 0.5);
    padding: 25px 0;
    text-align: center;
    font-size: 0.9rem;
}

.footer-bottom p {
    margin-bottom: 5px;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a:hover {
    color: var(--primary-light);
}

/* 回到顶部 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

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

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

/* 打印样式 */
@media print {
    .navbar,
    .back-to-top {
        display: none;
    }
}
