/* css/case-study.css - Modern Case Study Page */

/* ===== BASE STYLES ===== */
.case-study-main {
    background: var(--color-black);
    overflow-x: hidden;
}

/* ===== HERO SECTION ===== */
.case-study-hero {
    min-height: 55vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 80px 0 30px;
    background: linear-gradient(135deg, var(--color-off-black) 0%, var(--color-black) 100%);
    overflow: hidden;
}

/* Animated background gradient */
.case-study-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 59, 59, 0.03) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
    z-index: 0;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.case-study-hero .container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.case-study-hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

/* Breadcrumb */
.case-study-breadcrumb {
    margin-bottom: var(--space-md);
    opacity: 0;
    animation: fadeInUp 0.6s forwards 0.2s;
}

.case-study-breadcrumb a {
    color: var(--color-gray-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 59, 59, 0.1);
    border-radius: 40px;
    backdrop-filter: blur(10px);
}

.case-study-breadcrumb a:hover {
    color: var(--color-red);
    border-color: var(--color-red);
    transform: translateX(-5px);
    background: rgba(255, 59, 59, 0.05);
}

.case-study-breadcrumb svg {
    transition: transform 0.3s ease;
}

.case-study-breadcrumb a:hover svg {
    transform: translateX(-3px);
}

/* Category */
.case-study-category {
    color: var(--color-red);
    font-size: 0.85rem; /* Reduced from 1rem */
    text-transform: uppercase;
    letter-spacing: 0.3em;
    display: block;
    margin-bottom: var(--space-xs); /* Reduced from var(--space-sm) */
    opacity: 0;
    animation: fadeInUp 0.6s forwards 0.4s;
    font-weight: 500;
}

/* Title */
.case-study-title {
    font-size: clamp(2.5rem, 8vw, 5rem); /* Reduced from 6rem max */
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-sm); /* Reduced from var(--space-sm) to var(--space-xs)? Actually keep as is */
    color: var(--color-white);
    opacity: 0;
    animation: fadeInUp 0.6s forwards 0.6s;
    text-shadow: 0 0 30px rgba(255, 59, 59, 0.2);
}

/* Subtitle */
.case-study-subtitle {
    font-size: 1.2rem; /* Reduced from 1.5rem */
    color: var(--color-gray-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.4;
    opacity: 0;
    animation: fadeInUp 0.6s forwards 0.8s;
    font-weight: 400;
}

/* ===== MEDIA SHOWCASE SECTION ===== */
.case-study-media {
    padding: var(--space-lg); /* Reduced from var(--space-2xl) */
    /* margin-top: var(--space-md); */
    background: var(--color-off-black);
    position: relative;
}

.case-study-media .container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.media-showcase {
    width: 100%;
}

/* ===== MAIN VIDEO CONTAINER - REDUCED SPACING ===== */
.main-video-container {
    width: 100%;
    border-radius: 20px; /* Slightly reduced */
    overflow: hidden;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5); /* Reduced shadow */
    margin: 0; /* Remove all margins - no top or bottom margin */
    position: relative;
    background: var(--color-black);
    aspect-ratio: 16/9;
    border: 1px solid rgba(255, 59, 59, 0.1);
    transition: var(--transition-base);
}

.main-video-container:hover {
    border-color: var(--color-red);
    box-shadow: 0 30px 50px -15px rgba(255, 59, 59, 0.3);
    transform: translateY(-3px);
}

.main-video-container video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Video Controls Styling */
.main-video-container video::-webkit-media-controls-panel {
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.main-video-container video::-webkit-media-controls-play-button {
    background-color: var(--color-red);
    border-radius: 50%;
}

.main-video-container video::-webkit-media-controls-timeline {
    background-color: rgba(255,59,59,0.3);
    border-radius: 10px;
    height: 4px;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin: var(--space-xl) 0;
    opacity: 0;
    animation: fadeInUp 0.6s forwards 1s;
}

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 59, 59, 0.1);
    border-radius: 24px;
    padding: var(--space-lg);
    text-align: center;
    transition: var(--transition-base);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-red);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.stat-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-red);
    box-shadow: 0 30px 40px -20px rgba(255, 59, 59, 0.3);
}

.stat-card:hover::before {
    opacity: 0.05;
}

.stat-card > * {
    position: relative;
    z-index: 2;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-red);
    display: block;
    line-height: 1;
    margin-bottom: var(--space-xs);
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-value {
    transform: scale(1.05);
}

.stat-label {
    color: var(--color-gray-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* ===== FEATURE SHOWCASE GRID - OPTIMAL SPACING ===== */
.feature-showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md); /* Horizontal gap between cards */
    margin-top: 2rem; /* 2rem top spacing */
    margin-bottom: 2rem; /* No bottom margin */
    margin-left: 0;
    margin-right: 0;
    padding: 0;
}

.feature-video-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 59, 59, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-base);
    position: relative;
    backdrop-filter: blur(10px);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.feature-video-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-red);
    box-shadow: 0 20px 30px -15px rgba(255, 59, 59, 0.2);
    background: rgba(255, 59, 59, 0.02);
}

.feature-video-container {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
    background: var(--color-black);
}

.feature-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.feature-video-card:hover .feature-video-container video {
    transform: scale(1.02);
}

/* Play Button Overlay */
.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.feature-video-container:hover .video-play-overlay {
    opacity: 1;
}

.play-icon {
    width: 50px;
    height: 50px;
    background: var(--color-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.play-icon svg {
    width: 20px;
    height: 20px;
    fill: white;
    margin-left: 2px;
}

.feature-video-container:hover .play-icon {
    transform: scale(1);
}

.feature-video-content {
    padding: var(--space-sm); /* Reduced padding */
    flex: 1;
    display: flex;
    flex-direction: column;
}

.feature-video-content h3 {
    font-size: 1rem;
    margin-bottom: var(--space-xs);
    color: var(--color-white);
    font-weight: 600;
    transition: color 0.3s ease;
    line-height: 1.3;
}

.feature-video-card:hover .feature-video-content h3 {
    color: var(--color-red);
}

.feature-video-content p {
    color: var(--color-gray-light);
    line-height: 1.4;
    font-size: 0.85rem;
    margin: 0;
}

/* ===== OVERVIEW SECTION ===== */
.case-study-overview {
    padding: 0 !important; /* Force remove all padding */
    margin: 0 !important; /* Force remove all margins */
    position: relative;
}

.case-study-overview:nth-child(even) {
    background: var(--color-off-black);
}

.overview-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-xl);
    align-items: start;
}

.overview-stats {
    position: sticky;
    top: 150px;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.overview-content {
    max-width: 800px;
}

.overview-content h2 {
    font-size: 1.8rem; /* Reduced from 2rem */
    margin-bottom: var(--space-md); /* Reduced from var(--space-md) */
    color: var(--color-white);
    position: relative;
    display: inline-block;
}

.overview-content h2::after {
    content: '';
    position: absolute;
    bottom: -8px; /* Reduced from -10px */
    left: 0;
    width: 50px; /* Reduced from 60px */
    height: 2px; /* Reduced from 3px */
    background: var(--color-red);
    border-radius: 2px;
}

.overview-content p {
    color: var(--color-gray-light);
    line-height: 1.7; /* Reduced from 1.8 */
    margin-bottom: var(--space-md); /* Reduced from var(--space-lg) */
    font-size: 1rem; /* Reduced from 1.1rem */
}

.results-highlight {
    background: linear-gradient(135deg, rgba(255, 59, 59, 0.1) 0%, rgba(255, 59, 59, 0.05) 100%);
    border-left: 4px solid var(--color-red);
    padding: var(--space-md) var(--space-lg); /* Reduced from var(--space-lg) var(--space-xl) */
    border-radius: 0 20px 20px 0;
    margin-top: var(--space-lg); /* Reduced from var(--space-xl) */
    position: relative;
    overflow: hidden;
}

.highlight-number {
    font-family: var(--font-display);
    font-size: 2.5rem; /* Reduced from 3.5rem */
    font-weight: 800;
    color: var(--color-red);
    display: block;
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.highlight-text {
    font-size: 1.1rem; /* Reduced from 1.3rem */
    color: var(--color-white);
    font-weight: 500;
    position: relative;
    z-index: 2;
}

/* ===== RELATED WORK SECTION ===== */
.related-work {
    padding: var(--space-md) 0; /* Reduced from var(--space-2xl) */
    background: var(--color-off-black);
    position: relative;
    overflow: hidden;
}

.related-work::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(255, 59, 59, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.related-work h2 {
    font-size: 2rem; /* Reduced from 2.5rem */
    margin-bottom: var(--space-lg); /* Reduced from var(--space-xl) */
    text-align: center;
    color: var(--color-white);
    position: relative;
    z-index: 2;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm); /* Reduced from var(--space-md) */
    position: relative;
    z-index: 2;
    margin-bottom: 0;
}

.portfolio-card-link {
    text-decoration: none;
    display: block;
    height: 100%;
}

.portfolio-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 59, 59, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-red);
    box-shadow: 0 30px 40px -20px rgba(255, 59, 59, 0.3);
}

.portfolio-media {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--color-black);
}

.portfolio-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-media img {
    transform: scale(1.05);
}

.portfolio-content {
    padding: var(--space-sm); /* Reduced from var(--space-md) */
}

.portfolio-category {
    color: var(--color-red);
    font-size: 0.7rem; /* Reduced from 0.8rem */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: var(--space-xs);
}

.portfolio-content h3 {
    font-size: 1rem; /* Reduced from 1.2rem */
    color: var(--color-white);
    transition: color 0.3s ease;
    margin: 0;
}

.portfolio-card:hover .portfolio-content h3 {
    color: var(--color-red);
}

/* ===== CTA SECTION ===== */
.case-study-cta {
    padding: var(--space-xl) 0; /* Reduced from var(--space-2xl) */
    background: linear-gradient(135deg, var(--color-off-black) 0%, var(--color-black) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.case-study-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 59, 59, 0.05) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.cta-content h2 {
    font-size: clamp(2rem, 5vw, 3rem); /* Reduced from 4rem */
    margin-bottom: var(--space-sm); /* Reduced from var(--space-md) */
    color: var(--color-white);
}

.cta-content p {
    font-size: 1rem; /* Reduced from 1.2rem */
    color: var(--color-gray-light);
    margin-bottom: var(--space-md); /* Reduced from var(--space-lg) */
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    min-width: 180px; /* Reduced from 200px */
    padding: 1rem 1.8rem; /* Reduced from 1.2rem 2rem */
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Large Desktop */
@media (min-width: 1400px) {
    .feature-showcase-grid {
        gap: var(--space-xl);
    }
    
    .stat-value {
        font-size: 3.5rem;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    .overview-grid {
        gap: var(--space-lg);
    }
    
    .feature-showcase-grid {
        gap: var(--space-md);
    }
}

/* Tablet */
@media (max-width: 992px) {

   .main-video-container {
        width: calc(100% - 40px); /* Changed: adds 20px space on each side */
        border-radius: 16px;
        margin: 0 auto; /* Center the video with auto margins */
        max-width: none;
    }
    
    /* Adjust container to accommodate larger video */
    .case-study-media .container {
        overflow: visible;
        padding: 0;
    }
    
    .case-study-media {
        padding: var(--space-md) 0;
    }

    .overview-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .overview-stats {
        position: relative;
        top: 0;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
        margin-bottom: var(--space-lg);
    }
    
    .feature-showcase-grid {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .case-study-hero {
        min-height: 60vh;
        padding: 100px 0 50px;
    }
    
    .case-study-title {
        font-size: clamp(2.5rem, 7vw, 4rem);
    }
    
    .case-study-subtitle {
        font-size: 1.3rem;
        max-width: 500px;
    }
    
    .case-study-category {
        font-size: 0.9rem;
        letter-spacing: 0.25em;
        margin-bottom: var(--space-xs);
    }
    
    /* Reduce the animated gradient intensity on tablet */
    .case-study-hero::before {
        opacity: 0.8;
        animation-duration: 40s;
    }
}

/* Mobile */
@media (max-width: 768px) {

      .main-video-container {
        border-radius: 12px;
        width: calc(100% - 30px); /* Changed: adds 15px space on each side */
        margin: 0 auto; /* Center the video */
        max-width: none;
        aspect-ratio: 16/9;
    }
    
    /* Increase shadow for more impact */
    .main-video-container:hover {
        transform: translateY(-2px);
        box-shadow: 0 25px 45px -15px rgba(255, 59, 59, 0.3);
    }
    
    .case-study-media {
        padding: var(--space-sm) 0;
    }

      /* .main-video-container {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .main-video-container:active {
        transform: scale(1.01);
    } */

    .case-study-hero {
        min-height: 50vh;
        padding: 80px 0 40px;
        /* Slightly different gradient for mobile */
        background: linear-gradient(135deg, var(--color-off-black) 0%, var(--color-black) 100%);
    }
    
    /* Reduce or pause the rotating animation on mobile for performance */
    .case-study-hero::before {
        opacity: 0.5;
        animation-duration: 50s;
        width: 150%;
        height: 150%;
        top: -25%;
        right: -25%;
    }
    
    .case-study-title {
        font-size: clamp(2rem, 6vw, 3rem);
        line-height: 1.2;
        margin-bottom: var(--space-xs);
    }
    
    .case-study-subtitle {
        font-size: 1rem;
        line-height: 1.4;
        max-width: 90%;
        margin: 0 auto;
    }
    
    .case-study-category {
        font-size: 0.75rem;
        letter-spacing: 0.2em;
        margin-bottom: var(--space-xs);
    }
    
    /* Adjust breadcrumb for mobile */
    .case-study-breadcrumb {
        margin-bottom: var(--space-sm);
    }
    
    .case-study-breadcrumb a {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* Reduce content spacing */
    .case-study-hero-content {
        padding: 0 var(--space-sm);
    }
    
    .overview-stats {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .feature-video-content {
        padding: var(--space-md);
    }
    
    .feature-video-content h3 {
        font-size: 1.2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .highlight-number {
        font-size: 2.5rem;
    }
    
    .highlight-text {
        font-size: 1.1rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {

     .main-video-container {
        border-radius: 8px;
        width: calc(100% - 24px); /* Changed: adds 12px space on each side */
        margin: 0 auto; /* Center the video */
    }
    
    /* Increase video controls size for better touch interaction */
    .main-video-container video::-webkit-media-controls-panel {
        padding: 0 10px;
    }
    
    .main-video-container video::-webkit-media-controls-play-button {
        transform: scale(1.2);
    }
    
    .main-video-container video::-webkit-media-controls-timeline {
        height: 5px;
    }


   .case-study-hero {
        min-height: 50vh;
        padding: 80px 0 40px;
        /* Slightly different gradient for mobile */
        background: linear-gradient(135deg, var(--color-off-black) 0%, var(--color-black) 100%);
    }
    
    /* Reduce or pause the rotating animation on mobile for performance */
    .case-study-hero::before {
        opacity: 0.5;
        animation-duration: 50s;
        width: 150%;
        height: 150%;
        top: -25%;
        right: -25%;
    }
    
    .case-study-title {
        font-size: clamp(2rem, 6vw, 3rem);
        line-height: 1.2;
        margin-bottom: var(--space-xs);
    }
    
    .case-study-subtitle {
        font-size: 1rem;
        line-height: 1.4;
        max-width: 90%;
        margin: 0 auto;
    }
    
    .case-study-category {
        font-size: 0.75rem;
        letter-spacing: 0.2em;
        margin-bottom: var(--space-xs);
    }
    
    /* Adjust breadcrumb for mobile */
    .case-study-breadcrumb {
        margin-bottom: var(--space-sm);
    }
    
    .case-study-breadcrumb a {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* Reduce content spacing */
    .case-study-hero-content {
        padding: 0 var(--space-sm);
    }
    
    .stat-value {
        font-size: 2.5rem;
    }
    
    .main-video-container {
        border-radius: 20px;
    }
    
    .feature-video-card {
        border-radius: 20px;
    }
    
    .feature-video-content {
        padding: var(--space-sm);
    }
    
    .feature-video-content h3 {
        font-size: 1.1rem;
    }
    
    .feature-video-content p {
        font-size: 0.9rem;
    }
    
    .overview-content h2 {
        font-size: 1.6rem;
    }
    
    .overview-content p {
        font-size: 1rem;
    }
}

/* ===== EXTRA SMALL MOBILE (up to 360px) ===== */
@media (max-width: 360px) {
    .case-study-hero {
        min-height: 40vh;
        padding: 60px 0 25px;
    }
    
    .case-study-title {
        font-size: 1.6rem;
    }
    
    .case-study-subtitle {
        font-size: 0.85rem;
    }
    
    .case-study-category {
        font-size: 0.65rem;
        letter-spacing: 0.12em;
    }
}

/* Landscape Mode on Mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .main-video-container {
        margin: 0 auto;
        width: 90%;
        max-width: 800px;
        aspect-ratio: 16/9;
    }
    
    .case-study-media .container {
        padding: 0;
    }

      .case-study-hero {
        min-height: 100vh;
        padding: 60px 0 30px;
    }
    
    .case-study-title {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
    }
    
    .case-study-subtitle {
        font-size: 0.9rem;
        max-width: 70%;
    }
    
    /* Reduce animations for performance in landscape */
    .case-study-hero::before {
        animation-duration: 45s;
        opacity: 0.4;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .case-study-hero {
        background: none;
        color: #000;
    }
    
    .video-container,
    .feature-video-container,
    .cta-buttons {
        display: none;
    }
    
    .case-study-title {
        color: #000;
    }
}



/* ===== DARK MODE ADJUSTMENTS ===== */
[data-theme="light"] .case-study-hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

[data-theme="light"] .stat-card,
[data-theme="light"] .feature-video-card,
[data-theme="light"] .portfolio-card {
    background: var(--bg-card);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .case-study-title,
[data-theme="light"] .feature-video-content h3,
[data-theme="light"] .overview-content h2 {
    color: var(--text-primary);
}

[data-theme="light"] .case-study-subtitle,
[data-theme="light"] .feature-video-content p,
[data-theme="light"] .overview-content p {
    color: var(--text-secondary);
}

/* ===== GALLERY GRID FOR AWS PAGE ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    border: 1px solid rgba(255, 59, 59, 0.1);
    transition: var(--transition-base);
}

.gallery-item:hover {
    transform: translateY(-10px);
    border-color: var(--color-red);
    box-shadow: 0 30px 40px -20px rgba(255, 59, 59, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--color-white);
    font-size: 0.9rem;
    font-weight: 500;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* Tablet Landscape (992px to 1199px) */
@media (max-width: 1199px) and (min-width: 993px) {
    .gallery-grid {
        gap: var(--space-sm);
    }
    
    .gallery-item {
        border-radius: 16px;
    }
    
    .gallery-caption {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.85rem;
    }
}

/* Tablet (768px to 992px) */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
        margin: var(--space-md) 0;
    }
    
    .gallery-item {
        border-radius: 16px;
    }
    
    .gallery-caption {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.85rem;
        transform: translateY(0);
        background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    }
    
    /* Show caption immediately on tablet for better UX */
    .gallery-item .gallery-caption {
        transform: translateY(0);
    }
    
    .gallery-item:hover {
        transform: translateY(-5px);
    }
}

/* Mobile Landscape (576px to 767px) */
@media (max-width: 767px) and (min-width: 576px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
        margin: var(--space-md) auto;
        max-width: 90%;
    }
    
    .gallery-item {
        border-radius: 14px;
    }
    
    .gallery-caption {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.8rem;
        background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
        transform: translateY(0);
    }
    
    .gallery-item:hover {
        transform: translateY(-3px);
    }
}

/* Mobile Portrait (480px to 575px) */
@media (max-width: 575px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
        margin: var(--space-md) auto;
        max-width: 400px;
        padding: 0 var(--space-sm);
    }
    
    .gallery-item {
        border-radius: 14px;
        aspect-ratio: 4/3;
    }
    
    .gallery-caption {
        padding: var(--space-xs) var(--space-md);
        font-size: 0.85rem;
        background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
        transform: translateY(0);
        bottom: 0;
    }
    
    .gallery-item:hover {
        transform: translateY(-3px);
    }
    
    /* Touch-friendly hover effect for mobile */
    .gallery-item:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* Small Mobile (320px to 479px) */
@media (max-width: 479px) {
    .gallery-grid {
        gap: var(--space-sm);
        margin: var(--space-sm) auto;
        max-width: 100%;
        padding: 0 var(--space-sm);
    }
    
    .gallery-item {
        border-radius: 12px;
        aspect-ratio: 4/3;
    }
    
    .gallery-caption {
        padding: calc(var(--space-xs) * 0.75) var(--space-sm);
        font-size: 0.75rem;
        background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    }
}

/* Extra Small Mobile (up to 320px) */
@media (max-width: 320px) {
    .gallery-grid {
        gap: var(--space-xs);
        padding: 0 var(--space-xs);
    }
    
    .gallery-item {
        border-radius: 10px;
    }
    
    .gallery-caption {
        padding: 4px 8px;
        font-size: 0.7rem;
        line-height: 1.3;
    }
}

/* Landscape Mode on Mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-sm);
        margin: var(--space-sm) 0;
    }
    
    .gallery-item {
        aspect-ratio: 16/9;
        border-radius: 12px;
    }
    
    .gallery-caption {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.75rem;
        transform: translateY(0);
        background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    }
    
    .gallery-item:hover {
        transform: translateY(-3px);
    }
}

/* High-resolution screens (1400px and above) */
@media (min-width: 1400px) {
    .gallery-grid {
        gap: var(--space-lg);
        margin: var(--space-xl) 0;
    }
    
    .gallery-item {
        border-radius: 24px;
    }
    
    .gallery-caption {
        padding: var(--space-md) var(--space-lg);
        font-size: 1rem;
    }
}

/* css/case-study.css - Modern Case Study Page */

/* ===== BASE STYLES ===== */
.case-study-main {
    background: var(--color-black);
    overflow-x: hidden;
}

/* ===== HERO SECTION ===== */
.case-study-hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 120px 0 60px;
    background: linear-gradient(135deg, var(--color-off-black) 0%, var(--color-black) 100%);
    overflow: hidden;
}

/* Animated background gradient */
.case-study-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 59, 59, 0.03) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
    z-index: 0;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.case-study-hero .container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.case-study-hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

/* Breadcrumb */
.case-study-breadcrumb {
    margin-bottom: var(--space-md);
    opacity: 0;
    animation: fadeInUp 0.6s forwards 0.2s;
}

.case-study-breadcrumb a {
    color: var(--color-gray-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 59, 59, 0.1);
    border-radius: 40px;
    backdrop-filter: blur(10px);
}

.case-study-breadcrumb a:hover {
    color: var(--color-red);
    border-color: var(--color-red);
    transform: translateX(-5px);
    background: rgba(255, 59, 59, 0.05);
}

.case-study-breadcrumb svg {
    transition: transform 0.3s ease;
}

.case-study-breadcrumb a:hover svg {
    transform: translateX(-3px);
}

/* Category */
.case-study-category {
    color: var(--color-red);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    display: block;
    margin-bottom: var(--space-sm);
    opacity: 0;
    animation: fadeInUp 0.6s forwards 0.4s;
    font-weight: 500;
}

/* Title */
.case-study-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-sm);
    color: var(--color-white);
    opacity: 0;
    animation: fadeInUp 0.6s forwards 0.6s;
    text-shadow: 0 0 30px rgba(255, 59, 59, 0.2);
}

/* Subtitle */
.case-study-subtitle {
    font-size: 1.5rem;
    color: var(--color-gray-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
    opacity: 0;
    animation: fadeInUp 0.6s forwards 0.8s;
    font-weight: 400;
}

/* ===== MEDIA SHOWCASE SECTION ===== */
/* .case-study-media {
    padding: var(--space-2xl) 0;
    background: var(--color-off-black);
    position: relative;
}

.case-study-media .container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.media-showcase {
    width: 100%;
} */

/* Main Video Container */
/* .main-video-container {
    width: 100%;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
    margin-bottom: var(--space-xl);
    position: relative;
    background: var(--color-black);
    aspect-ratio: 16/9;
    border: 1px solid rgba(255, 59, 59, 0.1);
    transition: var(--transition-base);
}

.main-video-container:hover {
    border-color: var(--color-red);
    box-shadow: 0 40px 80px -20px rgba(255, 59, 59, 0.3);
    transform: translateY(-5px);
}

.main-video-container video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
} */

/* Video Controls Styling */
/* .main-video-container video::-webkit-media-controls-panel {
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.main-video-container video::-webkit-media-controls-play-button {
    background-color: var(--color-red);
    border-radius: 50%;
}

.main-video-container video::-webkit-media-controls-timeline {
    background-color: rgba(255,59,59,0.3);
    border-radius: 10px;
    height: 4px;
} */

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin: var(--space-xl) 0;
    opacity: 0;
    animation: fadeInUp 0.6s forwards 1s;
}

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 59, 59, 0.1);
    border-radius: 24px;
    padding: var(--space-lg);
    text-align: center;
    transition: var(--transition-base);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-red);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.stat-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-red);
    box-shadow: 0 30px 40px -20px rgba(255, 59, 59, 0.3);
}

.stat-card:hover::before {
    opacity: 0.05;
}

.stat-card > * {
    position: relative;
    z-index: 2;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-red);
    display: block;
    line-height: 1;
    margin-bottom: var(--space-xs);
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-value {
    transform: scale(1.05);
}

.stat-label {
    color: var(--color-gray-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* ===== FEATURE SHOWCASE GRID ===== */
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: var(--space-xl);
    color: var(--color-white);
    opacity: 0;
    animation: fadeInUp 0.6s forwards 1.2s;
}

.feature-showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.feature-video-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 59, 59, 0.1);
    border-radius: 30px;
    overflow: hidden;
    transition: var(--transition-base);
    position: relative;
    backdrop-filter: blur(10px);
}

.feature-video-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-red);
    box-shadow: 0 30px 50px -20px rgba(255, 59, 59, 0.3);
    background: rgba(255, 59, 59, 0.02);
}

.feature-video-container {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
    background: var(--color-black);
}

.feature-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.feature-video-card:hover .feature-video-container video {
    transform: scale(1.02);
}

/* Play Button Overlay */
.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.feature-video-container:hover .video-play-overlay {
    opacity: 1;
}

.play-icon {
    width: 60px;
    height: 60px;
    background: var(--color-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.play-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
    margin-left: 3px;
}

.feature-video-container:hover .play-icon {
    transform: scale(1);
}

.feature-video-content {
    padding: var(--space-lg);
}

.feature-video-content h3 {
    font-size: 1.4rem;
    margin-bottom: var(--space-xs);
    color: var(--color-white);
    font-weight: 600;
    transition: color 0.3s ease;
}

.feature-video-card:hover .feature-video-content h3 {
    color: var(--color-red);
}

.feature-video-content p {
    color: var(--color-gray-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ===== OVERVIEW SECTION ===== */
.case-study-overview {
    padding: var(--space-2xl) 0;
    position: relative;
}

.case-study-overview:nth-child(even) {
    background: var(--color-off-black);
}

.overview-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-xl);
    align-items: start;
}

.overview-stats {
    position: sticky;
    top: 150px;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.overview-content {
    max-width: 800px;
}

.overview-content h2 {
    font-size: 2rem;
    margin-bottom: var(--space-md);
    color: var(--color-white);
    position: relative;
    display: inline-block;
}

.overview-content h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--color-red);
    border-radius: 3px;
}

.overview-content p {
    color: var(--color-gray-light);
    line-height: 1.8;
    margin-bottom: var(--space-lg);
    font-size: 1.1rem;
}

.results-highlight {
    background: linear-gradient(135deg, rgba(255, 59, 59, 0.1) 0%, rgba(255, 59, 59, 0.05) 100%);
    border-left: 4px solid var(--color-red);
    padding: var(--space-lg) var(--space-xl);
    border-radius: 0 20px 20px 0;
    margin-top: var(--space-xl);
    position: relative;
    overflow: hidden;
}

.results-highlight::before {
    content: '"';
    position: absolute;
    top: -20px;
    right: 20px;
    font-size: 8rem;
    color: var(--color-red);
    opacity: 0.1;
    font-family: serif;
}

.highlight-number {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--color-red);
    display: block;
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.highlight-text {
    font-size: 1.3rem;
    color: var(--color-white);
    font-weight: 500;
    position: relative;
    z-index: 2;
}

/* Tablet Responsive (992px and below) */
@media (max-width: 992px) {
    .results-highlight {
        padding: var(--space-md) var(--space-lg);
        border-left-width: 3px;
        border-radius: 0 16px 16px 0;
        margin-top: var(--space-md);
    }
    
    .results-highlight::before {
        font-size: 6rem;
        top: -15px;
        right: 15px;
        opacity: 0.08;
    }
    
    .highlight-text {
        font-size: 1.2rem;
        line-height: 1.55;
    }
    
    .results-highlight > div {
        margin-top: 0.875rem;
        font-size: 0.95rem;
    }
}

/* Mobile Responsive (768px and below) */
@media (max-width: 768px) {
    .results-highlight {
        padding: var(--space-md);
        border-left-width: 3px;
        border-radius: 0 12px 12px 0;
        margin: var(--space-md) var(--space-sm) 0 var(--space-sm);
    }
    
    .results-highlight::before {
        font-size: 4rem;
        top: -10px;
        right: 10px;
        opacity: 0.06;
    }
    
    .highlight-text {
        font-size: 1rem;
        line-height: 1.5;
        font-weight: 500;
    }
    
    .results-highlight > div {
        margin-top: 0.75rem;
        font-size: 0.9rem;
    }
}

/* Small Mobile Responsive (480px and below) */
@media (max-width: 480px) {
    .results-highlight {
        padding: var(--space-sm);
        border-left-width: 2px;
        border-radius: 0 8px 8px 0;
        margin: var(--space-sm) var(--space-xs) 0 var(--space-xs);
    }
    
    .results-highlight::before {
        font-size: 3rem;
        top: -8px;
        right: 8px;
        opacity: 0.05;
    }
    
    .highlight-text {
        font-size: 0.9rem;
        line-height: 1.45;
        font-weight: 500;
    }
    
    .results-highlight > div {
        margin-top: 0.625rem;
        font-size: 0.85rem;
    }
}

/* Extra Small Mobile (360px and below) */
@media (max-width: 360px) {
    .results-highlight {
        padding: var(--space-xs);
        border-left-width: 2px;
        margin: var(--space-xs) 0.5rem 0 0.5rem;
    }
    
    .results-highlight::before {
        font-size: 2.5rem;
        top: -6px;
        right: 6px;
        display: none; /* Hide quote on very small screens for cleaner look */
    }
    
    .highlight-text {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .results-highlight > div {
        margin-top: 0.5rem;
        font-size: 0.8rem;
    }
}

/* Landscape Mode on Mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .results-highlight {
        padding: var(--space-sm) var(--space-md);
        margin: var(--space-sm) auto;
        max-width: 90%;
    }
    
    .highlight-text {
        font-size: 0.95rem;
        line-height: 1.45;
    }
    
    .results-highlight::before {
        font-size: 3rem;
        top: -12px;
        right: 12px;
    }
}

/* ===== RELATED WORK SECTION ===== */
.related-work {
    padding: var(--space-lg) 0;
    background: var(--color-off-black);
    position: relative;
    overflow: hidden;
}

.related-work::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(255, 59, 59, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.related-work h2 {
    font-size: 2.5rem;
    margin-bottom: var(--space-xl);
    text-align: center;
    color: var(--color-white);
    position: relative;
    z-index: 2;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    position: relative;
    z-index: 2;
}

.portfolio-card-link {
    text-decoration: none;
    display: block;
    height: 100%;
}

.portfolio-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 59, 59, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-red);
    box-shadow: 0 30px 40px -20px rgba(255, 59, 59, 0.3);
}

.portfolio-media {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--color-black);
}

.portfolio-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-media img {
    transform: scale(1.05);
}

.portfolio-content {
    padding: var(--space-md);
}

.portfolio-category {
    color: var(--color-red);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: var(--space-xs);
}

.portfolio-content h3 {
    font-size: 1.2rem;
    color: var(--color-white);
    transition: color 0.3s ease;
    margin: 0;
}

.portfolio-card:hover .portfolio-content h3 {
    color: var(--color-red);
}

/* ===== CTA SECTION ===== */
.case-study-cta {
    padding: var(--space-lg) 0;
    background: linear-gradient(135deg, var(--color-off-black) 0%, var(--color-black) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.case-study-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 59, 59, 0.05) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.cta-content h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: var(--space-md);
    color: var(--color-white);
}

.cta-content p {
    font-size: 1.2rem;
    color: var(--color-gray-light);
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    min-width: 200px;
    padding: 1.2rem 2rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Large Desktop */
@media (min-width: 1400px) {
    .feature-showcase-grid {
        gap: var(--space-xl);
    }
    
    .stat-value {
        font-size: 3.5rem;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    .overview-grid {
        gap: var(--space-lg);
    }
    
    .feature-showcase-grid {
        gap: var(--space-md);
    }
}

/* Tablet */
@media (max-width: 992px) {
    .overview-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .overview-stats {
        position: relative;
        top: 0;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
        margin-bottom: var(--space-lg);
    }
    
    .feature-showcase-grid {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .case-study-subtitle {
        font-size: 1.3rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .case-study-hero {
        min-height: 60vh;
        padding: 100px 0 40px;
    }
    
    .case-study-title {
        font-size: 3rem;
    }
    
    .case-study-subtitle {
        font-size: 1.2rem;
    }
    
    .overview-stats {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .feature-video-content {
        padding: var(--space-md);
    }
    
    .feature-video-content h3 {
        font-size: 1.2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .highlight-number {
        font-size: 2.5rem;
    }
    
    .highlight-text {
        font-size: 1.1rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .case-study-title {
        font-size: 2.5rem;
    }
    
    .case-study-subtitle {
        font-size: 1rem;
    }
    
    .case-study-category {
        font-size: 0.8rem;
        letter-spacing: 0.2em;
    }
    
    .stat-value {
        font-size: 2.5rem;
    }
    
    .main-video-container {
        border-radius: 20px;
    }
    
    .feature-video-card {
        border-radius: 20px;
    }
    
    .feature-video-content {
        padding: var(--space-sm);
    }
    
    .feature-video-content h3 {
        font-size: 1.1rem;
    }
    
    .feature-video-content p {
        font-size: 0.9rem;
    }
    
    .overview-content h2 {
        font-size: 1.6rem;
    }
    
    .overview-content p {
        font-size: 1rem;
    }
}

/* Landscape Mode on Mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .case-study-hero {
        min-height: 100vh;
        padding: 80px 0 40px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .case-study-hero {
        background: none;
        color: #000;
    }
    
    .video-container,
    .feature-video-container,
    .cta-buttons {
        display: none;
    }
    
    .case-study-title {
        color: #000;
    }
}

/* ===== DARK MODE ADJUSTMENTS ===== */
[data-theme="light"] .case-study-hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

[data-theme="light"] .stat-card,
[data-theme="light"] .feature-video-card,
[data-theme="light"] .portfolio-card {
    background: var(--bg-card);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .case-study-title,
[data-theme="light"] .feature-video-content h3,
[data-theme="light"] .overview-content h2 {
    color: var(--text-primary);
}

[data-theme="light"] .case-study-subtitle,
[data-theme="light"] .feature-video-content p,
[data-theme="light"] .overview-content p {
    color: var(--text-secondary);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--color-off-black);
  padding: var(--space-xl) 0 var(--space-lg);
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Background Pattern (subtle) */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 59, 59, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

/* Footer Grid - Desktop Default */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-lg);
  position: relative;
  z-index: 2;
}

/* Footer Info Section */
.footer-info {
  max-width: 350px;
}

.footer-info .logo {
  font-size: 2rem;
  margin-bottom: var(--space-md);
  display: inline-block;
  transition: var(--transition-base);
}

.footer-info .logo:hover {
  color: var(--color-red);
}

.footer-info p {
  color: var(--color-gray-light);
  line-height: 1.8;
  margin-bottom: var(--space-md);
  font-size: 0.95rem;
}

.footer-legal {
  color: var(--color-gray-mid);
  font-size: 0.85rem;
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Footer Links Sections */
.footer-links h4 {
  color: var(--color-white);
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  padding-bottom: var(--space-xs);
}

.footer-links h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--color-red);
  transition: width var(--transition-base);
}

.footer-links h4:hover::after {
  width: 50px;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: var(--space-sm);
  transition: var(--transition-fast);
}

.footer-links a {
  color: var(--color-gray-light);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  display: inline-block;
  position: relative;
  padding-left: 0;
}

.footer-links a:hover {
  color: var(--color-red);
  transform: translateX(8px);
}

/* Arrow animation on hover */
.footer-links a::before {
  content: '→';
  position: absolute;
  left: -20px;
  opacity: 0;
  transition: var(--transition-fast);
  color: var(--color-red);
}

.footer-links a:hover::before {
  opacity: 1;
  left: -25px;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Large Desktop (1400px and above) */
@media (min-width: 1400px) {
  .footer {
    padding: calc(var(--space-xl) * 1.2) 0 var(--space-xl);
  }
  
  .footer-grid {
    gap: calc(var(--space-lg) * 1.2);
  }
  
  .footer-info {
    max-width: 400px;
  }
  
  .footer-info .logo {
    font-size: 2.2rem;
  }
  
  .footer-info p {
    font-size: 1rem;
  }
  
  .footer-links h4 {
    font-size: 1.2rem;
  }
  
  .footer-links a {
    font-size: 1rem;
  }
}

/* Standard Desktop (1200px to 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
  .footer-grid {
    gap: var(--space-md);
  }
  
  .footer-info {
    max-width: 320px;
  }
}

/* Small Desktop / Large Tablet (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  .footer {
    padding: calc(var(--space-xl) * 0.9) 0 var(--space-lg);
  }
  
  .footer-grid {
    gap: var(--space-md);
  }
  
  .footer-info {
    max-width: 300px;
  }
  
  .footer-info .logo {
    font-size: 1.8rem;
  }
  
  .footer-info p {
    font-size: 0.9rem;
  }
  
  .footer-links h4 {
    font-size: 1rem;
    margin-bottom: calc(var(--space-md) * 0.8);
  }
  
  .footer-links a {
    font-size: 0.9rem;
  }
}

/* Tablet Landscape (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .footer {
    padding: calc(var(--space-xl) * 0.8) 0 var(--space-lg);
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg) var(--space-md);
  }
  
  .footer-info {
    grid-column: 1 / -1;
    max-width: 100%;
    text-align: center;
    margin-bottom: var(--space-md);
  }
  
  .footer-info .logo {
    margin-left: auto;
    margin-right: auto;
  }
  
  .footer-links {
    text-align: center;
  }
  
  .footer-links h4::after {
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
  }
  
  .footer-links h4:hover::after {
    width: 60px;
  }
  
  .footer-links a:hover {
    transform: translateY(-2px) translateX(0);
  }
  
  .footer-links a::before {
    display: none; /* Remove arrow on tablet for cleaner look */
  }
  
  .footer-legal {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: var(--space-md);
  }
}

/* Mobile Landscape (480px to 767px) */
@media (min-width: 480px) and (max-width: 767px) {
  .footer {
    padding: calc(var(--space-xl) * 0.7) 0 var(--space-md);
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }
  
  .footer-info {
    grid-column: 1 / -1;
    max-width: 100%;
    text-align: center;
    margin-bottom: var(--space-md);
  }
  
  .footer-info .logo {
    font-size: 1.8rem;
    margin-bottom: var(--space-sm);
  }
  
  .footer-info p {
    font-size: 0.9rem;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .footer-links {
    text-align: center;
  }
  
  .footer-links h4 {
    font-size: 1rem;
    margin-bottom: calc(var(--space-md) * 0.7);
  }
  
  .footer-links h4::after {
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
  }
  
  .footer-links ul {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .footer-links li {
    margin-bottom: calc(var(--space-sm) * 0.8);
  }
  
  .footer-links a {
    font-size: 0.9rem;
  }
  
  .footer-links a:hover {
    transform: translateY(-2px) translateX(0);
    color: var(--color-red);
  }
  
  .footer-links a::before {
    display: none;
  }
  
  .footer-legal {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: var(--space-md);
    font-size: 0.8rem;
  }
}

/* Mobile Portrait (up to 479px) */
@media (max-width: 479px) {
  .footer {
    padding: calc(var(--space-xl) * 0.6) 0 var(--space-sm);
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .footer-info {
    max-width: 100%;
    text-align: center;
  }
  
  .footer-info .logo {
    font-size: 1.8rem;
    margin-bottom: var(--space-sm);
  }
  
  .footer-info p {
    font-size: 0.85rem;
    line-height: 1.7;
    margin-bottom: var(--space-sm);
    padding: 0 var(--space-sm);
  }
  
  .footer-links {
    text-align: center;
  }
  
  .footer-links h4 {
    font-size: 1rem;
    margin-bottom: calc(var(--space-md) * 0.6);
  }
  
  .footer-links h4::after {
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
  }
  
  .footer-links ul {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .footer-links li {
    margin-bottom: calc(var(--space-sm) * 0.7);
  }
  
  .footer-links a {
    font-size: 0.85rem;
  }
  
  .footer-links a:hover {
    transform: translateY(-2px) translateX(0);
  }
  
  .footer-links a::before {
    display: none;
  }
  
  .footer-legal {
    margin-top: var(--space-md);
    padding-top: var(--space-sm);
    font-size: 0.75rem;
  }
}

/* Very Small Mobile (up to 360px) */
@media (max-width: 360px) {
  .footer {
    padding: calc(var(--space-xl) * 0.5) 0 var(--space-sm);
  }
  
  .footer-info .logo {
    font-size: 1.5rem;
  }
  
  .footer-info p {
    font-size: 0.8rem;
    padding: 0 0.5rem;
  }
  
  .footer-links h4 {
    font-size: 0.95rem;
  }
  
  .footer-links a {
    font-size: 0.8rem;
  }
  
  .footer-legal {
    font-size: 0.7rem;
  }
}

/* Landscape Mode on Mobile */
@media (max-height: 600px) and (orientation: landscape) {
  .footer {
    padding: var(--space-md) 0;
  }
  
  .footer-grid {
    gap: var(--space-md);
  }
  
  .footer-info {
    max-width: 300px;
  }
  
  .footer-info p {
    font-size: 0.85rem;
    margin-bottom: var(--space-sm);
  }
}

/* High-resolution screens (4K and above) */
@media (min-width: 2560px) {
  .footer {
    padding: calc(var(--space-2xl)) 0 calc(var(--space-xl) * 1.5);
  }
  
  .footer-grid {
    max-width: 1600px;
    margin: 0 auto;
    gap: calc(var(--space-xl) * 1.5);
  }
  
  .footer-info {
    max-width: 500px;
  }
  
  .footer-info .logo {
    font-size: 2.8rem;
  }
  
  .footer-info p {
    font-size: 1.2rem;
    line-height: 2;
  }
  
  .footer-links h4 {
    font-size: 1.5rem;
  }
  
  .footer-links a {
    font-size: 1.2rem;
  }
  
  .footer-legal {
    font-size: 1rem;
  }
}

/* Print Styles */
@media print {
  .footer {
    background: none;
    border-top: 1px solid #000;
    color: #000;
    padding: 2rem 0;
  }
  
  .footer a {
    color: #000 !important;
    text-decoration: underline;
  }
  
  .footer::before,
  .footer-links h4::after,
  .footer-links a::before {
    display: none;
  }
}