/* ============================================
   LOCOMEDS CASE STUDY - STYLES
   ============================================ */

/* Base Styles - Fixed for Sticky Nav */
html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    overflow-x: hidden;
    max-width: 100%;
    position: relative;
}

/* Ensure main doesn't block sticky */
main {
    position: relative;
    isolation: isolate;
}

/* Ensure containers don't block sticky */
.container {
    position: relative;
}

/* Case Study Hero Section */
.case-study-hero {
    padding: 2rem 0 1rem 0;
    background: #ffffff;
}

.client-badge {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1f71;
    margin-bottom: 1rem;
    display: block;
}

.case-study-hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: #000000;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    max-width: 900px;
}

.case-study-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555555;
    max-width: 900px;
    margin-bottom: 3rem;
}

/* Hero Image Section */
.hero-image-section {
    padding: 0;
    margin-bottom: 3rem;
}

.hero-image-wrapper {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.hero-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

/* Navigation Tabs - Sticky on Scroll - FINAL FIX */
.case-study-nav {
    background: #ffffff;
    border-bottom: 2px solid #e8e8e8;
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    z-index: 998;
    margin-bottom: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* Ensure nav container doesn't restrict */
.case-study-nav .container {
    overflow: visible;
}

.nav-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.nav-tabs::-webkit-scrollbar {
    display: none;
}

.nav-tab {
    padding: 1.2rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #666666;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-tab:hover {
    color: #0066ff;
    background: #f8f9fa;
}

.nav-tab.active {
    color: #0066ff;
    border-bottom-color: #0066ff;
}

/* Content Sections - ALL VISIBLE */
.content-section {
    padding: 4rem 0;
    scroll-margin-top: 80px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 2rem;
}

/* About Section Layout */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 4rem;
    margin-bottom: 3rem;
}

.about-left-column {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.about-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: #555555;
    margin-bottom: 0;
}

/* Project Highlights Box - White with Shadow */
.project-highlights {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 100px;
    height: fit-content;
}

.highlights-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0066ff;
    margin-bottom: 1.8rem;
    text-align: center;
}

.highlights-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.highlights-list li {
    padding: 0.85rem 0;
    font-size: 1rem;
    color: #333;
    position: relative;
    padding-left: 1.8rem;
}

.highlights-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #0066ff;
    font-size: 1.8rem;
    line-height: 1;
}

.highlights-btn {
    display: block;
    width: 100%;
    padding: 1.1rem;
    background: #0066ff;
    color: #ffffff;
    text-align: center;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease;
    font-size: 1rem;
}

.highlights-btn:hover {
    background: #0052cc;
}

/* Info Boxes Grid - With Left Border */
.info-boxes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.info-box {
    padding: 0;
    padding-left: 1.5rem;
    border-left: 3px solid #e0e0e0;
}

.info-box-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 0.5rem;
}

.info-box-label {
    font-size: 0.95rem;
    color: #999999;
    font-weight: 500;
}

/* Business Goal Section */
.business-goal {
    margin: 0;
}

.business-goal h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1rem;
}

.business-goal p {
    font-size: 1rem;
    line-height: 1.8;
    color: #555555;
}

.business-goal a {
    color: #0066ff;
    text-decoration: none;
    font-weight: 600;
}

.business-goal a:hover {
    text-decoration: underline;
}

/* UI/UX Section */
.uiux-header {
    text-align: center;
    margin-bottom: 3rem;
}

.uiux-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1rem;
}

.uiux-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555555;
    max-width: 900px;
    margin: 0 auto;
}

.uiux-images {
    background: #000000;
    padding: 4rem 0;
    margin-top: 3rem;
}

.uiux-image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.uiux-image-grid img {
    width: 100%;
    border-radius: 8px;
}

/* Other Sections */
.section-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555555;
    max-width: 1000px;
}

.section-content p {
    margin-bottom: 1.5rem;
}

.section-content ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.section-content ul li {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Key Challenges Section - Card Grid */
.challenges-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #e0e0e0;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    overflow: hidden;
}

.challenge-card {
    background: #ffffff;
    padding: 2.5rem 2rem;
    position: relative;
}

.challenge-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.challenge-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #666666;
    margin: 0;
}

/* Our Solutions Section */
.solutions-header {
    text-align: center;
    margin-bottom: 4rem;
}

.solutions-subtitle {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #666666;
    max-width: 900px;
    margin: 0 auto;
}

.solution-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 5rem;
}

.solution-block:last-child {
    margin-bottom: 0;
}

.solution-block-reverse {
    direction: rtl;
}

.solution-block-reverse > * {
    direction: ltr;
}

.solution-images {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.solution-image-main {
    width: 85%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
}

.solution-image-overlay {
    position: absolute;
    width: 50%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.solution-block-reverse .solution-image-overlay {
    right: auto;
    left: -5%;
}

.solution-content {
    padding: 2rem 0;
}

.solution-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.solution-description {
    font-size: 1rem;
    line-height: 1.8;
    color: #666666;
    margin: 0;
}

/* Our Approach Section */
.approach-section {
    background: linear-gradient(135deg, #e8f0fe 0%, #d4e7fc 100%);
    padding: 5rem 0;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);
}

.approach-header {
    max-width: 1200px;
    margin: 0 auto 4rem auto;
    padding: 0 2rem;
}

.approach-subtitle {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555555;
    max-width: 900px;
    margin: 0;
}

.approach-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.approach-card {
    text-align: left;
}

.approach-icon {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: #ffffff;
}

.orange-icon {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
}

.green-icon {
    background: linear-gradient(135deg, #5cb85c 0%, #6dd16d 100%);
}

.cyan-icon {
    background: linear-gradient(135deg, #5bc0de 0%, #6dd5ed 100%);
}

.pink-icon {
    background: linear-gradient(135deg, #ff6ec7 0%, #ff87d4 100%);
}

.approach-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1rem;
}

.approach-card-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #555555;
    margin: 0;
}

/* Technology Stack Section */
.tech-stack-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 4rem;
    align-items: start;
}

.tech-categories {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.tech-category {
    padding-left: 1.5rem;
    border-left: 4px solid #0066ff;
}

.tech-category-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #000000;
    margin: 0;
}

.tech-logos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.tech-logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tech-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: grayscale(0);
    transition: transform 0.3s ease;
}

.tech-logo-item:hover .tech-logo {
    transform: scale(1.1);
}

.tech-name {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

/* Key Results Section */
.results-section {
    background: linear-gradient(135deg, #1a2947 0%, #2d4a73 100%);
    padding: 5rem 0;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);
}

.results-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.results-title {
    color: #ffffff;
    text-align: left;
    margin-bottom: 3rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.result-card {
    background: rgba(45, 74, 115, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2.5rem;
    transition: all 0.3s ease;
}

.result-card:hover {
    background: rgba(45, 74, 115, 0.7);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.result-metric {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.result-description {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

/* Testimonial Section */
.testimonial-section {
    background: linear-gradient(135deg, #e8f0fe 0%, #d4e7fc 100%);
    padding: 5rem 0;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);
}

.testimonial-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.testimonial-title {
    text-align: center;
    margin-bottom: 3rem;
}

.testimonial-slider {
    position: relative;
    margin-bottom: 3rem;
}

.testimonial-slide {
    display: none;
}

.testimonial-slide.active {
    display: block;
}

.testimonial-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.testimonial-header {
    margin-bottom: 2rem;
}

.testimonial-author {
    text-align: left;
}

.author-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 0.5rem;
}

.author-title {
    font-size: 1rem;
    color: #666666;
    margin: 0;
}

.testimonial-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555555;
    margin-bottom: 2.5rem;
    font-style: italic;
}

.testimonial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.client-logo img {
    height: 40px;
    width: auto;
}

.testimonial-rating {
    text-align: right;
}

.rating-label {
    font-size: 0.7rem;
    color: #999;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.clutch-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clutch-logo {
    height: 20px;
    width: auto;
}

.stars {
    display: flex;
    gap: 0.2rem;
    color: #ff6b35;
}

.stars i {
    font-size: 0.9rem;
}

.rating-text {
    font-size: 0.75rem;
    color: #666;
    font-weight: 600;
}

.testimonial-navigation {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.nav-arrow {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    color: #0066ff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav-arrow:hover {
    background: #0066ff;
    color: #ffffff;
    transform: scale(1.1);
}

/* Portfolio CTA Section */
.portfolio-cta {
    background: linear-gradient(135deg, #1a1f71 0%, #0066ff 100%);
    padding: 5rem 0;
    text-align: center;
    margin-top: 5rem;
}

.portfolio-cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
}

.portfolio-cta-content p {
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: #ffffff;
    color: #1a1f71;
}

.btn-primary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.btn-secondary:hover {
    background: #ffffff;
    color: #1a1f71;
    transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 1200px) {
    .challenges-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .approach-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
    
    .tech-logos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 968px) {
    .case-study-hero h1 {
        font-size: 2.2rem;
    }
    
    .about-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .project-highlights {
        position: static;
    }
    
    .info-boxes {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .nav-tab {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .uiux-image-grid {
        grid-template-columns: 1fr;
    }
    
    .challenges-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        background: transparent;
        border: none;
    }
    
    .challenge-card {
        border: 1px solid #e0e0e0;
        border-radius: 8px;
    }
    
    .solution-block,
    .solution-block-reverse {
        grid-template-columns: 1fr;
        gap: 3rem;
        direction: ltr;
    }
    
    .solution-image-overlay {
        display: none;
    }
    
    .solution-image-main {
        width: 100%;
    }
    
    .solution-title {
        font-size: 1.5rem;
    }
    
    .approach-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .approach-card {
        text-align: center;
    }
    
    .approach-icon {
        margin-left: auto;
        margin-right: auto;
    }
    
    .tech-stack-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .tech-logos-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .testimonial-footer {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    
    .testimonial-rating {
        text-align: center;
    }
    
    .portfolio-cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 640px) {
    .case-study-hero {
        padding: 1.5rem 0 1rem 0;
    }
    
    .case-study-hero h1 {
        font-size: 1.8rem;
    }
    
    .case-study-description {
        font-size: 1rem;
    }
    
    .nav-tab {
        padding: 1rem 1rem;
        font-size: 0.85rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .uiux-title {
        font-size: 2rem;
    }
    
    .content-section {
        padding: 3rem 0;
    }
    
    .challenge-card {
        padding: 2rem 1.5rem;
    }
    
    .challenge-title {
        font-size: 1.2rem;
    }
    
    .solutions-subtitle {
        font-size: 0.95rem;
    }
    
    .solution-block {
        gap: 2rem;
        margin-bottom: 3rem;
    }
    
    .solution-title {
        font-size: 1.3rem;
    }
    
    .solution-description {
        font-size: 0.95rem;
    }
    
    .approach-section {
        padding: 3rem 0;
    }
    
    .approach-header {
        padding: 0 1.5rem;
        margin-bottom: 3rem;
    }
    
    .approach-grid {
        padding: 0 1.5rem;
        gap: 2rem;
    }
    
    .approach-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .approach-card-title {
        font-size: 1.2rem;
    }
    
    .tech-logos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .tech-logo {
        width: 80px;
        height: 80px;
    }
    
    .results-section {
        padding: 3rem 0;
    }
    
    .results-container {
        padding: 0 1.5rem;
    }
    
    .results-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .result-card {
        padding: 2rem;
    }
    
    .result-metric {
        font-size: 1.4rem;
    }
    
    .result-description {
        font-size: 0.95rem;
    }
    
    .testimonial-section {
        padding: 3rem 0;
    }
    
    .testimonial-container {
        padding: 0 1.5rem;
    }
    
    .testimonial-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .testimonial-card {
        padding: 2rem;
    }
    
    .author-name {
        font-size: 1.3rem;
    }
    
    .testimonial-text {
        font-size: 0.95rem;
    }
    
    .nav-arrow {
        width: 45px;
        height: 45px;
    }
    
    .project-highlights {
        padding: 2rem;
    }
    
    .portfolio-cta {
        padding: 3rem 0;
    }
    
    .portfolio-cta-content h2 {
        font-size: 1.8rem;
    }
    
    .portfolio-cta-content p {
        font-size: 1rem;
    }
}
