.project-details-main {
    padding-top: 80px;
    min-height: 100vh;
    background: var(--bg-color);
}

.back-button-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    padding: 10px 16px;
    border-radius: 8px;
    font-family: var(--font-outfit);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-button:hover {
    background: var(--card-hover);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.project-header-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.project-header-content {
    display: flex;
    align-items: center;
    gap: 25px;
    flex: 1;
}

.project-icon-container {
    flex-shrink: 0;
    position: relative;
}

.project-icon {
    width: 100px;
    height: 100px;
    border-radius: 22px;
    border: 2px solid var(--primary-color);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(2, 136, 209, 0.3),
        0 0 60px rgba(2, 136, 209, 0.1);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.project-icon-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(
        circle at center,
        rgba(2, 136, 209, 0.15) 0%,
        rgba(2, 136, 209, 0.08) 30%,
        rgba(2, 136, 209, 0.03) 60%,
        transparent 100%
    );
    border-radius: 26px;
    z-index: 1;
    animation: ambientPulse 3s ease-in-out infinite alternate;
}

.project-icon:hover {
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(2, 136, 209, 0.4),
        0 0 80px rgba(2, 136, 209, 0.15);
    transform: translateY(-3px) scale(1.02);
}

.project-icon-container:hover::before {
    animation-duration: 1.5s;
}

@keyframes ambientPulse {
    from {
        opacity: 0.6;
        transform: scale(1);
    }
    to {
        opacity: 1;
        transform: scale(1.1);
    }
}

.project-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    font-family: var(--font-outfit);
}

.project-main-subtitle {
    font-size: 1.2rem;
    color: #8F96A3;
    margin: 0 0 15px 0;
    font-family: var(--font-inter);
}

.status-text {
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-outfit);
    display: inline-block;
}

/* Action buttons */
.project-actions {
    display: flex;
    gap: 15px;
    flex-shrink: 0;
    align-items: center;
}

.action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 24px;
    border-radius: 10px;
    font-family: var(--font-outfit);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    white-space: nowrap;
    min-width: 140px;
}

.action-button.primary {
    background: var(--primary-color);
    color: white;
}

.action-button.primary:hover {
    background: #0277BD;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(2, 136, 209, 0.3);
}

.action-button.secondary {
    background: var(--card-bg);
    color: var(--text-color);
    border-color: rgba(255, 255, 255, 0.1);
}

.action-button.secondary:hover {
    background: var(--card-hover);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Content grid */
.project-content-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
    grid-template-areas:
        "description stats"
        "screenshots screenshots"
        "features tech"
        "technical technical";
}

/* Content cards */
.content-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    font-family: var(--font-outfit);
}

.card-title i {
    color: var(--primary-color);
}

.description-card { grid-area: description; }
.stats-card { grid-area: stats; }
.technical-card { grid-area: technical; }
.features-card { grid-area: features; }
.tech-card { grid-area: tech; }
.screenshots-card { grid-area: screenshots; }
.project-description-text { line-height: 1.6; }
.project-long-description-text { color: #8F96A3; line-height: 1.6; }

/* Stats card */
.stats-grid { display: flex; flex-direction: column; gap: 20px; }
.stats-row-flex { display: flex; gap: 15px; }
.stat-item-half { flex: 1; }
.stat-item { display: flex; align-items: center; gap: 15px; padding: 15px; background: rgba(255, 255, 255, 0.02); border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.05); transition: all 0.3s ease; }
.stat-item:hover { box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25); border-color: var(--primary-color); background-color: rgba(2, 136, 209, 0.03); }
.stat-icon { color: var(--primary-color); font-size: 1.2rem; }
.stat-content { display: flex; flex-direction: column; }
.stat-label { font-size: 0.8rem; color: #8F96A3; }
.stat-value { font-size: 1rem; font-weight: 600; }

/* Technical card */
.technical-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.technical-list li { display: flex; align-items: flex-start; gap: 10px; padding: 12px; background: rgba(255, 255, 255, 0.02); border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.05); transition: all 0.2s ease; }
.technical-list li:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--primary-color); }
.technical-list li i { color: var(--secondary-color); margin-top: 4px; flex-shrink: 0; }
.technical-list li span { line-height: 1.5; }
.technical-list li strong { color: var(--text-color); font-weight: 600; }

/* Features card */
.features-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.features-list li { display: flex; align-items: center; gap: 10px; padding: 12px; background: rgba(255, 255, 255, 0.02); border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.05); transition: all 0.2s ease; }
.features-list li:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--primary-color); }
.features-list li i { color: var(--secondary-color); }

/* Technologies card */
.tech-grid { display: flex; flex-direction: column; gap: 10px; }
.tech-item { display: flex; align-items: center; gap: 12px; padding: 12px; background: rgba(255, 255, 255, 0.02); border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.05); transition: all 0.2s ease; }
.tech-item:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--primary-color); }
.tech-item i { color: var(--primary-color); }

/* Call to action section */
.cta-section { background: rgba(24, 26, 27, 0.5); padding: 60px 20px; margin-top: 40px; }
.cta-content { max-width: 800px; margin: 0 auto; text-align: center; }
.cta-content h2 { font-size: 2rem; margin-bottom: 15px; }
.cta-content p { font-size: 1.1rem; color: #8F96A3; margin-bottom: 30px; }
.cta-buttons { display: flex; gap: 20px; justify-content: center; }
.cta-button { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 25px; border-radius: 10px; font-weight: 600; text-decoration: none; transition: all 0.3s ease; border: 2px solid transparent; }
.cta-button:not(.primary) { background: var(--card-bg); border-color: rgba(255, 255, 255, 0.1); }
.cta-button:not(.primary):hover { background: var(--card-hover); border-color: var(--primary-color); transform: translateY(-3px); }
.cta-button.primary { background: var(--primary-color); color: white; }
.cta-button.primary:hover { background: #0277BD; transform: translateY(-3px); box-shadow: 0 10px 25px rgba(2, 136, 209, 0.3); }

/* Screenshots Section */
.screenshots-grid {
        display: flex;
        gap: 20px;
        padding-bottom: 10px;
        overflow-x: auto;
        scroll-behavior: smooth;
        scrollbar-width: thin;
        scrollbar-color: var(--primary-color) rgba(255, 255, 255, 0.05);
        
        /* NEW: Adjust the maximum height of the container */
        max-height: 250px; /* Adjust this value as needed */
        
        /* OPTIONAL: Align items to the start to prevent empty space at the bottom */
        align-items: flex-start;
    }
.screenshots-grid::-webkit-scrollbar { height: 8px; }
.screenshots-grid::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 4px; }
.screenshots-grid::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 4px; }
.screenshot-item {
        position: relative; border-radius: 12px; background: rgba(210, 212, 213, 0.05); cursor: pointer; transition: all 0.3s ease;
        height: 240px; /* You can adjust this value for your desired shorter height */
        width: auto;
}
.screenshot-item img {
        transition: transform 0.3s ease;
        /* Make the image fill the container's new dimensions */
        width: 100%;
        height: 100%;
        object-fit: cover; /* This will fill the frame, cropping if necessary */
}
.screenshot-item:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }
.screenshot-item:hover img { transform: scale(1.05); }
.screenshot-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; }
.screenshot-item:hover .screenshot-overlay { opacity: 1; }
.screenshot-overlay i { color: white; font-size: 24px; }

/* Screenshot Modal */
.screenshot-modal { display: none; position: fixed; z-index: 9999; inset: 0; background-color: rgba(0, 0, 0, 0.9); backdrop-filter: blur(5px); }
.screenshot-modal.active { display: flex; align-items: center; justify-content: center; }
.modal-content { position: relative; }
.modal-image { max-width: 90vw; max-height: 85vh; object-fit: contain; cursor: zoom-in; }
.modal-image.zoomed { transform: scale(1.5); cursor: zoom-out; }
.modal-close, .modal-nav { position: absolute; color: white; background: rgba(0,0,0,0.5); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; user-select: none; }
.modal-close { top: 15px; right: 15px; width: 40px; height: 40px; font-size: 24px; }
.modal-nav { top: 50%; transform: translateY(-50%); width: 45px; height: 45px; font-size: 20px; }
.modal-nav:hover { background: rgba(255, 255, 255, 0.2); }
.modal-prev { left: 15px; }
.modal-next { right: 15px; }


/* ==========================================
   RESPONSIVE STYLES 📱
   ========================================== */

/* For Tablets and smaller */
@media (max-width: 992px) {
    /* FIX: Switch the main content grid to a single column */
    .project-content-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "description"
            "stats"
            "screenshots"
            "features"
            "tech"
            "technical";
    }
}

/* For Mobile Phones */
@media (max-width: 768px) {
    .project-details-main {
        padding-top: 70px;
    }
    /* FIX: Stack the header items vertically */
    .project-header-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 25px;
    }
    .project-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch; /* Makes buttons full-width */
    }
    .action-button {
        flex: 1; /* Make buttons grow to fill the container */
    }
    .project-main-title {
        font-size: 2rem;
    }
    /* IMPROVEMENT: Add a better mobile scrolling experience for screenshots */
    .screenshots-grid {
        padding: 0 20px; /* Add side padding to see the edges */
        scroll-snap-type: x mandatory; /* This enables the snap effect */
    }
    .screenshot-item {
        position: relative;
        border-radius: 12px;
        background: rgba(210, 212, 213, 0.05);
        cursor: pointer;
        transition: all 0.3s ease;
        width: 85%;
        scroll-snap-align: center; /* This makes each item snap to the center */
    }
    .project-icon {
        width: 100px;
        height: 100px;
        border-radius: 22px;
    }
    .project-header-content {
        width: 100%;
        text-align: center;
        align-items: center; /* Center the icon, title, and subtitle */
        flex-direction: column;
    }
    .project-main-title {
        font-size: 1.8rem;
    }
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    .cta-button {
        width: 100%;
        max-width: 320px;
    }
}

/* Add this to your project.css file */
.project-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 40px 20px;
    margin-top: 50px;
    background-color: rgba(24, 26, 27, 0.5);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: #8F96A3;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-separator {
    color: #444;
}

.copyright-text {
    font-size: 0.9em;
    margin: 0;
}