/* competence.css - Стили для страницы компетенций */

/* Основные стили для страницы компетенций */
.competence-item {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--secondary);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.competence-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.competence-scan-wrapper {
    flex-shrink: 0;
}

.competence-scan-container {
    width: 280px;
    cursor: pointer;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid var(--border-light);
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow-md);
}

.competence-scan-container:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.competence-scan {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.competence-content {
    flex: 1;
    min-width: 0;
}

.competence-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.competence-description {
    line-height: 1.7;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.competence-description p {
    margin-bottom: 1rem;
}

.competence-description p:last-child {
    margin-bottom: 0;
}

.scan-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 1rem;
    text-align: center;
    opacity: 0;
    transition: var(--transition);
    transform: translateY(10px);
}

.competence-scan-container:hover .scan-hint {
    opacity: 1;
    transform: translateY(0);
}

/* Стили для модального окна с изображением компетенций */
.modal.competence-modal {
    background-color: rgba(15, 19, 31, 0.95);
    backdrop-filter: blur(10px);
}

.modal.competence-modal .modal-content {
    background: transparent;
    border: none;
    box-shadow: none;
    max-width: 95vw;
    max-height: 95vh;
    margin: 2% auto;
}

.modal.competence-modal .modal-header {
    background: var(--bg-card);
    border-bottom: 2px solid var(--border-light);
    padding: 1.5rem 2rem;
}

.modal.competence-modal .modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal.competence-modal .modal-body {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.modal-image {
    max-width: 90vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
}

/* Анимации для модального окна */
.modal.competence-modal {
    transition: opacity 0.3s ease;
    opacity: 0;
}

.modal.competence-modal.active {
    opacity: 1;
}

.modal.competence-modal .modal-content {
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.modal.competence-modal.active .modal-content {
    transform: scale(1);
}

/* Улучшенные тени и границы */
.competence-scan-container {
    border: 2px solid var(--border-light);
    box-shadow: var(--shadow-lg);
}

.competence-scan-container:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-xl);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .competence-item {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .competence-scan-container {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .competence-title {
        font-size: 1.375rem;
        text-align: center;
    }

    .modal-image {
        max-width: 95vw;
        max-height: 70vh;
    }

    .modal.competence-modal .modal-content {
        margin: 10% auto;
    }

    .modal.competence-modal .modal-header {
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .competence-item {
        padding: 1.25rem;
    }

    .competence-scan-container {
        max-width: 100%;
    }

    .competence-title {
        font-size: 1.25rem;
    }

    .modal.competence-modal .modal-content {
        margin: 5% auto;
        max-width: 98vw;
    }

    .modal.competence-modal .modal-body {
        padding: 0.5rem;
    }

    .modal.competence-modal .modal-header {
        padding: 1rem;
    }

    .modal.competence-modal .modal-header h3 {
        font-size: 1.1rem;
    }
}

/* Стили для светлой темы */
@media (prefers-color-scheme: light) {
    .modal.competence-modal {
        background-color: rgba(0, 0, 0, 0.8);
    }

    .modal.competence-modal .modal-header {
        background: var(--bg-primary);
    }

    .scan-hint {
        background: linear-gradient(transparent, rgba(0,0,0,0.7));
    }

    .competence-item {
        background: var(--bg-primary);
    }

    .competence-description {
        color: var(--text-primary);
    }
}

/* Улучшенные стили для сетки компетенций */
.competence-grid {
    display: grid;
    gap: 2rem;
}

.competence-grid .modern-card {
    padding: 0;
    overflow: hidden;
}

.competence-grid .modern-card::before {
    height: 4px;
    background: var(--gradient-secondary);
}

/* Анимации появления */
.fade-in {
    animation: fadeInUp 0.8s ease-out;
}

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