/* ===========================
   TECHNOLOGY SECTION STYLES
   Секция "Объясняем наглядно" на главной странице
   =========================== */

.technology-section {
    position: relative;
    padding: 80px 0;
    background-color: #F4F4F4;
}

.technology-section .container {
    position: relative;
}

/* ===== ЗАГОЛОВОК СЕКЦИИ ===== */

.technology-header {
    text-align: left;
    margin-bottom: 60px;
}

/* Верхний заголовок */
.technology-subtitle {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-button-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

/* Основной заголовок */
.technology-title {
    font-size: clamp(28px, 2.5vw, 48px);
    font-weight: 400;
    color: var(--color-heading);
    letter-spacing: -0.5px;
    text-transform: uppercase;
    margin: 0 0 25px 0;
    line-height: 1.1;
}

/* Описание под заголовком */
.technology-description {
    font-size: 24px;
    font-weight: 500;
    color: var(--color-heading);
    margin: 0;
}

/* ===== СЕТКА КАРТОЧЕК ===== */

.technology-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

/* ===== КАРТОЧКА ТЕХНОЛОГИИ ===== */

.technology-card {
    background-color: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.technology-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ===== ИЗОБРАЖЕНИЕ КАРТОЧКИ ===== */

.technology-card-image {
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.technology-card-image img {
    width: 250px;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.technology-card-image-overlay {
    /* position: absolute;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 -55px 55px rgba(255, 255, 255, 1); */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0) 50%,
            rgba(255, 255, 255, 0.7) 100%);
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.technology-card:hover .technology-card-image-overlay {
    opacity: 0;
}

.technology-card:hover .technology-card-image img {
    transform: scale(1.05);
}

/* Заглушка для изображения */
.technology-card-image-placeholder {
    width: 100%;
    height: 160px;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 14px;
}

.placeholder-text {
    text-align: center;
    font-style: italic;
}

/* ===== КОНТЕНТ КАРТОЧКИ ===== */

.technology-card-content {
    padding: 25px 30px;
}

.technology-card-title {
    font-size: 20px;
    font-weight: 500;
    color: var(--color-heading);
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.technology-card-description {
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-heading);
    margin: 0;
}

.technology-card-description p {
    margin-bottom: 12px;
}

.technology-card-description p:last-child {
    margin-bottom: 0;
}

/* ===== АДАПТИВНОСТЬ ===== */

/* Планшеты (до 1200px) */
@media (max-width: 1200px) {
    .technology-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .technology-header {
        margin-bottom: 50px;
    }
}

/* Средние планшеты (до 992px) */
@media (max-width: 992px) {
    .technology-section {
        padding: 60px 0;
    }

    .technology-header {
        margin-bottom: 40px;
    }

    .technology-title {
        font-size: clamp(28px, 5vw, 40px);
    }

    .technology-description {
        font-size: 16px;
    }
}

/* Планшеты (до 768px) */
@media (max-width: 768px) {
    .technology-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .technology-card-content {
        padding: 20px 15px;
    }

    .technology-card-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .technology-card-description {
        font-size: 13px;
    }

    .technology-subtitle {
        font-size: 13px;
    }

    .technology-description {
        font-size: 15px;
    }
}

/* Мобильные устройства (до 576px) */
@media (max-width: 576px) {
    .technology-section {
        padding: 50px 0;
    }

    .technology-header {
        margin-bottom: 35px;
    }

    .technology-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .technology-card-content {
        padding: 18px 15px;
    }

    .technology-card-title {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .technology-card-description {
        font-size: 13px;
        line-height: 1.5;
    }
}

/* Очень маленькие экраны (до 480px) */
@media (max-width: 480px) {
    .technology-section {
        padding: 40px 0;
    }

    .technology-header {
        margin-bottom: 30px;
    }

    .technology-subtitle {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .technology-title {
        font-size: clamp(24px, 6vw, 32px);
        margin-bottom: 20px;
    }

    .technology-description {
        font-size: 14px;
    }

    .technology-card-image {
        height: 140px;
    }

    .technology-card-content {
        padding: 15px 12px;
    }

    .technology-card-title {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .technology-card-description {
        font-size: 12px;
        line-height: 1.4;
    }
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ===== */

/* Анимация появления карточек */
.technology-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.technology-card:nth-child(1) {
    animation-delay: 0.1s;
}

.technology-card:nth-child(2) {
    animation-delay: 0.2s;
}

.technology-card:nth-child(3) {
    animation-delay: 0.3s;
}

.technology-card:nth-child(4) {
    animation-delay: 0.4s;
}

.technology-card:nth-child(5) {
    animation-delay: 0.5s;
}

.technology-card:nth-child(6) {
    animation-delay: 0.6s;
}

.technology-card:nth-child(7) {
    animation-delay: 0.7s;
}

.technology-card:nth-child(8) {
    animation-delay: 0.8s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Состояния для доступности */
.technology-card:focus-within {
    outline: 2px solid var(--color-button-primary);
    outline-offset: 2px;
}

/* Улучшенные стили для текста */
.technology-card-description strong {
    color: var(--color-button-primary);
    font-weight: 600;
}

.technology-card-description em {
    color: var(--color-button-secondary);
    font-style: normal;
    font-weight: 500;
}

/* Специальные стили для длинного текста */
.technology-card-description {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

.technology-card-image img {
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.technology-card-image img.loaded {
    opacity: 1;
}

/* Стили для высокого контраста */
@media (prefers-contrast: high) {
    .technology-card {
        border: 2px solid #000;
    }

    .technology-subtitle {
        color: #000;
    }

    .technology-title,
    .technology-description,
    .technology-card-title,
    .technology-card-description {
        color: #000;
    }

    .technology-card:hover {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    }
}

/* Уменьшенная анимация для пользователей с чувствительностью к движению */
@media (prefers-reduced-motion: reduce) {

    .technology-card,
    .technology-card-image img {
        animation: none;
        transition: none;
    }

    .technology-card:hover {
        transform: none;
    }

    .technology-card:hover .technology-card-image img {
        transform: none;
    }
}