/* Case Studies Page Specific Styles */

/* CASE STUDIES HERO */
.case-studies-hero {
    position: relative;
    height: 60vh;
    min-height: 500px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 80px;
}

.case-studies-hero video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 30%;
}

.case-studies-hero .color-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(11, 28, 45, 0.85) 0%,
        rgba(255, 107, 107, 0.25) 50%,
        rgba(11, 28, 45, 0.85) 100%);
    z-index: 0.8;
}

.case-studies-hero-content {
    position: relative;
    max-width: 900px;
    color: black;
    text-align: center;
    padding: 0 40px;
    z-index: 2;
    animation: heroFadeIn 1s ease forwards;
}

.case-studies-hero h1 {
    font-size: 3.2rem;
    line-height: 1.2;
    margin: 20px 0;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.case-studies-hero p {
    font-size: 1.2rem;
    line-height: 1.7;
    color: black;
    max-width: 700px;
    margin: 0 auto 30px;
}

/* CASE STUDIES GRID SECTION */
.case-studies-grid-section {
    padding: 80px 0;
    background: #ffffff;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 20px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--secondary-color);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-medium);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

.case-studies-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

/* CASE STUDY DETAIL */
.case-study-detail {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.case-study-detail:hover {
    transform: translateY(-5px);
}

.case-study-image {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.case-study-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.case-study-detail:hover .case-study-image img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, 
        transparent 0%,
        rgba(var(--overlay-color-rgb, 255, 107, 107), 0.1) 100%);
}

.case-study-content {
    padding: 50px;
}

.case-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    align-items: center;
}

.industry-badge {
    background: var(--accent-red);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.duration, .team-size {
    color: var(--text-medium);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.duration::before {
    content: '⏱️';
}

.team-size::before {
    content: '👥';
}

.case-study-content h3 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--secondary-color);
    line-height: 1.3;
}

.case-challenge, .case-solution, .case-results, .case-technologies {
    margin-bottom: 40px;
}

.case-challenge h4, .case-solution h4, .case-results h4, .case-technologies h4 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.case-challenge h4::before {
    content: '🎯';
}

.case-solution h4::before {
    content: '💡';
}

.case-results h4::before {
    content: '📈';
}

.case-technologies h4::before {
    content: '⚙️';
}

.case-challenge p, .case-solution p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-medium);
    margin-bottom: 15px;
}

.case-challenge ul, .case-solution ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.case-challenge li, .case-solution li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
    line-height: 1.6;
    color: var(--text-medium);
}

.case-challenge li::before {
    content: '⚠️';
    position: absolute;
    left: 0;
}

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

/* RESULTS GRID */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.result-item {
    text-align: center;
    padding: 25px 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border-top: 4px solid var(--accent-teal);
    transition: all 0.3s ease;
}

.result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.result-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-teal);
    margin-bottom: 10px;
    line-height: 1;
}

.result-label {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--secondary-color);
}

.result-item p {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin: 0;
    line-height: 1.5;
}

/* TECHNOLOGIES */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.tech-tags span {
    background: rgba(78, 205, 196, 0.1);
    color: var(--accent-teal);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tech-tags span:hover {
    background: var(--accent-teal);
    color: white;
    transform: translateY(-2px);
}

/* MORE CASES */
.more-cases {
    padding: 80px 0;
    background: #f8f9fa;
}

.more-cases-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.more-cases-container h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--secondary-color);
}

.quick-cases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.quick-case {
    background: white;
    padding: 30px;
    border-radius: 15px;
    border-left: 4px solid var(--icon-color, var(--primary-color));
    transition: all 0.3s ease;
    text-align: left;
}

.quick-case:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.quick-icon {
    width: 60px;
    height: 60px;
    background: rgba(var(--icon-color-rgb, 24, 165, 88), 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--icon-color, var(--primary-color));
    font-size: 1.8rem;
}

.quick-case h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.quick-case p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-medium);
    margin-bottom: 20px;
}

/* CTA */
.cases-cta {
    padding: 80px 0;
    background: #0b1c2d;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.cta-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(165, 153, 233, 0.1) 0%,
        rgba(24, 165, 88, 0.1) 50%,
        rgba(11, 28, 45, 0.9) 100%);
    opacity: 0.5;
}

.cta-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 0 40px;
    z-index: 1;
}

.cases-cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #fff;
}

.cta-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* RESPONSIVE STYLES */
@media (max-width: 1200px) {
    .case-studies-container {
        padding: 0 30px;
    }
    
    .case-study-content {
        padding: 40px;
    }
}

@media (max-width: 992px) {
    .case-studies-hero {
        height: 50vh;
        min-height: 400px;
    }
    
    .case-studies-hero h1 {
        font-size: 2.5rem;
    }
    
    .case-study-image {
        height: 350px;
    }
    
    .case-study-content h3 {
        font-size: 1.8rem;
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .case-studies-hero {
        height: 45vh;
        min-height: 350px;
        margin-top: 70px;
    }
    
    .case-studies-hero-content {
        padding: 0 20px;
    }
    
    .case-studies-hero h1 {
        font-size: 2rem;
    }
    
    .case-studies-hero p {
        font-size: 1rem;
    }
    
    .case-study-image {
        height: 280px;
    }
    
    .case-study-content {
        padding: 30px 25px;
    }
    
    .case-study-content h3 {
        font-size: 1.6rem;
    }
    
    .case-meta {
        gap: 10px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-cases {
        grid-template-columns: 1fr;
    }
    
    .more-cases-container h2 {
        font-size: 2rem;
    }
    
    .cases-cta h2 {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .case-studies-hero h1 {
        font-size: 1.8rem;
    }
    
    .case-study-image {
        height: 220px;
    }
    
    .case-study-content {
        padding: 25px 20px;
    }
    
    .case-study-content h3 {
        font-size: 1.5rem;
    }
    
    .case-challenge h4, .case-solution h4, .case-results h4, .case-technologies h4 {
        font-size: 1.2rem;
    }
    
    .more-cases-container h2 {
        font-size: 1.8rem;
    }
    
    .cases-cta h2 {
        font-size: 1.8rem;
    }
}

/* Fix for specific image issues */
.case-study-image img {
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
}

/* Ensure images maintain aspect ratio on all devices */
@media (max-width: 768px) {
    .case-study-image {
        aspect-ratio: 16/9;
        height: auto;
        min-height: 250px;
    }
}