﻿.project-details-section {
    padding: 1rem 0;
}

.breadcrumb-nav {
    padding: 1rem 0 1rem 0;
}

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

.nav-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.nav-back:hover {
    color: var(--accent-primary);
}

.nav-back i {
    font-size: 1rem;
}

.project-details-hero {
    padding: 2rem 0 3rem 0;
    background: var(--secondary-bg);
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    display: grid;
    grid-template-columns: 400px 1fr 300px;
    gap: 3rem;
    align-items: start;
}

.project-details-media {
    position: sticky;
    justify-items: center;
    top: 100px;
}

.main-image {
    width: 100%;
    height: 326px;
    border-radius: 12px;
    /*    background: var(--gradient-primary);*/
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    justify-self: center;
    margin-bottom: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.main-image:hover {
    transform: scale(1.02);
}


/*.project-details .Gallery */
.project-details-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.gallery-thumbnail {
    height: 100px;
    width: 128px;
    border-radius: 8px;
    background: var(--card-bg);
    border: 2px solid transparent;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
}

.gallery-thumbnail:hover,
.gallery-thumbnail.active {
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.gallery-nav-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-nav-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.project-details-info {
    padding-top: 1rem;
    min-height: 400px;
}

.project-details-type {
    display: inline-block;
    background: var(--tag-background);
    color: var(--accent-primary);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.project-details-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.project-details-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tech-tag {
    background: var(--card-bg);
    color: var(--accent-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

.hero-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.hero-sidebar-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.hero-sidebar-title {
    color: var(--accent-primary);
    font-size: 1rem;
    margin-bottom: 1rem;
    text-align: center;
    position: relative;
    font-weight: 600;
}

.hero-sidebar-title::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background: var(--accent-primary);
    margin: 0.3rem auto 0;
    border-radius: 1px;
}

.quick-info {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.info-row-value {
    color: var(--text-primary);
    font-weight: 600;
}

.repository-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-public {
    background: #22c55e;
}

.status-private {
    background: #e81123;
}

.status-archived {
    background: #ea8d04;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.quick-btn {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
}

.quick-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--shadow), transparent);
    transition: left 0.5s ease;
}

.quick-btn:hover {
    border-color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px var(--shadow);
}

.quick-btn:hover::before {
    left: 100%;
}

.quick-btn-icon {
    font-size: 1.1rem;
    margin-right: 0.8rem;
    color: var(--accent-primary);
    width: 16px;
    text-align: center;
}

.quick-btn-content {
    flex: 1;
}

.quick-btn-title {
    font-weight: 600;
    margin-bottom: 0.1rem;
}


.quick-btn-desc {
    font-size: 0.75rem;
    color: var(--text-primary);
}

.quick-btn-arrow {
    color: var(--text-muted);
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.quick-btn:hover .quick-btn-arrow {
    transform: translateX(2px);
    color: var(--accent-primary);
}

html[lang="ar"] .platform-btn {
    direction: rtl; /* reverse text and layout */
}

html[lang="ar"] .quick-btn .quick-btn-content {
    /*order: 1;*/ /* move text to the left */
    padding-right:15px;
    text-align: right;
}


html[lang="ar"] .quick-btn .quick-btn-arrow i {
    transform: rotate(180deg); /* flip the arrow */
}


.mobile-actions {
    display: none;
}

/* Mobile-specific project-details Info */
.mobile-project-details-info {
    display: none;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    margin-top: 2rem;
}

.mobile-project-details-info-title {
    color: var(--accent-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
}




/* ============================================
   PLATFORM BUTTONS STYLES
   ============================================ */

.platform-btn {
    border: none;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.platform-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.platform-btn:hover::before {
    left: 100%;
}

.platform-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.platform-btn:active {
    transform: translateY(0px);
}

/* Flip platform button for Arabic */
html[lang="ar"] .platform-btn {
    direction: rtl; /* reverse text and layout */
}

html[lang="ar"] .platform-btn .quick-btn-content {
    order: 1; /* move text to the left */
    text-align: right;
}

html[lang="ar"] .platform-btn .quick-btn-arrow {
    order: 3; /* move arrow to the left */
}

html[lang="ar"] .platform-btn .quick-btn-arrow i {
    transform: rotate(180deg); /* flip arrow direction */
}

.primary-download {
    background: var(--gradient-primary) !important;
    border-color: var(--accent-primary) !important;
    font-weight: 600;
}

.primary-download:hover {
    box-shadow: 0 5px 15px rgba(255, 122, 26, 0.2);
}

.primary-download .quick-btn-icon,
.primary-download .quick-btn-title {
    color: white !important;
}

/* Itch.io Button */
.itch-btn {
    background: linear-gradient(135deg, #fa5c5c, #e63946);
    border: 2px solid rgba(250, 92, 92, 0.3);
}

.itch-btn:hover {
    background: linear-gradient(135deg, #ff6b6b, #fa5c5c);
    border-color: rgba(250, 92, 92, 0.5);
}

/* GitHub Button */
.github-btn {
    background: linear-gradient(135deg, #24292e, #1a1e22);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.github-btn:hover {
    background: linear-gradient(135deg, #2c3237, #24292e);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Steam Button */
.steam-btn {
    background: linear-gradient(135deg, #1b2838, #2a475e);
    border: 2px solid rgba(102, 192, 244, 0.3);
}

.steam-btn:hover {
    background: linear-gradient(135deg, #2a475e, #1b2838);
    border-color: rgba(102, 192, 244, 0.5);
}

.platform-btn-icon {
    height: 24px;
    fill: currentColor;
    font-size: 1.1rem;
    margin-right: 0.8rem;
    width: 16px;
    text-align: center;
}

/* Platform buttons container */
.platform-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}

/* Trailer Section Styles */
.trailer-section {
    padding: 4rem 0 2rem;
    background: var(--primary-bg);
}

.trailer-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.trailer-title {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.trailer-title i {
    color: var(--accent-primary);
    font-size: 1.8rem;
}

.trailer-title h2 {
    font-size: 2.2rem;
    color: var(--text-primary);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /*   16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.project-details {
    padding: 2rem 0 4rem;
}

.details-grid {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    /*    display: grid; 
    grid-template-columns: 2fr 1fr; */
    gap: 2rem;
}

.project-details-section-title {
    font-size: 1.8rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-content {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.features-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent-primary);
}

.feature-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 0.15rem !important;
}

.feature-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.sidebar-title {
    color: var(--accent-primary);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
}

.sidebar-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--accent-primary);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.sidebar-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 122, 26, 0.1), transparent);
    transition: left 0.5s ease;
}

.sidebar-btn:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 122, 26, 0.1);
}

.sidebar-btn:hover::before {
    left: 100%;
}

.sidebar-btn-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: var(--accent-primary);
    width: 24px;
    text-align: center;
}

.sidebar-btn-content {
    flex: 1;
}

.sidebar-btn-title {
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.sidebar-btn-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.sidebar-btn-arrow {
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.sidebar-btn:hover .sidebar-btn-arrow {
    transform: translateX(3px);
    color: var(--accent-primary);
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile-specific project-details Info */
.mobile-project-details-info {
    display: none;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    margin-top: 2rem;
}

.mobile-project-details-info-title {
    color: var(--accent-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
}

/* Gallery Modal */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.gallery-modal.active {
    display: flex;
}

.gallery-modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.gallery-modal img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
}

.gallery-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 122, 26, 0.8);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.gallery-modal-nav:hover {
    background: var(--accent-primary);
}

.gallery-modal-prev {
    left: -80px;
}

.gallery-modal-next {
    right: -80px;
}

/* Mobile responsive adjustments for platform buttons */
@media (max-width: 768px) {
    .platform-buttons-container {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .platform-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 15px;
    }

    .platform-btn-icon {
        width: 20px;
        height: 20px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-sidebar {
        display: none;
    }

    .project-details-media {
        justify-items: center;
        position: static;
    }

    .project-details-title {
        font-size: 2.5rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    /*     Show mobile actions and project-details info */
    .mobile-actions {
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
        margin-top: 2rem;
    }

    .mobile-project-details-info {
        display: block;
    }

    .mobile-actions .quick-btn {
        justify-content: space-between;
    }

    .project-details-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.3rem;
    }

    .gallery-thumbnail {
        font-size: 1rem;
    }

    .main-image {
        height: 250px;
        font-size: 3rem;
    }

    /*    Responsive info rows for mobile*/
    .quick-info {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }

    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
        padding: 0.6rem;
        background: var(--secondary-bg);
        border-radius: 8px;
        border-bottom: none;
        text-align: center;
    }

    .info-row-label {
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .info-row-value {
        font-size: 0.9rem;
    }

    /*     Trailer adjustments for mobile */
    .trailer-title h2 {
        font-size: 1.8rem;
    }

    .trailer-container {
        padding: 0 1rem;
    }
}

/* Tablets (1024px and below) */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 350px 1fr 280px;
        gap: 2rem;
    }

    .hero-sidebar-card {
        padding: 1.2rem;
    }

    .quick-btn {
        padding: 0.7rem 0.9rem;
        font-size: 0.85rem;
    }

    .details-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .sidebar {
        position: static;
    }

    .project-details-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }

    .trailer-container {
        padding: 0 1.5rem;
    }
}

/* Small tablets and large phones (768px and below) */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-sidebar {
        display: none;
    }

    .project-details-media {
        justify-items: center;
        position: static;
    }

    .project-details-title {
        font-size: 2.5rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    /*     Show mobile actions and project-details info */
    .mobile-actions {
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
        margin-top: 2rem;
    }

    .mobile-project-details-info {
        display: block;
    }

    .mobile-actions .quick-btn {
        justify-content: space-between;
    }

    .project-details-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.3rem;
    }

    .gallery-thumbnail {
        font-size: 1rem;
    }

    .main-image {
        height: 250px;
        font-size: 3rem;
    }

    /*    Responsive info rows for mobile*/
    .quick-info {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }

    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
        padding: 0.6rem;
        background: var(--secondary-bg);
        border-radius: 8px;
        border-bottom: none;
        text-align: center;
    }

    .info-row-label {
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .info-row-value {
        font-size: 0.9rem;
    }

    /*     Trailer adjustments for mobile */
    .trailer-title h2 {
        font-size: 1.8rem;
    }

    .trailer-container {
        padding: 0 1rem;
    }

    .gallery-modal-nav {
        font-size: 1.5rem;
        padding: 0.8rem;
    }

    .gallery-modal-prev {
        left: -60px;
    }

    .gallery-modal-next {
        right: -60px;
    }

    .project-details-content {
        padding: 1.5rem;
    }

    .project-details-title {
        font-size: 2rem;
    }
}

/* Tablet-specific optimizations (between 768px and 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-sidebar-title {
        font-size: 0.95rem;
    }

    .quick-btn-title {
        font-size: 0.85rem;
    }

    .quick-btn-desc {
        font-size: 0.7rem;
    }

    .quick-btn-icon {
        font-size: 1rem;
        margin-right: 0.7rem;
    }

    .info-row {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .project-details-title {
        font-size: 2rem;
    }

    .project-details-hero {
        padding: 2rem 0;
    }

    .project-details-details {
        padding: 2rem 0;
    }

    .quick-btn {
        padding: 0.7rem 0.8rem;
    }

    .quick-btn-icon {
        font-size: 1rem;
        margin-right: 0.6rem;
    }

    .main-image {
        height: 200px;
        font-size: 2.5rem;
    }

    .project-details-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-info {
        grid-template-columns: 1fr;
    }

    /*     Trailer adjustments for small mobile */
    .trailer-title h2 {
        font-size: 1.6rem;
    }

    .trailer-section {
        padding: 2rem 0 1rem;
    }

    .project-details-content {
        padding: 1rem;
    }

    .platform-btn {
        padding: 10px 16px;
        font-size: 14px;
        min-width: 140px;
    }

    .platform-btn-icon {
        width: 18px;
        height: 18px;
    }

    .mobile-actions {
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
        margin-top: 2rem;
    }
}