/* portfolio.css - Единый размер фото 560x747 (3:4) КАК В ПРИМЕРЕ hokkeynaya-akademiya-spartak.html */

.horizontal-track {
    display: flex;
    flex-wrap: nowrap;
    width: fit-content;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Фото одинакового размера 560x747 (3:4) - НЕ на весь экран! */
.photo-wrapper {
    width: 560px !important;
    height: 747px !important;
    max-width: 560px !important;
    max-height: 747px !important;
    aspect-ratio: 3 / 4 !important;
    margin: 0 auto !important;
    border-radius: 24px !important;
    box-shadow: 0 25px 40px rgba(0, 0, 0, 0.25) !important;
    overflow: hidden !important;
    position: relative;
}

.photo-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 24px !important;
    display: block;
}

.horizontal-section {
    position: relative;
    background: transparent;
}

/* На ПК - горизонтальный скролл, фото фиксированного размера */
@media (min-width: 1025px) {
    .horizontal-section {
        position: relative;
        height: 100vh !important;
        overflow: visible !important;
    }
    .horizontal-track {
        display: flex;
        flex-wrap: nowrap;
        width: fit-content;
        gap: 6.9rem !important;
        padding: 0 10vw !important;
        align-items: center;
        height: 100vh;
    }
    .project-card {
        width: auto !important;
        height: auto !important;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }
    /* Текст правее и ниже, увеличен на 30% - КАК В ПРИМЕРЕ */
    .project-info {
        position: absolute !important;
        bottom: 100px !important;
        right: -50px !important;
        left: auto !important;
        top: auto !important;
        background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 100%) !important;
        backdrop-filter: blur(8px) !important;
        border-radius: 16px !important;
        padding: 0.6rem 1.2rem !important;
        max-width: 70% !important;
        text-align: right !important;
        pointer-events: none;
        border: none !important;
        transform: scale(1.3) !important;
        transform-origin: bottom right !important;
    }
    .project-info h2 {
        font-size: 1rem !important;
        margin: 0 !important;
        color: white !important;
        font-weight: 600;
    }
    .project-info .project-category-tag {
        display: inline-block;
        background: rgba(44,82,130,0.9);
        color: white;
        font-size: 0.65rem;
        padding: 3px 12px;
        border-radius: 30px;
        margin-bottom: 6px;
        letter-spacing: 1px;
    }
    .btn-details {
        display: none !important;
    }
    .progress-bar {
        display: block !important;
        right: 30px;
        bottom: 30px;
    }
}

/* На мобильных (до 768px) - вертикальный скролл, но фото тоже уменьшенные */
@media (max-width: 768px) {
    .photo-wrapper {
        width: 85vw !important;
        height: auto !important;
        max-width: 85vw !important;
        aspect-ratio: 3 / 4 !important;
        margin: 0 auto !important;
    }
    .horizontal-track {
        flex-direction: column !important;
        gap: 2.5rem !important;
        padding: 1rem !important;
        transform: none !important;
        width: 100% !important;
    }
    .project-card {
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        position: relative;
        margin-bottom: 1rem;
    }
    .project-info {
        position: absolute !important;
        bottom: 15px !important;
        right: 15px !important;
        left: auto !important;
        background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 100%) !important;
        border-radius: 14px !important;
        padding: 0.5rem 1rem !important;
        text-align: right !important;
        max-width: 70% !important;
        backdrop-filter: blur(8px) !important;
    }
    .project-info h2 {
        font-size: 0.9rem !important;
        margin: 0 !important;
        color: white !important;
    }
    .project-info .project-category-tag {
        font-size: 0.5rem !important;
        padding: 2px 10px !important;
        margin-bottom: 4px;
    }
    .btn-details {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.3rem !important;
        background: rgba(255,255,250,0.95);
        border-radius: 50%;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        margin-top: 6px;
    }
    .pin-spacer {
        display: none !important;
    }
    .horizontal-section {
        height: auto !important;
        overflow: visible !important;
    }
    .progress-bar {
        display: none !important;
    }
}

/* Планшеты (769px - 1024px) - тоже вертикально, фото уменьшенные */
@media (min-width: 769px) and (max-width: 1024px) {
    .photo-wrapper {
        width: 450px !important;
        height: 600px !important;
        max-width: 450px !important;
        max-height: 600px !important;
        margin: 0 auto !important;
    }
    .horizontal-section {
        height: auto !important;
        overflow: visible !important;
    }
    .horizontal-track {
        flex-direction: column !important;
        gap: 2.5rem !important;
        padding: 1rem !important;
        transform: none !important;
        width: 100% !important;
    }
    .project-card {
        width: 100% !important;
        height: auto !important;
        position: relative;
    }
    .project-info {
        position: absolute !important;
        bottom: 20px !important;
        right: 20px !important;
        left: auto !important;
        background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 100%) !important;
        border-radius: 14px !important;
        padding: 0.5rem 1rem !important;
        max-width: 65% !important;
    }
    .project-info h2 {
        font-size: 0.9rem !important;
    }
    .btn-details {
        display: inline-flex !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 1.4rem !important;
    }
    .progress-bar {
        display: none !important;
    }
}

/* Общие стили для кнопок */
.btn-details {
    background: rgba(255, 255, 250, 0.95);
    border: 1px solid #fff;
    color: #2c5282;
    font-size: 1.6rem;
    cursor: pointer;
    pointer-events: auto;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 400;
    margin-top: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: 0.2s;
}

.btn-details:hover {
    background: #2c5282;
    color: white;
    transform: scale(1.05);
}

.progress-bar {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
    z-index: 110;
    font-family: monospace;
    letter-spacing: 1px;
    pointer-events: none;
}

.load-more-container {
    text-align: center;
    margin: 3rem 0 2rem;
}

.btn-load-more {
    background: #2c5282;
    border: none;
    color: white;
    padding: 16px 48px;
    border-radius: 60px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s;
    box-shadow: 0 6px 20px rgba(44, 82, 130, 0.35);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
}

.btn-load-more:hover {
    background: #1e3a5f;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(44, 82, 130, 0.45);
}

.btn-load-more:active {
    transform: translateY(0);
}

.all-works-container {
    text-align: center;
    margin: 1rem 0 3rem;
}

.btn-all-works {
    background: transparent;
    border: 2px solid #2c5282;
    color: #2c5282;
    padding: 14px 38px;
    border-radius: 60px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s;
    font-family: 'Inter', sans-serif;
    backdrop-filter: blur(4px);
}

.btn-all-works:hover {
    background: #2c5282;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(44, 82, 130, 0.3);
}

.btn-all-works-large {
    font-size: 1.8rem !important;
    padding: 1.2rem 3rem !important;
    border-radius: 80px !important;
    background: linear-gradient(135deg, #2c5282, #1e3a5f) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 12px 24px rgba(0,0,0,0.25) !important;
    transition: all 0.3s ease !important;
    letter-spacing: 1px;
}

.btn-all-works-large:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 20px 30px rgba(44,82,130,0.4) !important;
    background: linear-gradient(135deg, #1e3a5f, #0f2b3d) !important;
}

.works-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

.work-item {
    padding: 12px 18px;
    background: rgba(44, 82, 130, 0.08);
    border-radius: 60px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1e3a5f;
}

.work-item:hover {
    background: rgba(44, 82, 130, 0.2);
    transform: translateX(6px);
}

.all-works-modal {
    max-width: 600px;
}

.pin-spacer {
    transition: none !important;
}

/* Отключаем hover-эффекты на фото на всех устройствах (как в примере) */
.photo-wrapper:hover {
    transform: none !important;
}