/* =====================================================
   EverBen Towels - 网站样式文件
   来源: customtowelmanufacturer.com
   用途: 提供网站字体、排版、Header、导航和Footer的完整样式
   适用: Dreamweaver 用户
   ===================================================== */

/* =====================================================
   第1部分: CSS 变量 (颜色主题) - 在此修改颜色
   ===================================================== */
:root {
    --color-primary-accent: #337ab7;      /* 主色调：蓝色，用于链接和高亮 */
    --color-secondary-accent: #94B4AC;    /* 副色调：灰绿色 */
    --color-topbar-bg: #1C7C74;           /* 顶部信息栏背景：深绿色 */
    --color-footer-bg: #1C7C74;           /* Footer 背景色：深绿色 */
    --color-cta: #ffc107;                 /* 行动按钮颜色：黄色 */
    --color-cta-hover: #337ab7;           /* 行动按钮悬停颜色：蓝色 */
    --color-text-light: #ffffff;          /* 浅色文字：白色 */
    --color-text-body: #333333;           /* 正文文字：深灰 */
    --color-text-muted: #6c757d;          /* 次要文字：灰色 */
    --color-border: #e5e7eb;             /* 边框颜色 */
}

/* =====================================================
   第2部分: 全局重置 (基础样式)
   ===================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* =====================================================
   第3部分: 字体与排版
   ===================================================== */
body {
    font-family: 'Helvetica Neue', Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--color-text-body);
    line-height: 1.6;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    line-height: 1.25;
    color: #111827;
}

h1 { font-size: 2.25rem; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; margin-top: 2rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.25rem; margin-top: 1.5rem; margin-bottom: 0.5rem; font-weight: 600; }
h4 { font-size: 1.125rem; margin-top: 1.25rem; margin-bottom: 0.5rem; font-weight: 600; }

p { margin-top: 1.25em; margin-bottom: 1.25em; }

a {
    color: var(--color-primary-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    text-decoration: underline;
}

/* =====================================================
   第4部分: 辅助工具类 (Utility Classes)
   ===================================================== */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }
.block { display: block; }

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.flex-col { flex-direction: column; }

.text-center { text-align: center; }
.text-white { color: #ffffff; }
.text-gray-500 { color: #6c757d; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-normal { font-weight: 400; }

.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-x-8 > * + * { margin-left: 2rem; }

.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-gray-100 { border-color: #f3f4f6; }
.border-gray-200 { border-color: #e5e7eb; }

.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }

.rounded-md { border-radius: 0.375rem; }

.shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1); }

/* 间距 */
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.pt-8 { padding-top: 2rem; }
.pb-8 { padding-bottom: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-12 { margin-top: 3rem; }
.mr-3 { margin-right: 0.75rem; }
.ml-1 { margin-left: 0.25rem; }
.gap-8 { gap: 2rem; }

.w-full { width: 100%; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }

.max-w-none { max-width: none; }

/* 响应式网格 */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 768px) {
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* =====================================================
   第5部分: 顶部信息栏样式
   ===================================================== */
.topbar {
    background-color: var(--color-topbar-bg);
    color: var(--color-text-light);
    padding: 4px 0;
}
.topbar a {
    color: var(--color-text-light);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
}
.topbar a:hover {
    color: var(--color-cta);
    text-decoration: none;
}
.topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =====================================================
   第6部分: 主导航栏样式
   ===================================================== */
.main-nav {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #e7e7e7;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.main-nav .nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo 样式 */
.logo-wrapper {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.logo-wrapper img {
    margin-right: 0.75rem;
}
.logo-wrapper span {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

/* =====================================================
   第7部分: 桌面导航链接样式
   ===================================================== */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: #374151;
    font-weight: 600;
    text-decoration: none;
    padding: 1rem 0;
    display: inline-flex;
    align-items: center;
    border-bottom: 2px solid transparent;
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
}
.nav-link:hover,
.nav-link.active {
    color: var(--color-primary-accent);
    border-bottom-color: var(--color-primary-accent);
    text-decoration: none;
}

/* =====================================================
   第8部分: 下拉菜单样式
   ===================================================== */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 240px;
    width: 260px;
    max-height: 320px;
    overflow-y: auto;
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
    z-index: 1000;
    border-radius: 6px;
    padding: 8px 0;
    border: 1px solid #e5e7eb;
    transition: opacity 0.25s ease, transform 0.25s ease;
    visibility: hidden;
}

.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
}

.dropdown-menu:hover {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-menu a {
    color: #374151;
    padding: 10px 16px;
    display: block;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}
.dropdown-menu a:last-child { border-bottom: none; }
.dropdown-menu a:hover {
    background-color: var(--color-primary-accent);
    color: #ffffff;
    text-decoration: none;
}

/* =====================================================
   第9部分: 行动按钮 (CTA Button) 样式
   ===================================================== */
.cta-button {
    background-color: var(--color-cta);
    color: var(--color-text-light) !important;
    padding: 6px 16px;
    border-radius: 6px;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}
.cta-button:hover {
    background-color: var(--color-cta-hover);
    color: var(--color-text-light) !important;
    text-decoration: none;
}

/* =====================================================
   第10部分: 移动端菜单按钮
   ===================================================== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #374151;
}

/* =====================================================
   第11部分: 移动端侧边菜单
   ===================================================== */
#mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    background: white;
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: 4px 0 15px rgba(0,0,0,0.15);
}

#mobile-menu.open {
    transform: translateX(0);
}

#mobile-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9998;
}
#mobile-overlay.open {
    display: block;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: var(--color-topbar-bg);
    color: white;
}
.mobile-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    line-height: 1;
}

.mobile-nav-link {
    display: block;
    padding: 0.875rem 1.25rem;
    color: #374151;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}
.mobile-nav-link:hover {
    background-color: #f0f9ff;
    color: var(--color-primary-accent);
    text-decoration: none;
}

.mobile-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
}
.mobile-dropdown-toggle:hover {
    background-color: #f0f9ff;
    color: var(--color-primary-accent);
}
.mobile-dropdown-toggle .chevron {
    transition: transform 0.3s ease;
}
.mobile-dropdown-toggle.active .chevron {
    transform: rotate(180deg);
}

.mobile-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #f8fafc;
}
.mobile-dropdown-menu.open {
    max-height: 60vh;
    overflow-y: auto;
}
.mobile-dropdown-menu a {
    display: block;
    padding: 0.6rem 2rem;
    color: #4b5563;
    font-size: 0.8rem;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}
.mobile-dropdown-menu a:hover {
    background-color: #e0f2fe;
    color: var(--color-primary-accent);
    text-decoration: none;
}

/* =====================================================
   第12部分: 文章内容样式
   ===================================================== */
article {
    max-width: none;
    margin: 0 auto;
    padding: 2rem 1rem;
    color: #374151;
    line-height: 1.75;
}
article img {
    max-width: 100%;
    margin: 2rem auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
article table {
    width: 100%;
    margin: 2em 0;
    border-collapse: collapse;
    font-size: 0.9rem;
}
article th, article td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    word-wrap: break-word;
}
article th {
    background-color: #f8f8f8;
    font-weight: bold;
}

/* =====================================================
   第13部分: Footer 样式
   ===================================================== */
footer {
    background-color: var(--color-footer-bg);
    color: var(--color-text-light);
    padding: 3rem 0 1.5rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 3rem;
}
footer h4 {
    color: #1f2937; /* 深色标题在绿色背景上 */
}
footer p {
    color: rgba(255, 255, 255, 0.9);
}
footer a {
    color: var(--color-text-light);
    transition: color 0.3s ease;
}
footer a:hover {
    color: var(--color-cta);
    text-decoration: none;
}
.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}
.footer-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: 0.5rem;
}
.footer-links a {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    transition: color 0.3s ease;
}
.footer-links a:hover {
    color: var(--color-cta);
}
.footer-contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.footer-contact-item svg {
    flex-shrink: 0;
    margin-right: 0.75rem;
    margin-top: 0.25rem;
}
.footer-contact-item p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
}
.footer-bottom {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.8);
}

/* =====================================================
   第14部分: 响应式媒体查询
   ===================================================== */

/* 平板以下 - 显示移动菜单按钮 */
@media (max-width: 1023px) {
    .desktop-nav {
        display: none !important;
    }
    .mobile-menu-btn {
        display: flex !important;
    }
}

/* 桌面及以上 - 显示桌面导航 */
@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none !important;
    }
    .desktop-nav {
        display: flex !important;
    }
}

/* 小屏幕优化 */
@media (max-width: 640px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.3rem; }
    article { padding: 1rem; }
    .topbar-inner {
        flex-direction: column;
        gap: 4px;
        font-size: 0.7rem;
    }
    .footer-inner {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   第15部分: 文章图片样式
   ===================================================== */
.img-medium {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem auto;
    display: block;
}
.img-large {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem auto;
    display: block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}


/* =====================================================
   【强制修复】统一导航栏高度、去除Logo边框、固定顶栏
   适用于所有页面（包括动态加载组件）
   ===================================================== */

/* 1. 固定顶部信息栏（滚动时不隐藏） */
.topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 1001 !important;
    background-color: #1C7C74 !important;
}

.main-nav {
    position: sticky !important;
    top: 30px !important;   /* 顶栏高度约40px，让导航栏从顶栏下方开始 */
    z-index: 1000 !important;
}


/* 3. 降低导航栏高度 - 减小容器上下内边距 */
.main-nav .nav-container {
    padding-top: 0.5rem !important;
    padding-bottom: 0.1rem !important;
}

/* 4. 降低导航栏高度 - 减小菜单链接的上下内边距 */
.nav-link {
    padding-top: 0.5rem !important;
    padding-bottom: 0.1rem !important;
}

/* 5. 彻底移除Logo的任何边框、轮廓、阴影 */
.logo-wrapper img {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}


/* =====================================================
   回到顶部按钮 - 全局样式（所有页面通用）
   ===================================================== */
.back-to-top {
    display: block !important;
    position: fixed !important;
    bottom: 50px !important;
    right: 30px !important;
    background-color: rgba(0, 1, 0, 0.6) !important;
    color: white !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    text-align: center !important;
    line-height: 40px !important;
    font-size: 20px !important;
    text-decoration: none !important;
    z-index: 999 !important;
    cursor: pointer !important;
    transition: background-color 0.3s, opacity 0.3s !important;
    opacity: 0.7 !important;
}

.back-to-top:hover {
    background-color: rgba(0, 0, 0, 0.9) !important;
    text-decoration: none !important;
    opacity: 1 !important;
}

/* 缩小顶端电话栏的上下空间 */
.topbar {
    padding: 2px 0 !important;   /* 原来 4px，减小到 2px */
}
.topbar a {
    line-height: 1.2 !important; /* 减小链接的行高，避免撑高 */
    margin: 0 !important;
    padding: 0 !important;
}
.topbar-inner {
    min-height: 28px !important; /* 控制整体最小高度，可调 */
}

/* 强制 Footer 版权文字居中 */
.footer-bottom {
    text-align: center !important;
}