/* STL Viewer Styles - En üste taşıyalım */
.stl-viewer-container {
    position: relative;
    width: 100%;
    height: 400px;
    margin-bottom: 40px;
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
}

.stl-viewer {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

.stl-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    z-index: 10; /* z-index değerini artırdık */
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.stl-loading p {
    color: var(--primary-color);
    font-size: 1.1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading gizleme */
.stl-loading.hidden {
    display: none;
}

.project-page {
    padding-top: 100px;
    background: #f8f9fa;
}

.project-header {
    text-align: center;
    margin-bottom: 50px;
}

.project-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.project-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: #666;
}

.project-content {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.project-gallery {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.project-gallery h2 {
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center;
}

.gallery-container {
    position: relative;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
}

.gallery-slider {
    overflow: hidden;
    position: relative;
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.gallery-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-100%);
}

.gallery-item {
    flex: 0 0 100%;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item video {
    width: auto;
    height: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: block;
    object-fit: contain;
}

.gallery-nav {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    opacity: 1 !important;
}

.gallery-nav:hover {
    background: white;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: -25px;
}

.gallery-nav.next {
    right: -25px;
}

.gallery-nav i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.gallery-nav:hover i {
    transform: scale(1.2);
}

.main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.project-description h2 {
    color: var(--primary-color);
    margin: 30px 0 15px;
}

.project-description p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.tech-stack, .features {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.tech-stack li, .features li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.tech-stack li::before, .features li::before {
    content: '•';
    color: var(--secondary-color);
    position: absolute;
    left: 0;
}

.project-links {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.project-link:hover {
    background: #0873c4;
}

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

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item {
        aspect-ratio: 16/10;
    }

    .project-content {
        padding: 20px;
    }

    .project-header h1 {
        font-size: 2rem;
    }

    .gallery-container {
        max-width: 100%;
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
    }

    .gallery-nav.prev {
        left: -15px;
    }

    .gallery-nav.next {
        right: -15px;
    }

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

    .project-page {
        padding-top: 80px;
    }

    .project-header {
        margin-bottom: 30px;
        padding: 0 15px;
    }

    .project-header h1 {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .project-meta {
        flex-direction: column;
        gap: 5px;
    }

    .project-content {
        padding: 20px;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }

    /* 3D Viewer */
    .stl-viewer-container {
        height: 300px;
        margin-bottom: 20px;
        border-radius: 8px;
    }

    /* Proje Açıklamaları */
    .project-description h2 {
        font-size: 1.5rem;
        margin: 25px 0 15px;
    }

    .project-description p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .tech-stack li, 
    .features li {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    /* Proje Linkleri */
    .project-links {
        flex-direction: column;
        gap: 10px;
    }

    .project-link {
        width: 100%;
        justify-content: center;
        padding: 12px;
        font-size: 0.95rem;
    }

    header .container {
        padding: 15px 20px;
    }

    .menu-toggle {
        display: block;
        width: 30px;
        height: 20px;
        position: relative;
        cursor: pointer;
        z-index: 1001;
    }

    .menu-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background: var(--primary-color);
        position: absolute;
        transition: 0.3s;
    }

    .menu-toggle span:nth-child(1) { top: 0; }
    .menu-toggle span:nth-child(2) { top: 9px; }
    .menu-toggle span:nth-child(3) { top: 18px; }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg);
        top: 9px;
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg);
        top: 9px;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background: white;
        padding: 80px 20px;
        transition: 0.3s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        gap: 25px;
    }

    nav ul li a {
        font-size: 1.1rem;
        display: block;
        padding: 10px 0;
    }
}

/* Küçük Ekranlar */
@media (max-width: 480px) {
    .project-header h1 {
        font-size: 1.8rem;
    }

    .project-content {
        padding: 15px;
    }

    .stl-viewer-container {
        height: 250px;
    }

    .project-description h2 {
        font-size: 1.4rem;
    }

    .project-link {
        padding: 10px;
        font-size: 0.9rem;
    }

    .model-status {
        font-size: 0.85rem;
    }

    header .container {
        padding: 12px 15px;
    }

    .logo {
        font-size: 20px;
    }

    nav {
        width: 85%;
    }

    nav ul li a {
        font-size: 1rem;
    }
}

/* Yatay Mobil Görünüm */
@media (max-height: 480px) and (orientation: landscape) {
    .project-page {
        padding-top: 60px;
    }

    .stl-viewer-container {
        height: 200px;
    }

    .project-links {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .project-link {
        width: calc(50% - 5px);
    }
}

.fullscreen-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 3;
}

.fullscreen-btn:hover {
    background: white;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    transform: scale(1.1);
}

.fullscreen-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.fullscreen-btn:hover i {
    transform: scale(1.2);
}

/* Tam ekran overlay */
.fullscreen-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 9998;
}

.fullscreen-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Tam ekran içerik */
.gallery-slider.fullscreen {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 9999;
    background: transparent;
    margin: 0;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
}

.gallery-slider.fullscreen .gallery-item {
    height: auto;
    aspect-ratio: auto;
    background: transparent;
    border-radius: 0;
}

.gallery-slider.fullscreen .gallery-item img {
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: none;
}

.gallery-slider.fullscreen .gallery-item video {
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: none;
}

/* Tam ekran butonları */
.gallery-slider.fullscreen .gallery-nav {
    position: fixed;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    transition: all 0.3s ease;
}

.gallery-slider.fullscreen .gallery-nav:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.gallery-slider.fullscreen .gallery-nav.prev {
    left: 30px;
}

.gallery-slider.fullscreen .gallery-nav.next {
    right: 30px;
}

/* Tam ekran navigasyon okları */
.fullscreen-nav {
    position: fixed;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    display: none; /* Başlangıçta gizli */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000; /* Slider'dan daha üstte */
}

.fullscreen-overlay.active .fullscreen-nav {
    display: flex; /* Overlay aktif olduğunda göster */
}

.fullscreen-nav:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.fullscreen-nav.prev {
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.fullscreen-nav.next {
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}

/* Mobil için ayarlar */
@media (max-width: 768px) {
    .fullscreen-nav {
        width: 40px;
        height: 40px;
    }

    .fullscreen-nav.prev {
        left: 15px;
    }

    .fullscreen-nav.next {
        right: 15px;
    }
}

/* Model status styles */
.model-status {
    text-align: center;
    padding: 10px;
    margin: -10px 0 20px 0;
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-style: italic;
}

.model-status.hidden {
    display: none;
}

.model-status.success {
    color: #28a745;
}

.model-status.error {
    color: #dc3545;
} 