/* GENEL PROJECT DETAIL */
.project-detail {
    padding-top: 100px;
    min-height: 100vh;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: all var(--transition-normal);
}

.back-link:hover {
    transform: translateX(-5px);
}

.project-header {
    text-align: center;
    margin-bottom: 3rem;
}

.project-category {
    margin-bottom: 1rem;
}

.category-tag {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--gradient-primary);
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
}

.project-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.project-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.project-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.meta-item i {
    color: var(--primary-color);
}

.project-hero {
    margin-bottom: 4rem;
}

.hero-media {
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(168, 85, 247, 0.3);
}

.placeholder-hero {
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    color: var(--text-muted);
}

.placeholder-hero i {
    font-size: 5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    opacity: 0.5;
}

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

.content-section {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.content-section h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.8rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(168, 85, 247, 0.1);
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li i {
    color: var(--primary-color);
    margin-top: 0.2rem;
}

.gallery-grid.gallery-large {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 992px) {
    .gallery-grid.gallery-large {
        grid-template-columns: repeat(2, 1fr);
    }
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 2rem;
}

.gallery-image {
    width: 100%;
    height: 100%;
    max-width: 260px;
    max-height: 420px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
}

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

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    text-align: center;
    padding: 0.7rem;
    font-size: 0.95rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item:hover img {
    filter: brightness(0.7);
}

.placeholder-gallery {
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    color: var(--text-muted);
    border: 1px dashed rgba(168, 85, 247, 0.3);
    border-radius: 15px;
}

.placeholder-gallery i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    opacity: 0.5;
}

.placeholder-gallery p {
    font-size: 0.85rem;
    margin: 0;
}

.challenge-card,
.solution-card {
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1rem;
}

.challenge-card {
    background: rgba(236, 72, 153, 0.1);
    border-left: 4px solid var(--secondary-color);
}

.solution-card {
    background: rgba(6, 182, 212, 0.1);
    border-left: 4px solid var(--accent-color);
}

.challenge-card h4,
.solution-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.challenge-card h4 {
    color: var(--secondary-color);
}

.solution-card h4 {
    color: var(--accent-color);
}

.challenge-card p,
.solution-card p {
    margin: 0;
    font-size: 0.95rem;
}

.sidebar-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.sidebar-card h3 {
    font-size: 1.1rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    padding: 0.4rem 1rem;
    background: rgba(168, 85, 247, 0.2);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--primary-light);
    transition: all var(--transition-normal);
}

.tech-tag:hover {
    background: var(--primary-color);
    color: white;
}

.skills-list {
    list-style: none;
}

.skills-list li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(168, 85, 247, 0.1);
}

.skills-list li:last-child {
    border-bottom: none;
}

.project-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.project-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-normal);
}

.project-link-btn:not(.secondary) {
    background: var(--gradient-primary);
    color: white;
}

.project-link-btn.secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.project-link-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.project-navigation {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(168, 85, 247, 0.2);
    display: flex;
    justify-content: space-between;
}

.nav-project {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    text-decoration: none;
    padding: 1rem 1.5rem;
    border-radius: 15px;
    background: var(--bg-card);
    border: 1px solid rgba(168, 85, 247, 0.2);
    transition: all var(--transition-normal);
}

.nav-project:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.nav-project.prev {
    text-align: left;
}

.nav-project.next {
    text-align: right;
    margin-left: auto;
}

.nav-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.nav-title {
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-project.prev .nav-title {
    flex-direction: row;
}

.nav-project.next .nav-title {
    flex-direction: row;
    justify-content: flex-end;
}

@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .content-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .project-detail {
        padding-top: 80px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .placeholder-hero {
        height: 250px;
    }
    
    .project-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-project.next {
        margin-left: 0;
    }
}

/* ANİMASYONLAR GENEL */
.project-header {
    animation: fadeInUp 0.8s ease-out;
}

.category-tag {
    animation: bounceIn 0.6s ease-out 0.2s both;
}

.project-title {
    animation: slideInFromBottom 0.8s ease-out 0.3s both;
}

.project-subtitle {
    animation: fadeIn 0.8s ease-out 0.5s both;
}

.project-meta {
    animation: fadeIn 0.8s ease-out 0.6s both;
}

.hero-media {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
}

.hero-image {
    width: 320px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 24px;
    display: block;
}

.hero-image-izubot {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    object-fit: cover;
}

/* GENEL HERO HOVER */
.hero-media:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 50px rgba(168, 85, 247, 0.3);
}

/* GENEL VİDEO STİLİ */
.hero-video {
    width: 100%;
    height: 100%;
    max-height: 500px;
    border-radius: 20px;
    object-fit: cover;
}

.hero-media {
    position: relative;
}

.hero-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 14px;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
    z-index: 10;
}

.hero-video {
    width: 100%;
    border-radius: 20px;
    border: 2px solid rgba(168, 85, 247, 0.3);
}

/* SECTION HOVER ANİMASYONLARI GENEL */
.content-section {
    animation: slideInFromBottom 0.6s ease-out both;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.content-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.4);
}

.content-main .content-section:nth-child(1) { animation-delay: 0.5s; }
.content-main .content-section:nth-child(2) { animation-delay: 0.6s; }
.content-main .content-section:nth-child(3) { animation-delay: 0.7s; }
.content-main .content-section:nth-child(4) { animation-delay: 0.8s; }

.sidebar-card {
    animation: slideInFromRight 0.6s ease-out both;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.sidebar-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(168, 85, 247, 0.25);
    border-color: var(--primary-color);
}

.content-sidebar .sidebar-card:nth-child(1) { animation-delay: 0.6s; }
.content-sidebar .sidebar-card:nth-child(2) { animation-delay: 0.7s; }
.content-sidebar .sidebar-card:nth-child(3) { animation-delay: 0.8s; }

/* GENEL GALLERY ANİMASYONLARI */
.gallery-grid-single {
    display: flex !important;
    justify-content: center;
    align-items: center;
}

.gallery-grid-single .gallery-item {
    flex: 0 0 auto;
}

.gallery-grid-single .gallery-image {
    max-width: 560px;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    display: block;
}

/* Only for n8n gallery */
.gallery-grid--large .gallery-item img.gallery-image {
    width: 100%;
    height: auto;
    max-width: 850px;
    display: block;
    margin: 0 auto;
}

.gallery-grid--large {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.gallery-item {
    animation: scaleIn 0.5s ease-out both;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.gallery-item:nth-child(1) { animation-delay: 0.7s; }
.gallery-item:nth-child(2) { animation-delay: 0.8s; }
.gallery-item:nth-child(3) { animation-delay: 0.9s; }
.gallery-item:nth-child(4) { animation-delay: 1s; }
.gallery-item:nth-child(5) { animation-delay: 1.1s; }
.gallery-item:nth-child(6) { animation-delay: 1.2s; }
.gallery-item:nth-child(7) { animation-delay: 1.3s; }
.gallery-item:nth-child(8) { animation-delay: 1.4s; }
.gallery-item:nth-child(9) { animation-delay: 1.5s; }
.gallery-item:nth-child(10) { animation-delay: 1.6s; }
.gallery-item:nth-child(11) { animation-delay: 1.7s; }
.gallery-item:nth-child(12) { animation-delay: 1.8s; }

.gallery-item:hover {
    transform: scale(1.08) rotate(1deg);
    box-shadow: 0 15px 35px rgba(168, 85, 247, 0.4);
    z-index: 10;
}

/* GENEL DİĞER PROJECTLER İÇİN HERO GÖRSEL BOYU */
.project-detail .project-hero .hero-media img.hero-image {
    width: 880px !important;
    max-width: 90% !important;
    max-height: none !important;
    height: auto !important;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* FOOD PROJECT İÇİN KÜÇÜK HERO */
.project-detail .project-hero .hero-media img.hero-image--food {
    width: 320px !important;
    max-width: 60% !important;
    height: auto !important;
}

/* DİĞER ÇEŞİTLİ GENEL STİLLER */
.plant-hero-img {
    width: 820px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 0px;
    display: block;
    margin: 0 auto;
}

.gallery-photo {
    width: 100%;
    height: 550px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.tech-tag {
    animation: popIn 0.3s ease-out both;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.tech-tag:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 5px 15px rgba(168, 85, 247, 0.4);
}

.feature-list li {
    animation: slideInFromLeft 0.5s ease-out both;
}

.feature-list li:nth-child(1) { animation-delay: 0.8s; }
.feature-list li:nth-child(2) { animation-delay: 0.9s; }
.feature-list li:nth-child(3) { animation-delay: 1s; }
.feature-list li:nth-child(4) { animation-delay: 1.1s; }
.feature-list li:nth-child(5) { animation-delay: 1.2s; }
.feature-list li:nth-child(6) { animation-delay: 1.3s; }

.feature-list li i {
    transition: transform 0.3s ease, color 0.3s ease;
}

.feature-list li:hover i {
    transform: scale(1.3) rotate(10deg);
    color: var(--secondary-color);
}

.nav-project {
    animation: fadeIn 0.8s ease-out 1s both;
}

.project-link-btn {
    animation: pulseGlow 2s ease-in-out infinite;
}

.back-link {
    animation: slideInFromLeft 0.6s ease-out;
}

.back-link i {
    transition: transform 0.3s ease;
}

.back-link:hover i {
    transform: translateX(-8px);
}


@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInFromBottom {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInFromRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInFromLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes zoomInSlide {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { transform: scale(1.1); }
    70% { transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 5px 20px rgba(168, 85, 247, 0.3); }
    50% { box-shadow: 0 8px 30px rgba(168, 85, 247, 0.5); }
}

.placeholder-hero i,
.placeholder-gallery i {
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.1); }
}


/*  SADECE 3D SAYFAYA ÖZEL  */


.project-detail--3d .content-grid {
    grid-template-columns: 1fr;
}

/* 3D sayfanın hero alanı */
.project-detail--3d .hero-media {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(168, 85, 247, 0.3);
}

/* 3D hero video */
.project-detail--3d .hero-video-3d {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Video slider */
.project-detail--3d .hero-slider {
    position: relative;
    padding: 0;
    overflow: hidden;
}

.project-detail--3d .hero-slider-track {
    width: 100%;
    position: relative;
}

.project-detail--3d .hero-slide {
    width: 100%;
    display: none;
}

.project-detail--3d .hero-slide.is-active {
    display: block;
}

.project-detail--3d .hero-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    cursor: pointer;
    z-index: 20;
    font-size: 1.1rem;
}

.project-detail--3d .hero-slider-btn.prev { left: 12px; }
.project-detail--3d .hero-slider-btn.next { right: 12px; }

.project-detail--3d .hero-slider-btn[disabled] {
    opacity: 0.3;
    cursor: default;
}

/* Tek video varsa butonlar pasif */
.project-detail--3d .hero-slider:not(.has-multiple) .hero-slider-btn {
    opacity: 0.3;
    pointer-events: none;
}

/* 3D sayfa Environment / Props başlık ve grid boşlukları */
.project-detail--3d .gallery-subtitle {
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    font-size: 1.2rem;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-detail--3d .gallery-grid-3d {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.8rem;
    margin-bottom: 2.5rem;
}

.project-detail--3d .gallery-grid-3d .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

/* 3D sayfadaki genel gallery ayarı override */
.project-detail--3d .gallery-grid,
.project-detail--3d .gallery-grid.gallery-large {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.8rem;
}


.project-detail--3d .gallery-item img {
    width: 100%;
    height: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 12px;
}


/* SWARM PAGE — HERO FRAME   */


.project-detail--swarm .hero-media {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(168, 85, 247, 0.3);

    padding: 0;          /* ekstra boşluk yok */
    display: block;
}

/* Video gerçek boyutuna göre çerçeveyi doldurur */
.project-detail--swarm .hero-video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain; 
}

/* Lightbox (tam ekran görüntüleme) */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(255,255,255,0.3);
}


.lightbox-close {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    z-index: 10000;
}

.project-detail--3d .gallery-grid-3d .gallery-video {
    width: 100%;
    height: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}


/* =========================================
   GLOBAL MEDIA MODAL
========================================= */

.media-modal {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 60px 20px 30px;

    background: rgba(0, 0, 0, 0.92);

    z-index: 999999;

    overflow: hidden;
}


.media-modal.open {
    display: flex;
}


.media-modal-content {
    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;
}


/* FOTOĞRAF */

.media-modal-image {
    width: auto;
    height: auto;

    max-width: 92vw;
    max-height: 85vh;

    object-fit: contain;

    border-radius: 12px;

    cursor: grab;

    user-select: none;

    -webkit-user-drag: none;

    transform-origin: center center;

    transition: transform 0.12s ease;
}


.media-modal-image.dragging {
    cursor: grabbing;

    transition: none;
}


/* VİDEO */

.media-modal-video {
    width: auto;
    height: auto;

    max-width: 92vw;
    max-height: 85vh;

    object-fit: contain;

    border-radius: 12px;
}


/* KAPATMA */

.media-modal-close {
    position: fixed;

    top: 18px;
    right: 22px;

    width: 48px;
    height: 48px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: none;

    border-radius: 50%;

    background: rgba(30, 30, 30, 0.85);

    color: white;

    font-size: 32px;

    cursor: pointer;

    z-index: 1000000;
}


body.modal-open {
    overflow: hidden;
}


/* TIKLANABİLİR */

.project-detail .gallery-item img,
.project-detail .gallery-item video {
    cursor: pointer;
}


/* MOBILE */

@media (max-width: 768px) {

    .media-modal {
        padding: 60px 10px 20px;
    }


    .media-modal-image,
    .media-modal-video {
        max-width: 95vw;
        max-height: 80vh;
    }


    .media-modal-close {
        top: 12px;
        right: 12px;

        width: 44px;
        height: 44px;

        font-size: 28px;
    }

}