/* =================================================================
   Phase 3: Service Description Enhancements
   Problem-Solution-Results format with visual storytelling
   ================================================================= */

/* ===== ENHANCED SERVICE CARDS WITH PSR FORMAT ===== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.service-card {
    position: relative;
    background: var(--card-bg);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    border: 2px solid var(--border-primary);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Decorative gradient background */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-primary);
}

/* Service-specific color accents */
.service-card.strategy::before {
    background: linear-gradient(90deg, var(--strategy-accent), var(--strategy-border));
}

.service-card.platform::before {
    background: linear-gradient(90deg, var(--platform-accent), var(--platform-border));
}

.service-card.security::before {
    background: linear-gradient(90deg, var(--security-accent), var(--security-border));
}

/* ===== SERVICE ICON ===== */

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-secondary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    position: relative;
    transition: all 0.4s ease;
}

.service-icon i {
    font-size: 36px;
    color: var(--accent-primary);
    transition: all 0.4s ease;
}

.service-card:hover .service-icon {
    transform: rotateY(360deg) scale(1.1);
}

.service-card.strategy .service-icon i {
    color: var(--strategy-accent);
}

.service-card.platform .service-icon i {
    color: var(--platform-accent);
}

.service-card.security .service-icon i {
    color: var(--security-accent);
}

/* Icon glow effect */
.service-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.service-card:hover .service-icon::after {
    opacity: 0.3;
}

/* ===== SERVICE HEADER ===== */

.service-title {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.service-card:hover .service-title {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.service-tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ===== PROBLEM-SOLUTION-RESULTS SECTIONS ===== */

.psr-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.psr-section:hover {
    transform: translateX(8px);
}

.psr-section.problem {
    border-left-color: #ef4444;
}

.psr-section.solution {
    border-left-color: var(--strategy-accent);
}

.psr-section.results {
    border-left-color: var(--platform-accent);
}

.psr-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.psr-label i {
    font-size: 16px;
}

.psr-section.problem .psr-label {
    color: #ef4444;
}

.psr-section.solution .psr-label {
    color: var(--strategy-accent);
}

.psr-section.results .psr-label {
    color: var(--platform-accent);
}

.psr-content {
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.psr-content ul {
    margin: 1rem 0 0 0;
    padding-left: 1.5rem;
}

.psr-content li {
    margin-bottom: 0.5rem;
}

/* ===== KEY DELIVERABLES ===== */

.service-deliverables {
    margin-top: 2rem;
}

.deliverables-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.deliverables-title i {
    color: var(--accent-primary);
}

.deliverables-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.deliverable-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.deliverable-item:hover {
    transform: translateX(4px);
    background: var(--card-bg);
}

.deliverable-item i {
    color: var(--platform-accent);
    font-size: 14px;
    margin-top: 2px;
}

/* ===== METRICS SHOWCASE ===== */

.service-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 16px;
}

.metric-box {
    text-align: center;
}

.metric-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.metric-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== CTA BUTTON ===== */

.service-cta {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

.service-btn {
    flex: 1;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.service-btn.primary {
    background: var(--accent-primary);
    color: white;
    border: 2px solid var(--accent-primary);
}

.service-btn.primary:hover {
    background: var(--gradient-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 128, 78, 0.3);
}

.service-btn.secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-primary);
}

.service-btn.secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

/* ===== EXPANDABLE DETAILS ===== */

.service-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-details.expanded {
    max-height: 2000px;
}

.service-expand-btn {
    margin-top: 1.5rem;
    width: 100%;
    padding: 12px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.service-expand-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.service-expand-btn i {
    transition: transform 0.3s ease;
}

.service-expand-btn.expanded i {
    transform: rotate(180deg);
}

/* ===== PROCESS STEPS ===== */

.service-process {
    margin-top: 2rem;
}

.process-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.process-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.process-step {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.process-step::before {
    content: '';
    position: absolute;
    left: 42px;
    top: 60px;
    width: 2px;
    height: calc(100% + 1rem);
    background: var(--border-primary);
}

.process-step:last-child::before {
    display: none;
}

.process-step:hover {
    transform: translateX(8px);
    background: var(--card-bg);
}

.step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--accent-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    position: relative;
    z-index: 1;
}

.service-card.strategy .step-number {
    background: var(--strategy-accent);
}

.service-card.platform .step-number {
    background: var(--platform-accent);
}

.service-card.security .step-number {
    background: var(--security-accent);
}

.step-content h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }

    .service-metrics {
        grid-template-columns: repeat(3, 1fr);
    }

    .deliverables-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 2rem 1.5rem;
    }

    .service-icon {
        width: 60px;
        height: 60px;
    }

    .service-icon i {
        font-size: 28px;
    }

    .service-title {
        font-size: 1.5rem;
    }

    .service-metrics {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .metric-box {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .metric-number {
        font-size: 1.5rem;
    }

    .service-cta {
        flex-direction: column;
    }

    .process-step {
        flex-direction: column;
        gap: 1rem;
    }

    .process-step::before {
        left: 23px;
        top: 60px;
    }
}

@media (max-width: 480px) {
    .psr-section {
        padding: 1rem;
    }

    .service-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* ===== DARK THEME ADJUSTMENTS ===== */

[data-theme="dark"] .service-card {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .service-icon {
    background: rgba(15, 23, 42, 0.8);
}

[data-theme="dark"] .psr-section {
    background: rgba(15, 23, 42, 0.8);
}

[data-theme="dark"] .service-metrics {
    background: rgba(15, 23, 42, 0.8);
}

[data-theme="dark"] .deliverable-item {
    background: rgba(15, 23, 42, 0.8);
}

[data-theme="dark"] .process-step {
    background: rgba(15, 23, 42, 0.8);
}

[data-theme="dark"] .service-expand-btn {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}
