/**
 * 布局样式文件 - layout.css
 * 包含页面布局组件样式：顶部栏、导航栏、页脚、通用区块等
 * 加载顺序：在base.css之后，页面特定CSS之前
 */

/* ========== 顶部栏样式 (Top Bar) ========== */
.top-bar {
    background-color: #ffffff;
    padding: 12px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
}

.top-bar-logo {
    height: 55px;
    width: auto;
    margin-right: 15px;
    display: block;
}

.top-bar-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-name {
    font-size: 20px;
    font-weight: bold;
    color: #333333;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
    line-height: 1.2;
}

.brand-tagline {
    font-size: 10px;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 2px 0 0 0;
}

.top-bar .contact-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 25px;
    border: none;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    line-height: 1.5;
    transition: all 0.3s ease;
    min-height: 28px;
    font-family: 'Nunito Sans', sans-serif;
    white-space: nowrap;
}

.top-bar .contact-btn i {
    margin-right: 8px;
    font-size: 14px;
}

.top-bar .contact-btn-wrapper {
    gap: 15px;
}

.top-bar .whatsapp-btn {
    background-color: #333333;
}

.top-bar .whatsapp-btn:hover {
    background-color: #222222;
}

.top-bar .email-btn {
    background-color: #007bff;
}

.top-bar .email-btn:hover {
    background-color: #0056b3;
}

/* ========== 导航栏样式 (Navigation Bar) ========== */
.navbar {
    background-color: #ffffff;
    padding: 15px 0;
    position: fixed;
    top: 78px;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 99;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1), 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-nav {
    gap: 40px;
    flex-wrap: nowrap !important;
}

.nav-item-link {
    font-size: 15px !important;
    font-weight: 600 !important;
    font-family: 'Nunito Sans', sans-serif;
    letter-spacing: 1px;
    color: #333333 !important;
    padding: 10px 0 !important;
    transition: color 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-item-link:hover {
    color: #007bff !important;
}

.nav-item.active .nav-item-link {
    color: #007bff !important;
}

.nav-item-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #007bff;
    transition: width 0.3s ease;
}

.nav-item-link:hover::after,
.nav-item.active .nav-item-link::after {
    width: 100%;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

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

.nav-arrow {
    font-size: 12px;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.nav-item-dropdown:hover .nav-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 220px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    padding: 6px 0;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-item-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
}

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

.nav-dropdown-item-wrapper {
    position: relative;
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 22px;
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Nunito Sans', sans-serif;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-dropdown-item:hover {
    color: #007bff;
    background-color: #f8f9fa;
}

.nav-dropdown-arrow {
    font-size: 11px;
    color: #9ca3af;
    transition: transform 0.3s ease;
}

.nav-dropdown-has-child:hover .nav-dropdown-arrow {
    color: #007bff;
    transform: translateX(4px);
}

/* 三级下拉菜单 */
.nav-dropdown-submenu {
    position: absolute;
    top: 0;
    left: 100%;
    transform: translateX(-15px);
    min-width: 200px;
    max-height: 0;
    overflow: hidden;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    padding: 0;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-out, transform 0.2s ease-out, max-height 0.3s ease-out 0.15s, padding 0.3s ease-out 0.15s, visibility 0s linear 0.15s;
    z-index: 1001;
}

.nav-dropdown-has-child:hover .nav-dropdown-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    max-height: 400px;
    padding: 6px 0;
    transition: opacity 0.15s ease-out, transform 0.2s ease-out, max-height 0.3s ease-out, padding 0.3s ease-out, visibility 0s linear 0s;
}

.nav-dropdown-has-child::after {
    content: '';
    position: absolute;
    top: 0;
    right: -10px;
    width: 10px;
    height: 100%;
}

.nav-dropdown-subitem {
    display: block;
    padding: 10px 22px;
    color: #333333;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    font-family: 'Nunito Sans', sans-serif;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-dropdown-subitem:hover {
    color: #007bff;
    background-color: #f8f9fa;
}

/* ========== 页面顶部Banner ========== */
.page-top-banner {
    position: relative;
    min-height: 120px;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-bottom: 0;
}

.page-top-banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #e9ecef;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-top-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.page-top-banner-content {
    position: relative;
    z-index: 2;
    padding: 60px 0;
    color: #ffffff;
}

.page-top-banner-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.page-top-banner-subtitle {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
    line-height: 1.5;
}

@media (max-width: 992px) {
    .page-top-banner { min-height: 100px; }
    .page-top-banner-content { padding: 30px 0; }
    .page-top-banner-title { font-size: 1.125rem; }
    .page-top-banner-subtitle { font-size: 0.6875rem; }
}

@media (max-width: 768px) {
    .page-top-banner { min-height: 80px; }
    .page-top-banner-content { padding: 20px 0; }
    .page-top-banner-title { font-size: 1rem; }
    .page-top-banner-subtitle { font-size: 0.625rem; }
}

/* ========== 页脚样式 (Footer) ========== */
.site-footer {
    background-color: #1f2937;
    color: #ffffff;
    padding: 60px 0 0;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #ffffff;
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.875rem;
}

.footer-address p {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.footer-address i {
    color: #2563eb;
    margin-top: 3px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li { padding: 6px 0; }

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.footer-links a:hover {
    color: #2563eb;
    transform: translateX(4px);
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #2563eb;
    transition: width 0.3s ease;
}

.footer-links a:hover::after { width: 100%; }

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact i {
    color: #2563eb;
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
}

.footer-contact a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    position: relative;
}

.footer-contact a:hover { color: #2563eb; }

.footer-contact a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #2563eb;
    transition: width 0.3s ease;
}

.footer-contact a:hover::after { width: 100%; }

.footer-bottom {
    border-top: 1px solid #374151;
    padding: 25px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-copyright {
    color: #9ca3af;
    font-size: 0.875rem;
    margin: 0;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-legal a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    position: relative;
}

.footer-legal a:hover { color: #2563eb; }

.footer-legal a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #2563eb;
    transition: width 0.3s ease;
}

.footer-legal a:hover::after { width: 100%; }

.footer-divider { color: #6b7280; }

@media (max-width: 992px) {
    .footer-container { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .site-footer { padding: 40px 0 0; }
    .footer-container { grid-template-columns: 1fr; gap: 30px; }
    .footer-bottom-content { flex-direction: column; text-align: center; }
    .footer-legal { justify-content: center; }
}

/* ========== 斜切图片容器样式 ========== */
.slant-img-box {
    position: relative;
    overflow: hidden;
    transform: skewX(-3deg);
    margin-left: -8px;
    margin-right: -8px;
    height: 320px;
}

.slant-img-box img {
    display: block;
    width: calc(100% + 16px);
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transform: skewX(3deg);
    transition: transform 0.3s ease;
    margin-left: -8px;
}

.slant-img-box:hover img {
    transform: skewX(3deg) scale(1.03);
}

.slant-img-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* ========== About区域图文布局样式 ========== */
.about-container {
    gap: 3rem !important;
}

.about-text-block {
    padding-right: 1rem;
}

.about-text-block h3 {
    font-size: 1.8rem;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.about-text-block p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* ========== Stats统计卡片样式 ========== */
.stats-row {
    display: flex;
    align-items: stretch;
}

.stats-card {
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #dee2e6;
    min-height: 120px;
    padding: 1rem 0;
}

.stats-card:last-child { border-right: none; }

.stats-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #007bff;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.stats-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    line-height: 1.4;
}

/* ========== Hero区域样式 ========== */
.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 750px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}