/* Xander Portfolio Plugin Styles */

.xander-portfolio-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Portfolio Filter Buttons */
.xander-portfolio-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.xander-filter-btn {
    padding: 12px 25px;
    background: #fff;
    border: 2px solid #667eea;
    border-radius: 30px;
    color: #667eea;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.xander-filter-btn:hover,
.xander-filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* Portfolio Grid */
.xander-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.xander-portfolio-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.xander-portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.xander-portfolio-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.xander-portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.xander-portfolio-item:hover .xander-portfolio-image img {
    transform: scale(1.05);
}

.xander-portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.xander-portfolio-item:hover .xander-portfolio-overlay {
    opacity: 1;
}

/* Featured Portfolio Items */
.xander-featured-item {
    border: 3px solid #f1c40f;
    position: relative;
}

.xander-featured-item::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #f1c40f, #f39c12);
    border-radius: 23px;
    z-index: -1;
    animation: featuredGlow 2s ease-in-out infinite alternate;
}

@keyframes featuredGlow {
    from {
        box-shadow: 0 0 20px rgba(241, 196, 15, 0.3);
    }
    to {
        box-shadow: 0 0 30px rgba(241, 196, 15, 0.6);
    }
}

.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(241, 196, 15, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-badge i {
    font-size: 10px;
}

.xander-portfolio-content {
    padding: 25px;
}

.xander-portfolio-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.xander-portfolio-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.xander-portfolio-title a:hover {
    color: #667eea;
}

.xander-portfolio-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.xander-portfolio-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.xander-portfolio-category {
    background: #f8f9fa;
    color: #667eea;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.xander-portfolio-category:hover {
    background: #667eea;
    color: white;
}

.xander-portfolio-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.xander-portfolio-link:hover {
    color: #764ba2;
}

/* Single Portfolio Page */
.xander-single-portfolio {
    background: white;
    overflow: hidden;
}

/* Ensure consistent styling with template overrides */
.xander-single-portfolio .xander-single-header {
    display: none; /* Hidden since we use hero section */
}

.xander-single-portfolio .xander-single-image {
    margin-bottom: 0; /* Handled by template */
}

.xander-single-portfolio .xander-project-details {
    display: none; /* Replaced by new layout */
}

.xander-single-portfolio .xander-project-gallery {
    display: none; /* Replaced by new gallery section */
}

/* Lightbox Integration */
.xander-single-portfolio [data-lightbox] {
    cursor: zoom-in;
}

/* Smooth Animations */
.xander-single-portfolio * {
    box-sizing: border-box;
}

/* Font Awesome Icons Enhancement */
.xander-single-portfolio .fas,
.xander-single-portfolio .fab {
    transition: all 0.3s ease;
}

/* Enhanced Button Styles */
.xander-single-portfolio .xander-filter-btn,
.xander-single-portfolio .back-to-portfolio,
.xander-single-portfolio .xander-cta-button {
    cursor: pointer;
    user-select: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .xander-portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .xander-portfolio-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .xander-single-title {
        font-size: 2rem;
    }
    
    .xander-project-details {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .xander-gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Gallery Section Styles */
.xander-gallery-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.xander-gallery-section .section-header {
    text-align: center;
    margin-bottom: 50px;
}

.xander-gallery-section .section-header h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

.xander-gallery-section .section-header .header-accent {
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    margin: 0 auto 20px;
    border-radius: 2px;
}

.xander-gallery-section .section-header p {
    color: #666;
    font-size: 1.1rem;
}

.xander-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.xander-gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.xander-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.gallery-image-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.gallery-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.xander-gallery-item:hover .gallery-image-wrapper img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.xander-gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-zoom {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.gallery-zoom:hover {
    background: white;
    color: #667eea;
    transform: scale(1.1);
}

/* Gallery responsive adjustments */
@media (max-width: 768px) {
    .xander-gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    .gallery-image-wrapper {
        height: 200px;
    }
    
    .xander-gallery-section {
        padding: 40px 0;
    }
    
    .xander-gallery-section .section-header h2 {
        font-size: 2rem;
    }
}

/* Loading Animation */
.xander-portfolio-loading {
    text-align: center;
    padding: 50px;
}

.xander-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: xander-spin 1s linear infinite;
}

@keyframes xander-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Archive Page */
.xander-archive-header {
    text-align: center;
    padding: 60px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    margin-bottom: 50px;
}

.xander-archive-title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.xander-archive-description {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Pagination */
.xander-portfolio-pagination {
    text-align: center;
    margin-top: 50px;
}

.xander-portfolio-pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.xander-portfolio-pagination .page-numbers:hover,
.xander-portfolio-pagination .page-numbers.current {
    background: #667eea;
    color: white;
}

/* Admin Styles */
.xander-admin-field {
    margin-bottom: 20px;
}

.xander-admin-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.xander-admin-field input,
.xander-admin-field textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.xander-gallery-admin {
    border: 2px dashed #ddd;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.xander-gallery-admin:hover {
    border-color: #667eea;
}
