/* =========================================
   1. HERO BLOCK (Заголовок з паралаксом)
   ========================================= */
.hero-container {
    position: relative;
    height: 450px;
    overflow: hidden;
    background-color: #f0f0f0;
    margin-bottom: 3rem; /* mb-5 */
}

.parallax-img {
    width: 100%;
    height: 120%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 1s ease-in-out, transform 1s ease-out;
    will-change: transform, opacity;
    position: absolute;
    top: -10%;
    left: 0;
    z-index: 1;
}

.parallax-img.loaded {
    opacity: 1;
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 15px;
}

.hero-title {
    text-shadow: 0 4px 15px rgba(0,0,0,0.6);
    letter-spacing: 1px;
    /* 1. Каже браузеру підготуватись до змін */
    will-change: transform, opacity;

    /* 2. Прибирає розмиття тексту при русі (іноді буває в Chrome) */
    -webkit-font-smoothing: antialiased;

    /* 3. Примусово вмикає апаратне прискорення (GPU) */
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

/* =========================================
   2. PHOTO CARDS (Фото в тексті)
   ========================================= */
.photo-wrapper {
    position: relative;
    z-index: 1;
    transition: z-index 0s linear 0.1s; /* Щоб z-index не мінявся занадто швидко при втраті фокусу */
}

.photo-card {
    background-color: #fff;
    padding: 12px;
    border-radius: 2px;
    
    /* Початковий стан: прозора */
    opacity: 0;
    
    /* Тінь "левітації" */
    box-shadow: 
        0 15px 35px rgba(50, 50, 93, 0.15), 
        0 5px 15px rgba(0, 0, 0, 0.1);
    
    /* Анімація */
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 1s ease-in-out;
    will-change: opacity, transform;
}

/* Клас додається JS-ом після завантаження */
.photo-card.loaded {
    opacity: 1;
}

/* Повороти */
.rotate-left .photo-card {
    transform: rotate(-2deg);
}

.rotate-right .photo-card {
    transform: rotate(2deg);
}

/* Ефект при наведенні (Hover) */
.photo-wrapper:hover {
    z-index: 10;
}

.photo-wrapper:hover .photo-card {
    transform: scale(1.03) rotate(0deg);
    box-shadow: 
        0 30px 60px rgba(50, 50, 93, 0.25), 
        0 18px 36px rgba(0, 0, 0, 0.15);
}