/* Optimized additional-styles.css - Performance Enhanced for Non-Homepage Pages */

/* Projects page styles */
.projects-header {
    background-color: #f8f9fa;
    padding: 4rem 0 2rem;
    border-bottom: 1px solid #e0e0e0;
    contain: layout style paint;
}

.project-card {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
    contain: layout style;
    will-change: transform;
    transform: translateZ(0);
    min-height: 400px; /* Prevent layout shift */
}

.project-card .project-cta {
    width: 100%;
    margin-top: 2rem;
}

.project-card .tech-stack {
    margin-bottom: 0;
}

.project-card .tech-stack p {
    margin-bottom: 0;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.project-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    aspect-ratio: 16/9; /* Prevent layout shift */
    min-height: 200px;
}

.project-card h2 {
    color: #333;
    margin: 1rem 0;
    font-size: 1.75rem;
}

.project-card h3 {
    color: #555;
    margin: 1.5rem 0 0.75rem;
    font-size: 1.25rem;
}

.project-description {
    color: #666;
    margin-bottom: 1.5rem;
}

.project-card ul {
    padding-left: 1.25rem;
    margin-bottom: 1.5rem;
    color: #555;
}

.project-card li {
    margin-bottom: 0.5rem;
}

.tech-stack {
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.tech-stack p {
    color: #666;
    margin: 0;
}

.cta-section {
    background-color: #f8f9fa;
    padding: 4rem 0;
    margin-top: 2rem;
    border-top: 1px solid #e0e0e0;
    contain: layout style;
}

/* Pricing Header - Optimized for LCP */
.pricing-header {
    background: linear-gradient(135deg, rgb(56, 87, 155) 0%, rgb(25, 40, 80) 100%);
    padding: 6rem 0 3rem;
    color: #fff;
    margin-bottom: 2rem;
    contain: layout style paint;
    will-change: auto;
}

.pricing-header h1 {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Pricing Categories */
.pricing-categories {
    padding: 1rem 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.pricing-category {
    padding-bottom: 4rem;
    contain: layout style;
}

.core-services-section {
    padding: 4rem 0 3rem;
    contain: layout style;
}

.core-services-section h2 {
    color: #333;
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.core-services-section p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.category-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0;
    flex-wrap: wrap;
}

.category-buttons .btn {
    padding: 0.5rem 1.5rem;
    min-width: 120px;
    border: 2px solid rgb(56, 87, 155);
    transition: all 0.3s ease;
    will-change: background-color, color;
}

.category-buttons .btn.active {
    background-color: rgb(56, 87, 155);
    color: white;
    border-color: rgb(56, 87, 155);
}

.category-buttons .btn:not(.active) {
    background-color: transparent;
    color: rgb(56, 87, 155);
    border-color: rgb(56, 87, 155);
}

.category-buttons .btn:hover {
    background-color: rgb(56, 87, 155);
    color: white;
    border-color: rgb(56, 87, 155);
}

.btn-outline-primary {
    color: rgb(56, 87, 155);
    border-color: rgb(56, 87, 155);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: rgb(56, 87, 155);
    border-color: rgb(56, 87, 155);
    color: white;
}

.section-break {
    padding: 1rem 0 3rem;
}

/* Pricing Cards - Optimized layout */
.pricing-card {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    height: 100%;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid #e0e0e0;
    margin-bottom: 2rem;
    contain: layout style;
    will-change: transform;
    transform: translateZ(0);
    min-height: 500px; /* Prevent layout shift */
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.pricing-card.featured {
    border: 3px solid rgb(56, 87, 155);
    box-shadow: 0 5px 15px rgba(56, 87, 155, 0.2);
}

.enterprise-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 3px solid #6c757d;
}

.add-on-card {
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    border-top: 2px solid #e0e0e0;
    border-right: 2px solid #e0e0e0;
    border-bottom: 2px solid #e0e0e0;
}

.bundle-badge {
    background: #28a745;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    position: absolute;
    top: -10px;
    right: 15px;
}

.most-popular {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: rgb(56, 87, 155);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.pricing-card h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.pricing-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    min-height: 60px; /* Consistent spacing */
}

.price {
    font-size: 2rem;
    font-weight: bold;
    color: rgb(56, 87, 155);
    margin-bottom: 1.5rem;
}

.price span {
    font-size: 1rem;
    color: #666;
    font-weight: normal;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.feature-list li {
    padding: 0.5rem 0;
    color: #555;
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.95rem;
}

.feature-list li:before {
    content: "✓";
    color: rgb(56, 87, 155);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.service-header {
    margin-bottom: 3rem;
}

.service-header h3 {
    color: #333;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.service-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Section Break */
.styled-hr {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(56, 87, 155, 0), rgba(56, 87, 155, 0.3), rgba(56, 87, 155, 0));
    margin: 0;
}

.section-break h2 {
    color: rgb(56, 87, 155);
}

/* FAQ Section - Optimized */
.faq-section {
    background-color: #f8f9fa;
    padding: 4rem 0;
    margin-top: 4rem;
    contain: layout style;
}

.accordion-item {
    border: 1px solid #e0e0e0;
    margin-bottom: 1rem;
    background-color: #fff;
    contain: layout style;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(56, 87, 155, 0.1);
    color: rgb(56, 87, 155);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(56, 87, 155, 0.1);
}

.accordion-body {
    padding: 1.25rem;
    color: #555;
}

/* Case Study Specific Styles - Optimized for LCP */
.case-study-header {
    background: linear-gradient(135deg, rgb(56, 87, 155) 0%, rgb(25, 40, 80) 100%);
    color: #fff;
    padding: 6rem 0 3rem;
    margin-bottom: 3rem;
    contain: layout style paint;
    will-change: auto;
}

.case-study-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.case-study-header .lead {
    font-size: 1.25rem;
    opacity: 0.9;
}

.case-study-article {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 4rem;
    contain: layout style;
}

.case-study-article section {
    margin-bottom: 3rem;
}

.case-study-article h2 {
    color: rgb(56, 87, 155);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.case-study-article h3 {
    color: #333;
    margin: 1.5rem 0 1rem;
    font-size: 1.5rem;
}

.case-study-image {
    margin: 2rem 0;
}

.case-study-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    aspect-ratio: 16/9; /* Prevent layout shift */
    min-height: 300px;
}

/* Solution Components */
.solution-component {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    contain: layout style;
}

/* Key Finding Cards */
.key-finding {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid rgb(56, 87, 155);
    contain: layout style;
}

/* Impact Grid - Optimized layout */
.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    contain: layout style;
}

.impact-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    contain: layout style;
    min-height: 120px; /* Prevent layout shift */
}

.impact-item h4 {
    color: rgb(56, 87, 155);
    margin-bottom: 0.75rem;
}

/* Technology Stack - Optimized */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
    contain: layout style;
}

.tech-item {
    background: rgb(56, 87, 155);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* CTA Box - Optimized */
.cta-box {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 3rem;
    contain: layout style;
    border: 2px solid rgb(56, 87, 155);
}

.cta-box h3 {
    margin-bottom: 1.5rem;
    color: rgb(56, 87, 155);
}

/* Lists */
.case-study-article ul {
    padding-left: 1.25rem;
    margin-bottom: 1.5rem;
}

.case-study-article li {
    margin-bottom: 0.5rem;
    color: #555;
}

/* Executive Summary */
.executive-summary {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 3rem;
    border-left: 4px solid rgb(56, 87, 155);
    contain: layout style;
}

/* Challenge Section */
.challenge {
    padding: 2rem 0;
    contain: layout style;
}

/* Solution Section */
.solution {
    padding: 2rem 0;
    contain: layout style;
}

/* Findings Section */
.findings {
    padding: 2rem 0;
    contain: layout style;
}

/* Impact Section */
.impact {
    padding: 2rem 0;
    contain: layout style;
}

/* Technology Section */
.technology {
    padding: 2rem 0;
    contain: layout style;
}

/* Conclusion Section */
.conclusion {
    padding: 2rem 0;
    contain: layout style;
}

/* Optimize animations for performance */
@media (prefers-reduced-motion: reduce) {
    .project-card,
    .pricing-card,
    .accordion-button {
        transition: none !important;
        animation: none !important;
    }
}

/* Mobile responsive adjustments for additional pages - Optimized */
@media (max-width: 767px) {
    .project-card {
        padding: 1.5rem;
        min-height: 350px; /* Smaller on mobile */
    }

    .project-card h2 {
        font-size: 1.5rem;
    }

    .project-card h3 {
        font-size: 1.2rem;
    }

    .pricing-card {
        min-height: 450px; /* Smaller on mobile */
    }

    .case-study-header {
        padding: 4rem 0 2rem;
    }
    
    .case-study-header h1 {
        font-size: 2rem;
    }
    
    .case-study-article {
        padding: 0 1rem 3rem;
    }
    
    .case-study-image img {
        min-height: 200px; /* Smaller on mobile */
    }
    
    .impact-grid {
        grid-template-columns: 1fr;
    }
    
    .impact-item {
        min-height: 100px; /* Smaller on mobile */
    }
    
    .tech-stack {
        justify-content: center;
    }

    .category-buttons {
        flex-direction: column;
        width: 100%;
        padding: 0 1rem;
    }

    .category-buttons .btn {
        width: 100%;
        margin-bottom: 0.5rem;
        padding: 0.75rem;
        white-space: normal;
        height: auto;
        min-height: 48px; /* Touch target size */
    }

    .core-services-section {
        padding: 3rem 0 2rem;
    }
    
    .pricing-description {
        min-height: 40px; /* Smaller on mobile */
    }
    
    .executive-summary,
    .solution-component,
    .key-finding,
    .cta-box {
        padding: 1.5rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .pricing-card,
    .project-card,
    .accordion-item,
    .solution-component,
    .impact-item {
        border: 2px solid #000;
    }
    
    .pricing-card.featured {
        border: 3px solid #000;
    }
    
    .key-finding,
    .executive-summary {
        border-left: 6px solid #000;
    }
}

/* Print optimizations */
@media print {
    .pricing-header,
    .case-study-header,
    .projects-header {
        background: none !important;
        color: #000 !important;
        padding: 2rem 0;
    }
    
    .category-buttons,
    .btn {
        display: none !important;
    }
    
    .pricing-card,
    .project-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}