/* Case Studies Specific Styles */

/* Hero Section */
.case-studies-hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10rem 2rem 4rem;
    overflow: hidden;
}

.case-studies-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../assets/about-hero.jpg') center/cover no-repeat;
    /* Using about-hero as it fits well */
    opacity: 0.15;
    z-index: 0;
}

.case-studies-hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    text-align: center;
    animation: fadeIn 1s ease-out;
}

.case-studies-hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.case-studies-hero p {
    font-size: 1.3rem;
    color: var(--text-muted);
    line-height: 1.8;
    opacity: 0;
    animation: slideUp 0.8s ease-out 0.3s forwards;
}

/* Intro Section */
.case-studies-intro {
    max-width: 900px;
    margin: 0 auto;
    padding: 6rem 2rem 2rem;
    text-align: center;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.intro-content p {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.intro-content strong {
    color: var(--text);
    font-weight: 600;
}

.highlight-text {
    color: var(--text);
    font-weight: 600;
    background: linear-gradient(90deg, #a78bfa, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Case Studies Grid */
.case-studies-section {
    padding: 0 2rem 6rem;
    max-width: 1200px;
    margin: 4rem auto 0;
}

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

.case-study-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.case-study-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    pointer-events: none;
}

.case-study-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.08);
    /* Slightly lighter on hover */
}

/* Card Content */
.card-header {
    margin-bottom: 1.5rem;
}

.card-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.card-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    background: rgba(139, 92, 246, 0.1);
    /* Primary color tint */
    color: #a78bfa;
    /* Light primary */
    border: 1px solid rgba(139, 92, 246, 0.2);
    font-weight: 500;
}

.case-study-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.card-problem {
    margin-bottom: 2rem;
    flex-grow: 1;
}

.card-problem h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.card-problem p {
    color: #cbd5e1;
    /* Slightly brighter than muted */
    font-size: 1rem;
    line-height: 1.6;
}

.card-cta {
    margin-top: auto;
}

.view-case-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    /* Use primary color */
    font-weight: 600;
    /* Bold */
    text-decoration: none;
    /* No underline */
    font-size: 1rem;
    transition: gap 0.3s ease, color 0.3s ease;
    /* Animate icon movement */
}

.view-case-btn:hover {
    gap: 0.8rem;
    /* Move icon on hover */
    color: #a78bfa;
    /* Lighter primary on hover */
}

.view-case-btn span {
    font-size: 1.2rem;
    /* Arrow size */
}


/* Lightbox / Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    /* Darker backdrop */
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
    padding: 1rem;
    /* Add padding for mobile */
}

@media (max-width: 768px) {
    .lightbox {
        padding: 0;
    }
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    background: #0f172a;
    /* Dark modal bg */
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    /* Max height for scroll */
    overflow-y: auto;
    /* Scrollable content */
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

/* Modal Content Structure */
.modal-header {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--glass-border);
    padding: 2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: sticky;
    /* Sticky header */
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
    /* Glass effect on header */
}

.modal-title-group h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-client {
    color: var(--text-muted);
    font-size: 1rem;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.close-btn:hover {
    color: #fff;
    transform: rotate(90deg);
}

.modal-body {
    padding: 2.5rem;
}

.modal-section {
    margin-bottom: 2.5rem;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    color: var(--primary);
    /* Highlight section titles */
    margin-bottom: 1rem;
    border-left: 3px solid var(--secondary);
    padding-left: 1rem;
}

.modal-section p {
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.modal-section ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    color: #cbd5e1;
}

.modal-section li {
    margin-bottom: 0.5rem;
}

/* Animations included in styles.css (fadeIn, slideUp) are reused */

/* Scrollbar for modal */
.lightbox-content::-webkit-scrollbar {
    width: 6px;
}

.lightbox-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.lightbox-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}