/* Portfolio Grid Styles - v2 */
/* Uses variables from styles.css for consistency */

/* Portfolio Grid Container */
.portfolio-container {
    /* Full width! */
    /* max-width: var(--max-width, 1400px); */
    margin: 0 auto;
    padding: 40px 40px; /* Больше padding с боков */
}

.portfolio-header {
    text-align: center;
    margin-bottom: 48px;
}

.portfolio-header h1 {
    font-family: var(--font-primary);
    font-size: 36px;
    font-weight: 300;
    letter-spacing: 2px;
    color: var(--color-dark);
    margin-bottom: 16px;
}

.portfolio-header p {
    font-size: 14px;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Filter Bar */
.portfolio-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-group label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-light);
    font-weight: 500;
}

.filter-group select {
    padding: 8px 15px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: var(--font-primary);
    font-size: 13px;
    background: white;
    cursor: pointer;
    min-width: 140px;
    transition: all 0.2s ease;
}

.filter-group select:hover {
    border-color: var(--color-accent);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(64, 190, 193, 0.1);
}

/* Grid Layout */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

/* Portfolio Card */
.portfolio-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

/* Image Container */
.portfolio-image-wrapper {
    position: relative;
    padding-bottom: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    background: #f0f0f0;
}

.portfolio-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card:hover .portfolio-image-wrapper img {
    transform: scale(1.08);
}

/* Badges */
.portfolio-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    z-index: 2;
}

.badge {
    background: white;
    padding: 6px 10px;
    border-radius: 4px; /* Такой же как у типов внизу */
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.badge-video { color: #ff6600; } /* Оранжевый */
.badge-instagram { color: #ff6600; } /* Оранжевый */
.badge-timelapse { color: #ff6600; } /* Оранжевый */

/* Убираем Featured Badge - будем просто ставить первыми в сетке */
/* .featured-badge { display: none; } */

/* Featured Badge */
.featured-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, var(--color-accent), #35a5a8);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(64, 190, 193, 0.3);
}

/* Overlay - показываем только при hover */
.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: white;
}

/* Desktop hover effect */
@media (min-width: 769px) {
    .portfolio-card:hover .portfolio-overlay {
        opacity: 1;
    }
}

/* Quick View button */
.btn-quick-view {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--color-accent);
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-quick-view:hover {
    background: #50ced1;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(64, 190, 193, 0.3);
}

.btn-quick-view svg {
    width: 20px;
    height: 20px;
}

/* Hide overlay on mobile */
@media (max-width: 768px) {
    .portfolio-overlay {
        display: none;
    }
}

.portfolio-quick-info {
    text-align: center;
}

.portfolio-quick-info h3 {
    font-size: 22px;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.portfolio-quick-info p {
    font-size: 14px;
    opacity: 0.95;
    margin-bottom: 8px;
}

.overlay-meta {
    font-size: 13px !important;
    opacity: 1 !important;
    font-weight: 500;
}

.watch-model {
    font-size: 12px;
    color: #A0E7E8; /* Светлый тиффани для overlay */
    margin-top: 8px;
    font-weight: 500;
    opacity: 1;
}

.btn-view-details {
    margin-top: 12px;
    background: var(--color-accent);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.2s ease;
    text-align: center;
    letter-spacing: 0.5px;
}

.btn-view-details:hover {
    background: #35a5a8;
    transform: translateX(2px);
}

/* Card Info Section */
.portfolio-info {
    padding: 20px;
    background: white;
}

.portfolio-info h4 {
    font-size: 16px;
    color: var(--color-dark);
    margin-bottom: 12px;
    font-weight: 500;
}

.portfolio-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

/* Tags for style and theme */
.portfolio-tags {
    display: flex;
    gap: 6px;
}

.tag {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
}

.tag-style {
    background: #f0f8f8;
    color: var(--color-accent);
}

.tag-theme {
    background: #f5f5f5;
    color: #666;
}

.portfolio-type {
    font-size: 11px;
    color: white !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    background: #40bec1 !important; /* Прямой тиффани цвет */
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block; /* Чтобы точно показывался */
}

/* Watch model in card */
.portfolio-watch {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
    margin-bottom: 0;
}

.portfolio-location {
    font-size: 11px;
    color: #999;
}

/* Loading & Empty States */
.portfolio-loading,
.portfolio-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--color-text-light);
}

.portfolio-loading {
    font-size: 14px;
}

.portfolio-empty {
    font-size: 16px;
}

.portfolio-empty p {
    margin-bottom: 20px;
}

.btn-reset-filters {
    background: var(--color-accent);
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-primary);
}

.btn-reset-filters:hover {
    background: #35a5a8;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .portfolio-container {
        padding: 24px 16px;
    }
    
    .portfolio-header h1 {
        font-size: 28px;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .portfolio-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .filter-group {
        flex-direction: column;
        gap: 6px;
    }
    
    .filter-group select {
        width: 100%;
    }
    
    /* Touch-friendly hover state на мобильных */
    .portfolio-card:active {
        transform: scale(0.98);
    }
    
    /* Показываем overlay по клику на мобильных */
    .portfolio-card.active .portfolio-overlay {
        opacity: 1;
    }
}

/* Animation для появления карточек */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-card {
    animation: fadeInUp 0.5s ease both;
}

.portfolio-card:nth-child(1) { animation-delay: 0s; }
.portfolio-card:nth-child(2) { animation-delay: 0.05s; }
.portfolio-card:nth-child(3) { animation-delay: 0.1s; }
.portfolio-card:nth-child(4) { animation-delay: 0.15s; }
.portfolio-card:nth-child(5) { animation-delay: 0.2s; }
.portfolio-card:nth-child(6) { animation-delay: 0.25s; }