/* Carousel styles */
.carousel {
    height: 400px;
    margin-bottom: 60px;
    margin-top: -20px;
}

.carousel-caption {
    z-index: 10;
}

.carousel .item {
    height: 400px;
    background-color: #777;
}

.carousel-inner > .item > img {
    min-height: 100%;
    min-width: 100%;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    display: block;
    position: relative;
    opacity: 0.6;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Marketing content */
.marketing .col-lg-4 {
    margin-bottom: 20px;
    text-align: center;
}

.marketing h2 {
    font-weight: normal;
}

.marketing .col-lg-4 p {
    margin-right: 10px;
    margin-left: 10px;
}

/* Featurettes */
.featurette-heading {
    font-weight: 300;
    line-height: 1;
    letter-spacing: -1px;
}

/* Responsive */
@media (min-width: 768px) {
    .carousel-caption p {
        margin-bottom: 20px;
        font-size: 21px;
        line-height: 1.4;
    }

    .featurette-heading {
        font-size: 50px;
    }
}

@media (min-width: 992px) {
    .featurette-heading {
        margin-top: 120px;
    }
}

/* ============================================
   Плавная прокрутка для якорных ссылок
   ============================================ */

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* Отступ для якорных ссылок с учетом фиксированной навигации */
section[id] {
    scroll-margin-top: 70px;
}

/* ============================================
   Главная страница - Обертка
   ============================================ */

.index-wrapper {
    max-width: 100%;
}

/* ============================================
   Главная страница - Hero секция
   ============================================ */

.index-hero {
    position: relative;
    padding: 60px 20px 50px;
    margin: 0 -15px 50px;
    margin-top: -15px;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    overflow: hidden;
    min-height: 400px;
    text-align: center;
}

@supports (display: flex) {
    .index-hero {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
    }
}

.index-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.index-hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%);
}

.index-hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(24, 165, 92, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(24, 165, 92, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(24, 165, 92, 0.04) 0%, transparent 70%);
    background-size: 100% 100%;
    animation: heroPatternMove 20s ease-in-out infinite;
}

@keyframes heroPatternMove {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-2%, -2%) scale(1.05);
    }
}

.index-hero .container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
}

.index-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    animation: heroContentFadeIn 0.8s ease-out;
}

@keyframes heroContentFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.index-hero-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--color-text);
    margin: 0 0 16px;
    letter-spacing: -1px;
    animation: heroTitleFadeIn 0.8s ease-out 0.3s both;
}

@keyframes heroTitleFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.index-hero-title-line {
    display: block;
}

.index-hero-title-accent {
    position: relative;
}

@supports (-webkit-background-clip: text) {
    .index-hero-title-accent {
        background: linear-gradient(120deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

@supports not (-webkit-background-clip: text) {
    .index-hero-title-accent {
        color: var(--color-primary);
    }
}

.index-hero-subtitle {
    font-size: 20px;
    font-weight: 400;
    color: var(--color-text-muted);
    margin: 0 auto 0;
    line-height: 1.6;
    max-width: 700px;
    animation: heroSubtitleFadeIn 0.8s ease-out 0.4s both;
}

@keyframes heroSubtitleFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Главная страница - Категории
   ============================================ */

.index-categories-section {
    margin-bottom: 35px;
}

.index-categories-header {
    text-align: center;
    margin-bottom: 25px;
}

.index-categories-title {
    font-size: 28px;
    font-weight: 400;
    color: var(--color-text);
    margin: 0;
    line-height: 1.3;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.index-categories-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
}

.index-categories {
    margin-top: 0;
    margin-bottom: 0;
}

/* ============================================
   Главная страница - О компании
   ============================================ */

.index-about {
    margin-top: 40px;
    margin-bottom: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border-light);
}

.index-about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.index-about-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text-muted);
    margin: 0;
}

/* ============================================
   Адаптивность
   ============================================ */

@media (max-width: 767px) {
    .index-hero {
        padding: 40px 15px 40px;
        margin: 0 -15px 30px;
        margin-top: -15px;
        border-radius: 0;
        min-height: 350px;
    }
    
    .index-hero-title {
        font-size: 32px;
        margin-bottom: 12px;
        letter-spacing: -0.5px;
    }
    
    .index-hero-subtitle {
        font-size: 16px;
        margin-bottom: 0;
        line-height: 1.5;
    }
    
    .index-categories-section {
        margin-bottom: 25px;
    }
    
    .index-categories-header {
        margin-bottom: 20px;
    }
    
    .index-categories-title {
        font-size: 22px;
        padding-bottom: 12px;
    }
    
    .index-categories-title::after {
        width: 50px;
        height: 2px;
    }
    
    .index-about {
        margin-top: 30px;
        margin-bottom: 25px;
        padding-top: 25px;
    }
    
    .index-about-text {
        font-size: 14px;
        line-height: 1.6;
    }
}

@media (min-width: 768px) {
    .index-hero {
        margin: 0 -25px 40px;
        margin-top: -25px;
        padding: 50px 25px 40px;
        min-height: 380px;
    }
    
    .index-hero-title {
        font-size: 44px;
    }
    
    .index-hero-subtitle {
        font-size: 19px;
    }
    
    .index-categories-title {
        font-size: 26px;
    }
    
    .index-about-text {
        font-size: 15px;
    }
}

@media (min-width: 992px) {
    .index-hero {
        padding: 60px 30px 50px;
        margin: 0 -25px 50px;
        margin-top: -25px;
        min-height: 400px;
    }
    
    .index-hero-title {
        font-size: 56px;
    }
    
    .index-hero-subtitle {
        font-size: 22px;
    }
    
    .index-categories-section {
        margin-bottom: 40px;
    }
    
    .index-categories-header {
        margin-bottom: 28px;
    }
    
    .index-categories-title {
        font-size: 30px;
    }
    
    .index-about {
        margin-top: 45px;
        margin-bottom: 35px;
        padding-top: 35px;
    }
    
    .index-about-text {
        font-size: 16px;
    }
}