/**
 * Portfolio Styles
 */

/* Archive Page Styles */

/* Add more space between title and grid */
.blog-header {
    margin-bottom: 40px;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.portfolio-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.portfolio-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Increase the height of thumbnails since we don't have captions anymore */
.portfolio-thumbnail {
    position: relative;
    overflow: hidden;
    height: 300px;
    border-radius: 8px;
}

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

.portfolio-item:hover .portfolio-thumbnail img {
    transform: scale(1.05);
}

/* Before/After preview in archive */
.before-after-preview {
    position: relative;
    width: 100%;
    height: 100%;
}

.before-image,
.after-image {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.before-image {
    left: 0;
    background-position: left center;
}

.after-image {
    right: 0;
    background-position: right center;
}

.divider-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background-color: #FFCC00;
    z-index: 2;
    border: none !important;
    outline: none !important;
}

.divider-line:hover,
.divider-line:active,
.divider-line:focus {
    border: none !important;
    outline: none !important;
    background-color: #FFCC00 !important;
}

/* Make overlay more prominent without titles/categories */
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-view {
    color: #fff;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    padding: 15px 25px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.portfolio-item:hover .portfolio-view {
    transform: translateY(0);
}

.view-text {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 16px;
}

.no-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    color: #666;
    font-size: 48px;
}

/* Single Portfolio Page */
.portfolio-single-container {
    padding: 40px 0;
}

.portfolio-single {
    background-color: #000;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    overflow: hidden;
    padding: 30px;
}

.portfolio-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 20px;
}

.portfolio-image-area {
    position: relative;
}

.before-after-gallery {
    margin-bottom: 30px;
}

.comparison-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.img-comp-container {
    position: relative;
    height: 400px;
    width: 100%;
}

.img-comp-before,
.img-comp-after {
    position: absolute;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.img-comp-before {
    z-index: 1;
    width: 50%;
}

.img-comp-after {
    z-index: 0;
}

.img-comp-before img,
.img-comp-after img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    display: block;
}

.img-comp-slider {
    position: absolute;
    z-index: 9;
    cursor: ew-resize;
    width: 40px;
    height: 40px;
    background-color: #fcd307;
    opacity: 0.7;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.slider-button {
    margin-top: 3px;
}

.slider-label {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    top: 20px;
}

.slider-label-before {
    right: 20px;
}

.slider-label-after {
    left: 20px;
}

.thumbnails-gallery {
    margin-top: 20px;
}

.thumbnails-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.thumbnail-pair {
    position: relative;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.thumbnail-pair.active {
    box-shadow: 0 0 0 3px #fcd307;
}

.thumbnail-before-after {
    position: relative;
    width: 100%;
    height: 80px;
}

.thumbnail-before,
.thumbnail-after {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
}

.thumbnail-before {
    left: 0;
}

.thumbnail-after {
    right: 0;
}

.thumbnail-before img,
.thumbnail-after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-divider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background-color: #fff;
    z-index: 2;
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.thumbnail-pair:hover .thumbnail-overlay {
    opacity: 1;
}

.thumbnail-overlay span {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

/* Portfolio content area */
.portfolio-content-area .entry-title {
    font-size: 28px;
    margin-bottom: 20px;
}

/* Top navigation buttons */
.portfolio-navigation-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.nav-top-previous,
.nav-top-next {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-top-previous a,
.nav-top-next a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #fcd307;
    border-radius: 50%;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    font-size: 20px;
}

.nav-top-previous a:hover,
.nav-top-next a:hover {
    background-color: #fcd307;
    color: #333;
    transform: scale(1.1);
    text-decoration: none;
}

.entry-content {
    margin-bottom: 30px;
}

/* Hide portfolio categories on single page */
.portfolio-single .portfolio-categories {
    display: none;
}

/* Original portfolio-categories styles (keeping for reference) */
.portfolio-categories {
    padding-top: 15px;
    border-top: none;
}

.category-label {
    font-weight: 600;
    margin-right: 5px;
}

/* Portfolio navigation */
.portfolio-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding: 20px 0;
    border-top: none;
    border-bottom: none;
}

.nav-previous,
.nav-next {
    max-width: 45%;
}

.nav-previous a,
.nav-next a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #e0e0e0;
    transition: color 0.3s ease;
}

.nav-previous a:hover,
.nav-next a:hover {
    color: #fcd307;
}

.nav-arrow {
    margin: 0 10px;
}

.nav-title {
    font-weight: 500;
}

/* Related portfolio items */
.related-portfolio {
    padding-top: 30px;
    border-top: none;
}

/* Classes to control item visibility on different screen sizes */
.hide-on-tablet {
    display: block;
}

.hide-on-mobile {
    display: block;
}

.related-title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.related-title {
    margin-bottom: 0;
    font-size: 24px;
    font-weight: 600;
    position: relative;
    color: var(--text-color);
}

.portfolio-section-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin: 30px 0;
}

.portfolio-section-wrapper .portfolio-grid {
    flex: 1;
    margin-bottom: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

/* Make sure all related work thumbnails are square */
.portfolio-section-wrapper .portfolio-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Creates a 1:1 aspect ratio (square) */
    height: 0;
    overflow: hidden;
}

.portfolio-section-wrapper .portfolio-thumbnail img,
.portfolio-section-wrapper .before-after-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-section-wrapper .before-image,
.portfolio-section-wrapper .after-image {
    position: absolute;
    top: 0;
    height: 100%;
    background-size: cover;
}

.related-navigation {
    display: flex;
    gap: 10px;
}

.related-nav-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #fcd307;
    border-radius: 50%;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    margin: 0 15px;
    z-index: 10;
    font-size: 20px;
}

.related-nav-arrow:hover {
    background-color: #fcd307;
    color: #333;
    transform: scale(1.1);
    text-decoration: none;
}

.related-prev {
    margin-left: 0;
}

.related-next {
    margin-right: 0;
}

/* Responsive adjustments for related items */
@media (max-width: 1200px) {
    .related-items {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* 4 items for large screens */
    .portfolio-section-wrapper .portfolio-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
    
    /* Hide the 5th item on tablet */
    .hide-on-tablet {
        display: none !important;
    }
}

@media (max-width: 991px) {
    .related-items {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* 3 items for medium screens */
    .portfolio-section-wrapper .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

@media (max-width: 767px) {
    .portfolio-section-wrapper {
        display: block;
        width: 100%;
        position: relative;
        padding: 0 10px;
    }
    
    /* Hide 4th and 5th items on mobile */
    .hide-on-mobile {
        display: none !important;
    }
    
    .related-nav-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        width: 30px;
        height: 30px;
        margin: 0;
        font-size: 16px;
    }
    
    .related-prev {
        left: 0;
    }
    
    .related-next {
        right: 0;
    }
    
    /* Ensure the grid has proper spacing from arrows */
    .portfolio-section-wrapper .portfolio-grid {
        margin: 0 25px;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .portfolio-thumbnail {
        height: 250px;
    }
    
    .thumbnails-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .img-comp-container {
        height: 300px;
    }
    
    /* 3 items for mobile screens */
    .related-items {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Set 3-column layout for portfolio grid in related works */
    .portfolio-section-wrapper .portfolio-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    /* Remove fixed height to maintain square aspect ratio */
    .portfolio-section-wrapper .portfolio-thumbnail {
        height: 0;
        padding-bottom: 100%;
    }
    
    /* Make smaller view text for better mobile display */
    .portfolio-section-wrapper .portfolio-view {
        padding: 8px 15px;
    }
    
    .portfolio-section-wrapper .view-text {
        font-size: 12px;
        margin-bottom: 3px;
    }
    
    /* Fix for visibility issue - ensure related portfolio section is not hidden */
    .related-portfolio {
        display: block;
        width: 100%;
        overflow: visible;
    }
    
    /* Make portfolio single container full-width on mobile */
    .portfolio-single-container {
        padding: 20px 0;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .portfolio-single {
        padding: 20px 15px;
        border-radius: 0;
        box-shadow: none;
    }
    
    /* Target the main container for full-width layout */
    .site-main > .container.portfolio-single-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

@media (max-width: 575px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-thumbnail {
        height: 220px;
    }
    
    .img-comp-container {
        height: 250px;
    }
    
    .portfolio-view {
        padding: 10px 20px;
    }
    
    .view-text {
        font-size: 14px;
    }
    
    /* Keep 3-column layout even at smaller screens for "Benzer Çalışmalar" */
    .related-items {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    /* Keep 3-column layout for portfolio grid in related works */
    .portfolio-section-wrapper .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    /* Make view button simpler on smallest screens */
    .portfolio-section-wrapper .portfolio-view {
        padding: 5px 10px;
    }
    
    .portfolio-section-wrapper .view-text {
        font-size: 11px;
        margin-bottom: 0;
    }
    
    /* Hide arrow icon to save space */
    .portfolio-section-wrapper .portfolio-view i {
        display: none;
    }
    
    .nav-title {
        display: none;
    }
    
    /* Additional full-width styles for smaller screens */
    .portfolio-single-container {
        padding: 0;
        width: 100% !important;
        max-width: none !important;
    }
    
    .portfolio-single {
        padding: 15px 10px;
        border-radius: 0;
        margin: 0;
    }
    
    /* Ensure main container also respects full-width */
    main#primary.site-main {
        padding: 0 !important;
        overflow-x: hidden; /* Prevent horizontal scrolling */
    }
    
    /* Make sure the breadcrumbs don't add side padding */
    .rank-math-breadcrumb {
        padding-left: 15px;
        padding-right: 15px;
    }
} 