/* ============================================
   QIANMIAO PEPTIDES - Services Page Styles
   Unified design matching other pages
   ============================================ */

/* Page Hero - Match home style */
.page-hero {
    padding: calc(var(--header-height) + var(--topbar-height) + var(--space-16)) 0 var(--space-16);
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
    position: relative;
    overflow: hidden;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.page-hero-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(28, 158, 145, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(28, 158, 145, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 20%, transparent 70%);
}

.page-hero-gradient {
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(28, 158, 145, 0.08) 0%, transparent 60%);
    top: -400px;
    left: 50%;
    transform: translateX(-50%);
}

.page-hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Breadcrumb */
.breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-6);
}

.breadcrumb a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb svg {
    width: 14px;
    height: 14px;
}

.page-hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: var(--space-5);
}

.page-hero-title .accent {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-hero-description {
    font-size: var(--fs-lg);
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

/* Section Styles */
.section-header {
    margin-bottom: var(--space-10);
}

.section-header.center {
    text-align: center;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    background: var(--primary-light);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    line-height: 1.2;
}

.section-description {
    font-size: var(--fs-base);
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.7;
}

.section-header.center .section-description {
    margin: 0 auto;
}

/* Stats Section */
.services-stats {
    padding: var(--space-12) 0;
    background: var(--text-primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
}

.stat-item {
    text-align: center;
    color: var(--white);
}

.stat-value {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    margin-bottom: var(--space-2);
    color: var(--white);
}

.stat-label {
    font-size: var(--fs-sm);
    opacity: 0.7;
}

/* Service Showcase Sections */
.service-showcase {
    padding: var(--space-20) 0;
}

.service-showcase.service-alt {
    background: var(--gray-50);
}

.showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
}

.showcase-grid.reverse {
    direction: rtl;
}

.showcase-grid.reverse > * {
    direction: ltr;
}

.showcase-content h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    line-height: 1.2;
}

.showcase-lead {
    font-size: var(--fs-base);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-6);
}

.showcase-features {
    display: grid;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.feature-item {
    display: flex;
    gap: var(--space-3);
}

.feature-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: 50%;
    flex-shrink: 0;
}

.feature-icon svg {
    width: 14px;
    height: 14px;
    color: var(--primary);
}

.feature-text h4 {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.feature-text p {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Visual Cards */
.visual-card-large {
    background: linear-gradient(135deg, var(--primary) 0%, #0d9488 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-10);
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.visual-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.visual-circles .circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
}

.circle-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.05);
}

.visual-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
}

.visual-icon-large {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-5);
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-icon-large svg {
    width: 40px;
    height: 40px;
}

.visual-content h3 {
    font-size: var(--fs-xl);
    font-weight: 700;
    margin-bottom: var(--space-3);
    color: var(--white);
}

.visual-content p {
    font-size: var(--fs-sm);
    opacity: 0.9;
    max-width: 260px;
    margin: 0 auto;
    line-height: 1.6;
}

/* GMP Card - Dark variant */
.gmp-card {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--gray-800) 100%);
}

.certification-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    position: relative;
    z-index: 1;
}

.cert-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
    text-align: center;
}

.cert-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border-radius: 50%;
}

.cert-icon svg {
    width: 24px;
    height: 24px;
    color: var(--white);
}

.cert-item span {
    font-size: var(--fs-xs);
    font-weight: 500;
}

/* Services Grid Section */
.services-grid-section {
    padding: var(--space-20) 0;
    background: var(--gray-50);
}

.services-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
    margin-top: var(--space-10);
}

.service-card-large {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.service-card-large:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary-light);
}

.service-card-visual {
    padding: var(--space-8);
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(28, 158, 145, 0.02) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon-wrapper {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
}

.card-icon-wrapper svg {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.service-card-body {
    padding: var(--space-6);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-card-body h3 {
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.service-card-body > p {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-4);
}

.service-list {
    list-style: none;
    margin-bottom: var(--space-5);
    flex: 1;
}

.service-list li {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    padding: var(--space-1) 0;
    padding-left: var(--space-5);
    position: relative;
}

.service-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: var(--primary-light);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c9e91' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: 8px;
    background-repeat: no-repeat;
    background-position: center;
}

.service-card-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--primary);
    transition: gap var(--transition-fast);
}

.service-card-link:hover {
    gap: var(--space-3);
}

.service-card-link svg {
    width: 14px;
    height: 14px;
}

/* Process Section */
.process-section {
    padding: var(--space-20) 0;
}

.process-timeline {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-top: var(--space-10);
}

.process-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 140px;
}

.process-number {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--white);
    font-size: var(--fs-lg);
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: var(--space-3);
    box-shadow: 0 4px 15px rgba(28, 158, 145, 0.3);
}

.process-content h3 {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.process-content p {
    font-size: var(--fs-xs);
    color: var(--text-secondary);
    line-height: 1.5;
}

.process-line {
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--gray-200) 100%);
    margin-top: 28px;
    flex-shrink: 0;
}

/* CTA Section - Matching home style */
.cta {
    padding: var(--space-16) 0;
    background: var(--gray-50);
}

.cta-container {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, #0d9488 100%);
    border-radius: var(--radius-2xl);
    padding: var(--space-12) var(--space-10);
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cta-grid-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

.cta-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 60%);
    top: -150px;
    right: -100px;
}

.cta-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-10);
}

.cta-text {
    flex: 1;
}

.cta-title {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--space-2);
}

.cta-description {
    font-size: var(--fs-base);
    color: rgba(255,255,255,0.9);
    max-width: 480px;
    line-height: 1.6;
}

.cta-actions {
    display: flex;
    gap: var(--space-3);
    flex-shrink: 0;
}

.cta-actions .btn {
    padding: 12px 24px;
    font-size: var(--fs-sm);
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.cta-actions .btn-primary {
    background: var(--white);
    color: var(--primary);
    border: none;
}

.cta-actions .btn-primary:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-2px);
}

.cta-actions .btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.4);
}

.cta-actions .btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
}

.btn-icon {
    width: 16px;
    height: 16px;
    margin-left: var(--space-1);
}

/* Responsive */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }
    
    .showcase-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    
    .showcase-grid.reverse {
        direction: ltr;
    }
    
    .services-cards {
        grid-template-columns: 1fr;
    }
    
    .process-timeline {
        flex-wrap: wrap;
        gap: var(--space-6);
    }
    
    .process-line {
        display: none;
    }
    
    .process-step {
        max-width: calc(33.333% - var(--space-4));
    }
    
    .cta-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-6);
    }
    
    .cta-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding: calc(var(--header-height) + var(--topbar-height) + var(--space-10)) 0 var(--space-10);
    }
    
    .page-hero-title {
        font-size: 1.75rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    .service-showcase {
        padding: var(--space-14) 0;
    }
    
    .visual-card-large {
        min-height: 320px;
        padding: var(--space-6);
    }
    
    .certification-grid {
        gap: var(--space-3);
    }
    
    .cert-item {
        padding: var(--space-3);
    }
    
    .service-card-body {
        padding: var(--space-5);
    }
    
    .process-step {
        max-width: 100%;
        width: 100%;
    }
    
    .cta-container {
        padding: var(--space-8) var(--space-5);
    }
    
    .cta-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .cta-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Custom Image Support */
.visual-custom-image {
    background: transparent;
}

.visual-custom-image img {
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
}

.visual-card-large[style*="background-image"] {
    position: relative;
}

.visual-card-large[style*="background-image"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(28, 158, 145, 0.85) 0%, rgba(20, 120, 110, 0.9) 100%);
    border-radius: inherit;
}

.visual-card-large[style*="background-image"] .visual-content {
    position: relative;
    z-index: 1;
}

.cert-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.card-icon-wrapper img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}
