/* ========================================
   REMON - 广东日明五金实业有限公司
   整理后的样式（去除重复规则）
   ======================================== */

/* === 基础布局 === */
.nav-height {
    height: 60px;
}

/* === 导航按钮 === */
.nav-button {
    position: relative;
    z-index: 60;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    font-size: 1rem;
    color: #4B5563;
    transition: color 0.3s, transform 0.3s;
    overflow: hidden;
}

.nav-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #3b82f6;
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-button:hover {
    color: #3b82f6;
    transform: translateY(-2px);
}

.nav-button:hover::after {
    width: 100%;
    left: 0;
}

.nav-button:active {
    transform: scale(0.95);
}

/* === 导航栏 === */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 50;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.3s ease,
                box-shadow 0.3s ease;
}

header.nav-hidden {
    transform: translateY(-100%);
}

header.nav-scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

nav {
    position: relative;
    z-index: 51;
}

.logo-size {
    height: 300px;
    width: auto;
}

/* === RTL 支持 === */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* === 语言切换下拉菜单 === */
.language-dropdown {
    position: relative;
    display: inline-block;
    z-index: 1000;
}

.globe-icon-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px;
    border-radius: 4px;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    transition: transform 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
    outline: none;
    z-index: 1000;
}

.globe-icon-wrapper:hover {
    transform: translateY(-2px);
}

.globe-icon-wrapper:active {
    transform: translateY(1px);
}

.globe-icon {
    font-size: 1.25rem;
    color: #4B5563;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.globe-icon-wrapper:hover .globe-icon {
    transform: rotate(360deg);
}

.dropdown-arrow {
    font-size: 0.8rem;
    color: #4B5563;
    transition: transform 0.2s;
}

.language-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.language-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    z-index: 1001;
    border: 1px solid #e5e7eb;
    padding: 4px 0;
    transform-origin: top right;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: scale(0.95);
    opacity: 0;
}

.language-dropdown-content.show {
    display: block;
    transform: scale(1);
    opacity: 1;
}

.language-dropdown-content::before {
    content: '';
    position: absolute;
    top: -5px;
    right: 20px;
    width: 10px;
    height: 10px;
    background-color: #fff;
    transform: rotate(45deg);
    border-left: 1px solid #e5e7eb;
    border-top: 1px solid #e5e7eb;
    z-index: 999;
}

.language-option {
    width: 100%;
    text-align: left;
    padding: 8px 16px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    color: #4B5563;
    -webkit-user-select: none;
    user-select: none;
    position: relative;
    z-index: 1002;
}

.language-option:hover {
    background-color: #f3f4f6;
    transform: translateX(5px);
}

.language-option:focus {
    outline: none;
    background-color: #e5e7eb;
}

/* === Hero 背景图 === */
.hero-bg {
    background-image: url('../TP/衣柜1.webp');
}

@media (min-width: 768px) {
    .hero-bg {
        background-image: url('../TP/衣柜.webp');
    }
}

/* === Hero 文字渐入动画 === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#hero h1 { animation: fadeInUp 0.8s ease-out; }
#hero h2 { animation: fadeInUp 0.8s ease-out 0.2s both; }
#hero img { animation: fadeInUp 0.8s ease-out 0.4s both; }
#hero p   { animation: fadeInUp 0.8s ease-out 0.6s both; }

/* === 产品区域背景色 === */
#products, #hinges {
    background-color: #f8f9fa;
}

/* === 产品卡片（统一） === */
.product-card {
    background-color: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-card img {
    transition: transform 0.3s ease;
}

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

.product-card h3 {
    color: #000000;
}

.product-card p {
    color: #000000;
}

/* === 铰链卡片展开/收缩 === */
.hinge-card {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
}

.hinge-card:hover {
    transform: translateY(-5px);
}

.hinge-category {
    width: 100%;
}

.hinge-category h3 {
    color: #000000;
}

.hinge-category p {
    color: #000000;
}

.expand-indicator {
    position: static;
    transform: none;
    background: #2563eb;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 1;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
    animation: pulse 2s infinite;
    z-index: 20;
    margin: 0 auto;
    width: fit-content;
}

@keyframes pulse {
    0%   { box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3); transform: scale(1); }
    50%  { box-shadow: 0 4px 12px rgba(37, 99, 235, 0.5); transform: scale(1.05); }
    100% { box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3); transform: scale(1); }
}

.hinge-card.expanded .expand-indicator {
    background: #dc2626;
    animation: none;
}

.expand-indicator i {
    transition: transform 0.3s ease;
}

.hinge-card.expanded .expand-indicator i {
    transform: rotate(180deg);
}

/* === 铰链展开内容 === */
.hinge-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.3s ease-out;
    width: 100%;
    margin-top: 1rem;
}

.hinge-content.expanded {
    max-height: 3000px;
    opacity: 1;
}

.hinge-content > div {
    background-color: #edf2f7;
}

.hinge-content.expanded > div {
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.hinge-content .product-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
}

.hinge-content .product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.hinge-content .bg-white {
    background-color: #ffffff;
}

/* RTL 铰链定位重置 */
[dir="ltr"] .hinge-category:nth-child(2) .hinge-content,
[dir="ltr"] .hinge-category:nth-child(3) .hinge-content,
[dir="rtl"] .hinge-category:nth-child(2) .hinge-content,
[dir="rtl"] .hinge-category:nth-child(3) .hinge-content {
    left: auto;
    right: auto;
}

.rotate-icon {
    transition: transform 0.3s ease;
}

.rotate-icon.expanded {
    transform: rotate(180deg);
}

/* === 特性图标动画 === */
@keyframes iconPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.feature-icon {
    transition: transform 0.3s ease;
}

.feature-icon:hover {
    animation: iconPulse 1s infinite;
}

/* === 滚动显示动画 === */
.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* === 波纹效果 === */
.ripple {
    position: absolute;
    background: rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}

/* === 视频模态框 === */
.video-container {
    margin: 20px 0;
    text-align: center;
}

.video-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin: 0 auto;
}

.video-btn i {
    margin-right: 8px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

.modal-content {
    position: relative;
    width: 80%;
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
}

.close-btn {
    position: absolute;
    right: 0;
    top: -30px;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

#productVideo {
    width: 100%;
    height: auto;
}

/* === Logo 切换 === */
.logo-light { display: block !important; }
.logo-dark  { display: none !important; }

/* === 暗黑模式切换按钮动画 === */
#darkModeToggle i, #mobileDarkModeToggle i {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#darkModeToggle:hover i, #mobileDarkModeToggle:hover i {
    transform: rotate(360deg) scale(1.1);
}

/* === 表单样式 === */
input, textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, textarea:focus {
    transform: translateY(-2px);
}

button[type="submit"] {
    transition: transform 0.2s ease, background-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
}

button[type="submit"]:active {
    transform: translateY(1px);
}

/* === RTL 视频按钮 === */
[dir="rtl"] .video-btn i {
    margin-right: 0;
    margin-left: 8px;
}

/* ========================================
   响应式
   ======================================== */
@media (max-width: 640px) {
    .logo-size { height: 200px; }

    #hero h1, #hero h2 {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    #hero p { font-size: 1.5rem; }

    .product-card { padding: 0.5rem; }
    .product-card h3 { font-size: 1.1rem; }
    .product-card p { font-size: 0.9rem; }
}

@media (max-width: 768px) {
    .hinge-content { width: 100%; }
}

@media (max-width: 360px) {
    .logo-size { height: 150px; }
    #hero h1, #hero h2 { font-size: 2rem; }
    .nav-height { height: 50px; }
}

/* ========================================
   暗黑模式（统一）
   ======================================== */
.dark body {
    background-color: #111827;
    color: #f3f4f6;
}

.dark .logo-light { display: none !important; }
.dark .logo-dark  { display: block !important; }

.dark header {
    background-color: rgba(17, 24, 39, 0.85);
    border-bottom: 1px solid rgba(75, 85, 99, 0.3);
}

.dark header.nav-scrolled {
    background-color: rgba(17, 24, 39, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.dark .nav-button {
    color: #e5e7eb;
}

.dark .nav-button:hover {
    color: #60a5fa;
    background-color: rgba(75, 85, 99, 0.2);
}

.dark .nav-button::after {
    background: #60a5fa;
}

.dark .ripple {
    background: rgba(96, 165, 250, 0.3);
}

.dark .bg-white {
    background-color: #1f2937;
}

.dark .text-gray-900 {
    color: #f3f4f6;
}

.dark .shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2),
                0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.dark #features,
.dark #technical {
    background-color: #111827;
}

.dark #products, .dark #hinges {
    background-color: #1a1f2d;
}

/* 暗黑 - 语言下拉 */
.dark .language-dropdown-content {
    background-color: #1f2937;
    border-color: #374151;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.dark .language-option {
    color: #f3f4f6;
}

.dark .language-option:hover {
    background-color: #374151;
}

.dark .globe-icon-wrapper {
    background-color: #1f2937;
    border-color: #374151;
    color: #f3f4f6;
}

.dark .globe-icon-wrapper:hover {
    background-color: #374151;
}

/* 暗黑 - 移动端菜单 */
.dark #mobileMenu {
    background-color: #1f2937;
    border-top: 1px solid rgba(75, 85, 99, 0.3);
}

.dark #mobileLangSelect {
    background-color: #1f2937;
    color: #f3f4f6;
    border-color: #374151;
}

/* 暗黑 - 页脚 */
.dark footer {
    background-color: #0f172a;
    border-top: 1px solid rgba(75, 85, 99, 0.2);
}

/* 暗黑 - 表单 */
.dark input,
.dark textarea {
    background-color: #1f2937;
    color: #f3f4f6;
    border-color: #374151;
}

.dark input:focus,
.dark textarea:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.dark button[type="submit"] {
    background-color: #3b82f6;
    transition: background-color 0.2s;
}

.dark button[type="submit"]:hover {
    background-color: #2563eb;
}

/* 暗黑 - 产品卡片（统一） */
.dark .product-card {
    background-color: #1f2937;
    border: 1px solid rgba(75, 85, 99, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dark .product-card:hover {
    transform: translateY(-5px);
    border-color: rgba(75, 85, 99, 0.4);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.dark .product-card h3 {
    color: #ffffff;
}

.dark .product-card p {
    color: #9ca3af;
}

/* 暗黑 - 铰链卡片 */
.dark .hinge-card {
    background-color: #1f2937;
    border: 1px solid #374151;
}

.dark .hinge-category h3 {
    color: #ffffff;
}

.dark .hinge-category p {
    color: #9ca3af;
}

/* 暗黑 - 铰链展开内容 */
.dark .hinge-content > div {
    background-color: #1a202c;
}

.dark .hinge-content.expanded > div {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dark .hinge-content .product-card {
    background-color: #2d3748;
    border: 1px solid #4a5568;
}

.dark .hinge-content .product-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.12);
}

.dark .hinge-content .bg-white {
    background-color: #1f2937;
}

/* 暗黑 - 特性图标背景 */
.dark .bg-blue-100   { background-color: rgba(59, 130, 246, 0.1); }
.dark .bg-green-100  { background-color: rgba(16, 185, 129, 0.1); }
.dark .bg-red-100    { background-color: rgba(239, 68, 68, 0.1); }
.dark .bg-yellow-100 { background-color: rgba(245, 158, 11, 0.1); }
