/**
 * Case Study Template Styles - Aligned with Homepage Design System
 * Version: 2.0.0
 * Last Updated: 2025
 * Based on homepage-unified.css patterns for consistency
 * 
 * Key Updates:
 * - Unified hover effects (translateY(-8px) instead of -5px)
 * - Consistent shadow intensities with homepage
 * - Standardized section padding (80px)
 * - Matching gradient patterns and animations
 * - Typography aligned with Sora/Inter font system
 */

/* ===== Design System Variables - Matching Homepage ===== */
:root {
    --primary-color: #2C3E50;
    --secondary-color: #E74C3C;
    --accent-color: #F39C12;
    --text-primary: #2C3E50;
    --text-secondary: #5A6C7D;
    --background-light: #F8F9FA;
    --background-white: #FFFFFF;
    --border-color: #E1E8ED;
    
    /* Gradient definitions matching homepage */
    --gradient-primary: linear-gradient(90deg, var(--primary-color) 0%, #3498DB 100%);
    --gradient-cta: linear-gradient(90deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    --gradient-dark: linear-gradient(135deg, var(--primary-color) 0%, #34495E 100%);
}

/* Hero Section - Consistent with Homepage Hero */
.case-study-hero {
    padding: 120px 0 80px;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.case-study-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="white" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.1;
}

.case-study-hero .hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.case-category {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 20px;
}

.case-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.case-subtitle {
    font-size: 20px;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 40px;
}

.hero-stats {
    margin-top: 40px;
}

.hero-stats .wp-block-column {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.hero-stats .stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.hero-stats .stat-label {
    display: block;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.hero-image img {
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    height: auto;
}

/* Section Styling - Aligned with Homepage */
.case-study-hero + .wp-block-group.section,
.wp-block-group.section {
    padding: 80px 0;
    position: relative;
    z-index: 10;
}

/* Section Title - Matching Homepage Pattern */
.section h2,
.section-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-family: 'Sora', sans-serif;
    position: relative;
    padding-bottom: 20px;
    text-align: center;
}

.section h2::after,
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #E74C3C 0%, #F39C12 100%);
    border-radius: 2px;
}

.section h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.section p,
.section-subtitle {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section ul {
    margin-left: 0;
    padding-left: 0;
}

.section ul li {
    list-style: none;
    padding-left: 30px;
    position: relative;
    margin-bottom: 12px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.section ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* Solution Features */
.solution-features {
    margin-top: 40px;
    gap: 30px;
}

/* Solution Features - Matching Homepage Card Pattern */
.solution-features .wp-block-column {
    background: var(--background-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: visible;
}

.solution-features .wp-block-column::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, #3498DB 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.solution-features .wp-block-column:hover::before {
    transform: scaleX(1);
}

.solution-features .wp-block-column:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 40px;
    margin-top: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 40px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -35px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 4px solid var(--background-white);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-date {
    display: inline-block;
    background: var(--primary-color);
    color: var(--background-white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.timeline-item h4 {
    font-size: 20px;
    font-weight: 600;
    margin: 10px 0;
    color: var(--text-primary);
}

.timeline-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Results Section */
.case-results {
    background: var(--gradient-primary);
    padding: 80px 0;
    margin: 80px 0;
}

.results-grid {
    margin-top: 40px;
    gap: 30px;
}

/* Result Cards - Consistent with Homepage Cards */
.result-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.result-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.result-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 20px;
}

.result-card h3 {
    color: var(--background-white);
    font-size: 22px;
    margin-bottom: 15px;
}

.result-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.6;
}

/* Testimonial */
.case-testimonial {
    padding: 80px 0;
    background: var(--background-light);
}

.case-testimonial blockquote {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    border-left: none;
    padding: 0;
}

.case-testimonial blockquote p {
    font-size: 24px;
    line-height: 1.8;
    color: var(--text-primary);
    font-style: italic;
    margin-bottom: 20px;
}

.case-testimonial blockquote cite {
    font-size: 16px;
    color: var(--text-secondary);
    font-style: normal;
    font-weight: 600;
}

/* Tech Stack */
.tech-grid {
    margin-top: 40px;
    gap: 30px;
}

/* Tech Grid - Consistent with Homepage Patterns */
.tech-grid .wp-block-column {
    background: var(--background-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.tech-grid .wp-block-column:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.tech-grid h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.tech-list {
    list-style: none;
    padding: 0;
}

.tech-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
    color: var(--text-secondary);
}

.tech-list li:last-child {
    border-bottom: none;
}

.tech-list li::before {
    content: '→';
    margin-right: 10px;
    color: var(--accent-color);
}

/* CTA Section */
.case-cta {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(to bottom, var(--background-white), var(--background-light));
}

.case-cta h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-family: 'Sora', sans-serif;
}

.case-cta p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.case-cta .wp-block-buttons {
    gap: 20px;
}

/* Button Styles - Consistent with Homepage */
.case-cta .wp-block-button__link,
.wp-block-button__link {
    padding: 15px 35px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.case-cta .is-style-fill .wp-block-button__link {
    background: var(--gradient-cta);
    color: var(--background-white);
}

.case-cta .is-style-fill .wp-block-button__link:hover {
    background: var(--gradient-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(231, 76, 60, 0.3);
}

.case-cta .is-style-outline .wp-block-button__link {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.case-cta .is-style-outline .wp-block-button__link:hover {
    background: var(--primary-color);
    color: var(--background-white);
}

/* ROI Section */
.case-roi {
    padding: 60px 0;
}

.case-roi h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.case-roi ul {
    background: var(--background-light);
    padding: 25px;
    border-radius: 10px;
}

/* Recognition Section */
.case-recognition {
    padding: 60px 0;
    background: var(--background-light);
}

.case-recognition .wp-block-column {
    text-align: center;
    padding: 20px;
}

.case-recognition strong {
    display: block;
    margin-bottom: 10px;
    font-size: 18px;
    color: var(--primary-color);
}

/* Future Section */
.case-future h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Responsive Design - Aligned with Homepage */
@media (max-width: 768px) {
    .case-study-hero {
        padding: 80px 0 60px;
    }
    
    .section {
        padding: 60px 20px;
    }
    
    .case-title {
        font-size: 32px;
    }
    
    .section h2,
    .section-title {
        font-size: 32px;
    }
    
    .case-subtitle {
        font-size: 18px;
    }
    
    .hero-stats .wp-block-columns {
        display: block;
    }
    
    .hero-stats .wp-block-column {
        margin-bottom: 15px;
    }
    
    .solution-features .wp-block-columns,
    .results-grid,
    .tech-grid {
        display: block;
    }
    
    .solution-features .wp-block-column,
    .result-card,
    .tech-grid .wp-block-column {
        margin-bottom: 20px;
    }
    
    .timeline {
        padding-left: 20px;
    }
    
    .timeline::before {
        left: 0;
    }
    
    .timeline-item::before {
        left: -10px;
        width: 16px;
        height: 16px;
    }
}

/* Animations - Consistent with Homepage */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeInUp 0.8s ease-out backwards;
}

/* Section Backgrounds - Alternating like Homepage */
.wp-block-group.section:nth-child(even) {
    background: var(--background-light);
}

.wp-block-group.section:nth-child(odd) {
    background: var(--background-white);
}

/* Loading Animation */
.case-study-hero .hero-content > * {
    animation: fadeInUp 0.8s ease-out backwards;
}

.case-study-hero .hero-content > :nth-child(1) { animation-delay: 0.1s; }
.case-study-hero .hero-content > :nth-child(2) { animation-delay: 0.2s; }
.case-study-hero .hero-content > :nth-child(3) { animation-delay: 0.3s; }
.case-study-hero .hero-content > :nth-child(4) { animation-delay: 0.4s; }