/* ============================================
   星伦数智案例库 - 外部样式表
   主要样式已在 index.html 内联，此文件保留
   Header / Footer / 联系我们下拉 等共享样式
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* --- Site Header --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 64px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.header-inner {
    width: 100%;
    margin: 0;
    padding: 0 32px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #0f172a;
    flex-shrink: 0;
}

.header-logo:hover {
    color: #0f172a;
}

.header-logo img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
}

.header-logo span {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* --- 联系我们下拉 --- */
.header-dropdown {
    position: relative;
}

.header-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-secondary, #4A5568);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-md, 8px);
    transition: all 0.2s;
}

.header-dropdown-trigger:hover {
    color: var(--color-text-primary, #1A202C);
    background: var(--color-bg, #F5F7FA);
}

.dropdown-arrow {
    width: 14px;
    height: 14px;
    transition: transform 0.25s ease;
}

.header-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.header-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border-radius: var(--radius-lg, 12px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    padding: 8px;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 100;
}

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

.dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md, 8px);
    text-decoration: none;
    color: var(--color-text-primary, #1A202C);
    transition: background 0.15s;
}

.dropdown-item:hover {
    background: var(--color-bg, #F5F7FA);
}

.dropdown-item svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--color-primary, #1B5FAA);
}

.dropdown-item-text {
    min-width: 0;
}

.dropdown-item-label {
    font-size: 12px;
    color: var(--color-text-tertiary, #718096);
    margin-bottom: 2px;
}

.dropdown-item-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary, #1A202C);
    line-height: 1.4;
}

/* --- Back Link (详情页专用) --- */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.back-link:hover {
    color: #0f172a;
}

.back-link svg {
    flex-shrink: 0;
}

/* --- Site Footer --- */
.site-footer {
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    padding: 24px 0;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    text-align: center;
}

.footer-inner p {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.footer-inner a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-inner a:hover {
    color: #334155;
}

/* --- Responsive Header --- */
@media (max-width: 900px) {
    .header-dropdown-trigger span {
        display: none;
    }
    .header-dropdown-trigger svg:first-child {
        width: 18px;
        height: 18px;
    }
    .dropdown-arrow {
        display: none;
    }
    .header-dropdown-menu {
        right: -8px;
        min-width: 240px;
    }
}

@media (max-width: 640px) {
    .header-inner {
        padding: 0 16px;
    }
    .site-header {
        height: 56px;
    }
    .header-logo span {
        font-size: 16px;
    }
    .header-logo img {
        width: 28px;
        height: 28px;
    }
    .footer-inner {
        padding: 0 16px;
    }
}
