/* Green Theme Header CSS */

/* Top Bar */
.top-bar {
    background: linear-gradient(135deg, #DC2626, #540101);
    color: #fff;
    padding: 8px 0;
    font-size: 13px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info {
    display: flex;
    gap: 20px;
}

.contact-info span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.contact-info i {
    color: #fff;
    font-size: 12px;
}

.top-bar-actions {
    display: flex;
    gap: 12px;
}

.social-link {
    color: #fff;
    text-decoration: none;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Main Header */
.main-header {
    background: #fff;
    border-bottom: 3px solid #DC2626;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.main-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

/* Logo Styles */
.logo {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.02);
}

.logo-icon {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #DC2626, #540101);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    position: relative;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
    transition: all 0.3s ease;
}

.logo-link:hover .logo-icon {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.logo-icon i {
    font-size: 24px;
    color: #fff;
    z-index: 2;
}

/* Logo Image Styles */
.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* Override logo-icon background when using image */
.logo-icon:has(.logo-image) {
    background: transparent !important;
    box-shadow: none !important;
}

.logo-link:hover .logo-icon:has(.logo-image) {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.3) !important;
}

.logo-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

.logo-text h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #DC2626;
    line-height: 1.1;
}

.logo-text p {
    margin: 0;
    font-size: 13px;
    color: #7f8c8d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 2px;
}

/* Navigation Styles */
.main-nav {
    flex: 1;
    margin: 0 50px;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu li {
    position: relative;
    margin: 0 3px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    background: #e8f5e8;
    color: #DC2626;
    transform: translateY(-1px);
}

.nav-menu .active > .nav-link {
    background: #DC2626;
    color: #fff;
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.3);
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

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

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 500px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid #e1e8ed;
    padding: 20px;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 25px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
}

.dropdown-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.dropdown-section h4 {
    color: #DC2626;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #DC2626;
}

.dropdown-section a {
    display: block;
    padding: 6px 0;
    color: #7f8c8d;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 4px;
    padding-left: 10px;
}

.dropdown-section a:hover {
    color: #DC2626;
    background: #f8f9f8;
    padding-left: 15px;
}

/* Services Dropdown - 通用样式 */
.dropdown .dropdown-menu {
    min-width: 500px;
}

.dropdown .dropdown-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* Services Dropdown - 单列布局 */
.dropdown .dropdown-menu:has(.dropdown-content a:not([href*="category"])) {
    min-width: 220px;
}

.dropdown .dropdown-menu:has(.dropdown-content a:not([href*="category"])) .dropdown-content {
    grid-template-columns: 1fr;
    gap: 0;
}

.dropdown .dropdown-menu:has(.dropdown-content a:not([href*="category"])) .dropdown-content a {
    display: block;
    padding: 12px 18px;
    color: #7f8c8d;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin-bottom: 4px;
    border-bottom: 1px solid #f8f9f8;
}

.dropdown .dropdown-menu:has(.dropdown-content a:not([href*="category"])) .dropdown-content a:hover {
    color: #DC2626;
    background: #f8f9f8;
    padding-left: 25px;
}

.dropdown .dropdown-menu:has(.dropdown-content a:not([href*="category"])) .dropdown-content a:last-child {
    border-bottom: none;
}

/* 备用样式 - 使用类名 */
.dropdown.services-dropdown .dropdown-menu {
    min-width: 220px;
}

.dropdown.services-dropdown .dropdown-content {
    grid-template-columns: 1fr;
    gap: 0;
}

.dropdown.services-dropdown .dropdown-content a {
    display: block;
    padding: 12px 18px;
    color: #7f8c8d;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin-bottom: 4px;
    border-bottom: 1px solid #f8f9f8;
}

.dropdown.services-dropdown .dropdown-content a:hover {
    color: #DC2626;
    background: #f8f9f8;
    padding-left: 25px;
}

.dropdown.services-dropdown .dropdown-content a:last-child {
    border-bottom: none;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Search Box */
.search-box {
    position: relative;
}

.search-box form {
    display: flex;
    align-items: center;
    background: #f8f9f8;
    border: 2px solid #e1e8ed;
    border-radius: 25px;
    padding: 10px 18px;
    transition: all 0.3s ease;
}

.search-box form:focus-within {
    background: #fff;
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.search-input {
    background: transparent;
    border: none;
    outline: none;
    color: #2c3e50;
    font-size: 13px;
    width: 180px;
    padding: 4px 8px;
}

.search-input::placeholder {
    color: #95a5a6;
}

.search-btn {
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: #e8f5e8;
    color: #DC2626;
    transform: scale(1.1);
}

/* CTA Button */
.cta-btn {
    background: linear-gradient(135deg, #DC2626, #4a0202);
    color: #fff;
    padding: 12px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.cta-btn:hover::before {
    left: 100%;
}

.cta-btn:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    flex-direction: column;
    gap: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle span {
    width: 22px;
    height: 3px;
    background: #2c3e50;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover span {
    background: #27ae60;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .top-bar {
        display: none;
    }
    
    .header-content {
        height: auto;
        padding: 12px 0;
        flex-wrap: wrap;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid #e1e8ed;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        order: 3;
        width: 100%;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .nav-menu {
        flex-direction: column;
        padding: 15px;
    }
    
    .nav-menu li {
        width: 100%;
        margin: 3px 0;
    }
    
    .nav-link {
        justify-content: flex-start;
        padding: 12px 18px;
        border-radius: 6px;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f8f9f8;
        margin: 6px 0 0 15px;
        border: none;
        border-radius: 6px;
        min-width: auto;
    }
    
    .dropdown-menu::before {
        display: none;
    }
    
    .dropdown-content {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
        order: 2;
    }
    
    .header-actions {
        order: 1;
        margin-left: auto;
        gap: 12px;
    }
    
    .search-input {
        width: 140px;
    }
    
    .logo-text h1 {
        font-size: 24px;
    }
    
    .logo-text p {
        font-size: 11px;
    }
    
    .cta-btn {
        padding: 10px 18px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo-icon {
        width: 45px;
        height: 45px;
        margin-right: 12px;
    }
    
    .logo-icon i {
        font-size: 20px;
    }
    
    .logo-text h1 {
        font-size: 20px;
    }
    
    .search-input {
        width: 110px;
    }
    
    .cta-btn {
        padding: 8px 15px;
        font-size: 11px;
    }
    
    .header-actions {
        gap: 8px;
    }
}

/* Animations & Effects */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-header {
    animation: fadeInDown 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(15px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.logo {
    animation: slideInRight 0.6s ease-out 0.1s both;
}

.nav-menu {
    animation: slideInRight 0.6s ease-out 0.2s both;
}

.header-actions {
    animation: slideInRight 0.6s ease-out 0.3s both;
}

/* Hover Effects */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #27ae60;
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}

.nav-link:hover::after {
    width: 70%;
}

/* Focus States for Accessibility */
.nav-link:focus,
.cta-btn:focus,
.search-input:focus,
.search-btn:focus {
    outline: 2px solid #27ae60;
    outline-offset: 2px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Print Styles */
@media print {
    .top-bar,
    .header-actions,
    .mobile-menu-toggle {
        display: none;
    }
    
    .main-header {
        box-shadow: none;
        border-bottom: 1px solid #ccc;
    }
}