/* CSS/styles.css */

/* (Стили шапки находятся в header.css, здесь только общие) */

:root {
    --primary-color: #ff8c42;        /* мягкий оранжевый */
    --secondary-color: #7b61ff;      /* фиолетово-синий */
    --accent-color: #ffd342;         /* акцентный жёлтый */
    --text-color: #1e293b;
    --bg-color: #f9fafc;
    --card-bg: #ffffff;
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    --header-text: #ffffff;
    --header-text-scrolled: #1f2937;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden; /* Чтобы избежать гориз. прокрутки от анимаций */
}

/* --- BANNER SECTION --- */
.banner {
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, rgba(255, 140, 66, 0.7), rgba(123, 97, 255, 0.7)), url('../img/photo.png') center/cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0 20px;
}

.banner-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    height: 100%;
    gap: 30px;
    padding: 0 20px;
}

.banner-logo {
    max-width: 200px;
    width: 100%;
    height: auto;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

/* --- INFO BANNER --- */
.info-banner {
    width: 95%;
    max-width: 1400px; 
    background: linear-gradient(135deg, rgba(255, 140, 66, 0.8), rgba(123, 97, 255, 0.8)), url('../img/photo2.png') center/cover no-repeat;
    border-radius: 20px;
    color: white;
    text-align: center;
    padding: 70px 20px;
    margin-top: 80px;
    box-shadow: var(--shadow);
}

.text-banner-inf {
    font-size: 36px;
}

.info-banner-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.info-btn {
    background: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.info-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.info-btn.active {
    background: var(--accent-color);
    color: var(--text-color);
}

.info-content {
    margin-top: 20px;
}

.info-item {
    display: none;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
}

.info-item.active {
    display: block;
    opacity: 1;
}

.info-item h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.info-item p {
    font-size: 16px;
    line-height: 1.6;
}

/* --- GENERAL CONTAINER & CARDS --- */
.container {
    max-width: 1400px;
    width: 90%;
    margin: 60px auto;
    padding: 40px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    text-align: center;
}

h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 36px;
    font-weight: 600;
}

p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.card h3 {
    color: var(--text-color);
    font-size: 20px;
    margin-bottom: 15px;
}

.register-btn {
    display: inline-block;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 14px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    margin: 20px 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.register-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.about-grid, .why-choose-us-grid, .programs-grid, .reviews-grid, .team-grid, .partners-grid, .faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

.team-image,
.partner-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 15px;
}

.team-image {
    height: 250px;
    border-radius: 50%;
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
}

/* --- CTA SECTION --- */
.cta-section {
    background: linear-gradient(135deg, rgba(255, 140, 66, 0.8), rgba(123, 97, 255, 0.8)), url('../img/photo.png') center/cover no-repeat;
    width: 95%;
    max-width: 1400px; 
    border-radius: 20px;
    color: white;
    text-align: center;
    padding: 70px 20px;
    margin-top: 80px;
    box-shadow: var(--shadow);
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cta-content h2 {
    color: white;
    font-size: 40px;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.cta-content p {
    font-size: 18px;
    line-height: 1.6;
}

/* --- ANIMATIONS --- */
.section-hidden {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section-hidden.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

/* --- SCROLL TO TOP --- */
.scroll-to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: var(--header-text);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    opacity: 0.9;
}


/* =========================================================================
   СТИЛИ ДЛЯ РАЗВОРАЧИВАЮЩИХСЯ ПАНЕЛЕЙ (EXPANDING CARDS) - FIXED TOP ALIGN
   ========================================================================= */

.automation-section-expanding {
    padding: 50px 20px;
    background: transparent;
    overflow: hidden;
}

.expanding-title {
    text-align: center;
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.expanding-desc {
    text-align: center;
    color: #64748b;
    margin-bottom: 30px;
    font-size: 15px;
}

.expanding-cards-wrapper {
    display: flex;
    width: 100%;
    max-width: 1200px;
    height: 280px; /* Компактная высота */
    margin: 0 auto;
    gap: 15px;
}

.expand-card {
    position: relative;
    flex: 0.6;
    background: #f1f5f9; /* Серый фон для неактивных */
    border-radius: 20px;
    cursor: pointer;
    overflow: hidden;
    transition: flex 0.5s cubic-bezier(0.25, 1, 0.5, 1), background 0.3s ease, transform 0.3s ease;
    border: 2px solid transparent; 
    box-shadow: inset 0 0 20px rgba(0,0,0,0.03); 
}

/* Стили для АКТИВНОЙ карты */
.expand-card:hover,
.expand-card.active {
    flex: 4; /* Раскрытие */
    background: #ffffff;
    border-color: var(--secondary-color); /* Цветная рамка */
    box-shadow: 0 15px 40px rgba(123, 97, 255, 0.2); 
    transform: translateY(-5px); 
}

/* Успешная карта */
.expand-card.success-card:hover {
    border-color: #10b981;
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.2);
}

/* Фоновая иконка (Остается внизу для красоты) */
.card-bg-icon {
    position: absolute;
    bottom: -15px;
    right: -15px;
    font-size: 100px;
    color: rgba(123, 97, 255, 0.08); 
    transition: all 0.5s ease;
    pointer-events: none;
}

.expand-card:hover .card-bg-icon {
    color: rgba(123, 97, 255, 0.15); 
    transform: rotate(-15deg) scale(1.1);
    right: 10px; 
}

/* --- ОСНОВНОЕ ИЗМЕНЕНИЕ ЗДЕСЬ --- */
.card-content {
    position: absolute;
    /* Теперь контент начинается СВЕРХУ, а не снизу */
    top: 30px; 
    left: 25px;
    right: 25px;
    bottom: auto; /* Отключаем привязку к низу */
    
    opacity: 0;
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
    transform: translateY(10px);
}
/* -------------------------------- */

.expand-card:hover .card-content,
.expand-card.active .card-content {
    opacity: 1;
    transform: translateY(0);
}

.card-icon-small {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    color: var(--secondary-color);
    margin-bottom: 12px; /* Чуть больше отступ */
    font-weight: bold;
}

.step-num {
    background: var(--primary-color);
    color: white;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
}

.card-content h3 {
    font-size: 22px;
    margin-bottom: 8px;
    color: var(--text-color);
    white-space: nowrap;
    font-weight: 700;
}

.card-content p {
    font-size: 14px; 
    line-height: 1.5;
    color: #556987;
    max-width: 90%; /* Ограничиваем ширину текста */
}

/* Точки в свернутом состоянии */
.expand-card:not(:hover):not(.active)::after {
    content: '●'; 
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    color: #cbd5e1;
}

/* Адаптивность */
@media (max-width: 900px) {
    .expanding-cards-wrapper {
        flex-direction: column;
        height: auto;
        gap: 10px;
    }

    .expand-card {
        height: 60px; 
        flex: none;
        width: 100%;
        background: #fff; 
        border: 1px solid #e2e8f0;
    }

    .expand-card:hover,
    .expand-card.active {
        flex: none;
        height: 220px; 
        border-color: var(--secondary-color);
    }
    
    /* На мобильных тоже прижимаем к верху, но чуть меньше отступ */
    .card-content {
        top: 20px;
        left: 20px;
    }
    
    .card-bg-icon {
        font-size: 80px;
        top: auto;
        bottom: -10px;
        right: 10px;
    }
    
    .expand-card:not(:hover):not(.active)::after {
        content: '↓'; 
        bottom: 15px;
    }
}

