/* Portfolio-specific styles */

/* Portfolio filtering */
.portfolio-item {
    transition: opacity 0.3s ease;
}

.portfolio-item.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Tab styling - REMOVE GAP BETWEEN TABS AND CONTENT */
.tm-sortable-list {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.tm-sortable-list .tm-sortable-link {
    margin: 0 5px 10px 0 !important;
    padding: 0 !important;
}

.tm-sortable-list .tm-sortable-link a {
    display: inline-block;
    padding: 10px 20px;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    margin: 0 !important;
    transition: all 0.3s ease;
}

.tm-sortable-list .tm-sortable-link a:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

.tm-sortable-list .tm-sortable-link a.selected {
    background-color: #cda274 !important;
    color: white !important;
    border-color: #cda274 !important;
}

/* DESKTOP POSITIONING ADJUSTMENTS */
/* Move sidebar up relative to main content */
.sidebar,
#secondary {
    margin-top: -30px !important;
    padding-top: 0 !important;
}

/* Move main content down a bit */
.site-main {
    margin-top: 20px !important;
    padding-top: 15px !important;
}

/* Normal portfolio spacing - RESTORED FOR DESKTOP */
.portfolio-wrapper {
    margin-top: 0 !important;
    margin-bottom: 40px !important;
    padding-top: 0 !important;
    padding-bottom: 20px !important;
}

/* Normal content area spacing */
.entry-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 30px !important;
    padding-bottom: 15px !important;
}

/* Remove any gaps in article/post containers */
.post-portfolio.page {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.single-entry-header.tm-hide {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Sidebar styling */
.sidebar .widget {
    background: #f9f9f9;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 5px;
}

.project-categories {
    list-style: none;
    padding: 0;
}

.project-categories li {
    margin-bottom: 10px;
}

.project-categories li a {
    text-decoration: none;
    color: #333;
    padding: 5px 0;
    display: block;
    border-bottom: 1px solid #eee;
}

.project-categories li a:hover {
    color: #cda274;
}

.featured-project img {
    width: 100%;
    border-radius: 5px;
    margin-bottom: 10px;
}

.quote-widget {
    text-align: center;
}

.quote-widget .btn {
    background-color: #cda274;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    margin-top: 10px;
}

/* Portfolio-specific responsive fixes - ONLY for mobile overlap prevention */
@media (max-width: 1199px) {
    /* Reset positioning for responsive layouts */
    .sidebar,
    #secondary {
        margin-top: 0 !important;
        padding-top: 25px !important;
    }
    
    .site-main {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .content-area {
        display: flex;
        flex-direction: column;
    }
    
    .site-main {
        order: 1;
        width: 100%;
        margin-bottom: 40px !important;
    }
    
    .sidebar {
        order: 2;
        width: 100%;
        margin-top: 50px !important;
        padding-top: 25px !important;
        border-top: 2px solid #eee; /* RESTORED ORIGINAL COLOR */
    }
    
    /* Portfolio wrapper adjustments */
    .portfolio-wrapper {
        margin-bottom: 50px !important;
    }
    
    /* Tab responsive layout */
    .tm-sortable-list {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
        margin-bottom: 20px !important;
    }
    
    .tm-sortable-list .tm-sortable-link {
        margin: 0 !important;
    }
}

@media (max-width: 991px) {
    /* Ensure no overlap on mobile */
    .portfolio-wrapper {
        margin-bottom: 60px !important;
        padding-bottom: 30px !important;
    }
    
    .entry-content {
        margin-bottom: 40px !important;
        padding-bottom: 25px !important;
    }
    
    .sidebar {
        margin-top: 60px !important;
        padding-top: 30px !important;
        border-top: 2px solid #eee !important; /* RESTORED ORIGINAL COLOR */
    }
    
    /* Mobile tab layout */
    .tm-sortable-list {
        flex-direction: row;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
        margin-bottom: 20px !important;
    }
    
    .tm-sortable-list .tm-sortable-link {
        flex-shrink: 0;
        margin-right: 10px !important;
    }
}

@media (max-width: 767px) {
    /* Mobile spacing to prevent overlap */
    .portfolio-wrapper {
        margin-bottom: 70px !important;
        padding-bottom: 40px !important;
    }
    
    .entry-content {
        margin-bottom: 50px !important;
        padding-bottom: 35px !important;
    }
    
    .sidebar {
        margin-top: 70px !important;
        padding-top: 35px !important;
        border-top: 2px solid #eee !important; /* RESTORED ORIGINAL COLOR */
    }
    
    /* Stack tabs vertically on small screens */
    .tm-sortable-list {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 15px !important;
    }
    
    .tm-sortable-list .tm-sortable-link {
        margin: 0 0 10px 0 !important;
        width: 100%;
    }
    
    .tm-sortable-list .tm-sortable-link a {
        display: block;
        text-align: center;
        width: 100%;
    }
}