/* 红太阳广告网站 - 升级版CSS */
:root {
    --primary: #E60012;
    --primary-dark: #C4000F;
    --primary-light: #ffe5e8;
    --gold: #D4AF37;
    --text: #2c2c2c;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
    --bg: #F8F9FB;
    --white: #fff;
    --border: #e5e7eb;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --shadow-hover: 0 20px 50px rgba(230,0,18,0.15);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--white);
}

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

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

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

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(230,0,18,0.25);
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230,0,18,0.4);
}
.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-secondary:hover {
    background: var(--primary);
    color: white;
}
.btn-white {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* 导航栏 */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text);
    font-size: 20px;
    font-weight: bold;
}
.logo-icon {
    font-size: 28px;
    margin-right: 8px;
}
.logo-text { color: var(--primary); }
.nav {
    display: flex;
    gap: 28px;
    align-items: center;
}
.nav a {
    text-decoration: none;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
    padding: 6px 2px;
}
.nav a:hover,
.nav a.active {
    color: var(--primary);
}
.nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2.5px;
    background: var(--primary);
    border-radius: 2px;
}
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text);
}
.mobile-menu {
    display: none;
    background: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.mobile-menu a {
    display: block;
    padding: 12px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid #eee;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 120px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(230,0,18,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}
.hero-content {
    position: relative;
    z-index: 1;
}
.hero h1 {
    font-size: 56px;
    margin-bottom: 20px;
    font-weight: 700;
}
.hero p {
    font-size: 20px;
    margin-bottom: 10px;
    opacity: 0.9;
}
.hero-buttons {
    margin-top: 40px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Section */
.section {
    padding: 90px 0;
}
.section-gray {
    background: var(--bg);
}
.section-dark {
    background: #1a1a2e;
    color: white;
}

.section-dark {
    background: #1a1a2e;
    color: white;
}

.section-dark {
    background: #1a1a2e;
    color: white;
}

.section-red {
    background: var(--primary);
    color: white;
}

/* Section Title 升级（兼容旧HTML：h2.section-title + p.section-subtitle） */
.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    position: relative;
    display: block;
}
.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--primary);
    margin: 18px auto 0;
    border-radius: 2px;
}
.section-subtitle {
    text-align: center;
    font-size: 16px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 50px;
    line-height: 1.7;
}
.section-title-white {
    color: white;
}
.section-title-white::after {
    background: var(--gold);
}
.section-subtitle-white {
    color: rgba(255,255,255,0.85);
}
.text-center { text-align: center; }

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}
.page-header h1 { font-size: 42px; margin-bottom: 15px; }
.page-header p { font-size: 18px; opacity: 0.9; }

/* Services - 5列优化 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}
.service-card {
    background: white;
    padding: 36px 22px 30px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid transparent;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #ff4444);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s;
}
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(230,0,18,0.1);
}
.service-card:hover::before {
    transform: scaleX(1);
}
.service-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    background: linear-gradient(135deg, var(--primary-light), #fff5f6);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    line-height: 1;
    transition: var(--transition);
}
.service-card:hover .service-icon {
    transform: scale(1.05) rotate(-5deg);
}
.service-card h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
}
.service-card p {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.6;
}

/* Portfolio - 4列优化 + 白底卡片 */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.portfolio-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}
.portfolio-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(230,0,18,0.2);
}
.portfolio-img {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #f0f2f5;
    transition: transform 0.5s;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}
.portfolio-card:hover .portfolio-img {
    transform: scale(1.05);
}
.portfolio-info {
    padding: 20px 18px;
    background: white;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.portfolio-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.portfolio-info p {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-top: auto;
    align-self: flex-start;
}

.filter-tags {
    text-align: center;
    margin-bottom: 30px;
}
.filter-tag {
    display: inline-block;
    padding: 8px 20px;
    margin: 5px;
    border-radius: 20px;
    background: white;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.3s;
}
.filter-tag:hover,
.filter-tag.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.feature-item {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition);
}
.feature-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-4px);
}
.feature-icon {
    font-size: 36px;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: rgba(230,0,18,0.18);
    border-radius: 50%;
}
.feature-item h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: white;
}
.feature-item p {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    line-height: 1.6;
}

/* About */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}
.about-content h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--text);
}
.about-content p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 20px;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}
.contact-info h2,
.contact-form h2 {
    font-size: 24px;
    margin-bottom: 30px;
}
.contact-info p {
    margin-bottom: 15px;
    font-size: 16px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'><circle cx='30' cy='30' r='1' fill='rgba(255,255,255,0.1)'/></svg>");
    opacity: 0.5;
}
.cta-section h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
}
.cta-section p {
    font-size: 17px;
    margin-bottom: 32px;
    opacity: 0.95;
    position: relative;
}
.cta-section .btn { position: relative; }

/* Footer */
.footer {
    background: #1a1a2e;
    color: white;
    padding: 60px 0 20px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--gold);
}
.footer-col p,
.footer-col a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
}
.footer-col a:hover { color: white; }
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    color: rgba(255,255,255,0.5);
}
.footer-icp {
    margin-top: 8px;
    font-size: 12px;
    color: #aaa;
}
.footer-icp a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-icp a:hover { color: #fff; }
.footer-icp img {
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
}

/* Responsive */
@media (max-width: 1100px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav { display: none; }
    .mobile-menu-toggle { display: block; }
    .mobile-menu.active { display: block; }
    .hero { padding: 80px 0; }
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .section { padding: 60px 0; }
    .section-title { font-size: 28px; }
    .section-subtitle { margin-bottom: 36px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .cta-section h2 { font-size: 26px; }
}

@media (max-width: 480px) {
    .services-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}


.portfolio-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}
.portfolio-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255,255,255,0.04) 20px, rgba(255,255,255,0.04) 21px);
    pointer-events: none;
}
.placeholder-text {
    color: white;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 4px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.placeholder-icon {
    font-size: 42px;
    opacity: 0.6;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Portfolio 占位符（无图片时显示）- 浅色克制版 */
.portfolio-placeholder {
    background: linear-gradient(135deg, #f8f9fb 0%, #e9ecef 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}
.portfolio-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 30% 40%, rgba(230, 0, 18, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(212, 175, 55, 0.04) 0%, transparent 50%);
    pointer-events: none;
}
.portfolio-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 14px, rgba(0,0,0,0.025) 14px, rgba(0,0,0,0.025) 15px);
    pointer-events: none;
}
.placeholder-text {
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 3px;
    position: relative;
    z-index: 1;
    opacity: 0.85;
}
.placeholder-text::after {
    content: '';
    display: block;
    width: 28px;
    height: 2px;
    background: var(--primary);
    margin: 8px auto 0;
    border-radius: 2px;
    opacity: 0.7;
}
.placeholder-hint {
    color: var(--text-lighter);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
    margin-top: 4px;
}
.placeholder-icon {
    display: none;
}

/* 占位符品牌水印（右上角小红方块） */
.portfolio-placeholder::before {
    background-image:
        radial-gradient(circle at 30% 40%, rgba(230, 0, 18, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(212, 175, 55, 0.04) 0%, transparent 50%);
}
/* 占位符品牌水印 - 加强版 */
.portfolio-placeholder .brand-mark {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #e60012 0%, #b8000e 100%);
    color: #ffffff !important;
    border-radius: 8px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    font-family: var(--font-cn);
    z-index: 999 !important;
    box-shadow: 0 3px 10px rgba(230, 0, 18, 0.35);
    opacity: 1;
    pointer-events: none;
    letter-spacing: 0;
}
