.case-study-container {
    min-height: 100vh;
    width: 100vw;
    position: relative;
    overflow-x: hidden;
}

.floating-square {
    position: fixed;
    border: 0.1vw solid var(--accent);
    pointer-events: none;
    z-index: 1;
}

.floating-square:nth-child(odd) {
    animation: floatVertical 20s ease-in-out infinite;
}

.floating-square:nth-child(even) {
    animation: floatHorizontal 25s ease-in-out infinite;
}

.case-study-container .floating-square:nth-child(3n) {
    animation: floatDiagonal 30s ease-in-out infinite;
}

@keyframes floatVertical {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    25% {
        transform: translateY(-100vh) rotate(90deg);
    }

    50% {
        transform: translateY(-50vh) rotate(180deg);
    }

    75% {
        transform: translateY(-80vh) rotate(270deg);
    }
}

@keyframes floatHorizontal {

    0%,
    100% {
        transform: translateX(0px) rotate(0deg);
    }

    25% {
        transform: translateX(100vw) rotate(90deg);
    }

    50% {
        transform: translateX(50vw) rotate(180deg);
    }

    75% {
        transform: translateX(80vw) rotate(270deg);
    }
}

@keyframes floatDiagonal {

    0%,
    100% {
        transform: translate(0px, 0px) rotate(0deg);
    }

    25% {
        transform: translate(50vw, -50vh) rotate(90deg);
    }

    50% {
        transform: translate(100vw, -100vh) rotate(180deg);
    }

    75% {
        transform: translate(25vw, -25vh) rotate(270deg);
    }
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(to right, rgba(30, 30, 30, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(30, 30, 30, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

.logo {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

@media (min-width: 1490px) {
    .logo {
        position: fixed;
        left: 1rem;
        top: 1rem;
    }
}


.logo-name {
    width: 7rem;
}
.logo-name .logo-title{
    position: relative;
    text-align: center;
}

.close-btn {
    margin: 0 !important;
}

.btn-quaternary {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    background-color: var(--card-bg);
    border: 1px solid var(--accent);
    color: var(--text);
    padding: 0.75rem 1.5rem;
    border-radius: 0.25rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .btn-quaternary {
        top: 1rem;
        right: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

.close-button:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(204, 11, 13, 0.3);
}


/* ==========================================================================
   1. HERO SECTION
   ========================================================================== */

.hero-section {
    height: 90vh;
    margin-top: 10vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.hero-content {
    text-align: left;
    width: 100%;
}

.project-tag {
    font-size: 0.9rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    margin-bottom: 1rem;
    margin-top: 10rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-tag::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 1px;
    background-color: var(--accent);
    margin-right: 8px;
    transition: width 0.3s ease;
}

.project-tag:hover::before {
    width: 30px;
}

@media (min-width: 1400px) {
    .project-tag {
        justify-content: flex-start;
    }
}



.hero-title {
    margin: 3rem 0; 
    font-size: 2.5rem; 
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 5rem;
        margin: 8rem 0;
    }
}

.hero-title h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
}

.hero-title span {
    color: var(--accent);
}

.hero-description {
    font-size: 1.1rem; 
    color: var(--text-light);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 12rem;
}

@media (min-width: 768px) {
    .hero-description {
        font-size: 1.25rem;
    }
}

.tech-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    width: 60%;
    margin: 2rem auto;
    position: relative;
    overflow: hidden;
}

.tech-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: scanEffect 4s ease-in-out infinite;
}

@keyframes scanEffect {
    0% {
        left: -50%;
    }

    100% {
        left: 150%;
    }
}


/* **************************************************************************
   ==========================================================================
   MAIN
   ========================================================================== 
   ************************************************************************** */


.content-section {
    position: relative;
    z-index: 10;
    padding: 3rem 1rem;
}

@media (min-width: 768px) {
    .content-section {
        padding: 4rem 2rem;
    }
}

.content-container {
    max-width: 1200px;
    margin: 0 auto 5rem;
}

.section-title {
    margin-bottom: 5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--accent);
}


/* ==========================================================================
   2. Project Overview
   ========================================================================== */


.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.info-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    transition: all 0.5s ease;
}

.info-card:hover::before {
    left: 100%;
}

.info-card h3 {
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-card p {
    line-height: 1.7;
}


/* ==========================================================================
   3. Challenge & Solution
   ========================================================================== */

.challenge-solution {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 5rem;
}

@media (min-width: 768px) {
    .challenge-solution {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

.challenge-card,
.solution-card {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 0.25rem;
    border-left: 4px solid var(--accent);
}

.challenge-card ul,
.solution-card ul {
    margin-top: 2rem;
}

.feature-item {
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.feature-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 0.5rem;
    height: 0.5rem;
    background-color: var(--accent);
    border-radius: 50%;
}


/* ==========================================================================
   4. Image Showcase
   ========================================================================== */

.image-showcase {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2.5rem;
    margin-bottom: 5rem;
}

@media (min-width: 1140px) {
    .image-showcase {
        grid-template-columns: repeat(2, 1fr);
    }
}

.showcase-image {
    border-radius: 0.25rem;
    overflow: hidden;
    position: relative;
}

.showcase-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.showcase-image:hover img {
    transform: scale(1.05);
}

.showcase-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.4) 25%, rgba(0, 0, 0, 0.6) 100%);
    padding: 1.5rem;
    color: var(--text);
}


/* ==========================================================================
   5. Website, CTA & Testimonial
   ========================================================================== */

.results-section {
    /* background-color: var(--card-bg); */
    padding: 4rem 2rem;
}

.content-container {
    max-width: 1200px;
    margin: 0 auto 5rem;
}

.results-section {
    /* background-color: var(--card-bg); */
    padding: 0;
    border-radius: 0.25rem;
    margin: 3rem 0;
}

@media (min-width: 1024px) {
    .results-section {
       padding: 3rem;
    }
}

.btn-container {
    width: 100%;
    display: flex;
    align-items: center;;
}

.btn {
    margin: 5rem auto;
    align-items: center;
}

.testimonial-card {
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
    padding: 2.5rem;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-content {
    position: relative;
}

.quote-icon {
    color: var(--accent);
    opacity: 0.3;
    margin-bottom: 1rem;
}

.testimonial-card blockquote {
    text-align: left;
    font-size: 1.1rem;
    line-height: 1.8;
    font-style: italic;
    margin-bottom: 2rem;
    position: relative;
    padding-left: 0.75rem;
    border-left: 2px solid var(--accent);
}

.testimonial-author {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.author-info strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.author-info span {
    color: var(--accent);
    font-size: 0.9rem;
    opacity: 0.9;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stars {
    color: #ffd700;
    font-size: 1.2rem;
}

.rating-text {
    font-weight: 600;
    color: var(--accent);
}