/* ==========================================
   MBALYSH PORTFOLIO - MAIN STYLES (SPA VERSION)
   Дата: 22 ноября 2025
   Архитектура: Single Page Application
   ========================================== */

/* === БАЗОВЫЕ СБРОСЫ === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #fff;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === КОНТЕЙНЕР === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === MAIN LAYOUT === */
#app {
    min-height: 70vh;
    padding: 20px 0;
}

/* === FADE IN ANIMATION (для SPA переходов) === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

/* === PAGE TRANSITIONS === */
.page-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.4s ease-out;
}

.page-exit {
    opacity: 1;
}

.page-exit-active {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

/* === ЗАГОЛОВОК СТРАНИЦЫ === */
.page-title {
    padding: 60px 0 40px;
    text-align: center;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
    margin-bottom: 40px;
}

.page-title h2 {
    font-weight: 300;
    font-size: 32px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: #333;
}

.page-title p {
    font-size: 14px;
    color: #777;
    letter-spacing: 1px;
}

/* === HERO SECTION === */
.hero {
    padding: 40px 0;
    text-align: center;
}

.hero-image {
    width: 100%;
    max-width: 1000px;
    height: auto;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-radius: 4px;
}

/* === GALLERY GRID === */
.gallery-section {
    padding: 40px 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* === ARTWORK CARD === */
.artwork-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;
    background: #f9f9f9;
    transition: transform 0.3s ease;
}

.artwork-card:hover {
    transform: translateY(-5px);
}

.artwork-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    filter: grayscale(20%);
    transition: all 0.3s ease;
}

.artwork-card:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.artwork-info {
    padding: 20px;
    text-align: center;
}

.artwork-info h3 {
    font-weight: 400;
    font-size: 18px;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: #333;
}

.artwork-info .meta {
    font-size: 13px;
    color: #888;
}

/* === OVERLAY === */
.artwork-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.artwork-card:hover .artwork-overlay {
    opacity: 1;
}

.overlay-content {
    color: #fff;
    text-align: center;
}

.overlay-content h3 {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 15px;
    letter-spacing: 1px;
    color: #fff;
}

.overlay-content .size,
.overlay-content .year {
    font-size: 14px;
    margin-bottom: 8px;
    color: #ddd;
}

.overlay-content .description {
    font-size: 13px;
    color: #bbb;
    font-style: italic;
    margin-top: 10px;
}

/* === LOADING SPINNER === */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #333;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === ERROR MESSAGE === */
.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #d32f2f;
}

.error-message h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.error-message p {
    font-size: 16px;
    color: #666;
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 400;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .page-title h2 {
        font-size: 24px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .artwork-card img {
        height: 300px;
    }
    
    .hero {
        padding: 20px 0;
    }
}

@media (max-width: 480px) {
    .page-title {
        padding: 40px 0 30px;
    }
    
    .page-title h2 {
        font-size: 20px;
    }
    
    .artwork-card img {
        height: 250px;
    }
}

/* === UTILITY CLASSES === */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }

.pt-1 { padding-top: 10px; }
.pt-2 { padding-top: 20px; }
.pt-3 { padding-top: 30px; }
.pt-4 { padding-top: 40px; }

.pb-1 { padding-bottom: 10px; }
.pb-2 { padding-bottom: 20px; }
.pb-3 { padding-bottom: 30px; }
.pb-4 { padding-bottom: 40px; }
