/* ======================================================================= */
/* ФАЙЛ: index.css (Стили для главной страницы)                           */
/* ======================================================================= */

/* Стили для слайд-шоу на главной странице */
.hero-slideshow-section {
    display: flex;
    width: 100%;
    height: 60vh; /* Занимает всю высоту видимой части экрана */
    overflow: hidden;
    max-width: 1300px; /*calc(100vw - 4rem);*/
    margin: 0 auto;
    padding-top: 120px; /* Отступ сверху, равный высоте шапки */
    box-sizing: border-box; /* Учитываем padding в общей высоте */
}

/* The container for the text content on the left */
.hero-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    background-color: var(--primary-bg-color);
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 2rem;
    max-width: 800px; /* Ограничиваем ширину для лучшей читаемости */
}

.hero-contact-link-container {
    margin-top: 2.5rem; /* Space above the button */
}

.hero-contact-link.btn {
    font-size: 1.5rem;
    font-weight: 700;
    background-color: transparent;
    color: var(--primary-text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
    text-decoration: underline;
    padding: 0;
    border-radius: 0;
}

.hero-contact-link.btn:hover {
    transform: translateY(-4px);
    color: var(--accent-color);
    background-color: transparent;
}

/* Styling for the loading indicator */
.loading-indicator {
    border: 4px solid #f3f3f3; /* Light grey */
    border-top: 4px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
}

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

/* Styles for the section headers in infinite scroll */
.infinite-scroll-section-header {
    margin-top: 4rem; /* Adds space above the new section */
    margin-bottom: 1rem;
    text-align: center;
    font-size: 2.5rem; /* Large font for the title */
    font-weight: 700;
}

.infinite-scroll-section-header a {
    text-decoration: none;
    color: var(--primary-text-color);
    transition: color 0.3s ease;
}

.infinite-scroll-section-header a:hover {
    color: var(--accent-color);
}


/* The container for the new slideshow on the right */
.hero-slideshow-container {
    max-height: 600px;
    width: 50%;
    position: relative; 
    aspect-ratio: 16 / 9; /* Сохраняем пропорции */
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}



/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .hero-slideshow-section {
        flex-direction: column;
        height: auto;
    }

    .hero-slideshow-container {
        width: 100%;
        height: 300px; /* Фиксированная высота для мобильных */
    }

    .hero-contact-link.btn {
        font-size: 1.2rem;
        padding: 0;
    }

    .hero-content {
        width: 100%;
        height: auto;
        padding: 2rem 1rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }
}

/* Стили для подгруженных секций */
.lazy-loaded-section {
    padding-top: 2rem;
    padding-bottom: 0rem;
    border-top: 1px solid var(--border-color);
}

/* Триггер и индикатор загрузки */
#scroll-trigger {
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#scroll-trigger.loading::after {
    content: '';
    width: 50px;
    height: 50px;
    border: 5px solid var(--text-secondary-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
