/* WordPress Sekmeli İçerik Sistemi - Frontend CSS */

/* Ana container */
.wp-tabs-container {
    margin: 1.5rem 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Horizontal layout */
.wp-tabs-container.horizontal {
    display: block;
}

.wp-tabs-container.horizontal > * + * {
    margin-top: 1rem;
}

/* Vertical layout */
.wp-tabs-container.vertical {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .wp-tabs-container.vertical {
        flex-direction: row;
    }
}

/* Tab navigasyon */
.tabs-nav {
    display: flex;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.wp-tabs-container.vertical .tabs-nav {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 0.5rem;
    margin-bottom: 0;
    margin-right: 0;
    border-bottom: 2px solid #e5e7eb;
    border-right: none;
}

@media (min-width: 1024px) {
    .wp-tabs-container.vertical .tabs-nav {
        width: 16rem;
        flex-direction: column;
        overflow-x: visible;
        padding-bottom: 0;
        margin-right: 1.5rem;
        border-bottom: none;
        border-right: 2px solid #e5e7eb;
    }
}

/* Tab butonları */
.tab-button {
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    cursor: pointer;
    background: rgba(44, 41, 99, 1);
    color: #64748b;
    text-decoration: none;
}

.tab-button:hover {
    transform: translateY(-2px);
    background: rgba(18, 147, 61, 1);
    color: #475569;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.tab-button.active {
    color: white;
    background: rgba(18, 147, 61, 1);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.25);
}

.tab-button i {
    margin-right: 0.5rem;
}

/* Tab içerik alanları */
.tabs-content {
    flex: 1;
}

.tab-pane {
    display: none;
    animation: fadeInUp 0.3s ease-out;
}

.tab-pane.active {
    display: block;
}

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

/* Prose içerik */
.tab-pane .prose {
    max-width: none;
}

/* Galeri sistemi */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

.gallery-item {
    cursor: pointer;
}

.gallery-item-wrapper {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.gallery-item-wrapper:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    opacity: 1; /* Sabit opacity */
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

/* Basit Lightbox */
.gallery-lightbox {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.9);
    animation: lightboxFadeIn 0.3s ease-out;
}

.gallery-lightbox.hidden {
    pointer-events: none;
    display: none;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    width: 100%;
    height: 80% !important;
    object-fit: contain;
    border-radius: 0.5rem;
    animation: imageZoomIn 0.4s ease-out;
    transition: opacity 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: -3rem;
    right: 0;
    width: 3rem;
    height: 3rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 1.25rem;
}

.lightbox-close:hover {
    background: white;
    transform: scale(1.1);
}

/* Loading spinner */
.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2rem;
    z-index: 10;
}



/* Animasyonlar */
@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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



@media (max-width: 768px) {
    .wp-tabs-container.vertical {
        flex-direction: column;
    }
    
    .wp-tabs-container.vertical .tabs-nav {
        flex-direction: row;
        overflow-x: auto;
        border-bottom: 2px solid #e5e7eb;
        border-right: none;
        margin-bottom: 1rem;
        margin-right: 0;
    }
    
    .tabs-nav {
        flex-wrap: wrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .tabs-nav::-webkit-scrollbar {
        display: none;
    }
    
    .tab-button {
        padding: 0.75rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lightbox-close {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
        top: -2rem;
    }
    
    .lightbox-loading {
        font-size: 1.5rem;
    }
}

@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .tab-button {
        padding: 0.5rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .tab-button i {
        margin-right: 0.25rem;
    }
}

/* Dark mode desteği */
@media (prefers-color-scheme: dark) {
    .tab-button {
        background: #1e293b;
        color: #cbd5e1;
    }
    
    .tab-button:hover {
        background: #334155;
        color: #e2e8f0;
    }
    
    .tab-table {
        background: #1e293b;
        color: #e2e8f0;
    }
    
    .tab-table th {
        background: #334155;
        color: #cbd5e1;
    }
    
    .tab-table tr:nth-child(even) {
        background: #2d3d4f;
    }
}

/* Erişilebilirlik */
.tab-button:focus {
    outline: none;
}

.gallery-image:focus {
    outline: none;
    box-shadow: 0 0 0 2px #3b82f6, 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.lightbox-close:focus {
    outline: none;
    box-shadow: 0 0 0 2px #3b82f6;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .tab-button {
        border-width: 2px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .tab-button,
    .gallery-image,
    .lightbox-close {
        transition: none;
    }
    
    .tab-pane {
        animation: none;
    }
    
    .gallery-lightbox {
        animation: none;
    }
    
    .lightbox-image {
        animation: none;
    }
}